jsontype

package
v0.0.0-...-3457ba0 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(globals *model.Globals) (data []byte, err error)

Types

type Field

type Field struct {
	Name          string   // 字段名
	Type          string   // 表中原有写的类型
	Comment       string   // 注释, 表中的名称
	Value         string   `json:",omitempty"` // 枚举值
	MakeIndex     bool     `json:",omitempty"` // 是否生成索引
	ArraySplitter string   `json:",omitempty"` // 数组切割符
	Tags          []string `json:",omitempty"` // 自定义标记
}

func (*Field) EnumValue

func (self *Field) EnumValue() int

type File

type File struct {
	Tool    string `json:"@Tool"`
	Version string `json:"@Version"`
	Objects []*Object
}

type Object

type Object struct {
	Name string
	Type string   // 对象类型
	Tags []string `json:",omitempty"` // 自定义标记

	Fields []*Field
}

表示表格, 枚举

func (*Object) Compare

func (self *Object) Compare(other *Object) bool

Jump to

Keyboard shortcuts

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