utils

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: MIT Imports: 16 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 {
	// contains filtered or unexported fields
}

func ParseConfig

func ParseConfig() (*Config, error)

func (*Config) ConvertSQLBoilerModelsToApiModels

func (c *Config) ConvertSQLBoilerModelsToApiModels() error

type ERGConfig

type ERGConfig struct {
	Output    string   `toml:"output"`
	OutputTS  string   `toml:"output-ts"`
	Pkgname   string   `toml:"pkgname"`
	Wipe      bool     `toml:"wipe"`
	Inline    bool     `toml:"inline"`
	Blacklist []string `toml:"blacklist"`
}

type SQLBoilerConfig

type SQLBoilerConfig struct {
	Output          string    `toml:"output"`
	PkgName         string    `toml:"pkgname"`
	StructTagCasing *string   `toml:"struct-tag-casing"`
	Erg             ERGConfig `toml:"erg"`
}

type SQLBoilerName

type SQLBoilerName struct {
	PascalCase string
	SnakeCase  string
	CamelCase  string
}

type SQLBoilerTable

type SQLBoilerTable struct {
	Name      SQLBoilerName
	Relations []SQLBoilerTableRelation
	Columns   []SQLBoilerTableColumn
	Imports   []string
}

type SQLBoilerTableColumn

type SQLBoilerTableColumn struct {
	IsPrimaryKey bool
	Name         SQLBoilerName
	Type         SQLBoilerType
	IsRelation   bool
}

type SQLBoilerTableColumnEnum

type SQLBoilerTableColumnEnum struct {
	Name   SQLBoilerName
	Values []SQLBoilerTableColumnEnumValue
	Type   SQLBoilerType
}

type SQLBoilerTableColumnEnumValue

type SQLBoilerTableColumnEnumValue struct {
	Label string
	Value string
}

type SQLBoilerTableRelation

type SQLBoilerTableRelation struct {
	Name          SQLBoilerName
	MainTableName SQLBoilerName
	IsMany        bool
	Type          SQLBoilerType
}

type SQLBoilerType

type SQLBoilerType struct {
	OriginalName  string
	FormattedName string
	IsEnum        bool
}

Jump to

Keyboard shortcuts

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