config

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultStateHistoryLimit   = 10
	DefaultBackupRevisionLimit = 10
)

Variables

View Source
var (
	DefaultConfigPath = filepath.Join(xdg.ConfigHome, "kontext", "kontext.yaml")
)

Functions

This section is empty.

Types

type Backup added in v1.1.0

type Backup struct {
	Enabled   bool   `json:"enabled"`
	Directory string `json:"directory,omitempty"`
	Revisions int    `json:"revisions,omitempty"`
}

type Client added in v1.2.0

type Client struct {
	// File of the file, that will be used to read the configuration
	File string
}

func (*Client) Read added in v1.2.0

func (r *Client) Read() (*Config, error)

Read reads the current config file and serialize it with koanf

type Config

type Config struct {
	Global  Global   `json:"global,omitempty"`
	Backup  Backup   `json:"backup,omitempty"`
	State   State    `json:"state,omitempty"`
	Groups  []Group  `json:"groups,omitempty"`
	Sources []Source `json:"sources,omitempty"`
}

type Global

type Global struct {
	Kubeconfig string         `json:"kubeconfig,omitempty"`
	Verbosity  pterm.LogLevel `json:"verbosity,omitempty"`
}

type Group

type Group struct {
	Name    string   `json:"name"`
	Context string   `json:"context,omitempty"`
	Sources []string `json:"sources"`
}

type History added in v1.1.0

type History struct {
	Size int `json:"size"`
}

type Source

type Source struct {
	Name    string   `json:"name"`
	Include []string `json:"include,omitempty"`
	Exclude []string `json:"exclude"`
}

type State added in v1.2.0

type State struct {
	File    string  `json:"file,omitempty"`
	History History `json:"history,omitempty"`
}

Jump to

Keyboard shortcuts

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