state

package
v1.50.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 16, 2025 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package state is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Wrap added in v1.42.0

func Wrap(s State, f func(State, *cobra.Command, []string) error) func(*cobra.Command, []string) error

func WrapCtx added in v1.23.0

func WrapCtx(
	ctx context.Context,
	fn func(context.Context, *cobra.Command, []string) error,
) func(*cobra.Command, []string) error

Types

type ActionWaiter added in v1.23.0

type ActionWaiter interface {
	WaitForActions(context.Context, *cobra.Command, ...*hcloud.Action) error
}

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) EXPECT added in v1.23.0

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockActionWaiter) WaitForActions added in v1.23.0

func (m *MockActionWaiter) WaitForActions(arg0 context.Context, arg1 *cobra.Command, arg2 ...*hcloud.Action) error

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) WaitForActions added in v1.23.0

func (mr *MockActionWaiterMockRecorder) WaitForActions(arg0, arg1 any, arg2 ...any) *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

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockTokenEnsurer) EnsureToken added in v1.23.0

func (m *MockTokenEnsurer) EnsureToken(cmd *cobra.Command, args []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(cmd, args any) *gomock.Call

EnsureToken indicates an expected call of EnsureToken.

type State

type State interface {
	context.Context

	TokenEnsurer
	ActionWaiter

	Client() hcapi2.Client
	Config() config.Config
	Terminal() terminal.Terminal
}

func New

func New(cfg config.Config) (State, error)

type TokenEnsurer added in v1.23.0

type TokenEnsurer interface {
	EnsureToken(cmd *cobra.Command, args []string) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL