tpl

package
v0.0.0-...-5540867 Latest Latest
Warning

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

Go to latest
Published: May 31, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ForceGenerateTpl

func ForceGenerateTpl(text string, data any, targetPath string) error

func GenerateFile

func GenerateFile(path string, content []byte) error

func GenerateTpl

func GenerateTpl(text string, data any, targetPath string, force bool) error

Types

type ColaCurd

type ColaCurd struct {
	TplArgs *ColaCurdTplArgs
	// contains filtered or unexported fields
}

func NewColaCurd

func NewColaCurd(mod mod.Mod, c *config.Conf, table string, force bool) *ColaCurd

func (*ColaCurd) Execute

func (cs *ColaCurd) Execute() error

func (*ColaCurd) Initialize

func (cs *ColaCurd) Initialize()

func (*ColaCurd) Name

func (cs *ColaCurd) Name() string

type ColaCurdTableField

type ColaCurdTableField struct {
	Name           string
	LowerCamelName string
	UpperCamelName string
	Type           string
}

type ColaCurdTplArgs

type ColaCurdTplArgs struct {
	ModName             string
	ModDelimitedName    string
	DBName              string
	TableName           string
	LowerTableName      string
	LowerCamelTableName string
	UpperCamelTableName string
	TableFields         []*ColaCurdTableField
}

type ColaSkeleton

type ColaSkeleton struct {
	TplArgs *ColaSkeletonTplArgs
	// contains filtered or unexported fields
}

func NewColaSkeleton

func NewColaSkeleton(mod mod.Mod, force bool) *ColaSkeleton

func (*ColaSkeleton) Execute

func (cs *ColaSkeleton) Execute() error

func (*ColaSkeleton) Initialize

func (cs *ColaSkeleton) Initialize()

func (*ColaSkeleton) Name

func (cs *ColaSkeleton) Name() string

type ColaSkeletonTplArgs

type ColaSkeletonTplArgs struct {
	ModName string
}

type Executor

type Executor interface {
	Name() string
	Initialize()
	Execute() error
}

func GetColaCurdExecutors

func GetColaCurdExecutors(mod mod.Mod, c *config.Conf, table string, force bool) []Executor

func GetColaExecutors

func GetColaExecutors(mod mod.Mod, force bool) []Executor

func GetInjectExecutors

func GetInjectExecutors(mod mod.Mod, nodes mbast.Nodes) []Executor

func NewWire

func NewWire(modIns mod.Mod, nodes mbast.Nodes) Executor

type Wire

type Wire struct {
	TplArgs *WireTplArgs
	// contains filtered or unexported fields
}

func (*Wire) Execute

func (w *Wire) Execute() error

func (*Wire) Initialize

func (w *Wire) Initialize()

func (*Wire) Name

func (w *Wire) Name() string

type WireAutoloadFunc

type WireAutoloadFunc struct {
	Name       string
	LcName     string
	LowerName  string
	RefName    string
	InjectFunc string
}

type WireController

type WireController struct {
	Name    string
	Uniqid  string
	Methods map[string]*WireMethods
}

type WireMethods

type WireMethods struct {
	Name    string
	Path    string
	Methods []string
}

type WireTplArgs

type WireTplArgs struct {
	Imports       map[string]string
	BindStructs   map[string]string
	InjectsFuncs  []string
	AutoloadFuncs map[string]*WireAutoloadFunc
	Routers       map[string]*WireController
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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