config

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Branch

type Branch struct {
	Name           string `yaml:"name"`
	BuildOnFailure bool   `yaml:"build_on_failure"`
}

Configuration for the git branch

type Config

type Config struct {
	ApiVersion string    `yaml:"api_version"`
	Image      Image     `yaml:"image"`
	Container  Container `yaml:"container"`
	Branch     Branch    `yaml:"branch"`
	Heartbeat  Heartbeat `yaml:"heartbeat"`
}

Overall config object

func Parse

func Parse(filename string) (*Config, error)

func (*Config) Validate

func (c *Config) Validate() error

Validate the configuration value to make sure any required parameters are not missing

type Container

type Container struct {
	Ports   []Port   `yaml:"ports"`
	Mounts  []Mount  `yaml:"mounts"`
	Name    string   `yaml:"name"`
	Command []string `yaml:"command"`
}

Configuration for the container to run

type Heartbeat

type Heartbeat struct {
	SleepTime int    `yaml:"sleep_time"`
	Endpoint  string `yaml:"endpoint"`
}

Configuration for the heartbeat functionality

type Image

type Image struct {
	Name string `yaml:"name"`
	Tag  string `yaml:"tag"`
}

Configuration for the image

type Mount

type Mount struct {
	Host   string `yaml:"host"`
	Target string `yaml:"target"`
}

type Port

type Port struct {
	Host   int `yaml:"host"`
	Target int `yaml:"target"`
}

Jump to

Keyboard shortcuts

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