common

package
v0.0.0-...-1445020 Latest Latest
Warning

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

Go to latest
Published: May 30, 2016 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Build

type Build struct {
	WorkingDir    string `db:"-"`
	BuildID       int32  `db:"build_id"`
	Branch        string `db:"branch"`
	Revision      string `db:"revision"`
	RepositoryURL string `db:"repository_url"`
	RawConfig     string
	Config        struct {
		Env        []string `yaml:"env"`
		Tests      []string `yaml:"tests"`
		Images     []string `yaml:"images"`
		Commands   []string `yaml:"commands"`
		Entrypoint []string `yaml:"entrypoint"`
		Postgres   struct {
			Database string `yaml:"database"`
			Username string `yaml:"username"`
			Password string `yaml:"password"`
		} `postgres`
	}
}

func (*Build) DSN

func (b *Build) DSN(host string) string

func (*Build) LoadConfig

func (b *Build) LoadConfig() error

type Config

type Config struct {
	Assets     string        `yaml:"assets"`
	Connect    Connect       `yaml:"connect"`
	Docker     docker.Config `yaml:"docker"`
	Loglevel   string        `yaml:"loglevel"`
	NumWorkers string        `yaml:"num_workers"`
	WorkingDir string        `yaml:"working_dir"`
}

func ReadConfig

func ReadConfig(path string) (Config, error)

func (*Config) DebugAddr

func (c *Config) DebugAddr() string

func (*Config) GetNumWorkers

func (c *Config) GetNumWorkers() int

func (*Config) LogLevel

func (c *Config) LogLevel() log.Level

type Connect

type Connect struct {
	Host     string `yaml:"host"`
	Port     uint32 `yaml:"port"`
	Username string `yaml:"username"`
	Password string `yaml:"password"`
	Database string `yaml:"database"`
}

func (*Connect) DSN

func (c *Connect) DSN() string

Jump to

Keyboard shortcuts

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