config

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2018 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadGlobalConfig added in v0.2.0

func ReadGlobalConfig(args ...string) error

ReadGlobalConfig tries to reads the global config.

Types

type Config

type Config struct {
	Env     []string `json:"env"`
	Image   string   `json:"image"`
	Host    string   `json:"host"`
	Domains []string `json:"domains"`
	Links   []string `json:"links"`
	Port    int      `json:"port"`
	Path    string   `json:"path"`
}

Config represents application configuration.

func ReadConfig

func ReadConfig(path string) (*Config, error)

ReadConfig tries to reads the given path or create a default config.

func (*Config) Default

func (c *Config) Default() error

Default sets the default config.

func (*Config) Hosts added in v0.4.0

func (c *Config) Hosts() []string

Hosts returns all hosts that the application container should use.

type Docker added in v0.2.0

type Docker struct {
	Host string `json:"host"`
}

Docker represents docker configuration.

func (*Docker) Default added in v0.2.0

func (d *Docker) Default()

Default sets the default docker global config.

type GlobalConfig added in v0.2.0

type GlobalConfig struct {
	Docker *Docker `json:"docker"`
	Proxy  *Proxy  `json:"proxy"`
	TLD    string  `json:"tld"`
}

GlobalConfig represents global configuration.

func Global added in v0.2.0

func Global() *GlobalConfig

Global returns the global config.

func (*GlobalConfig) Default added in v0.2.0

func (g *GlobalConfig) Default()

Default sets the default global config.

type Proxy added in v0.2.0

type Proxy struct {
	Type string `json:"type"`
}

Proxy represents type configuration.

func (*Proxy) Default added in v0.2.0

func (p *Proxy) Default()

Default sets the default proxy global config.

Jump to

Keyboard shortcuts

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