Documentation
¶
Index ¶
- Constants
- Variables
- type DefElt
- type DefEltList
- type DefMap
- type DefMapMap
- type DefNameMap
- type DefNameMapMap
- type Field
- type FieldMap
- type Func
- type FuncDef
- type FuncDefMap
- type FuncNameDefMap
- type JSONSchemaDef
- type RawFuncDef
- type RawFuncDefMap
- type RawSchemaDef
- type Schema
- type SchemaDef
- type StringMap
- type StringMapMap
- type Struct
Constants ¶
View Source
const (
DefaultVersion = "0.0.1"
)
Variables ¶
View Source
var FieldTypes = map[string]bool{ "Address": true, "AgentID": true, "BigInt": true, "Bool": true, "Bytes": true, "ChainID": true, "Hash": true, "Hname": true, "Int8": true, "Int16": true, "Int32": true, "Int64": true, "NftID": true, "RequestID": true, "String": true, "TokenID": true, "Uint8": true, "Uint16": true, "Uint32": true, "Uint64": true, }
Functions ¶
This section is empty.
Types ¶
type DefEltList ¶ added in v0.3.0
type DefEltList []DefElt
func (DefEltList) Len ¶ added in v0.3.0
func (l DefEltList) Len() int
func (DefEltList) Less ¶ added in v0.3.0
func (l DefEltList) Less(i, j int) bool
func (DefEltList) Swap ¶ added in v0.3.0
func (l DefEltList) Swap(i, j int)
type DefMap ¶ added in v0.3.0
func (DefMap) ToStringMap ¶ added in v0.3.0
type DefMapMap ¶ added in v0.3.0
func (DefMapMap) ToStringMapMap ¶ added in v0.3.0
func (m DefMapMap) ToStringMapMap() StringMapMap
type DefNameMap ¶ added in v0.3.0
type DefNameMapMap ¶ added in v0.3.0
type Field ¶
type FuncDefMap ¶
func (FuncDefMap) ToRawFuncDefMap ¶ added in v0.3.0
func (m FuncDefMap) ToRawFuncDefMap() RawFuncDefMap
type FuncNameDefMap ¶ added in v0.3.0
type JSONSchemaDef ¶ added in v0.3.0
type JSONSchemaDef RawSchemaDef
type RawFuncDef ¶ added in v0.3.0
type RawFuncDefMap ¶ added in v0.3.0
type RawFuncDefMap map[string]*RawFuncDef
func (RawFuncDefMap) ToFuncDefMap ¶ added in v0.3.0
func (m RawFuncDefMap) ToFuncDefMap() FuncDefMap
type RawSchemaDef ¶ added in v0.3.0
type RawSchemaDef struct {
Copyright string `yaml:"copyright"`
Name string `yaml:"name"`
Version string `yaml:"version"`
Description string `yaml:"description"`
Author string `yaml:"author"`
License string `yaml:"license"`
Repository string `yaml:"repository"`
Events StringMapMap `yaml:"events"`
Structs StringMapMap `yaml:"structs"`
Typedefs StringMap `yaml:"typedefs"`
State StringMap `yaml:"state"`
Funcs RawFuncDefMap `yaml:"funcs"`
Views RawFuncDefMap `yaml:"views"`
}
func (*RawSchemaDef) ToSchemaDef ¶ added in v1.0.3
func (s *RawSchemaDef) ToSchemaDef() *SchemaDef
type Schema ¶
type Schema struct {
ContractName string
PackageName string
Author string
Copyright string
Description string
License string
Repository string
Version string
CoreContracts bool
SchemaTime time.Time
Events []*Struct
Funcs []*Func
Params []*Field
Results []*Field
StateVars []*Field
Structs []*Struct
Typedefs []*Field
}
type SchemaDef ¶
type SchemaDef struct {
Name DefElt
Author DefElt
Copyright string
Description DefElt
License DefElt
Repository DefElt
Version DefElt
Events DefMapMap
Structs DefMapMap
Typedefs DefMap
State DefMap
Funcs FuncDefMap
Views FuncDefMap
}
func NewSchemaDef ¶ added in v0.3.0
func NewSchemaDef() *SchemaDef
func (*SchemaDef) ToRawSchemaDef ¶ added in v0.3.0
func (s *SchemaDef) ToRawSchemaDef() *RawSchemaDef
type StringMapMap ¶
func (StringMapMap) ToDefMapMap ¶ added in v0.3.0
func (mm StringMapMap) ToDefMapMap() DefMapMap
Click to show internal directories.
Click to hide internal directories.