yaml

package
v0.0.0-...-2a3d657 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2016 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseDebug

func ParseDebug(in []byte) bool

ParseDebug parses a Yaml configuration file in in order to extract the `debug` field value.

func ParseDebugString

func ParseDebugString(in string) bool

ParseDebugString parses a Yaml configuration file in string format and attempts to extract the `debug` field value

Types

type AuthConfig

type AuthConfig struct {
	Username      string `yaml:"username"`
	Password      string `yaml:"password"`
	Email         string `yaml:"email"`
	RegistryToken string `yaml:"registry_token"`
}

Auth for Docker Image Registry

type Build

type Build struct {
	Container `yaml:",inline"`

	Commands []string
	Filter   Filter `yaml:"when"`
}

Build is a typed representation of the build step in the Yaml configuration file.

type BuildStep

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

BuildStep holds the build step configuration using a custom Yaml unarmshal function to preserve ordering.

func (*BuildStep) Slice

func (s *BuildStep) Slice() []Build

func (*BuildStep) UnmarshalYAML

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

type Command

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

func (*Command) Slice

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

func (*Command) UnmarshalYAML

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

type Config

type Config struct {
	Cache Plugin
	Clone Plugin
	Build BuildStep

	Compose Containerslice
	Publish Pluginslice
	Deploy  Pluginslice
	Notify  Pluginslice
}

Config is a typed representation of the Yaml configuration file.

func Parse

func Parse(in []byte) (*Config, error)

Parse parses a Yaml configuraiton file.

func ParseString

func ParseString(in string) (*Config, error)

ParseString parses a Yaml configuration file in string format.

type Container

type Container struct {
	Image          string
	Pull           bool
	Privileged     bool
	Environment    MapEqualSlice
	Entrypoint     Command
	Command        Command
	ExtraHosts     []string `yaml:"extra_hosts"`
	Volumes        []string
	Net            string
	AuthConfig     AuthConfig `yaml:"auth_config"`
	Memory         int64      `yaml:"mem_limit"`
	CPUSetCPUs     string     `yaml:"cpuset"`
	OomKillDisable bool       `yaml:"oom_kill_disable"`
}

Container is a typed representation of a docker step in the Yaml configuration file.

type Containerslice

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

ContainerSlice is a slice of Containers with a custom Yaml unarmshal function to preserve ordering.

func (*Containerslice) Slice

func (s *Containerslice) Slice() []Container

func (*Containerslice) UnmarshalYAML

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

type Filter

type Filter struct {
	Repo    string
	Branch  Stringorslice
	Event   Stringorslice
	Success string
	Failure string
	Change  string
	Matrix  map[string]string
}

Filter is a typed representation of filters used at runtime to decide if a particular plugin should be executed or skipped.

type MapEqualSlice

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

func (*MapEqualSlice) Slice

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

func (*MapEqualSlice) UnmarshalYAML

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

type Plugin

type Plugin struct {
	Container `yaml:",inline"`

	Vargs  Vargs  `yaml:",inline"`
	Filter Filter `yaml:"when"`
}

Plugin is a typed representation of a docker plugin step in the Yaml configuration file.

type Pluginslice

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

Pluginslice is a slice of Plugins with a custom Yaml unarmshal function to preserve ordering.

func (*Pluginslice) Slice

func (s *Pluginslice) Slice() []Plugin

func (*Pluginslice) UnmarshalYAML

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

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 (*Stringorslice) Len

func (s *Stringorslice) Len() int

Len returns the number of parts of the Stringorslice.

func (Stringorslice) MarshalYAML

func (s Stringorslice) MarshalYAML() (interface{}, 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(unmarshal func(interface{}) error) error

UnmarshalYAML implements the Unmarshaller interface.

type Vargs

type Vargs map[string]interface{}

Vargs holds unstructured arguments, specific to the plugin, that are used at runtime when executing the plugin.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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