docker

package
v0.19.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 12, 2018 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TimeverRegexp = regexp.MustCompile(`^([0-9]{2})\.((?:0[1-9])|(?:1[0-2]))\.([0-9]+)(?:-(.+))?$`)

	ErrTimeverInvalidYear  = errors.New("invalid year value")
	ErrTimeverInvalidMonth = errors.New("invalid month value")
	ErrTimeverEmptyVersion = errors.New("version string empty")
	ErrTimeverParse        = errors.New("invalid Timever version string")
)
View Source
var (
	DockerReleaseCE = "ce"
	DockerReleaseEE = "ee"

	ErrServerVersionInvalidRelease = errors.New("release must be one of ce or ee")
)

Functions

func NewEnvClient

func NewEnvClient(ctx context.Context, logger log.Logger) (docker.CommonAPIClient, error)

Types

type ServerVersion added in v0.19.2

type ServerVersion struct {
	Semver  *semver.Version
	Timever *Timever
}

func MustParseServerVersion added in v0.19.2

func MustParseServerVersion(s string) ServerVersion

func NewServerVersion added in v0.19.2

func NewServerVersion(s string) (vp *ServerVersion, err error)

func ParseServerVersion added in v0.19.2

func ParseServerVersion(s string) (ServerVersion, error)

func (ServerVersion) Compare added in v0.19.2

func (v ServerVersion) Compare(o ServerVersion) int

func (ServerVersion) EQ added in v0.19.2

func (ServerVersion) GE added in v0.19.2

func (ServerVersion) GT added in v0.19.2

func (ServerVersion) GTE added in v0.19.2

func (v ServerVersion) GTE(o ServerVersion) bool

func (ServerVersion) LE added in v0.19.2

func (ServerVersion) LT added in v0.19.2

func (ServerVersion) LTE added in v0.19.2

func (v ServerVersion) LTE(o ServerVersion) bool

func (ServerVersion) MarshalJSON added in v0.19.2

func (v ServerVersion) MarshalJSON() ([]byte, error)

func (ServerVersion) NE added in v0.19.2

func (ServerVersion) Release added in v0.19.2

func (v ServerVersion) Release() string

func (ServerVersion) String added in v0.19.2

func (v ServerVersion) String() string

func (*ServerVersion) UnmarshalJSON added in v0.19.2

func (v *ServerVersion) UnmarshalJSON(data []byte) (err error)

func (ServerVersion) Validate added in v0.19.2

func (v ServerVersion) Validate() error

func (ServerVersion) ValidateRelease added in v0.19.2

func (v ServerVersion) ValidateRelease() error

type Timever added in v0.19.2

type Timever struct {
	Year    uint64
	Month   uint64
	Patch   uint64
	Release string
}

func MustTimeverParse added in v0.19.2

func MustTimeverParse(s string) Timever

MustTimeverParse is like Parse but panics if the version cannot be parsed.

func NewTimever added in v0.19.2

func NewTimever(s string) (vp *Timever, err error)

NewTimever is an alias for TimeverParse and returns a pointer, parses version string and returns a validated Timever or error

func TimeverParse added in v0.19.2

func TimeverParse(s string) (Timever, error)

TimeverParse parses version string and returns a validated Timever or error

func (Timever) Compare added in v0.19.2

func (v Timever) Compare(o Timever) int

Compare compares Timevers v to o: -1 == v is less than o 0 == v is equal to o 1 == v is greater than o

func (Timever) EQ added in v0.19.2

func (v Timever) EQ(o Timever) bool

EQ checks if v is equal to o.

func (Timever) GE added in v0.19.2

func (v Timever) GE(o Timever) bool

GE checks if v is greater than or equal to o.

func (Timever) GT added in v0.19.2

func (v Timever) GT(o Timever) bool

GT checks if v is greater than o.

func (Timever) GTE added in v0.19.2

func (v Timever) GTE(o Timever) bool

GTE checks if v is greater than or equal to o.

func (Timever) LE added in v0.19.2

func (v Timever) LE(o Timever) bool

LE checks if v is less than or equal to o.

func (Timever) LT added in v0.19.2

func (v Timever) LT(o Timever) bool

LT checks if v is less than o.

func (Timever) LTE added in v0.19.2

func (v Timever) LTE(o Timever) bool

LTE checks if v is less than or equal to o.

func (Timever) MarshalJSON added in v0.19.2

func (v Timever) MarshalJSON() ([]byte, error)

MarshalJSON implements the encoding/json.Marshaler interface.

func (Timever) NE added in v0.19.2

func (v Timever) NE(o Timever) bool

NE checks if v is not equal to o.

func (Timever) String added in v0.19.2

func (v Timever) String() string

Timever to string

func (*Timever) UnmarshalJSON added in v0.19.2

func (v *Timever) UnmarshalJSON(data []byte) (err error)

UnmarshalJSON implements the encoding/json.Unmarshaler interface.

func (Timever) Validate added in v0.19.2

func (v Timever) Validate() error

Validate validates v and returns error in case

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL