config

package
v0.2.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2026 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BoolOr

func BoolOr(ptr *bool, def bool) bool

func BoolPtr

func BoolPtr(b bool) *bool

func DiscoverConfigPath

func DiscoverConfigPath(repoPath string) string

func ParseClusterPath

func ParseClusterPath(s string) (cluster, path string)

ParseClusterPath splits a path string into cluster and path components. If the string contains a colon, the part before the first colon is the cluster and the part after is the path. Otherwise cluster is empty.

Types

type AIConfig

type AIConfig struct {
	Enabled                 *bool    `yaml:"enabled,omitempty"`
	Provider                string   `yaml:"provider,omitempty"`
	Model                   string   `yaml:"model,omitempty"`
	FailOnError             *bool    `yaml:"fail-on-error,omitempty"`
	Instructions            string   `yaml:"instructions,omitempty"`
	AllowedClassifications  []string `yaml:"allowed-classifications,omitempty"`
	MaxInputBytes           int      `yaml:"max-input-bytes,omitempty"`
	MaxDiffLinesPerResource int      `yaml:"max-diff-lines-per-resource,omitempty"`
	Timeout                 string   `yaml:"timeout,omitempty"`
}

type ClusterConfig

type ClusterConfig struct {
	Paths []string
}

ClusterConfig holds one or more paths for a named cluster.

func (*ClusterConfig) UnmarshalYAML

func (c *ClusterConfig) UnmarshalYAML(node *yaml.Node) error

UnmarshalYAML supports both a single string and a list of strings.

type Config

type Config struct {
	Paths        []string                 `yaml:"paths,omitempty"`
	Clusters     map[string]ClusterConfig `yaml:"clusters,omitempty"`
	Recursive    *bool                    `yaml:"recursive,omitempty"`
	Helm         *bool                    `yaml:"helm,omitempty"`
	ResolveGit   *bool                    `yaml:"resolve-git,omitempty"`
	SOPSDecrypt  *bool                    `yaml:"sops-decrypt,omitempty"`
	Sort         *bool                    `yaml:"sort,omitempty"`
	ExcludeCRDs  *bool                    `yaml:"exclude-crds,omitempty"`
	Filters      filter.FilterConfig      `yaml:",inline"`
	HelmSettings *HelmSettings            `yaml:"helm-settings,omitempty"`
	Crossplane   *CrossplaneSettings      `yaml:"crossplane,omitempty"`
	Policies     *PolicyConfig            `yaml:"policies,omitempty"`
	AI           *AIConfig                `yaml:"ai,omitempty"`
	SourcePath   string                   `yaml:"-"`
}

func LoadConfig

func LoadConfig(repoPath string) (*Config, error)

func LoadConfigFromPath

func LoadConfigFromPath(configPath string) (*Config, error)

func (*Config) ClusterPaths

func (cfg *Config) ClusterPaths() map[string][]string

ClusterPaths normalizes both prefixed Paths and the Clusters map into a map of cluster name → list of paths.

If no prefixes are present in Paths and Clusters is empty, it returns nil to signal flat (non-clustered) mode.

type CrossplaneSettings

type CrossplaneSettings struct {
	Enabled      *bool  `yaml:"enabled,omitempty"`
	Timeout      string `yaml:"timeout,omitempty"`
	MaxFunctions int    `yaml:"max-functions,omitempty"`
}

CrossplaneSettings contains repository preferences, never execution grants. Executables and development endpoints must come from trusted CLI invocation.

type HelmSettings

type HelmSettings struct {
	RegistryConfig   string `yaml:"registry-config,omitempty" json:"registryConfig,omitempty"`
	RepositoryConfig string `yaml:"repository-config,omitempty" json:"repositoryConfig,omitempty"`
	RepositoryCache  string `yaml:"repository-cache,omitempty" json:"repositoryCache,omitempty"`
}

type LabelList

type LabelList []string

func (*LabelList) UnmarshalYAML

func (l *LabelList) UnmarshalYAML(value *yaml.Node) error

type PolicyConfig

type PolicyConfig struct {
	Builtin []string             `yaml:"builtin,omitempty"`
	Modules []string             `yaml:"modules,omitempty"`
	Inline  []string             `yaml:"inline,omitempty"`
	FailOn  []string             `yaml:"fail-on,omitempty"`
	Labels  map[string]LabelList `yaml:"labels,omitempty"`
}

Jump to

Keyboard shortcuts

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