config

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ConfigValidationErr = errors.New("invalid config")
View Source
var RepoNotFoundErr = errors.New("repo not found")

Functions

This section is empty.

Types

type Config

type Config struct {
	Repos    map[string]*ConfigRepo `yaml:"repos" json:"repos"`
	Services []Services             `yaml:"services" json:"services"`
	Global   `yaml:",inline"`
}

func (Config) Validate

func (c Config) Validate() error

type ConfigManager

type ConfigManager struct {
	Repos        []LiveRepo
	ConfigPath   string
	TagPattern   string
	Services     []Services
	EnvFilenames []string
}

func NewConfigManager

func NewConfigManager(configPath string, src []byte, d serializer.Serializer) (*ConfigManager, error)

type ConfigRepo

type ConfigRepo struct {
	Updater    string   `yaml:"updater" json:"updater,omitempty"`
	OnStart    []string `yaml:"on_start" json:"on_start,omitempty"`
	OnStop     string   `yaml:"on_stop" json:"on_stop,omitempty"`
	ExcludeTag bool     `yaml:"exclude_tag" json:"exclude_tag,omitempty"`
	Remote     string   `yaml:"remote" json:"remote,omitempty"`
	Path       string   `yaml:"rel_path" json:"rel_path,omitempty"`
	Refs       string   `yaml:"main_stream" json:"main_stream,omitempty"`
}

type Global

type Global struct {
	RootPath     string   `yaml:"root_path" json:"root_path,omitempty"`
	RootRefs     string   `yaml:"root_main_stream" json:"root_main_stream"`
	EnvFilenames []string `yaml:"env_filenames" json:"env_filenames"`
	TagPattern   string   `yaml:"tag_pattern" json:"tag_pattern"`
}

type LiveRepo

type LiveRepo struct {
	Name      string
	GitConfig git.Repo
	Config    ConfigRepo
}

type Services

type Services struct {
	Tag     string `yaml:"tag" json:"tag,omitempty"`
	Cmd     string `yaml:"cmd" json:"cmd,omitempty"`
	Dispose string `yaml:"dispose" json:"dispose,omitempty"`
}

Jump to

Keyboard shortcuts

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