Documentation
¶
Index ¶
- Constants
- Variables
- func GetExample() string
- func Write(fs billy.Filesystem, filepath string, cfg *Config) error
- type Config
- func (c Config) GetGroupBase(group, resolver string) (base gp.GardenPath, notFound []string, err error)
- func (c Config) GetGroupBaseAll(resolver string) (groups map[string]gp.GardenPath, notFound []string, err error)
- func (c Config) GetGroups(plan string) map[string]bool
- func (r Config) IsEqual(other *Config) bool
Constants ¶
View Source
const ( ModeFile = "file" ModeLink = "link" ModeDefault = ModeFile Version1 = "v1" ConfigVersion = Version1 )
View Source
const (
ConfigFileName = "dotato.yaml"
)
Variables ¶
Functions ¶
func GetExample ¶
func GetExample() string
Types ¶
type Config ¶
type Config struct {
Version string `yaml:"version"`
Mode string `yaml:"mode"`
Plans map[string][]string `yaml:"plans"`
Groups map[string]map[string]string `yaml:"groups"`
}
func NewFromByte ¶
func NewFromString ¶
func ReadRecur ¶
func ReadRecur(fs billy.Filesystem, dir gp.GardenPath, filename string) (*Config, gp.GardenPath, error)
ReadConfigRecur tries to find config file by walking up the directory tree. It returns the directory of the config file.
func (Config) GetGroupBase ¶
func (Config) GetGroupBaseAll ¶
func (c Config) GetGroupBaseAll(resolver string) (groups map[string]gp.GardenPath, notFound []string, err error)
Returns:
- groups - map of group and base pairs
- notFound - env vars that are not found in the base
- err - error if any
Click to show internal directories.
Click to hide internal directories.