config

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ValidAPIVersions = []string{
		"kat.jacobcolvin.com/v1beta1",
	}
	ValidKinds = []string{
		"Configuration",
	}
)

Functions

func GetPath

func GetPath() string

func ReadConfig

func ReadConfig(path string) ([]byte, error)

func WriteDefaultConfig

func WriteDefaultConfig(path string) error

WriteDefaultConfig writes the embedded default config.yaml to the specified path.

Types

type Config

type Config struct {
	Command    *command.Config `yaml:",inline"`
	UI         *ui.Config      `yaml:",inline"`
	APIVersion string          `validate:"required" yaml:"apiVersion"`
	Kind       string          `validate:"required" yaml:"kind"`
}

func LoadConfig

func LoadConfig(data []byte) (*Config, error)

func NewConfig

func NewConfig() *Config

func (*Config) EnsureDefaults

func (c *Config) EnsureDefaults()

func (*Config) MarshalYAML

func (c *Config) MarshalYAML() ([]byte, error)

func (*Config) Validate

func (c *Config) Validate() error

func (*Config) Write

func (c *Config) Write(path string) error

Jump to

Keyboard shortcuts

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