config

package
v1.43.1 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package config is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContextNames

func ContextNames(cfg Config) []string

func DefaultConfigPath

func DefaultConfigPath() string

func RemoveContext

func RemoveContext(cfg Config, context *Context)

Types

type Config

type Config interface {
	Write() error

	ActiveContext() *Context
	SetActiveContext(*Context)
	Contexts() []*Context
	SetContexts([]*Context)
	Endpoint() string
	SetEndpoint(string)

	SSHPath() string
}

func ReadConfig

func ReadConfig(path string) (Config, error)

type Context

type Context struct {
	Name  string
	Token string
}

func ContextByName

func ContextByName(cfg Config, name string) *Context

type MockConfig

type MockConfig struct {
	// contains filtered or unexported fields
}

MockConfig is a mock of Config interface.

func NewMockConfig

func NewMockConfig(ctrl *gomock.Controller) *MockConfig

NewMockConfig creates a new mock instance.

func (*MockConfig) ActiveContext

func (m *MockConfig) ActiveContext() *Context

ActiveContext mocks base method.

func (*MockConfig) Contexts

func (m *MockConfig) Contexts() []*Context

Contexts mocks base method.

func (*MockConfig) EXPECT

func (m *MockConfig) EXPECT() *MockConfigMockRecorder

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

func (*MockConfig) Endpoint

func (m *MockConfig) Endpoint() string

Endpoint mocks base method.

func (*MockConfig) SSHPath added in v1.43.1

func (m *MockConfig) SSHPath() string

SSHPath mocks base method.

func (*MockConfig) SetActiveContext

func (m *MockConfig) SetActiveContext(arg0 *Context)

SetActiveContext mocks base method.

func (*MockConfig) SetContexts

func (m *MockConfig) SetContexts(arg0 []*Context)

SetContexts mocks base method.

func (*MockConfig) SetEndpoint

func (m *MockConfig) SetEndpoint(arg0 string)

SetEndpoint mocks base method.

func (*MockConfig) Write

func (m *MockConfig) Write() error

Write mocks base method.

type MockConfigMockRecorder

type MockConfigMockRecorder struct {
	// contains filtered or unexported fields
}

MockConfigMockRecorder is the mock recorder for MockConfig.

func (*MockConfigMockRecorder) ActiveContext

func (mr *MockConfigMockRecorder) ActiveContext() *gomock.Call

ActiveContext indicates an expected call of ActiveContext.

func (*MockConfigMockRecorder) Contexts

func (mr *MockConfigMockRecorder) Contexts() *gomock.Call

Contexts indicates an expected call of Contexts.

func (*MockConfigMockRecorder) Endpoint

func (mr *MockConfigMockRecorder) Endpoint() *gomock.Call

Endpoint indicates an expected call of Endpoint.

func (*MockConfigMockRecorder) SSHPath added in v1.43.1

func (mr *MockConfigMockRecorder) SSHPath() *gomock.Call

SSHPath indicates an expected call of SSHPath.

func (*MockConfigMockRecorder) SetActiveContext

func (mr *MockConfigMockRecorder) SetActiveContext(arg0 interface{}) *gomock.Call

SetActiveContext indicates an expected call of SetActiveContext.

func (*MockConfigMockRecorder) SetContexts

func (mr *MockConfigMockRecorder) SetContexts(arg0 interface{}) *gomock.Call

SetContexts indicates an expected call of SetContexts.

func (*MockConfigMockRecorder) SetEndpoint

func (mr *MockConfigMockRecorder) SetEndpoint(arg0 interface{}) *gomock.Call

SetEndpoint indicates an expected call of SetEndpoint.

func (*MockConfigMockRecorder) Write

func (mr *MockConfigMockRecorder) Write() *gomock.Call

Write indicates an expected call of Write.

Jump to

Keyboard shortcuts

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