Documentation ¶
Overview ¶
Package config provides the defined CLI config actions for Vela.
Usage:
import "github.com/go-vela/cli/action/config"
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct { Address string `yaml:"addr,omitempty"` Token string `yaml:"token,omitempty"` AccessToken string `yaml:"access_token,omitempty"` RefreshToken string `yaml:"refresh_token,omitempty"` Version string `yaml:"version,omitempty"` }
API represents the API related configuration fields populated in the config file to perform requests with Vela.
type Compiler ¶ added in v0.10.0
type Compiler struct {
GitHub *GitHub `yaml:"github,omitempty"`
}
Compiler represents the compiler configuration fields populated in the config file to perform requests with Vela.
type Config ¶
type Config struct { Action string File string Addr string Token string AccessToken string RefreshToken string Version string LogLevel string NoGit string Org string Repo string Engine string Type string GitHub *GitHub UpdateFlags map[string]string RemoveFlags []string Output string }
Config represents the configuration necessary to perform config related quests with Vela.
func (*Config) Load ¶
Load reads the config file and sets the values based off the provided configuration.
func (*Config) Remove ¶
Remove deletes one or more fields from the config file based off the provided configuration.
func (*Config) Update ¶
Update modifies one or more fields from the config file based off the provided configuration.
type ConfigFile ¶
type ConfigFile struct { API *API `yaml:"api,omitempty"` Log *Log `yaml:"log,omitempty"` NoGit string `yaml:"no-git,omitempty"` Secret *Secret `yaml:"secret,omitempty"` Compiler *Compiler `yaml:"compiler,omitempty"` Output string `yaml:"output,omitempty"` Org string `yaml:"org,omitempty"` Repo string `yaml:"repo,omitempty"` }
ConfigFile represents the configuration file to perform config related requests with Vela.
func (*ConfigFile) Empty ¶
func (c *ConfigFile) Empty() bool
Empty checks if the config file contains empty values.
type GitHub ¶ added in v0.10.0
GitHub represents the compiler configuration fields populated in the config file to perform requests with Vela.