common.go 688 B

123456789101112131415161718192021222324252627
  1. package swarm
  2. import "time"
  3. // Version represents the internal object version.
  4. type Version struct {
  5. Index uint64 `json:",omitempty"`
  6. }
  7. // Meta is a base object inherited by most of the other once.
  8. type Meta struct {
  9. Version Version `json:",omitempty"`
  10. CreatedAt time.Time `json:",omitempty"`
  11. UpdatedAt time.Time `json:",omitempty"`
  12. }
  13. // Annotations represents how to describe an object.
  14. type Annotations struct {
  15. Name string `json:",omitempty"`
  16. Labels map[string]string `json:",omitempty"`
  17. }
  18. // Driver represents a driver (network, logging).
  19. type Driver struct {
  20. Name string `json:",omitempty"`
  21. Options map[string]string `json:",omitempty"`
  22. }