yaml

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2016 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command struct {
	// contains filtered or unexported fields
}

Command represents a docker command, can be a string or an array of strings. FIXME why not use Stringorslice (type Command struct { Stringorslice }

func NewCommand

func NewCommand(parts ...string) Command

NewCommand creates a Command based on the specified parts (as strings).

func (Command) MarshalYAML

func (s Command) MarshalYAML() (tag string, value interface{}, err error)

MarshalYAML implements the Marshaller interface.

func (*Command) Slice

func (s *Command) Slice() []string

Slice gets the parts of the Command as a Slice of string.

func (*Command) ToString

func (s *Command) ToString() string

ToString returns the parts of the command as a string (joined by spaces).

func (*Command) UnmarshalYAML

func (s *Command) UnmarshalYAML(tag string, value interface{}) error

UnmarshalYAML implements the Unmarshaller interface.

type MaporColonSlice

type MaporColonSlice struct {
	// contains filtered or unexported fields
}

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

func NewMaporColonSlice

func NewMaporColonSlice(parts []string) MaporColonSlice

NewMaporColonSlice creates a new MaporColonSlice based on the specified parts.

func (MaporColonSlice) MarshalYAML

func (s MaporColonSlice) MarshalYAML() (tag string, value interface{}, err error)

MarshalYAML implements the Marshaller interface.

func (*MaporColonSlice) Slice

func (s *MaporColonSlice) Slice() []string

Slice gets the parts of the MaporColonSlice as a Slice of string.

func (*MaporColonSlice) UnmarshalYAML

func (s *MaporColonSlice) UnmarshalYAML(tag string, value interface{}) error

UnmarshalYAML implements the Unmarshaller interface.

type MaporEqualSlice

type MaporEqualSlice struct {
	// contains filtered or unexported fields
}

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

func NewMaporEqualSlice

func NewMaporEqualSlice(parts []string) MaporEqualSlice

NewMaporEqualSlice creates a new MaporEqualSlice based on the specified parts.

func (MaporEqualSlice) MarshalYAML

func (s MaporEqualSlice) MarshalYAML() (tag string, value interface{}, err error)

MarshalYAML implements the Marshaller interface.

func (*MaporEqualSlice) Slice

func (s *MaporEqualSlice) Slice() []string

Slice gets the parts of the MaporEqualSlice as a Slice of string.

func (*MaporEqualSlice) UnmarshalYAML

func (s *MaporEqualSlice) UnmarshalYAML(tag string, value interface{}) error

UnmarshalYAML implements the Unmarshaller interface.

type MaporSpaceSlice

type MaporSpaceSlice struct {
	// contains filtered or unexported fields
}

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

func NewMaporSpaceSlice

func NewMaporSpaceSlice(parts []string) MaporSpaceSlice

NewMaporSpaceSlice creates a new MaporSpaceSlice based on the specified parts.

func (MaporSpaceSlice) MarshalYAML

func (s MaporSpaceSlice) MarshalYAML() (tag string, value interface{}, err error)

MarshalYAML implements the Marshaller interface.

func (*MaporSpaceSlice) Slice

func (s *MaporSpaceSlice) Slice() []string

Slice gets the parts of the MaporSpaceSlice as a Slice of string.

func (*MaporSpaceSlice) UnmarshalYAML

func (s *MaporSpaceSlice) UnmarshalYAML(tag string, value interface{}) error

UnmarshalYAML implements the Unmarshaller interface.

type SliceorMap

type SliceorMap struct {
	// contains filtered or unexported fields
}

SliceorMap represents a slice or a map of strings.

func NewSliceorMap

func NewSliceorMap(parts map[string]string) SliceorMap

NewSliceorMap creates a new SliceorMap based on the specified parts (as map of string).

func (*SliceorMap) MapParts

func (s *SliceorMap) MapParts() map[string]string

MapParts gets the parts of the SliceorMap as a Map of string.

func (SliceorMap) MarshalYAML

func (s SliceorMap) MarshalYAML() (tag string, value interface{}, err error)

MarshalYAML implements the Marshaller interface.

func (*SliceorMap) UnmarshalYAML

func (s *SliceorMap) UnmarshalYAML(tag string, value interface{}) error

UnmarshalYAML implements the Unmarshaller interface.

type Stringorslice

type Stringorslice struct {
	// contains filtered or unexported fields
}

Stringorslice represents a string or an array of strings. TODO use docker/docker/pkg/stringutils.StrSlice once 1.9.x is released.

func NewStringorslice

func NewStringorslice(parts ...string) Stringorslice

NewStringorslice creates an Stringorslice based on the specified parts (as strings).

func (*Stringorslice) Len

func (s *Stringorslice) Len() int

Len returns the number of parts of the Stringorslice.

func (Stringorslice) MarshalYAML

func (s Stringorslice) MarshalYAML() (tag string, value interface{}, err error)

MarshalYAML implements the Marshaller interface.

func (*Stringorslice) Slice

func (s *Stringorslice) Slice() []string

Slice gets the parts of the StrSlice as a Slice of string.

func (*Stringorslice) UnmarshalYAML

func (s *Stringorslice) UnmarshalYAML(tag string, value interface{}) error

UnmarshalYAML implements the Unmarshaller interface.

type Ulimit

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

Ulimit represents ulimit information.

func NewUlimit

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

NewUlimit creates a Ulimit based on the specified parts.

func (Ulimit) MarshalYAML

func (u Ulimit) MarshalYAML() (tag string, value interface{}, err error)

MarshalYAML implements the Marshaller interface.

type Ulimits

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

func (u Ulimits) MarshalYAML() (tag string, value interface{}, err error)

MarshalYAML implements the Marshaller interface.

func (*Ulimits) UnmarshalYAML

func (u *Ulimits) UnmarshalYAML(tag string, value interface{}) error

UnmarshalYAML implements the Unmarshaller interface.

Jump to

Keyboard shortcuts

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