data

package
v0.0.0-...-f2f6987 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2014 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const ConfigFileName = "cider.yml"

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildArgs

type BuildArgs struct {
	Repository string   `codec:"repository"`
	Script     string   `codec:"script"`
	Env        []string `codec:"env,omitempty"`
	Noop       bool     `codec:"noop,omitempty"` // For benchmarking purposes only.
}

func ParseArgs

func ParseArgs(slave, repository, script, runner string, env []string) (method string, args *BuildArgs, err error)

func (*BuildArgs) Validate

func (args *BuildArgs) Validate() error

type BuildResult

type BuildResult struct {
	PullDuration  time.Duration `codec:"pullDuration"`
	BuildDuration time.Duration `codec:"buildDuration"`
	Error         string        `codec:"error"`
}

func (BuildResult) WriteSummary

func (result BuildResult) WriteSummary(w io.Writer)

type Config

type Config struct {
	Master struct {
		URL   string `yaml:"url"`
		Token string `yaml:"token"`
	} `yaml:"master"`
	Slave struct {
		Label string `yaml:"label"`
	} `yaml:"slave"`
	Repository struct {
		URL string `yaml:"url"`
	} `yaml:"repository"`
	Script struct {
		Path   string `yaml:"path"`
		Runner string `yaml:"runner"`
		Env    Env    `yaml:"env"`
	} `yaml:"script"`
}

func NewConfig

func NewConfig() *Config

func ParseConfig

func ParseConfig(data []byte) (*Config, error)

func (*Config) FeedFromEnv

func (config *Config) FeedFromEnv(prefix string) error

type Env

type Env []string

func (*Env) Set

func (env *Env) Set(kv string) error

func (*Env) String

func (env *Env) String() string

type ErrInvalidEnvironment

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

func (*ErrInvalidEnvironment) Error

func (err *ErrInvalidEnvironment) Error() string

Jump to

Keyboard shortcuts

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