Documentation
¶
Index ¶
- Variables
- func MarshalConfig(c *Config) ([]byte, error)
- func UnmarshalConfig(config *Config, data []byte) error
- type Config
- type ConfigContext
- type RawConfig
- type RawConfigContext
- type State
- func (c *State) ActionProgress(ctx context.Context, action *hcloud.Action) error
- func (c *State) ActionsProgresses(ctx context.Context, actions []*hcloud.Action) error
- func (c *State) CertificateLabelKeys(idOrName string) []string
- func (c *State) CertificateNames() []string
- func (c *State) Client() *hcloud.Client
- func (c *State) DataCenterNames() []string
- func (c *State) EnsureToken(cmd *cobra.Command, args []string) error
- func (c *State) FirewallLabelKeys(idOrName string) []string
- func (c *State) FirewallNames() []string
- func (c *State) FloatingIPLabelKeys(idOrName string) []string
- func (c *State) FloatingIPNames() []string
- func (c *State) ISONames() []string
- func (c *State) ImageLabelKeys(idOrName string) []string
- func (c *State) ImageNames() []string
- func (c *State) LoadBalancerLabelKeys(idOrName string) []string
- func (c *State) LoadBalancerNames() []string
- func (c *State) LoadBalancerTypeNames() []string
- func (c *State) LocationNames() []string
- func (c *State) NetworkLabelKeys(idOrName string) []string
- func (c *State) NetworkName(id int) string
- func (c *State) NetworkNames() []string
- func (c *State) ReadConfig() error
- func (c *State) ReadEnv()
- func (c *State) SSHKeyLabelKeys(idOrName string) []string
- func (c *State) SSHKeyNames() []string
- func (c *State) ServerLabelKeys(idOrName string) []string
- func (c *State) ServerName(id int) string
- func (c *State) ServerNames() []string
- func (c *State) ServerTypeNames() []string
- func (c *State) Terminal() bool
- func (c *State) VolumeLabelKeys(idOrName string) []string
- func (c *State) VolumeNames() []string
- func (c *State) WaitForActions(ctx context.Context, actions []*hcloud.Action) error
- func (c *State) Wrap(f func(*State, *cobra.Command, []string) error) func(*cobra.Command, []string) error
- func (c *State) WriteConfig() error
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultConfigPath string
View Source
var ErrConfigPathUnknown = errors.New("config file path unknown")
Functions ¶
func MarshalConfig ¶
func UnmarshalConfig ¶
Types ¶
type Config ¶
type Config struct { Endpoint string ActiveContext *ConfigContext Contexts []*ConfigContext }
func (*Config) ContextByName ¶
func (config *Config) ContextByName(name string) *ConfigContext
func (*Config) ContextNames ¶
func (*Config) RemoveContext ¶
func (config *Config) RemoveContext(context *ConfigContext)
type ConfigContext ¶
type RawConfig ¶
type RawConfig struct { ActiveContext string `toml:"active_context,omitempty"` Contexts []RawConfigContext `toml:"contexts"` }
type RawConfigContext ¶
type State ¶
type State struct { Token string Endpoint string Context context.Context Config *Config ConfigPath string Debug bool DebugFilePath string // contains filtered or unexported fields }
func (*State) ActionProgress ¶
func (*State) ActionsProgresses ¶
func (*State) CertificateLabelKeys ¶
func (*State) CertificateNames ¶
func (*State) DataCenterNames ¶
func (*State) FirewallLabelKeys ¶
func (*State) FirewallNames ¶
func (*State) FloatingIPLabelKeys ¶
func (*State) FloatingIPNames ¶
func (*State) ImageLabelKeys ¶
func (*State) ImageNames ¶
func (*State) LoadBalancerLabelKeys ¶
func (*State) LoadBalancerNames ¶
func (*State) LoadBalancerTypeNames ¶
func (*State) LocationNames ¶
func (*State) NetworkLabelKeys ¶
func (*State) NetworkName ¶
func (*State) NetworkNames ¶
func (*State) ReadConfig ¶
func (*State) SSHKeyLabelKeys ¶
func (*State) SSHKeyNames ¶
func (*State) ServerLabelKeys ¶
func (*State) ServerName ¶
func (*State) ServerNames ¶
func (*State) ServerTypeNames ¶
func (*State) VolumeLabelKeys ¶
func (*State) VolumeNames ¶
func (*State) WaitForActions ¶
func (*State) WriteConfig ¶
Click to show internal directories.
Click to hide internal directories.