template

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CacheDefTmpl

type CacheDefTmpl struct{}

func (*CacheDefTmpl) Render

func (t *CacheDefTmpl) Render() string

func (*CacheDefTmpl) RenderLocal

func (t *CacheDefTmpl) RenderLocal() string

func (*CacheDefTmpl) RenderRedis

func (t *CacheDefTmpl) RenderRedis() string

func (*CacheDefTmpl) RenderSerial

func (t *CacheDefTmpl) RenderSerial() string

type CreateStmt

type CreateStmt struct {
	Name     string
	StmtName string
	OrigStmt string
}

type CurdDefTmpl

type CurdDefTmpl struct {
	Name    string
	TabName string
	Fields  Fields
	Indexes []Index
}

func (*CurdDefTmpl) Render

func (t *CurdDefTmpl) Render() string

type Field

type Field struct {
	Name    string
	Type    string
	ZeroVal string
	ColName string
	Comment string
}

type Fields

type Fields []Field

func (*Fields) Find

func (a *Fields) Find(name string) (Field, error)

type Index

type Index struct {
	Uniq bool
	Cols Fields
}

type MgrDefTmpl

type MgrDefTmpl struct {
	Stmts []CreateStmt
}

func (*MgrDefTmpl) Render

func (t *MgrDefTmpl) Render() string

func (*MgrDefTmpl) RenderSQL

func (t *MgrDefTmpl) RenderSQL() string

type ModelDefTmpl

type ModelDefTmpl struct {
	Imports map[string]struct{}
	Name    string
	Fields  Fields
}

func (*ModelDefTmpl) Render

func (t *ModelDefTmpl) Render() string

Jump to

Keyboard shortcuts

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