Versions in this module Expand all Collapse all v0 v0.9.3 Apr 1, 2016 v0.9.2 Mar 17, 2016 v0.9.1 Mar 10, 2016 v0.9.0 Mar 8, 2016 Changes in this version + const LinuxCapabilitiesRetainSetName + const LinuxCapabilitiesRevokeSetName + const ResourceBlockBandwidthName + const ResourceBlockIOPSName + const ResourceCPUName + const ResourceMemoryName + const ResourceNetworkBandwidthName + var ErrBadSemVer = ACVersionError("SemVer is bad") + var ErrDefaultRequired = errors.New("default must be true") + var ErrDefaultTrue = errors.New("default must be false") + var ErrEmptyACIdentifier = ACIdentifierError("ACIdentifier cannot be empty") + var ErrEmptyACName = ACNameError("ACName cannot be empty") + var ErrInvalidCharInACIdentifier = ACIdentifierError(...) + var ErrInvalidCharInACName = ACNameError(...) + var ErrInvalidEdgeInACIdentifier = ACIdentifierError(...) + var ErrInvalidEdgeInACName = ACNameError(...) + var ErrNoACKind = ACKindError("ACKind must be set") + var ErrNoEmptyUUID = errors.New("UUID cannot be empty") + var ErrNoZeroSemVer = ACVersionError("SemVer cannot be zero") + var ErrRequestNonEmpty = errors.New("request not supported by this resource, must be empty") + var LinuxIsolatorNames = make(map[ACIdentifier]struct{}) + var ResourceIsolatorNames = make(map[ACIdentifier]struct{}) + var ValidACIdentifier = regexp.MustCompile("^[a-z0-9]+([-._~/][a-z0-9]+)*$") + var ValidACName = regexp.MustCompile("^[a-z0-9]+([-][a-z0-9]+)*$") + var ValidOSArch = map[string][]string + func AddIsolatorName(n ACIdentifier, ns map[ACIdentifier]struct{}) + func AddIsolatorValueConstructor(n ACIdentifier, i IsolatorValueConstructor) + func IsValidOSArch(labels map[ACIdentifier]string, validOSArch map[string][]string) error + func SanitizeACIdentifier(s string) (string, error) + func SanitizeACName(s string) (string, error) + func ShortHash(hash string) string + type ACIdentifier string + func MustACIdentifier(s string) *ACIdentifier + func NewACIdentifier(s string) (*ACIdentifier, error) + func (n *ACIdentifier) Set(s string) error + func (n *ACIdentifier) UnmarshalJSON(data []byte) error + func (n ACIdentifier) Empty() bool + func (n ACIdentifier) Equals(o ACIdentifier) bool + func (n ACIdentifier) MarshalJSON() ([]byte, error) + func (n ACIdentifier) String() string + type ACIdentifierError string + func (e ACIdentifierError) Error() string + type ACKind string + func (a *ACKind) UnmarshalJSON(data []byte) error + func (a ACKind) MarshalJSON() ([]byte, error) + func (a ACKind) String() string + type ACKindError string + func InvalidACKindError(kind ACKind) ACKindError + func (e ACKindError) Error() string + type ACName string + func MustACName(s string) *ACName + func NewACName(s string) (*ACName, error) + func (n *ACName) Set(s string) error + func (n *ACName) UnmarshalJSON(data []byte) error + func (n ACName) Empty() bool + func (n ACName) Equals(o ACName) bool + func (n ACName) MarshalJSON() ([]byte, error) + func (n ACName) String() string + type ACNameError string + func (e ACNameError) Error() string + type ACVersionError string + func (e ACVersionError) Error() string + type Annotation struct + Name ACIdentifier + Value string + type Annotations []Annotation + func (a *Annotations) Set(name ACIdentifier, value string) + func (a *Annotations) UnmarshalJSON(data []byte) error + func (a Annotations) Get(name string) (val string, ok bool) + func (a Annotations) MarshalJSON() ([]byte, error) + type App struct + Environment Environment + EventHandlers []EventHandler + Exec Exec + Group string + Isolators Isolators + MountPoints []MountPoint + Ports []Port + SupplementaryGIDs []int + User string + WorkingDirectory string + func (a *App) UnmarshalJSON(data []byte) error + func (a App) MarshalJSON() ([]byte, error) + type Date time.Time + func NewDate(s string) (*Date, error) + func (d *Date) UnmarshalJSON(data []byte) error + func (d Date) MarshalJSON() ([]byte, error) + func (d Date) String() string + type Dependencies []Dependency + type Dependency struct + ImageID *Hash + ImageName ACIdentifier + Labels Labels + Size uint + func (d *Dependency) UnmarshalJSON(data []byte) error + func (d Dependency) MarshalJSON() ([]byte, error) + type Environment []EnvironmentVariable + func (e *Environment) Set(name string, value string) + func (e *Environment) UnmarshalJSON(data []byte) error + func (e Environment) Get(name string) (value string, ok bool) + func (e Environment) MarshalJSON() ([]byte, error) + type EnvironmentVariable struct + Name string + Value string + type EventHandler struct + Exec Exec + Name string + func (e *EventHandler) UnmarshalJSON(data []byte) error + func (e EventHandler) MarshalJSON() ([]byte, error) + type Exec []string + func (e *Exec) UnmarshalJSON(data []byte) error + func (e Exec) MarshalJSON() ([]byte, error) + type ExposedPort struct + HostPort uint + Name ACName + type Hash struct + Val string + func NewHash(s string) (*Hash, error) + func NewHashSHA512(b []byte) *Hash + func (h *Hash) Set(s string) error + func (h *Hash) UnmarshalJSON(data []byte) error + func (h Hash) Empty() bool + func (h Hash) MarshalJSON() ([]byte, error) + func (h Hash) String() string + type Isolator struct + Name ACIdentifier + ValueRaw *json.RawMessage + func (i *Isolator) UnmarshalJSON(b []byte) error + func (i *Isolator) Value() IsolatorValue + type IsolatorValue interface + AssertValid func() error + UnmarshalJSON func(b []byte) error + type IsolatorValueConstructor func() IsolatorValue + type Isolators []Isolator + func (is *Isolators) GetByName(name ACIdentifier) *Isolator + func (is *Isolators) Unrecognized() Isolators + type Label struct + Name ACIdentifier + Value string + type Labels []Label + func LabelsFromMap(labelsMap map[ACIdentifier]string) (Labels, error) + func (l *Labels) UnmarshalJSON(data []byte) error + func (l Labels) Get(name string) (val string, ok bool) + func (l Labels) MarshalJSON() ([]byte, error) + func (l Labels) ToMap() map[ACIdentifier]string + type LinuxCapabilitiesRetainSet struct + func NewLinuxCapabilitiesRetainSet(caps ...string) (*LinuxCapabilitiesRetainSet, error) + func (l *LinuxCapabilitiesRetainSet) UnmarshalJSON(b []byte) error + func (l LinuxCapabilitiesRetainSet) AsIsolator() Isolator + func (l LinuxCapabilitiesRetainSet) AssertValid() error + func (l LinuxCapabilitiesRetainSet) Set() []LinuxCapability + type LinuxCapabilitiesRevokeSet struct + func NewLinuxCapabilitiesRevokeSet(caps ...string) (*LinuxCapabilitiesRevokeSet, error) + func (l *LinuxCapabilitiesRevokeSet) UnmarshalJSON(b []byte) error + func (l LinuxCapabilitiesRevokeSet) AsIsolator() Isolator + func (l LinuxCapabilitiesRevokeSet) AssertValid() error + func (l LinuxCapabilitiesRevokeSet) Set() []LinuxCapability + type LinuxCapabilitiesSet interface + AssertValid func() error + Set func() []LinuxCapability + type LinuxCapability string + type MountPoint struct + Name ACName + Path string + ReadOnly bool + func MountPointFromString(mp string) (*MountPoint, error) + type Port struct + Count uint + Name ACName + Port uint + Protocol string + SocketActivated bool + func PortFromString(pt string) (*Port, error) + func (p *Port) UnmarshalJSON(data []byte) error + func (p Port) MarshalJSON() ([]byte, error) + type Resource interface + Default func() bool + Limit func() *resource.Quantity + Request func() *resource.Quantity + type ResourceBase struct + func (r *ResourceBase) UnmarshalJSON(b []byte) error + func (r ResourceBase) AssertValid() error + func (r ResourceBase) Default() bool + func (r ResourceBase) Limit() *resource.Quantity + func (r ResourceBase) Request() *resource.Quantity + type ResourceBlockBandwidth struct + func (r ResourceBlockBandwidth) AssertValid() error + type ResourceBlockIOPS struct + func (r ResourceBlockIOPS) AssertValid() error + type ResourceCPU struct + func NewResourceCPUIsolator(request, limit string) (*ResourceCPU, error) + func (r ResourceCPU) AsIsolator() Isolator + func (r ResourceCPU) AssertValid() error + func (r ResourceCPU) String() string + type ResourceMemory struct + func NewResourceMemoryIsolator(request, limit string) (*ResourceMemory, error) + func (r ResourceMemory) AsIsolator() Isolator + func (r ResourceMemory) AssertValid() error + func (r ResourceMemory) String() string + type ResourceNetworkBandwidth struct + func (r ResourceNetworkBandwidth) AssertValid() error + type SemVer semver.Version + func NewSemVer(s string) (*SemVer, error) + func (sv *SemVer) UnmarshalJSON(data []byte) error + func (sv SemVer) Empty() bool + func (sv SemVer) LessThanExact(versionB SemVer) bool + func (sv SemVer) LessThanMajor(versionB SemVer) bool + func (sv SemVer) MarshalJSON() ([]byte, error) + func (sv SemVer) String() string + type URL url.URL + func NewURL(s string) (*URL, error) + func (u *URL) UnmarshalJSON(data []byte) error + func (u URL) MarshalJSON() ([]byte, error) + func (u URL) String() string + type UUID [16]byte + func NewUUID(s string) (*UUID, error) + func (u *UUID) Set(s string) error + func (u *UUID) UnmarshalJSON(data []byte) error + func (u UUID) Empty() bool + func (u UUID) MarshalJSON() ([]byte, error) + func (u UUID) String() string + type Volume struct + GID *int + Kind string + Mode *string + Name ACName + ReadOnly *bool + Source string + UID *int + func VolumeFromString(vp string) (*Volume, error) + func (v *Volume) UnmarshalJSON(data []byte) error + func (v Volume) MarshalJSON() ([]byte, error) + func (v Volume) String() string