metadata

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Groups map[string][]string `yaml:"groups"`
	Alias  map[string]string   `yaml:"alias"`

	MetadataDir string `yaml:"metadataDir"`
}

type History

type History struct {
	Records []*HistoryRecord

	Path string
}

func (*History) Add

func (h *History) Add(name, namespace string)

func (*History) ClearAll

func (h *History) ClearAll()

func (*History) ClearKubeConfig

func (h *History) ClearKubeConfig(name string)

func (*History) GetLastKubeConfig

func (h *History) GetLastKubeConfig(current string) *string

func (*History) GetLastNamespace

func (h *History) GetLastNamespace(name, currentNamespace string) *string

func (*History) Save

func (h *History) Save() error

type HistoryRecord

type HistoryRecord struct {
	Timestamp int64  `yaml:"timestamp" json:"timestamp"`
	Name      string `yaml:"name" json:"name"`
	Namespace string `yaml:"namespace" json:"namespace"`
}

type Metadata

type Metadata struct {
	Config *Config

	History *History

	KubeConfigDir string

	TempDir string
}

func Load

func Load(configPath string) (*Metadata, error)

Jump to

Keyboard shortcuts

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