types

package
v0.15.5 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BoolTrue

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

BoolTrue is a custom Yaml boolean type that defaults to true.

func (BoolTrue) Bool

func (b BoolTrue) Bool() bool

Bool returns the bool value.

func (*BoolTrue) UnmarshalYAML

func (b *BoolTrue) UnmarshalYAML(value *yaml.Node) error

UnmarshalYAML implements custom Yaml unmarshaling.

type Command

type Command strslice.StrSlice

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

func (*Command) UnmarshalYAML

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

UnmarshalYAML implements the Unmarshaler interface.

type MemStringorInt

type MemStringorInt int64

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

func (*MemStringorInt) UnmarshalYAML

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

UnmarshalYAML implements the Unmarshaler interface.

type Network

type Network struct {
	Name        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.

type Networks

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) MarshalYAML

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

MarshalYAML implements the Marshaller interface.

func (*Networks) UnmarshalYAML

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

UnmarshalYAML implements the Unmarshaler interface.

type SliceorMap

type SliceorMap map[string]string

SliceorMap represents a slice or a map of strings.

func (*SliceorMap) UnmarshalYAML

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

UnmarshalYAML implements the Unmarshaler interface.

type StringorInt

type StringorInt int64

StringorInt represents a string or an integer.

func (*StringorInt) UnmarshalYAML

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

UnmarshalYAML implements the Unmarshaler interface.

type Stringorslice

type Stringorslice strslice.StrSlice

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

func (*Stringorslice) UnmarshalYAML

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

UnmarshalYAML implements the Unmarshaler interface.

type Ulimit

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

Ulimit represents ulimit information.

func (Ulimit) MarshalYAML

func (u Ulimit) MarshalYAML() (interface{}, 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() (interface{}, error)

MarshalYAML implements the Marshaller interface.

func (*Ulimits) UnmarshalYAML

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

UnmarshalYAML implements the Unmarshaler interface.

type Volume

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

Volume represent a service volume

func (*Volume) String

func (v *Volume) String() string

String implements the Stringer interface.

type Volumes

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) MarshalYAML

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

MarshalYAML implements the Marshaller interface.

func (*Volumes) UnmarshalYAML

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

UnmarshalYAML implements the Unmarshaler interface.

Jump to

Keyboard shortcuts

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