2018-03-06 10:41:43 -05:00
|
|
|
package swarm // import "github.com/docker/docker/api/types/swarm"
|
2018-03-06 10:32:47 -05:00
|
|
|
|
|
|
|
import "os"
|
|
|
|
|
|
|
|
// Secret represents a secret.
|
|
|
|
type Secret struct {
|
|
|
|
ID string
|
|
|
|
Meta
|
|
|
|
Spec SecretSpec
|
|
|
|
}
|
|
|
|
|
|
|
|
// SecretSpec represents a secret specification from a secret in swarm
|
|
|
|
type SecretSpec struct {
|
|
|
|
Annotations
|
|
|
|
Data []byte `json:",omitempty"`
|
|
|
|
Driver *Driver `json:",omitempty"` // name of the secrets driver used to fetch the secret's value from an external secret store
|
2018-03-06 10:41:43 -05:00
|
|
|
|
|
|
|
// Templating controls whether and how to evaluate the secret payload as
|
|
|
|
// a template. If it is not set, no templating is used.
|
|
|
|
Templating *Driver `json:",omitempty"`
|
2018-03-06 10:32:47 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
// SecretReferenceFileTarget is a file target in a secret reference
|
|
|
|
type SecretReferenceFileTarget struct {
|
|
|
|
Name string
|
|
|
|
UID string
|
|
|
|
GID string
|
|
|
|
Mode os.FileMode
|
|
|
|
}
|
|
|
|
|
|
|
|
// SecretReference is a reference to a secret in swarm
|
|
|
|
type SecretReference struct {
|
|
|
|
File *SecretReferenceFileTarget
|
|
|
|
SecretID string
|
|
|
|
SecretName string
|
|
|
|
}
|