github.com/zhuohuang-hust/src-cbuild@v0.0.0-20230105071821-c7aab3e7c840/api/types/swarm/common.go (about) 1 package swarm 2 3 import "time" 4 5 // Version represents the internal object version. 6 type Version struct { 7 Index uint64 `json:",omitempty"` 8 } 9 10 // Meta is a base object inherited by most of the other once. 11 type Meta struct { 12 Version Version `json:",omitempty"` 13 CreatedAt time.Time `json:",omitempty"` 14 UpdatedAt time.Time `json:",omitempty"` 15 } 16 17 // Annotations represents how to describe an object. 18 type Annotations struct { 19 Name string `json:",omitempty"` 20 Labels map[string]string `json:",omitempty"` 21 } 22 23 // Driver represents a driver (network, logging). 24 type Driver struct { 25 Name string `json:",omitempty"` 26 Options map[string]string `json:",omitempty"` 27 }