Help us shape the future of Go! Take the 2026 Go Developer Survey

schema

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppSchema

type AppSchema struct {
	Path   string
	App    string
	Values map[string]any
	Envs   map[string]EnvSchema
}

func Load

func Load(path string) (AppSchema, error)

func (AppSchema) AdditionalPropertiesFalse

func (s AppSchema) AdditionalPropertiesFalse() bool

func (AppSchema) Compile

func (s AppSchema) Compile(env string) error

func (AppSchema) Declares

func (s AppSchema) Declares(key string) bool

func (AppSchema) Required

func (s AppSchema) Required(env string) []string

type EnvSchema

type EnvSchema struct {
	Values map[string]any
}

type GlobError

type GlobError struct {
	Pattern string
}

type LoadError

type LoadError struct {
	Path string
	Err  error
}

type Set

type Set struct {
	Schemas    []AppSchema
	GlobErrors []GlobError
	LoadErrors []LoadError
}

func Discover

func Discover(doc *config.Document, configPath string) (*Set, error)

func (*Set) App

func (s *Set) App(app string) *AppSchema

type ValidationError

type ValidationError struct {
	Path string
	Err  error
}

func ValidateResult

func ValidateResult(set *Set, env, app string, result *resolve.Result) []ValidationError

func ValidateValues

func ValidateValues(appSchema AppSchema, env string, values map[string]any) []ValidationError

Jump to

Keyboard shortcuts

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