app

package
v0.0.0-...-ea498fe Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2017 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App interface {
	Config() Config
	Projects() []string
	Project(project string) (project.Project, error)
	Builds(projectID *string) []string
	Build(build string) (build.Build, error)
	Stdout(build string) ([]byte, error)
	StageData(build string, stage string) ([]byte, error)
	TriggerBuild(projectID string) (build.Build, error)
	AddStage(buildID string, stage build.Stage) error
	Version() version.Info
	Shutdown() (<-chan bool, error)
}

App is the container for the whole builder application. This is used by frontends such as HTTP server or command line interface

func New

func New(cfg Config) (App, error)

New creates a new App from configuration

func NewFromURL

func NewFromURL(filename string) (App, error)

NewFromURL creates a new App from configuration filename

type Config

type Config struct {
	ServerAddress string          `hcl:"bind_addr"`
	URL           string          `hcl:"url"`
	Projects      []projectConfig `hcl:"projects"`
	Store         string          `hcl:"store"`
	Verbose       bool            `hcl:"verbose"`
}

Config is the builder configuration

func FromString

func FromString(input string) (Config, error)

FromString creates a Cfg from string.

func NewConfig

func NewConfig(filename string) (Config, error)

NewConfig creates a new configuration manager from given URL / filename

Jump to

Keyboard shortcuts

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