models

package
v0.0.0-...-3708987 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2019 License: MIT Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Name      string                      `yaml:"name"` // Supporting both JSON and YAML.
	Envs      []Env                       `yaml:"envs"`
	Groups    []Group                     `yaml:"groups"`
	Resources []Resource                  `yaml:"resources"`
	Features  map[interface{}]interface{} `yaml:"features"`
}

func Load

func Load(y []byte) (Config, error)

func LoadFromFile

func LoadFromFile(path string) (Config, error)

func (*Config) EnvsWithFeature

func (c *Config) EnvsWithFeature(feature string) []Env

func (*Config) Feature

func (c *Config) Feature(feature string) string

func (*Config) FeatureList

func (c *Config) FeatureList(feature string) []string

func (*Config) GenericFeature

func (c *Config) GenericFeature(feature string) interface{}

func (*Config) HasEnvsWithFeature

func (c *Config) HasEnvsWithFeature(feature string) bool

func (*Config) HasFeature

func (c *Config) HasFeature(feature string) bool

type Env

type Env struct {
	Name      string                      `yaml:"name"`
	DependsOn []string                    `yaml:"depends_on"`
	Features  map[interface{}]interface{} `yaml:"features"`
}

func (*Env) Feature

func (e *Env) Feature(feature string) string

func (*Env) FeatureList

func (e *Env) FeatureList(feature string) []string

func (*Env) GenericFeature

func (e *Env) GenericFeature(feature string) interface{}

func (*Env) GetDependsOn

func (f *Env) GetDependsOn() string

func (*Env) GetDependsOnArray

func (f *Env) GetDependsOnArray() []string

func (*Env) HasDependencies

func (e *Env) HasDependencies() bool

func (*Env) HasFeature

func (e *Env) HasFeature(feature string) bool

type Group

type Group struct {
	Name string `yaml:"name"`
}

type Resource

type Resource struct {
	Name string `yaml:"name"`
}

Jump to

Keyboard shortcuts

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