Documentation
¶
Index ¶
- type CommandRunner
- type ConstructError
- type ContextManager
- func (m *ContextManager) DeleteContext(contextName string) error
- func (m *ContextManager) DeleteToken(contextName string) error
- func (m *ContextManager) GetContext(contextName string) (*api.EndpointContext, error)
- func (m *ContextManager) ListContexts() ([]string, error)
- func (m *ContextManager) LoadContext() (*api.EndpointContexts, error)
- func (m *ContextManager) RetrieveToken(contextName string) (string, error)
- func (m *ContextManager) SetCurrentContext(contextName string) error
- func (m *ContextManager) StoreToken(contextName string, token string) error
- func (m *ContextManager) UpsertContext(contextName string, kind string, address string, setCurrent bool, ...) (bool, error)
- type DefaultCommandRunner
- type DefaultRuntimeInfo
- type DefaultUserInfo
- func (u *DefaultUserInfo) ConstructConfigDir() (string, error)
- func (u *DefaultUserInfo) ConstructDataDir() (string, error)
- func (u *DefaultUserInfo) ConstructLogDir() (string, error)
- func (u *DefaultUserInfo) ConstructRuntimeDir() (string, error)
- func (u *DefaultUserInfo) Cwd() (string, error)
- func (u *DefaultUserInfo) HomeDir() (string, error)
- func (u *DefaultUserInfo) IsRoot() (bool, error)
- func (u *DefaultUserInfo) UserID() (string, error)
- type ErrorSource
- type RuntimeInfo
- type UserInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommandRunner ¶
type ConstructError ¶
type ConstructError struct {
Source ErrorSource
Message string
Err error
}
func Errorf ¶
func Errorf(source ErrorSource, format string, a ...any) *ConstructError
func Wrap ¶
func Wrap(source ErrorSource, err error, format string, a ...any) *ConstructError
func (*ConstructError) As ¶
func (e *ConstructError) As(target interface{}) bool
func (*ConstructError) Error ¶
func (e *ConstructError) Error() string
func (*ConstructError) Is ¶
func (e *ConstructError) Is(target error) bool
func (*ConstructError) Unwrap ¶
func (e *ConstructError) Unwrap() error
type ContextManager ¶
type ContextManager struct {
// contains filtered or unexported fields
}
func NewContextManager ¶
func NewContextManager(fs *afero.Afero, userInfo UserInfo) *ContextManager
func (*ContextManager) DeleteContext ¶
func (m *ContextManager) DeleteContext(contextName string) error
func (*ContextManager) DeleteToken ¶
func (m *ContextManager) DeleteToken(contextName string) error
func (*ContextManager) GetContext ¶
func (m *ContextManager) GetContext(contextName string) (*api.EndpointContext, error)
func (*ContextManager) ListContexts ¶
func (m *ContextManager) ListContexts() ([]string, error)
func (*ContextManager) LoadContext ¶
func (m *ContextManager) LoadContext() (*api.EndpointContexts, error)
func (*ContextManager) RetrieveToken ¶
func (m *ContextManager) RetrieveToken(contextName string) (string, error)
func (*ContextManager) SetCurrentContext ¶
func (m *ContextManager) SetCurrentContext(contextName string) error
func (*ContextManager) StoreToken ¶
func (m *ContextManager) StoreToken(contextName string, token string) error
func (*ContextManager) UpsertContext ¶
func (m *ContextManager) UpsertContext(contextName string, kind string, address string, setCurrent bool, auth *api.AuthConfig) (bool, error)
type DefaultCommandRunner ¶
type DefaultCommandRunner struct{}
type DefaultRuntimeInfo ¶
type DefaultRuntimeInfo struct{}
func (*DefaultRuntimeInfo) GOOS ¶
func (r *DefaultRuntimeInfo) GOOS() string
type DefaultUserInfo ¶
type DefaultUserInfo struct {
// contains filtered or unexported fields
}
func NewDefaultUserInfo ¶
func NewDefaultUserInfo(fs afero.Fs) *DefaultUserInfo
func (*DefaultUserInfo) ConstructConfigDir ¶
func (u *DefaultUserInfo) ConstructConfigDir() (string, error)
func (*DefaultUserInfo) ConstructDataDir ¶
func (u *DefaultUserInfo) ConstructDataDir() (string, error)
func (*DefaultUserInfo) ConstructLogDir ¶
func (u *DefaultUserInfo) ConstructLogDir() (string, error)
func (*DefaultUserInfo) ConstructRuntimeDir ¶
func (u *DefaultUserInfo) ConstructRuntimeDir() (string, error)
func (*DefaultUserInfo) Cwd ¶
func (u *DefaultUserInfo) Cwd() (string, error)
func (*DefaultUserInfo) HomeDir ¶
func (u *DefaultUserInfo) HomeDir() (string, error)
func (*DefaultUserInfo) IsRoot ¶
func (u *DefaultUserInfo) IsRoot() (bool, error)
func (*DefaultUserInfo) UserID ¶
func (u *DefaultUserInfo) UserID() (string, error)
type ErrorSource ¶
type ErrorSource int
const ( ErrorSourceTool ErrorSource = iota ErrorSourceAgent ErrorSourceSystem ErrorSourceUser ErrorSourceUnknown )
type RuntimeInfo ¶
type RuntimeInfo interface {
GOOS() string
}
Click to show internal directories.
Click to hide internal directories.