store

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteKonfToStore added in v0.5.0

func WriteKonfToStore(f afero.Fs, konf *konf.Konfig) (storepath string, err error)

Types

type EmptyStore

type EmptyStore struct{}

EmptyStore describes a state in which no kubeconfig is inside the store It makes sense to have this in a separate case as it does not matter for some operations (e.g. importing) but detrimental for others (e.g. running the selection prompt)

func (*EmptyStore) Error

func (k *EmptyStore) Error() string

type KubeConfigOverload

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

KubeConfigOverload describes a state in which a kubeconfig has multiple Contexts or Clusters This can be undesirable for konf when such a kubeconfig is in its store

func (*KubeConfigOverload) Error

func (k *KubeConfigOverload) Error() string

type Metadata

type Metadata struct {
	Context string
	Cluster string
	File    string
}

Metadata describes a formatting of kubekonf information. It is mainly being used to present the user a nice table selection

func FetchAllKonfs

func FetchAllKonfs(f afero.Fs) ([]*Metadata, error)

FetchAllKonfs retrieves metadata for all konfs currently in the store

func FetchKonfsForGlob

func FetchKonfsForGlob(f afero.Fs, pattern string) ([]*Metadata, error)

FetchKonfsForGlob returns all konfs whose name matches the supplied pattern. Pattern matching is done using filepath.Match. The pattern should only include the name of the file itself not its full path. Also it should not include the extension of the file. All relation to the konfs StoreDir will be handled automatically.

type NoMatch

type NoMatch struct {
	Pattern string
}

NoMatch describes a state in which no konf was found matching the supplied glob It makes sense to have this in a separate case as it does not matter for some operations (e.g. importing) but detrimental for others (e.g. running the selection prompt)

func (*NoMatch) Error

func (k *NoMatch) Error() string

Jump to

Keyboard shortcuts

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