github.com/docker/docker@v299999999.0.0-20200612211812-aaf470eca7b5+incompatible/api/types/swarm/secret.go (about)

     1  package swarm // import "github.com/docker/docker/api/types/swarm"
     2  
     3  import "os"
     4  
     5  // Secret represents a secret.
     6  type Secret struct {
     7  	ID string
     8  	Meta
     9  	Spec SecretSpec
    10  }
    11  
    12  // SecretSpec represents a secret specification from a secret in swarm
    13  type SecretSpec struct {
    14  	Annotations
    15  	Data   []byte  `json:",omitempty"`
    16  	Driver *Driver `json:",omitempty"` // name of the secrets driver used to fetch the secret's value from an external secret store
    17  
    18  	// Templating controls whether and how to evaluate the secret payload as
    19  	// a template. If it is not set, no templating is used.
    20  	Templating *Driver `json:",omitempty"`
    21  }
    22  
    23  // SecretReferenceFileTarget is a file target in a secret reference
    24  type SecretReferenceFileTarget struct {
    25  	Name string
    26  	UID  string
    27  	GID  string
    28  	Mode os.FileMode
    29  }
    30  
    31  // SecretReference is a reference to a secret in swarm
    32  type SecretReference struct {
    33  	File       *SecretReferenceFileTarget
    34  	SecretID   string
    35  	SecretName string
    36  }