github.com/lazyboychen7/engine@v17.12.1-ce-rc2+incompatible/api/types/swarm/secret.go (about)

     1  package 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  
    19  // SecretReferenceFileTarget is a file target in a secret reference
    20  type SecretReferenceFileTarget struct {
    21  	Name string
    22  	UID  string
    23  	GID  string
    24  	Mode os.FileMode
    25  }
    26  
    27  // SecretReference is a reference to a secret in swarm
    28  type SecretReference struct {
    29  	File       *SecretReferenceFileTarget
    30  	SecretID   string
    31  	SecretName string
    32  }