Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Set = wire.NewSet( wire.Struct(new(Standalone), "*"), wire.Bind(new(Interface), new(*Standalone)), )
Set provides the use-case.
Functions ¶
This section is empty.
Types ¶
type Input ¶
type Input struct { KubeconfigFilename string // Default to the environment variable or global config as kubectl KubeconfigContext kubeconfig.ContextName // Default to the current context but ignored if KubeconfigUser is set KubeconfigUser kubeconfig.UserName // Default to the user of the context GrantOptionSet authentication.GrantOptionSet TLSClientConfig tlsclientconfig.Config }
Input represents an input DTO of the use-case.
type MockInterface ¶ added in v1.25.2
MockInterface is an autogenerated mock type for the Interface type
func NewMockInterface ¶ added in v1.25.2
func NewMockInterface(t mockConstructorTestingTNewMockInterface) *MockInterface
NewMockInterface creates a new instance of MockInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*MockInterface) Do ¶ added in v1.25.2
func (_m *MockInterface) Do(ctx context.Context, in Input) error
Do provides a mock function with given fields: ctx, in
func (*MockInterface) EXPECT ¶ added in v1.25.2
func (_m *MockInterface) EXPECT() *MockInterface_Expecter
type MockInterface_Do_Call ¶ added in v1.25.2
MockInterface_Do_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Do'
func (*MockInterface_Do_Call) Return ¶ added in v1.25.2
func (_c *MockInterface_Do_Call) Return(_a0 error) *MockInterface_Do_Call
func (*MockInterface_Do_Call) Run ¶ added in v1.25.2
func (_c *MockInterface_Do_Call) Run(run func(ctx context.Context, in Input)) *MockInterface_Do_Call
type MockInterface_Expecter ¶ added in v1.25.2
type MockInterface_Expecter struct {
// contains filtered or unexported fields
}
func (*MockInterface_Expecter) Do ¶ added in v1.25.2
func (_e *MockInterface_Expecter) Do(ctx interface{}, in interface{}) *MockInterface_Do_Call
Do is a helper method to define mock.On call
- ctx context.Context
- in Input
type Standalone ¶
type Standalone struct { Authentication authentication.Interface KubeconfigLoader loader.Interface KubeconfigWriter writer.Interface Logger logger.Interface }
Standalone provides the use case of explicit login.
If the current auth provider is not oidc, show the error. If the kubeconfig has a valid token, do nothing. Otherwise, update the kubeconfig.