Documentation ¶
Overview ¶
Package state is a generated GoMock package.
Index ¶
- Variables
- func MarshalConfig(c *Config) ([]byte, error)
- func UnmarshalConfig(config *Config, data []byte) error
- func WrapCtx(ctx context.Context, fn func(context.Context, *cobra.Command, []string) error) func(*cobra.Command, []string) error
- type ActionWaiter
- type Config
- type ConfigContext
- type MockActionWaiter
- type MockActionWaiterMockRecorder
- type MockTokenEnsurer
- type MockTokenEnsurerMockRecorder
- 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) LoadBalancerName(id int) 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) PlacementGroupNames() []string
- func (c *State) PrimaryIPNames() []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
- type TokenEnsurer
Constants ¶
This section is empty.
Variables ¶
var DefaultConfigPath string
var ErrConfigPathUnknown = errors.New("config file path unknown")
Functions ¶
func MarshalConfig ¶
func UnmarshalConfig ¶
Types ¶
type ActionWaiter ¶ added in v1.23.0
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 MockActionWaiter ¶ added in v1.23.0
type MockActionWaiter struct {
// contains filtered or unexported fields
}
MockActionWaiter is a mock of ActionWaiter interface.
func NewMockActionWaiter ¶ added in v1.23.0
func NewMockActionWaiter(ctrl *gomock.Controller) *MockActionWaiter
NewMockActionWaiter creates a new mock instance.
func (*MockActionWaiter) ActionProgress ¶ added in v1.23.0
ActionProgress mocks base method.
func (*MockActionWaiter) EXPECT ¶ added in v1.23.0
func (m *MockActionWaiter) EXPECT() *MockActionWaiterMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockActionWaiter) WaitForActions ¶ added in v1.23.0
WaitForActions mocks base method.
type MockActionWaiterMockRecorder ¶ added in v1.23.0
type MockActionWaiterMockRecorder struct {
// contains filtered or unexported fields
}
MockActionWaiterMockRecorder is the mock recorder for MockActionWaiter.
func (*MockActionWaiterMockRecorder) ActionProgress ¶ added in v1.23.0
func (mr *MockActionWaiterMockRecorder) ActionProgress(arg0, arg1 interface{}) *gomock.Call
ActionProgress indicates an expected call of ActionProgress.
func (*MockActionWaiterMockRecorder) WaitForActions ¶ added in v1.23.0
func (mr *MockActionWaiterMockRecorder) WaitForActions(arg0, arg1 interface{}) *gomock.Call
WaitForActions indicates an expected call of WaitForActions.
type MockTokenEnsurer ¶ added in v1.23.0
type MockTokenEnsurer struct {
// contains filtered or unexported fields
}
MockTokenEnsurer is a mock of TokenEnsurer interface.
func NewMockTokenEnsurer ¶ added in v1.23.0
func NewMockTokenEnsurer(ctrl *gomock.Controller) *MockTokenEnsurer
NewMockTokenEnsurer creates a new mock instance.
func (*MockTokenEnsurer) EXPECT ¶ added in v1.23.0
func (m *MockTokenEnsurer) EXPECT() *MockTokenEnsurerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockTokenEnsurer) EnsureToken ¶ added in v1.23.0
func (m *MockTokenEnsurer) EnsureToken(arg0 *cobra.Command, arg1 []string) error
EnsureToken mocks base method.
type MockTokenEnsurerMockRecorder ¶ added in v1.23.0
type MockTokenEnsurerMockRecorder struct {
// contains filtered or unexported fields
}
MockTokenEnsurerMockRecorder is the mock recorder for MockTokenEnsurer.
func (*MockTokenEnsurerMockRecorder) EnsureToken ¶ added in v1.23.0
func (mr *MockTokenEnsurerMockRecorder) EnsureToken(arg0, arg1 interface{}) *gomock.Call
EnsureToken indicates an expected call of EnsureToken.
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 }