secret.go 594 B

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