configuration

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2026 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidValuesInConfig = errors.New("invalid values in config")

Functions

func ValidateIdentifier

func ValidateIdentifier(identifier string) bool

func ValidateIdentifierList

func ValidateIdentifierList(identifiers []string) bool

Types

type Config

type Config struct {
	//nolint:tagliatelle
	ModelName string `yaml:"model_name"`
	//nolint:tagliatelle
	DatabaseName string `yaml:"db_name"`
	//nolint:tagliatelle
	Roles     []Role     `yaml:"roles"`
	Templates []Template `yaml:"templates"`
	Output    *Output    `yaml:"output"`
}

func ReadConfig

func ReadConfig(wd string) (*Config, error)

func (*Config) GetOutputPath added in v0.12.0

func (c *Config) GetOutputPath(outputType string) string

GetOutputPath returns the output path for the given type if enabled, or empty string if not. The outputType must be one of: "sql", "png", "svg". Panics if an invalid outputType is provided.

type Output added in v0.12.0

type Output struct {
	SQL *OutputFile `yaml:"sql"`
	PNG *OutputFile `yaml:"png"`
	SVG *OutputFile `yaml:"svg"`
}

type OutputFile added in v0.12.0

type OutputFile struct {
	Path string `yaml:"path"`
}

type Role

type Role struct {
	Name string `yaml:"name"`
}

type Template

type Template struct {
	Path    string `yaml:"path"`
	Content string `yaml:"content"`
}

Jump to

Keyboard shortcuts

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