gen_behavior

package
v0.0.0-alpha Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2023 License: BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Gen

func Gen(config gensc.GenBehaviorConfig) error

生成协议

func QuoteChar

func QuoteChar() interface{}

Types

type Collection

type Collection struct {
	CollName           string // 表名
	StructName         string // 表名的驼峰格式
	MongoDaoStructName string // mongo dao 结构的名称
	Derive             string
	CommentArr         []string
	FieldDict          map[string]*Field
	FieldArr           []*Field
	IndexDict          map[string]*Index
	IndexArr           []*Index
	HasLogTimeField    bool
	HasCreateTimeField bool
}

func (*Collection) IsDeriveUser

func (coll *Collection) IsDeriveUser() bool

func (*Collection) IsDeriveUserArr

func (coll *Collection) IsDeriveUserArr() bool

type Database

type Database struct {
	Module              string
	Driver              string
	DbStructName        string // 数据库名的驼峰格式
	MongoDaoStructName  string // mongo 的 dao 结构名字
	DaoInterfaceName    string
	DbName              string
	GenXmlDir           string        // 生成的文件路径,在 gen/{{DbName}}
	GenXmlFilePath      string        // 生成的文件路径,在 gen/{{DbName}}/{{DbName}}.gen.go
	SrcGenModelDir      string        // 生成的文件路径,在 src/gen/{{DbName}}
	SrcGenModelFilePath string        // 生成的文件路径,在 src/gen/{{DbName}}/{{DbName}}.gen.go
	SrcGenBinFilePath   string        // 生成的文件路径,在 src/gen/{{DbName}}/bin/{{DbName}}.gen.go
	SrcGenBinDir        string        // 生成的文件路径,在 src/gen/{{DbName}}/bin
	CollectionArr       []*Collection // 所有的模型
}

type Field

type Field struct {
	Tag        int
	Name       string
	CamelName  string
	Type       field_type
	TypeName   string
	GoTypeName string
	Default    interface{}
	CommentArr []string
	Coll       *Collection
}

func (*Field) IsComparable

func (f *Field) IsComparable() bool

type Index

type Index struct {
	Name     string
	KeyDict  map[string]*Key
	KeyArr   []*Key
	Tag      int
	FullName string
}

type Key

type Key struct {
	Key   string
	Value interface{}
}

type Parser

type Parser interface {
	// contains filtered or unexported methods
}

Jump to

Keyboard shortcuts

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