gen

package
v0.0.0-...-969f932 Latest Latest
Warning

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

Go to latest
Published: May 22, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parse

func Parse(s string, wr io.Writer) error

Types

type ColumnValueType

type ColumnValueType byte

func (ColumnValueType) String

func (cv ColumnValueType) String() string

type StructCreator

type StructCreator struct {
	PackageName string
	TableName   string
	Pk          string
	Fields      []StructField
	HasTime     bool
}

func New

func New() *StructCreator

func (*StructCreator) Create

func (c *StructCreator) Create() *ast.GenDecl

func (*StructCreator) Enter

func (c *StructCreator) Enter(in ast.Node) (ast.Node, bool)

func (*StructCreator) Leave

func (c *StructCreator) Leave(in ast.Node) (ast.Node, bool)

func (*StructCreator) PkFunc

func (c *StructCreator) PkFunc() *ast.FuncDecl

func (*StructCreator) StructName

func (c *StructCreator) StructName() string

func (*StructCreator) TableFunc

func (c *StructCreator) TableFunc() *ast.FuncDecl

type StructField

type StructField struct {
	Name    string
	Type    string
	Tag     string
	Comment string
}

Jump to

Keyboard shortcuts

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