config

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	PreloadAll bool `toml:"PreloadAll"` // Preload all the relations
	Models     struct {
		Pkgs     []string `toml:"Pkgs"`     // absolute package names where models are located
		Skip     []string `toml:"Skip"`     // Slice of models(Structs) to skip
		ReadOnly []string `toml:"ReadOnly"` // For SQL Views
	} `toml:"Models"`

	Output struct {
		ServiceName string `toml:"ServiceName"` // simple name for the services default: services
		OutDir      string `toml:"OutDir"`      // Directory where to create new packages: default "."
	} `toml:"Output"`
	Overrides    Overrides `toml:"overrides"`
	PreloadDepth uint      `toml:"PreloadDepth"` // Preload depth for nested relations
}

Config struct represents the configuration parameters

func LoadConfig

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

type Overrides added in v0.0.6

type Overrides struct {
	Types  map[string]string `toml:"types"`
	Fields map[string]string `toml:"fields"`
}

Jump to

Keyboard shortcuts

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