runtimeconfigs

package
v0.28.1 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package runtimeconfigs provides the RuntimeConfig configuration type for kat.

Index

Constants

This section is empty.

Variables

View Source
var (
	// FileNames contains the valid names for runtime configuration files.
	// The slice order determines precedence when searching for config files.
	FileNames = []string{
		".katrc.yaml",
		"katrc.yaml",
		".katrc.yml",
		"katrc.yml",
	}

	// DefaultValidator validates runtime configuration against the JSON schema.
	DefaultValidator = yaml.MustNewValidator("/runtimeconfigs.v1beta1.json", runtimeSchemaJSON)

	// ValidKinds contains the valid kind values for runtime configurations.
	ValidKinds = []string{"RuntimeConfig"}
)

Functions

func Find

func Find(targetPath string) (string, error)

Find searches for a runtime config file starting from targetPath and walking up the directory tree until the filesystem root. It checks for all FileNames in each directory. Returns the path to the config file if found, or empty string if not found.

Types

type RuntimeConfig

type RuntimeConfig struct {
	Command          *command.Config `json:",inline"`
	v1beta1.TypeMeta `json:",inline"`
}

RuntimeConfig represents runtime-level configuration.

func New

func New() *RuntimeConfig

New creates a new RuntimeConfig.

func (*RuntimeConfig) EnsureDefaults

func (c *RuntimeConfig) EnsureDefaults()

EnsureDefaults initializes nil fields to their default values.

func (RuntimeConfig) JSONSchemaExtend

func (c RuntimeConfig) JSONSchemaExtend(jss *jsonschema.Schema)

func (*RuntimeConfig) Validate

func (c *RuntimeConfig) Validate() error

Validate validates the runtime configuration.

Jump to

Keyboard shortcuts

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