config

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2025 License: AGPL-3.0 Imports: 5 Imported by: 2

Documentation

Overview

Package config loads configuration data from an external file.

Package config loads configuration data from an external file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadYML

func LoadYML(relativepath string) (*models.Generator, error)

LoadYML loads a .yml configuration file into a Generator.

func ParseYML

func ParseYML(yml YML) *models.Generator

ParseYML parses a YML into a Generator.

Types

type Cast added in v0.4.1

type Cast struct {
	Depth    int      `yaml:"depth"`
	Enabled  bool     `yaml:"enabled"`
	Disabled Disabled `yaml:"disabled"`
}

Cast represents matcher cast properties of the YML file.

type Disabled added in v0.4.1

type Disabled struct {
	AssignObjectInterface bool `yaml:"assignObjectInterface"`
	AssertInterfaceObject bool `yaml:"assertInterfaceObject"`
	Convert               bool `yaml:"convert"`
}

Disabled represents matcher cast feature flags of the YML file.

type Generated

type Generated struct {
	Setup    string `yaml:"setup"`
	Output   string `yaml:"output"`
	Template string `yaml:"template"`
}

Generated represents generated properties of the YML file.

type Matcher added in v0.4.1

type Matcher struct {
	Skip bool `yaml:"skip"`
	Cast Cast `yaml:"cast"`
}

Matcher represents matcher properties of the YML file.

type YML

type YML struct {
	Options   map[string]interface{} `yaml:"custom"`
	Generated Generated              `yaml:"generated"`
	Matcher   Matcher                `yaml:"matcher"`
}

YML represents the first level of the YML file.

Jump to

Keyboard shortcuts

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