constants

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateFromV2ConfigWithCatalog

func GenerateFromV2ConfigWithCatalog(
	l logger.Logger,
	configDir string,
	schema *config.SchemaConfig,
	cat *catalog.Catalog,
) error

GenerateFromV2ConfigWithCatalog generates Go constants using a pre-parsed catalog.

func RenderConstants

func RenderConstants(p ConstantsParams, w io.Writer) error

Types

type ConstantsColumnNamesParamsItem

type ConstantsColumnNamesParamsItem struct {
	TableName   string
	NamePreffix string
	Name        string
}

type ConstantsParams

type ConstantsParams struct {
	Package     string
	Tables      []ConstantsTableNamesParamsItem
	ColumnNames []ConstantsColumnNamesParamsItem
}

func (ConstantsParams) GetColumnNamesContent

func (p ConstantsParams) GetColumnNamesContent() string

func (ConstantsParams) GetColumnsForTable

func (p ConstantsParams) GetColumnsForTable(tableName string) []ConstantsColumnNamesParamsItem

func (ConstantsParams) GetHeaderComment

func (p ConstantsParams) GetHeaderComment() string

func (ConstantsParams) GetTablesContent

func (p ConstantsParams) GetTablesContent() string

type ConstantsTableNamesParamsItem

type ConstantsTableNamesParamsItem struct {
	NamePreffix string
	Name        string
}

Jump to

Keyboard shortcuts

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