Documentation
¶
Overview ¶
Package config defines all the variables that users can set (through flags, environment vars, or the config file) to affect command behavior.
The variables are grouped into a hierarchy of structs that matches the subcommand tree. Each struct defines destination fields and the mapping from command-specific flags into those fields.
These structs are defined in a separate package from the actual behavior (in the 'internal/command' package) so that nested commands can refer to the "inherited" config from parent commands without creating an import loop.
Index ¶
- Variables
- type API
- type Cluster
- type ClusterAdd
- type ClusterList
- type ClusterToken
- type ClusterTokenCreate
- type ClusterTokenDelete
- type ClusterTokenList
- type OutputFormat
- type Root
- type RouteGroup
- type RouteGroupApply
- type RouteGroupDelete
- type RouteGroupGet
- type RouteGroupList
- type Sandbox
- type SandboxApply
- type SandboxDelete
- type SandboxGet
- type SandboxList
- type TemplateVal
- type TemplateVals
Constants ¶
This section is empty.
Variables ¶
var ( VarRefRx = regexp.MustCompile(`\@\{([a-zA-Z][a-zA-Z0-9_.-]*)\}`) VarRx = regexp.MustCompile(`^[a-zA-Z][a-zA-Z0-9_.-]*$`) )
Functions ¶
This section is empty.
Types ¶
type API ¶ added in v0.3.3
type API struct { Root // Config file values Org string MaskedAPIKey string APIURL string // Runtime values Client *client.SignadotAPI `json:"-"` }
func (*API) InitAPIConfig ¶ added in v0.3.3
func (*API) MarshalJSON ¶ added in v0.3.3
for error reporting, we select the config that the user controls.
type ClusterAdd ¶ added in v0.2.0
func (*ClusterAdd) AddFlags ¶ added in v0.2.0
func (c *ClusterAdd) AddFlags(cmd *cobra.Command)
type ClusterList ¶
type ClusterList struct {
*Cluster
}
type ClusterToken ¶
type ClusterToken struct {
*Cluster
}
type ClusterTokenCreate ¶
type ClusterTokenCreate struct { *ClusterToken // Flags ClusterName string }
func (*ClusterTokenCreate) AddFlags ¶
func (c *ClusterTokenCreate) AddFlags(cmd *cobra.Command)
type ClusterTokenDelete ¶ added in v0.2.0
type ClusterTokenDelete struct { *ClusterToken // Flags ClusterName string }
func (*ClusterTokenDelete) AddFlags ¶ added in v0.2.0
func (c *ClusterTokenDelete) AddFlags(cmd *cobra.Command)
type ClusterTokenList ¶ added in v0.2.0
type ClusterTokenList struct { *ClusterToken // Flags ClusterName string }
func (*ClusterTokenList) AddFlags ¶ added in v0.2.0
func (c *ClusterTokenList) AddFlags(cmd *cobra.Command)
type OutputFormat ¶
type OutputFormat string
const ( OutputFormatDefault OutputFormat = "" OutputFormatYAML OutputFormat = "yaml" OutputFormatJSON OutputFormat = "json" )
func (*OutputFormat) Set ¶
func (o *OutputFormat) Set(v string) error
Set implements the pflag.Value interface.
func (*OutputFormat) String ¶
func (o *OutputFormat) String() string
func (*OutputFormat) Type ¶
func (o *OutputFormat) Type() string
Type implements the pflag.Value interface.
type Root ¶
type Root struct { // Config file values DashboardURL *url.URL // Flags Debug bool ConfigFile string OutputFormat OutputFormat }
type RouteGroup ¶ added in v0.3.7
type RouteGroup struct {
*API
}
type RouteGroupApply ¶ added in v0.3.7
type RouteGroupApply struct { *RouteGroup // Flags Filename string Wait bool WaitTimeout time.Duration TemplateVals TemplateVals }
func (*RouteGroupApply) AddFlags ¶ added in v0.3.7
func (c *RouteGroupApply) AddFlags(cmd *cobra.Command)
type RouteGroupDelete ¶ added in v0.3.7
type RouteGroupDelete struct { *RouteGroup // Flags Filename string Wait bool WaitTimeout time.Duration TemplateVals TemplateVals }
func (*RouteGroupDelete) AddFlags ¶ added in v0.3.7
func (c *RouteGroupDelete) AddFlags(cmd *cobra.Command)
type RouteGroupGet ¶ added in v0.3.7
type RouteGroupGet struct {
*RouteGroup
}
type RouteGroupList ¶ added in v0.3.7
type RouteGroupList struct {
*RouteGroup
}
type SandboxApply ¶ added in v0.2.0
type SandboxApply struct { *Sandbox // Flags Filename string Wait bool WaitTimeout time.Duration TemplateVals TemplateVals }
func (*SandboxApply) AddFlags ¶ added in v0.2.0
func (c *SandboxApply) AddFlags(cmd *cobra.Command)
type SandboxDelete ¶
type SandboxDelete struct { *Sandbox // Flags Filename string Wait bool WaitTimeout time.Duration TemplateVals TemplateVals Force bool }
func (*SandboxDelete) AddFlags ¶
func (c *SandboxDelete) AddFlags(cmd *cobra.Command)
type SandboxGet ¶
type SandboxGet struct {
*Sandbox
}
type SandboxList ¶
type SandboxList struct {
*Sandbox
}
type TemplateVal ¶ added in v0.3.0
type TemplateVal struct {
Var, Val string
}
func (*TemplateVal) String ¶ added in v0.3.0
func (tv *TemplateVal) String() string
type TemplateVals ¶ added in v0.3.0
type TemplateVals []TemplateVal
func (*TemplateVals) Set ¶ added in v0.3.0
func (tvs *TemplateVals) Set(v string) error
func (*TemplateVals) String ¶ added in v0.3.0
func (tvs *TemplateVals) String() string
func (*TemplateVals) Type ¶ added in v0.3.0
func (tvs *TemplateVals) Type() string