Documentation
¶
Index ¶
- Constants
- func ApplyDefaults(cfg *Config)
- func DefaultBinaries() []string
- func EnabledJobNames(cfg Config) []string
- func LastRecords(records []RunRecord) map[string]RunRecord
- func LegacyManifest(binary string) (control.Manifest, bool)
- func Load(path string) (Config, Paths, error)
- func ParseEvery(value string) (time.Duration, error)
- func Uninstall(backend string) error
- type App
- type Config
- type InstallOptions
- type InstallPlan
- type Job
- type Paths
- type RunOptions
- type RunRecord
- type RunnerConfig
Constants ¶
View Source
const ConfigVersion = 1
Variables ¶
This section is empty.
Functions ¶
func ApplyDefaults ¶
func ApplyDefaults(cfg *Config)
func DefaultBinaries ¶
func DefaultBinaries() []string
func EnabledJobNames ¶
func LastRecords ¶
Types ¶
type App ¶
type App struct {
ID string `json:"id"`
Binary string `json:"binary"`
DisplayName string `json:"display_name,omitempty"`
Manifest *control.Manifest `json:"manifest,omitempty"`
Legacy bool `json:"legacy,omitempty"`
Found bool `json:"found"`
Path string `json:"path,omitempty"`
Error string `json:"error,omitempty"`
}
type Config ¶
type Config struct {
Version int `toml:"version" json:"version"`
Runner RunnerConfig `toml:"runner" json:"runner"`
Jobs map[string]Job `toml:"jobs" json:"jobs"`
}
func DefaultConfig ¶
func DefaultConfig() Config
type InstallOptions ¶
type InstallPlan ¶
type InstallPlan struct {
Backend string `json:"backend"`
Path string `json:"path,omitempty"`
Command []string `json:"command,omitempty"`
Content string `json:"content,omitempty"`
}
func Install ¶
func Install(opts InstallOptions) (InstallPlan, error)
func PlanInstall ¶
func PlanInstall(opts InstallOptions) (InstallPlan, error)
type Job ¶
type Job struct {
Enabled bool `toml:"enabled" json:"enabled"`
Every string `toml:"every,omitempty" json:"every,omitempty"`
Command []string `toml:"command" json:"command"`
Repos []string `toml:"repos,omitempty" json:"repos,omitempty"`
WorkDir string `toml:"work_dir,omitempty" json:"work_dir,omitempty"`
Env []string `toml:"env,omitempty" json:"env,omitempty"`
}
type Paths ¶
type Paths struct {
ConfigPath string
BaseDir string
LogDir string
StateDir string
LockPath string
History string
}
func DefaultPaths ¶
type RunOptions ¶
type RunRecord ¶
type RunRecord struct {
ID string `json:"id"`
Job string `json:"job"`
Command []string `json:"command"`
Repo string `json:"repo,omitempty"`
StartedAt string `json:"started_at"`
FinishedAt string `json:"finished_at"`
DurationMs int64 `json:"duration_ms"`
ExitCode int `json:"exit_code"`
Status string `json:"status"`
LogPath string `json:"log_path"`
Error string `json:"error,omitempty"`
}
func ReadHistory ¶
type RunnerConfig ¶
Click to show internal directories.
Click to hide internal directories.