2018-02-05 21:05:59 +00:00
|
|
|
package swarm // import "github.com/docker/docker/api/types/swarm"
|
2016-09-06 18:18:12 +00:00
|
|
|
|
2022-05-10 20:35:09 +00:00
|
|
|
import (
|
|
|
|
"strconv"
|
|
|
|
"time"
|
|
|
|
)
|
2016-09-06 18:18:12 +00:00
|
|
|
|
2016-09-24 15:17:18 +00:00
|
|
|
// Version represents the internal object version.
|
2016-09-06 18:18:12 +00:00
|
|
|
type Version struct {
|
|
|
|
Index uint64 `json:",omitempty"`
|
|
|
|
}
|
|
|
|
|
2022-05-10 20:35:09 +00:00
|
|
|
// String implements fmt.Stringer interface.
|
|
|
|
func (v Version) String() string {
|
|
|
|
return strconv.FormatUint(v.Index, 10)
|
|
|
|
}
|
|
|
|
|
2016-09-24 15:17:18 +00:00
|
|
|
// Meta is a base object inherited by most of the other once.
|
2016-09-06 18:18:12 +00:00
|
|
|
type Meta struct {
|
|
|
|
Version Version `json:",omitempty"`
|
|
|
|
CreatedAt time.Time `json:",omitempty"`
|
|
|
|
UpdatedAt time.Time `json:",omitempty"`
|
|
|
|
}
|
|
|
|
|
|
|
|
// Annotations represents how to describe an object.
|
|
|
|
type Annotations struct {
|
|
|
|
Name string `json:",omitempty"`
|
2017-02-13 08:07:03 +00:00
|
|
|
Labels map[string]string `json:"Labels"`
|
2016-09-06 18:18:12 +00:00
|
|
|
}
|
2016-12-05 14:18:36 +00:00
|
|
|
|
2017-07-19 10:27:24 +00:00
|
|
|
// Driver represents a driver (network, logging, secrets backend).
|
2016-12-05 14:18:36 +00:00
|
|
|
type Driver struct {
|
|
|
|
Name string `json:",omitempty"`
|
|
|
|
Options map[string]string `json:",omitempty"`
|
|
|
|
}
|
2017-04-27 02:46:20 +00:00
|
|
|
|
|
|
|
// TLSInfo represents the TLS information about what CA certificate is trusted,
|
|
|
|
// and who the issuer for a TLS certificate is
|
|
|
|
type TLSInfo struct {
|
|
|
|
// TrustRoot is the trusted CA root certificate in PEM format
|
|
|
|
TrustRoot string `json:",omitempty"`
|
|
|
|
|
|
|
|
// CertIssuer is the raw subject bytes of the issuer
|
|
|
|
CertIssuerSubject []byte `json:",omitempty"`
|
|
|
|
|
|
|
|
// CertIssuerPublicKey is the raw public key bytes of the issuer
|
|
|
|
CertIssuerPublicKey []byte `json:",omitempty"`
|
|
|
|
}
|