config

package
v0.10.1-rc1 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LocalServer    = "kubeconfig"
	LocalServerEnv = "local " + LocalServer
)

Variables

This section is empty.

Functions

func AsConfigMap

func AsConfigMap(cfg *apiv1.Config) (*corev1.ConfigMap, error)

func Get

func Get(ctx context.Context, getter kclient.Reader) (*apiv1.Config, error)

func GetFeature added in v0.9.0

func GetFeature(ctx context.Context, getter kclient.Reader, featureName string) (bool, error)

func Incomplete

func Incomplete(ctx context.Context, getter kclient.Reader) (*apiv1.Config, error)

func Init

func Init(ctx context.Context, client kclient.Client) error

func IsDockerDesktop

func IsDockerDesktop(ctx context.Context, getter kclient.Reader) (bool, error)

func RemoveServer

func RemoveServer(cfg *CLIConfig, serverAddress string) error

func Set

func Set(ctx context.Context, client kclient.Client, cfg *apiv1.Config) error

func TestSetGet

func TestSetGet(ctx context.Context, client kclient.Client, cfg *apiv1.Config) (*apiv1.Config, error)

TestSetGet will do everything that Set does, but instead of persisting the resulting config it will return the merged and completed config. This is as though you did Set() followed by Get() except that the state in Kubernetes will not actually change.

func UnmarshalAndComplete

func UnmarshalAndComplete(ctx context.Context, cm *corev1.ConfigMap, getter kclient.Reader) (*apiv1.Config, error)

Types

type AuthConfig

type AuthConfig types.AuthConfig

func (AuthConfig) MarshalJSON

func (a AuthConfig) MarshalJSON() ([]byte, error)

func (*AuthConfig) UnmarshalJSON

func (a *AuthConfig) UnmarshalJSON(data []byte) error

type CLIConfig

type CLIConfig struct {
	Auths              map[string]AuthConfig `json:"auths,omitempty"`
	CredentialsStore   string                `json:"credsStore,omitempty"`
	CredentialHelpers  map[string]string     `json:"credHelpers,omitempty"`
	DefaultAcornServer string                `json:"defaultAcornServer,omitempty"`
	AcornServers       []string              `json:"acornServers,omitempty"`
	ProjectAliases     map[string]string     `json:"projectAliases,omitempty"`
	DefaultContext     string                `json:"defaultContext,omitempty"`
	CurrentProject     string                `json:"currentProject,omitempty"`
	LastProject        string                `json:"lastProject,omitempty"`
	AcornConfigFile    string                `json:"acornConfig,omitempty"`

	// ProjectURLs is used for testing to return EndpointURLs for remote projects
	ProjectURLs map[string]string `json:"projectURLs,omitempty"`
	// contains filtered or unexported fields
}

func ReadCLIConfig

func ReadCLIConfig(acornConfigFile string, kubeconfigOnly bool) (*CLIConfig, error)

func (*CLIConfig) GetAuthConfigs

func (c *CLIConfig) GetAuthConfigs() map[string]types.AuthConfig

func (*CLIConfig) GetDefaultAcornServer

func (c *CLIConfig) GetDefaultAcornServer() string

func (*CLIConfig) GetFilename

func (c *CLIConfig) GetFilename() string

func (*CLIConfig) Sanitize

func (c *CLIConfig) Sanitize() *CLIConfig

func (*CLIConfig) Save

func (c *CLIConfig) Save() error

Jump to

Keyboard shortcuts

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