settings

package
v3.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2017 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DEFAULT_BRANCH = "master"
	DEFAULT_PATH   = "deployment/k8s/"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ProjectConfig

type ProjectConfig struct {
	Services Services `json:"services"`
	Settings Settings `json:"settings"`
}

func ReadProjectConfigFrom

func ReadProjectConfigFrom(filename string) (*ProjectConfig, error)

func (*ProjectConfig) Format

func (c *ProjectConfig) Format(s fmt.State, verb rune)

func (ProjectConfig) String

func (c ProjectConfig) String() string

func (*ProjectConfig) WriteTo

func (c *ProjectConfig) WriteTo(filename string) error

type Service

type Service struct {
	Name           string         `yaml:"name,omitempty"`
	Repository     string         `yaml:"repo" mapstructure:"repo"`
	Path           string         `yaml:"path,omitempty"`
	Branch         string         `yaml:"branch,omitempty"`
	TemplateValues TemplateValues `yaml:"template-values"`
}

func (*Service) Clean

func (s *Service) Clean()

func (*Service) GuessName

func (s *Service) GuessName() string

type Services

type Services []*Service

func (*Services) Clean

func (s *Services) Clean()

func (*Services) Shuffle

func (s *Services) Shuffle()

type Settings

type Settings struct {
	Kubeconfig           string         `yaml:"kubeconfig"`
	Output               string         `yaml:"output"`
	Sleep                time.Duration  `yaml:"sleep"`
	SkipShuffle          bool           `yaml:"skip-shuffle" mapstructure:"skip-shuffle"`
	RetrySleep           time.Duration  `yaml:"retry-sleep" mapstructure:"retry-sleep"`
	RetryCount           int            `yaml:"retry-count" mapstructure:"retry-count"`
	IgnoreDeployFailures bool           `yaml:"ignore-deploy-failures" mapstructure:"ignore-deploy-failures"`
	TemplateValues       TemplateValues `yaml:"template-values" mapstructure:"template-values"`
}

type SettingsBuilder

type SettingsBuilder func() ProjectConfig

func NewBuilder

func NewBuilder(fs *pflag.FlagSet) SettingsBuilder

type TemplateValue

type TemplateValue struct {
	Name  string `yaml:"name" mapstructure:"name"`
	Value string `yaml:"value" mapstructure:"value"`
}

type TemplateValues

type TemplateValues []TemplateValue

func (TemplateValues) ToMap

func (tv TemplateValues) ToMap() map[string]string

Jump to

Keyboard shortcuts

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