core

package
v0.61.0 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AppHelpGroup = cobrautil.HelpSection{
		Key:   cmdGroupKey,
		Value: "app",
		Title: "App Commands:",
	}
	AppSupportHelpGroup = cobrautil.HelpSection{
		Key:   cmdGroupKey,
		Value: "app-support",
		Title: "App Support Commands:",
	}
	MiscHelpGroup = cobrautil.HelpSection{
		Key:   cmdGroupKey,
		Value: "misc",
		Title: "Misc Commands:",
	}
	RestOfCommandsHelpGroup = cobrautil.HelpSection{
		Key:   cmdGroupKey,
		Value: "",
		Title: "Available/Other Commands:",
	}
)

Functions

func NewValueNamespace added in v0.14.0

func NewValueNamespace(ns string) uitable.ValueString

Types

type CancelSignals

type CancelSignals struct{}

func (CancelSignals) Watch

func (CancelSignals) Watch(stopFunc func())

type ConfigFactory

type ConfigFactory interface {
	ConfigurePathResolver(func() (string, error))
	ConfigureContextResolver(func() (string, error))
	ConfigureYAMLResolver(func() (string, error))
	ConfigureClient(float32, int)
	RESTConfig() (*rest.Config, error)
	DefaultNamespace() (string, error)
}

type ConfigFactoryImpl

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

func NewConfigFactoryImpl

func NewConfigFactoryImpl() *ConfigFactoryImpl

func (*ConfigFactoryImpl) ConfigureClient added in v0.53.0

func (f *ConfigFactoryImpl) ConfigureClient(qps float32, burst int)

func (*ConfigFactoryImpl) ConfigureContextResolver

func (f *ConfigFactoryImpl) ConfigureContextResolver(resolverFunc func() (string, error))

func (*ConfigFactoryImpl) ConfigurePathResolver

func (f *ConfigFactoryImpl) ConfigurePathResolver(resolverFunc func() (string, error))

func (*ConfigFactoryImpl) ConfigureYAMLResolver added in v0.53.0

func (f *ConfigFactoryImpl) ConfigureYAMLResolver(resolverFunc func() (string, error))

func (*ConfigFactoryImpl) DefaultNamespace

func (f *ConfigFactoryImpl) DefaultNamespace() (string, error)

func (*ConfigFactoryImpl) RESTConfig

func (f *ConfigFactoryImpl) RESTConfig() (*rest.Config, error)

type DedupingMessagesUI added in v0.11.0

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

func NewDedupingMessagesUI added in v0.11.0

func NewDedupingMessagesUI(ui MessagesUI) *DedupingMessagesUI

func (*DedupingMessagesUI) Notify added in v0.11.0

func (ui *DedupingMessagesUI) Notify(msgs []string)

func (*DedupingMessagesUI) NotifySection added in v0.11.0

func (ui *DedupingMessagesUI) NotifySection(msg string, args ...interface{})

type DepsFactory

type DepsFactory interface {
	DynamicClient(opts DynamicClientOpts) (dynamic.Interface, error)
	CoreClient() (kubernetes.Interface, error)
	RESTMapper() (meta.RESTMapper, error)
	ConfigureWarnings(warnings bool)
}

type DepsFactoryImpl

type DepsFactoryImpl struct {
	Warnings bool
	// contains filtered or unexported fields
}

func NewDepsFactoryImpl

func NewDepsFactoryImpl(configFactory ConfigFactory, ui ui.UI) *DepsFactoryImpl

func (*DepsFactoryImpl) ConfigureWarnings added in v0.53.0

func (f *DepsFactoryImpl) ConfigureWarnings(warnings bool)

func (*DepsFactoryImpl) CoreClient

func (f *DepsFactoryImpl) CoreClient() (kubernetes.Interface, error)

func (*DepsFactoryImpl) DynamicClient

func (f *DepsFactoryImpl) DynamicClient(opts DynamicClientOpts) (dynamic.Interface, error)

func (*DepsFactoryImpl) RESTMapper added in v0.61.0

func (f *DepsFactoryImpl) RESTMapper() (meta.RESTMapper, error)

type DynamicClientOpts added in v0.53.0

type DynamicClientOpts struct {
	Warnings bool
}

type FlagsFactory

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

func NewFlagsFactory

func NewFlagsFactory(configFactory ConfigFactory, depsFactory DepsFactory) FlagsFactory

func (FlagsFactory) NewNamespaceNameFlag

func (f FlagsFactory) NewNamespaceNameFlag(str *string) *NamespaceNameFlag

type GenerateNameFlags

type GenerateNameFlags struct {
	GenerateName bool
}

func (*GenerateNameFlags) Apply

func (*GenerateNameFlags) Set

func (s *GenerateNameFlags) Set(cmd *cobra.Command, _ FlagsFactory)

type KubeAPIFlags added in v0.53.0

type KubeAPIFlags struct {
	QPS   float32
	Burst int
}

func (*KubeAPIFlags) Configure added in v0.53.0

func (f *KubeAPIFlags) Configure(config ConfigFactory)

func (*KubeAPIFlags) Set added in v0.53.0

func (f *KubeAPIFlags) Set(cmd *cobra.Command, _ FlagsFactory)

type KubeconfigContextFlag

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

func NewKubeconfigContextFlag

func NewKubeconfigContextFlag() *KubeconfigContextFlag

func (*KubeconfigContextFlag) Resolve

func (s *KubeconfigContextFlag) Resolve() error

func (*KubeconfigContextFlag) Set

func (s *KubeconfigContextFlag) Set(val string) error

func (*KubeconfigContextFlag) String

func (s *KubeconfigContextFlag) String() string

func (*KubeconfigContextFlag) Type

func (s *KubeconfigContextFlag) Type() string

func (*KubeconfigContextFlag) Value

func (s *KubeconfigContextFlag) Value() (string, error)

type KubeconfigFlags

type KubeconfigFlags struct {
	Path    *KubeconfigPathFlag
	Context *KubeconfigContextFlag
	YAML    *KubeconfigYAMLFlag
}

func (*KubeconfigFlags) Set

func (f *KubeconfigFlags) Set(cmd *cobra.Command, _ FlagsFactory)

type KubeconfigPathFlag

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

func NewKubeconfigPathFlag

func NewKubeconfigPathFlag() *KubeconfigPathFlag

func (*KubeconfigPathFlag) Resolve

func (s *KubeconfigPathFlag) Resolve() error

func (*KubeconfigPathFlag) Set

func (s *KubeconfigPathFlag) Set(val string) error

func (*KubeconfigPathFlag) String

func (s *KubeconfigPathFlag) String() string

func (*KubeconfigPathFlag) Type

func (s *KubeconfigPathFlag) Type() string

func (*KubeconfigPathFlag) Value

func (s *KubeconfigPathFlag) Value() (string, error)

type KubeconfigYAMLFlag added in v0.53.0

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

func NewKubeconfigYAMLFlag added in v0.53.0

func NewKubeconfigYAMLFlag() *KubeconfigYAMLFlag

func (*KubeconfigYAMLFlag) Resolve added in v0.53.0

func (s *KubeconfigYAMLFlag) Resolve() error

func (*KubeconfigYAMLFlag) Set added in v0.53.0

func (s *KubeconfigYAMLFlag) Set(val string) error

func (*KubeconfigYAMLFlag) String added in v0.53.0

func (s *KubeconfigYAMLFlag) String() string

func (*KubeconfigYAMLFlag) Type added in v0.53.0

func (s *KubeconfigYAMLFlag) Type() string

func (*KubeconfigYAMLFlag) Value added in v0.53.0

func (s *KubeconfigYAMLFlag) Value() (string, error)

type MessagesUI

type MessagesUI interface {
	NotifySection(msg string, args ...interface{})
	Notify(msgs []string)
}

type NamespaceFlags

type NamespaceFlags struct {
	Name string
}

func (*NamespaceFlags) Set

func (s *NamespaceFlags) Set(cmd *cobra.Command, flagsFactory FlagsFactory)

type NamespaceNameFlag

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

func NewNamespaceNameFlag

func NewNamespaceNameFlag(value *string, configFactory ConfigFactory) *NamespaceNameFlag

func (*NamespaceNameFlag) Resolve

func (s *NamespaceNameFlag) Resolve() error

func (*NamespaceNameFlag) Set

func (s *NamespaceNameFlag) Set(val string) error

func (*NamespaceNameFlag) String

func (s *NamespaceNameFlag) String() string

func (*NamespaceNameFlag) Type

func (s *NamespaceNameFlag) Type() string

type PlainMessagesUI added in v0.11.0

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

func NewPlainMessagesUI added in v0.11.0

func NewPlainMessagesUI(ui ui.UI) *PlainMessagesUI

func (*PlainMessagesUI) Notify added in v0.11.0

func (ui *PlainMessagesUI) Notify(msgs []string)

func (*PlainMessagesUI) NotifySection added in v0.11.0

func (ui *PlainMessagesUI) NotifySection(msg string, args ...interface{})

type ValueAge

type ValueAge struct {
	T time.Time
}

func NewValueAge

func NewValueAge(t time.Time) ValueAge

func (ValueAge) Compare

func (t ValueAge) Compare(other uitable.Value) int

func (ValueAge) String

func (t ValueAge) String() string

func (ValueAge) Value

func (t ValueAge) Value() uitable.Value

type ValueStringsSingleLine

type ValueStringsSingleLine struct {
	S []string
}

func NewValueStringsSingleLine

func NewValueStringsSingleLine(s []string) ValueStringsSingleLine

func (ValueStringsSingleLine) Compare

func (t ValueStringsSingleLine) Compare(other uitable.Value) int

func (ValueStringsSingleLine) String

func (t ValueStringsSingleLine) String() string

func (ValueStringsSingleLine) Value

type ValueUnknownBool

type ValueUnknownBool struct {
	B *bool
}

func NewValueUnknownBool

func NewValueUnknownBool(b *bool) ValueUnknownBool

func (ValueUnknownBool) Compare

func (t ValueUnknownBool) Compare(_ uitable.Value) int

func (ValueUnknownBool) String

func (t ValueUnknownBool) String() string

func (ValueUnknownBool) Value

func (t ValueUnknownBool) Value() uitable.Value

Jump to

Keyboard shortcuts

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