Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DoctlConfig ¶
type DoctlConfig struct {
// DefaultContextName is the name of the top-level context in the `doctl` config file.
// Typically: "default"
DefaultContextName string `yaml:"context"`
// DefaultAuthContextAccessToken is the access token associated with the DefaultContextName
DefaultAuthContextAccessToken string `yaml:"access-token"`
// AuthContexts represents a mapping {context_name -> token}
AuthContexts map[string]string `yaml:"auth-contexts"`
Kubeconfig Kubeconfig `yaml:"kubeconfig"`
HttpRetryMax int `yaml:"http-retry-max"`
HttpRetryWaitMax int `yaml:"http-retry-wait-max"`
HttpRetryWaitMin int `yaml:"http-retry-wait-min"`
ApiUrl string `yaml:"api-url"`
}
DoctlConfig represents the `doctl` config file which is created when users interact with the `doctl` command line tool (such as when running `doctl auth init`)
func GetDoctlConfiguration ¶
func GetDoctlConfiguration() (*DoctlConfig, error)
GetDoctlConfiguration parses the `doctl` config.yaml file to return a map(context_name -> access_token} A context_name in `doctl` represents a DO account.
type Kubeconfig ¶
type Kubeconfig struct {
// SaveConfig contains configuration when saving the DOKS kubeconfig via `doctl`
SaveConfig Save `yaml:"save"`
}
Kubeconfig is the kubeconfig sub-section of the `doctl` config file
type Save ¶
type Save struct {
// ExpirySeconds is the expiratio nseconds for tokens used as authentication of created kubeconfigs
// The default value is 0, in which case DO's default will be taken (defaults to 7days)
ExpirySeconds string `yaml:"expiry-seconds"`
}
Save contains configuration when saving the DOKS kubeconfig via `doctl`