github.com/rumpl/bof@v23.0.0-rc.2+incompatible/api/types/swarm/common.go (about) 1 package swarm // import "github.com/docker/docker/api/types/swarm" 2 3 import ( 4 "strconv" 5 "time" 6 ) 7 8 // Version represents the internal object version. 9 type Version struct { 10 Index uint64 `json:",omitempty"` 11 } 12 13 // String implements fmt.Stringer interface. 14 func (v Version) String() string { 15 return strconv.FormatUint(v.Index, 10) 16 } 17 18 // Meta is a base object inherited by most of the other once. 19 type Meta struct { 20 Version Version `json:",omitempty"` 21 CreatedAt time.Time `json:",omitempty"` 22 UpdatedAt time.Time `json:",omitempty"` 23 } 24 25 // Annotations represents how to describe an object. 26 type Annotations struct { 27 Name string `json:",omitempty"` 28 Labels map[string]string `json:"Labels"` 29 } 30 31 // Driver represents a driver (network, logging, secrets backend). 32 type Driver struct { 33 Name string `json:",omitempty"` 34 Options map[string]string `json:",omitempty"` 35 } 36 37 // TLSInfo represents the TLS information about what CA certificate is trusted, 38 // and who the issuer for a TLS certificate is 39 type TLSInfo struct { 40 // TrustRoot is the trusted CA root certificate in PEM format 41 TrustRoot string `json:",omitempty"` 42 43 // CertIssuer is the raw subject bytes of the issuer 44 CertIssuerSubject []byte `json:",omitempty"` 45 46 // CertIssuerPublicKey is the raw public key bytes of the issuer 47 CertIssuerPublicKey []byte `json:",omitempty"` 48 }