json

package
v0.0.0-...-83fd405 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Field

type Field struct {
	RawName string `json:"Name"`
	Name    string `json:"-"`
	Type    string
	Comment string
}

type StaticData

type StaticData struct {
	Package string
	Tables  []*Table
	Enums   []*static_data.Enum
	// contains filtered or unexported fields
}

func New

func New(pkg string) *StaticData

func (*StaticData) CollectExtend

func (s *StaticData) CollectExtend(filePath string, extendBeginRegex *regexp.Regexp) (err error)

func (StaticData) GetExtendContent

func (s StaticData) GetExtendContent(name string) (content string)

type Table

type Table struct {
	Package       string
	JsonFileName  string `json:"-"`
	RawName       string `json:"Name"`
	Name          string `json:"-"`
	Fields        []*Field
	UniqueIndexes []*Field `json:",omitempty"` // 唯一索引
	NormalIndexes []*Field `json:",omitempty"` // 普通索引
	Attributes    []*Field `json:",omitempty"`
	Enums         []*static_data.Enum
	Comment       string
	// contains filtered or unexported fields
}

func NewTable

func NewTable(pkg string, enums []*static_data.Enum) (t *Table)

func ReadJsonFile

func ReadJsonFile(path string, info os.FileInfo, enums []*static_data.Enum, pkg string, replaceNames map[string]string) (tbl *Table, err error)

func (*Table) CollectExtend

func (t *Table) CollectExtend(filePath string, extendBeginRegex *regexp.Regexp) (err error)

func (Table) GetExtendContent

func (t Table) GetExtendContent(name string) (content string)

Jump to

Keyboard shortcuts

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