Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateDir ¶ added in v0.1.3
func CreateDir() error
CreateDir creates the config directory and all necessary parent directories missing. It returns any error it encounters with creating the directory.
func DirExists ¶ added in v0.1.3
DirExists returns a bool and error representing whether or not a config directory exists for the current user, and any errors it encounters with statting the existence of the directory.
func FileExists ¶ added in v0.1.3
FileExists returns a bool and error representing whether or not a config file exists for the current user, and any errors it encounters with statting the existence of the file.
Types ¶
type Config ¶
type Config struct {
ReleaseBranch string `yaml:"release_branch"`
Github *GithubHost `yaml:"github.com"`
}
Config represents the config file for train
func ParseFromFile ¶
ParseFromFile reads the train config file from the home directory. It returns any errors it encounters with parsing the file.
type GithubEnsures ¶ added in v0.2.0
type GithubHost ¶ added in v0.2.0
type GithubHost struct {
Token string `yaml:"token"`
Ensures *GithubEnsures `yaml:"ensures"`
Ignores *GithubIgnores `yaml:"ignores"`
Limits *Limits `yaml:"limits"`
}
GithubHost represents a single host for which train has a configuration