yaml

package
v0.0.0-...-e51861b Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2018 License: Apache-2.0 Imports: 7 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 []string

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 Unmarshaller interface.

type Constraint

type Constraint struct {
	Include []string
	Exclude []string
}

Constraint defines a runtime constraint.

func (*Constraint) Excludes

func (c *Constraint) Excludes(v string) bool

Excludes returns true if the string matches the exclude patterns.

func (*Constraint) Includes

func (c *Constraint) Includes(v string) bool

Includes returns true if the string matches the include patterns.

func (*Constraint) Match

func (c *Constraint) Match(v string) bool

Match returns true if the string matches the include patterns and does not match any of the exclude patterns.

func (*Constraint) MatchAny

func (c *Constraint) MatchAny(v []string) bool

MatchAny returns true if the one or more of the strings matches the include patterns and does not match any of the exclude patterns.

func (*Constraint) UnmarshalYAML

func (c *Constraint) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML unmarshals the constraint.

type ConstraintMap

type ConstraintMap struct {
	Include map[string]string
	Exclude map[string]string
}

ConstraintMap defines a runtime constraint map.

func (*ConstraintMap) Match

func (c *ConstraintMap) Match(params map[string]string) bool

Match returns true if the params matches the include key values and does not match any of the exclude key values.

func (*ConstraintMap) UnmarshalYAML

func (c *ConstraintMap) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML unmarshals the constraint map.

type Constraints

type Constraints struct {
	Ref         Constraint
	Repo        Constraint
	Instance    Constraint
	Platform    Constraint
	Environment Constraint
	Event       Constraint
	Branch      Constraint
	Status      Constraint
	Paths       Constraint
	Matrix      ConstraintMap
}

Constraints defines a set of runtime constraints.

type Container

type Container struct {
	CapAdd        []string               `yaml:"cap_add,omitempty"`
	CapDrop       []string               `yaml:"cap_drop,omitempty"`
	Command       Command                `yaml:"command,omitempty"`
	Commands      StringSlice            `yaml:"commands,omitempty"`
	CPUQuota      StringInt              `yaml:"cpu_quota,omitempty"`
	CPUSet        string                 `yaml:"cpuset,omitempty"`
	CPUShares     StringInt              `yaml:"cpu_shares,omitempty"`
	Detached      bool                   `yaml:"detach,omitempty"`
	Devices       []string               `yaml:"devices,omitempty"`
	ErrIgnore     bool                   `yaml:"allow_failure,omitempty"`
	Tmpfs         []string               `yaml:"tmpfs,omitempty"`
	DNS           StringSlice            `yaml:"dns,omitempty"`
	DNSSearch     StringSlice            `yaml:"dns_search,omitempty"`
	Entrypoint    Command                `yaml:"entrypoint,omitempty"`
	Environment   SliceMap               `yaml:"environment,omitempty"`
	ExtraHosts    []string               `yaml:"extra_hosts,omitempty"`
	Group         string                 `yaml:"group,omitempty"`
	Image         string                 `yaml:"image,omitempty"`
	Isolation     string                 `yaml:"isolation,omitempty"`
	Labels        SliceMap               `yaml:"labels,omitempty"`
	MemLimit      MemStringInt           `yaml:"mem_limit,omitempty"`
	MemSwapLimit  MemStringInt           `yaml:"memswap_limit,omitempty"`
	MemSwappiness MemStringInt           `yaml:"mem_swappiness,omitempty"`
	Name          string                 `yaml:"name,omitempty"`
	NetworkMode   string                 `yaml:"network_mode,omitempty"`
	IpcMode       string                 `yaml:"ipc_mode,omitempty"`
	Networks      Networks               `yaml:"networks,omitempty"`
	Privileged    bool                   `yaml:"privileged,omitempty"`
	Pull          bool                   `yaml:"pull,omitempty"`
	Shell         string                 `yaml:"shell,omitempty"`
	ShmSize       MemStringInt           `yaml:"shm_size,omitempty"`
	Sysctls       SliceMap               `yaml:"sysctls,omitempty"`
	Volumes       []*Volume              `yaml:"volumes,omitempty"`
	Secrets       Secrets                `yaml:"secrets,omitempty"`
	Reports       Reports                `yaml:"reports,omitempty"`
	Constraints   Constraints            `yaml:"when,omitempty"`
	Vargs         map[string]interface{} `yaml:",inline"`
}

Container represents a Docker container.

type Containers

type Containers struct {
	Containers []*Container
}

Containers represents an ordered list of containers.

func (*Containers) UnmarshalYAML

func (c *Containers) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML implements the Unmarshaller interface.

type External

type External struct {
	External bool
	Name     string
}

External represent an external resource.

func (*External) UnmarshalYAML

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

UnmarshalYAML unmarshals the extneral resource.

type MemStringInt

type MemStringInt int64

MemStringInt represents an integer or string followed by a unit symbol.

func (*MemStringInt) UnmarshalYAML

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

UnmarshalYAML implements the Unmarshaller interface.

type Network

type Network struct {
	Name    string
	Aliases []string
}

Network represent a container network.

type Networks

type Networks struct {
	Networks []*Network
}

Networks represent a container network list.

func (*Networks) UnmarshalYAML

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

UnmarshalYAML implements the Unmarshaller interface.

type Pipeline

type Pipeline struct {
	Name  string
	Steps []*Container
}

Pipeline represents the pipeline section of the yaml.

func (*Pipeline) UnmarshalYAML

func (c *Pipeline) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML implements the Unmarshaller interface.

type Report

type Report struct {
	Source string
	Format string
}

Report represents a coverage report artifacts.

func (*Report) UnmarshalYAML

func (r *Report) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML implements the Unmarshaller interface.

type Reports

type Reports struct {
	Coverage *Report
}

Reports represents a list of report artifacts.

type Secret

type Secret struct {
	Source string
	Target string
}

Secret represents a container secret.

type Secrets

type Secrets struct {
	Secrets []*Secret
}

Secrets represents a list of container secrets.

func (*Secrets) UnmarshalYAML

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

UnmarshalYAML implements the Unmarshaller interface.

type SliceMap

type SliceMap struct {
	Map map[string]string
}

SliceMap represents a slice or map of key pairs.

func (*SliceMap) UnmarshalYAML

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

UnmarshalYAML implements custom Yaml unmarshaling.

type StringInt

type StringInt int64

StringInt represents a string or an integer.

func (*StringInt) UnmarshalYAML

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

UnmarshalYAML implements the Unmarshaller interface.

type StringSlice

type StringSlice []string

StringSlice represents a slice of strings or a string.

func (*StringSlice) UnmarshalYAML

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

UnmarshalYAML implements the Unmarshaller interface.

type Volume

type Volume struct {
	Source      string
	Destination string
	ReadOnly    bool
}

Volume represent a container volume.

func (*Volume) UnmarshalYAML

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

UnmarshalYAML implements the Unmarshaller interface.

Jump to

Keyboard shortcuts

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