libcompose: github.com/docker/libcompose/yaml Index | Files

package yaml

import "github.com/docker/libcompose/yaml"

Index

Package Files

build.go command.go external.go network.go types_yaml.go ulimit.go volume.go

type Build Uses

type Build struct {
    Context    string
    Dockerfile string
    Args       map[string]*string
    CacheFrom  []*string
    Labels     map[string]*string
    // TODO: ShmSize (can be a string or int?) for v3.5
    Target string
    // Note: as of Sep 2018 this is undocumented but supported by docker-compose
    Network string
}

Build represents a build element in compose file. It can take multiple form in the compose file, hence this special type

func (Build) MarshalYAML Uses

func (b Build) MarshalYAML() (interface{}, error)

MarshalYAML implements the Marshaller interface.

func (*Build) UnmarshalYAML Uses

func (b *Build) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML implements the Unmarshaller interface.

type Command Uses

type Command strslice.StrSlice

Command represents a docker command, can be a string or an array of strings.

func (*Command) UnmarshalYAML Uses

func (s *Command) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML implements the Unmarshaller interface.

type External Uses

type External struct {
    External bool
    Name     string
}

External represents an external network entry in compose file. It can be a boolean (true|false) or have a name

func (External) MarshalYAML Uses

func (n External) MarshalYAML() (interface{}, error)

MarshalYAML implements the Marshaller interface.

func (*External) UnmarshalYAML Uses

func (n *External) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML implements the Unmarshaller interface.

type MaporColonSlice Uses

type MaporColonSlice []string

MaporColonSlice represents a slice of strings that gets unmarshal from a YAML map into 'key:value' string.

func (*MaporColonSlice) ToMap Uses

func (s *MaporColonSlice) ToMap() map[string]string

ToMap returns the list of string as a map splitting using = the key=value

func (*MaporColonSlice) UnmarshalYAML Uses

func (s *MaporColonSlice) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML implements the Unmarshaller interface.

type MaporEqualSlice Uses

type MaporEqualSlice []string

MaporEqualSlice represents a slice of strings that gets unmarshal from a YAML map into 'key=value' string.

func (*MaporEqualSlice) ToMap Uses

func (s *MaporEqualSlice) ToMap() map[string]string

ToMap returns the list of string as a map splitting using = the key=value

func (*MaporEqualSlice) UnmarshalYAML Uses

func (s *MaporEqualSlice) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML implements the Unmarshaller interface.

type MaporSpaceSlice Uses

type MaporSpaceSlice []string

MaporSpaceSlice represents a slice of strings that gets unmarshal from a YAML map into 'key value' string.

func (*MaporSpaceSlice) ToMap Uses

func (s *MaporSpaceSlice) ToMap() map[string]string

ToMap returns the list of string as a map splitting using = the key=value

func (*MaporSpaceSlice) UnmarshalYAML Uses

func (s *MaporSpaceSlice) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML implements the Unmarshaller interface.

type MemStringorInt Uses

type MemStringorInt int64

MemStringorInt represents a string or an integer the String supports notations like 10m for then Megabyte of memory

func (*MemStringorInt) UnmarshalYAML Uses

func (s *MemStringorInt) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML implements the Unmarshaller interface.

type Network Uses

type Network struct {
    Name        string   `yaml:"-"`
    RealName    string   `yaml:"-"`
    Aliases     []string `yaml:"aliases,omitempty"`
    IPv4Address string   `yaml:"ipv4_address,omitempty"`
    IPv6Address string   `yaml:"ipv6_address,omitempty"`
}

Network represents a service network in compose file.

func (*Network) HashString Uses

func (n *Network) HashString() string

Generate a hash string to detect service network config changes

type Networks Uses

type Networks struct {
    Networks []*Network
}

Networks represents a list of service networks in compose file. It has several representation, hence this specific struct.

func (*Networks) HashString Uses

func (n *Networks) HashString() string

Generate a hash string to detect service network config changes

func (Networks) MarshalYAML Uses

func (n Networks) MarshalYAML() (interface{}, error)

MarshalYAML implements the Marshaller interface.

func (*Networks) UnmarshalYAML Uses

func (n *Networks) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML implements the Unmarshaller interface.

type SliceorMap Uses

type SliceorMap map[string]string

SliceorMap represents a slice or a map of strings.

func (*SliceorMap) UnmarshalYAML Uses

func (s *SliceorMap) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML implements the Unmarshaller interface.

type StringorInt Uses

type StringorInt int64

StringorInt represents a string or an integer.

func (*StringorInt) UnmarshalYAML Uses

func (s *StringorInt) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML implements the Unmarshaller interface.

type Stringorslice Uses

type Stringorslice strslice.StrSlice

Stringorslice represents Using engine-api Strslice and augment it with YAML marshalling stuff. a string or an array of strings.

func (*Stringorslice) UnmarshalYAML Uses

func (s *Stringorslice) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML implements the Unmarshaller interface.

type Ulimit Uses

type Ulimit struct {
    Name string
    // contains filtered or unexported fields
}

Ulimit represents ulimit information.

func NewUlimit Uses

func NewUlimit(name string, soft int64, hard int64) Ulimit

NewUlimit creates a Ulimit based on the specified parts.

func (Ulimit) MarshalYAML Uses

func (u Ulimit) MarshalYAML() (interface{}, error)

MarshalYAML implements the Marshaller interface.

type Ulimits Uses

type Ulimits struct {
    Elements []Ulimit
}

Ulimits represents a list of Ulimit. It is, however, represented in yaml as keys (and thus map in Go)

func (Ulimits) MarshalYAML Uses

func (u Ulimits) MarshalYAML() (interface{}, error)

MarshalYAML implements the Marshaller interface.

func (*Ulimits) UnmarshalYAML Uses

func (u *Ulimits) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML implements the Unmarshaller interface.

type Volume Uses

type Volume struct {
    Source      string `yaml:"-"`
    Destination string `yaml:"-"`
    AccessMode  string `yaml:"-"`
}

Volume represent a service volume

func (*Volume) String Uses

func (v *Volume) String() string

String implements the Stringer interface.

type Volumes Uses

type Volumes struct {
    Volumes []*Volume
}

Volumes represents a list of service volumes in compose file. It has several representation, hence this specific struct.

func (*Volumes) HashString Uses

func (v *Volumes) HashString() string

Generate a hash string to detect service volume config changes

func (Volumes) MarshalYAML Uses

func (v Volumes) MarshalYAML() (interface{}, error)

MarshalYAML implements the Marshaller interface.

func (*Volumes) UnmarshalYAML Uses

func (v *Volumes) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML implements the Unmarshaller interface.

Package yaml imports 8 packages (graph) and is imported by 59 packages. Updated 2018-09-15. Refresh now. Tools for package owners.