secret.go 637 B

123456789101112131415161718192021222324252627282930313233
  1. package swarm
  2. import "os"
  3. // Secret represents a secret.
  4. type Secret struct {
  5. ID string
  6. Meta
  7. Spec SecretSpec
  8. Digest string
  9. SecretSize int64
  10. }
  11. // SecretSpec represents a secret specification from a secret in swarm
  12. type SecretSpec struct {
  13. Annotations
  14. Data []byte `json:",omitempty"`
  15. }
  16. // SecretReferenceFileTarget is a file target in a secret reference
  17. type SecretReferenceFileTarget struct {
  18. Name string
  19. UID string
  20. GID string
  21. Mode os.FileMode
  22. }
  23. // SecretReference is a reference to a secret in swarm
  24. type SecretReference struct {
  25. SecretID string
  26. SecretName string
  27. Target *SecretReferenceFileTarget
  28. }