api

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ColumnParam

type ColumnParam struct {
	ColumnName      string
	ColumnNameCamel string
	ColumnType      string
	IsNullable      bool
}

type Config

type Config struct {
	TargetSchema    string           `yaml:"targetSchema" json:"targetSchema"`
	TemplateConfigs []TemplateConfig `yaml:"templateConfigs" json:"templateConfigs"`
}

type Generator

type Generator struct {
	FuncMaps template.FuncMap
}

func NewGenerator

func NewGenerator(opts ...GeneratorOption) *Generator

func (*Generator) Generate

func (x *Generator) Generate(ctx context.Context, cfg Config, conn *pgx.Conn) error

type GeneratorOption

type GeneratorOption func(*Generator)

func WithFuncMap

func WithFuncMap(funcMap template.FuncMap) GeneratorOption

type Param

type Param struct {
	TableParams []TableParam
}

type TableParam

type TableParam struct {
	TableName        string
	TableNameCamel   string
	TableNameCamelFU string
	Columns          []ColumnParam
}

type TemplateConfig

type TemplateConfig struct {
	TemplatePath string `yaml:"templatePath" json:"templatePath"`
	OutputPath   string `yaml:"outputPath" json:"outputPath"`
}

Jump to

Keyboard shortcuts

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