contextconfig

package
v1.0.26 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ResolveConfigPath added in v1.0.22

func ResolveConfigPath(dir string) string

ResolveConfigPath returns the path to an existing config file in dir, trying each accepted extension in priority order. If none exist it returns the canonical (.yaml) path so new files are created canonically.

Types

type Inputs

type Inputs struct {
	FlagValue           string
	LegacyEnvValue      string
	PreferredEnvValue   string
	ContextConfigValue  string
	BehaviorDefault     string
	SessionDefaultValue string
	UserDefaultValue    string
}

type Kind

type Kind string
const (
	ContextPipeline   Kind = "pipeline"
	ContextServer     Kind = "server"
	ContextRepository Kind = "repository"
	ContextGlobal     Kind = "global"
)

type LoadResult

type LoadResult struct {
	LoadedPaths []string
}

func LoadLayeredConfig

func LoadLayeredConfig(v *viper.Viper, runtime Runtime, explicitConfigPath string) (LoadResult, error)

type Output

type Output struct {
	Value  string
	Source string
}

func ResolveValue

func ResolveValue(input Inputs) Output

type Runtime

type Runtime struct {
	Kind             Kind
	Explicit         bool
	WorkingDir       string
	UserConfigPath   string
	ActiveConfigPath string
	RepositoryRoot   string
	NonInteractive   bool
}

func DetectRuntime

func DetectRuntime(explicitContext string, workingDir string) Runtime

Jump to

Keyboard shortcuts

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