config

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StructureService       = "service"
	StructureDomainService = "domain-service"
)
View Source
const FileName = "platformctl.yaml"

Variables

This section is empty.

Functions

func Validate

func Validate(cfg Config) error

Types

type Config

type Config struct {
	APIVersion string           `yaml:"apiVersion"`
	Kind       string           `yaml:"kind"`
	Layout     LayoutConfig     `yaml:"layout"`
	Validation ValidationConfig `yaml:"validation"`
	Naming     NamingConfig     `yaml:"naming"`
	Contexts   ContextsConfig   `yaml:"contexts"`
}

func Default

func Default() Config

func Load

func Load(repoRoot string) (*Config, error)

func LoadPath

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

type ContextsConfig

type ContextsConfig struct {
	Default string                    `yaml:"default"`
	Items   map[string]map[string]any `yaml:"items"`
}

type LayoutConfig

type LayoutConfig struct {
	MirroredGroups       []MirroredGroup `yaml:"mirroredGroups"`
	OutputRoot           string          `yaml:"outputRoot"`
	RequireMirroredPaths bool            `yaml:"requireMirroredPaths"`
}

func (LayoutConfig) MirroredGroupByName added in v1.3.0

func (layout LayoutConfig) MirroredGroupByName(name string) (MirroredGroup, error)

func (LayoutConfig) MirroredGroupForRelPath added in v1.3.0

func (layout LayoutConfig) MirroredGroupForRelPath(relPath string) (MirroredGroup, error)

func (LayoutConfig) ResolvedMirroredGroups added in v1.3.0

func (layout LayoutConfig) ResolvedMirroredGroups() ([]MirroredGroup, error)

type MirroredGroup added in v1.3.0

type MirroredGroup struct {
	Name       string `yaml:"name"`
	ChartRoot  string `yaml:"chartRoot"`
	ValuesRoot string `yaml:"valuesRoot"`
	Structure  string `yaml:"structure"`
}

func (MirroredGroup) ChartDir added in v1.3.0

func (group MirroredGroup) ChartDir(repoRoot string, relPath string) (string, error)

func (MirroredGroup) PathRoot added in v1.3.0

func (group MirroredGroup) PathRoot() string

func (MirroredGroup) RelativeSuffix added in v1.3.0

func (group MirroredGroup) RelativeSuffix(relPath string) (string, error)

func (MirroredGroup) ValuesDir added in v1.3.0

func (group MirroredGroup) ValuesDir(repoRoot string, relPath string) (string, error)

type NamingConfig

type NamingConfig struct {
	WrapperPrefix string `yaml:"wrapperPrefix"`
}

type ValidationConfig

type ValidationConfig struct {
	RequiredCommonValues string   `yaml:"requiredCommonValues"`
	OverlayPattern       string   `yaml:"overlayPattern"`
	TestOverlayName      string   `yaml:"testOverlayName"`
	TestOverlayWarnings  []string `yaml:"testOverlayWarnings"`
}

Jump to

Keyboard shortcuts

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