Documentation ¶
Index ¶
- Constants
- Variables
- func FindModulePath() error
- type Field
- type FieldMap
- type FieldMapMap
- type Func
- type FuncDef
- type FuncDefMap
- type GenBase
- type Generator
- type GoGenerator
- type RustGenerator
- type Schema
- func (s *Schema) Compile(schemaDef *SchemaDef) error
- func (s *Schema) GenerateJava() error
- func (s *Schema) GenerateJavaConsts() error
- func (s *Schema) GenerateJavaFunc(file *os.File, f *Func) error
- func (s *Schema) GenerateJavaFuncScanner(file *os.File) ([]string, StringMap, error)
- func (s *Schema) GenerateJavaFuncs() error
- func (s *Schema) GenerateJavaFuncsNew(scFileName string) error
- func (s *Schema) GenerateJavaLib() error
- func (s *Schema) GenerateJavaThunk(file, params *os.File, f *Func)
- func (s *Schema) GenerateJavaType(td *Struct) error
- func (s *Schema) GenerateJavaTypes() error
- type SchemaDef
- type StringMap
- type StringMapMap
- type Struct
- type TypeScriptGenerator
Constants ¶
View Source
const ( AccessChain = "chain" AccessCreator = "creator" AccessSelf = "self" AliasThis = "this" InitFunc = "Init" KindFunc = "Func" KindView = "View" PropImmutable = "Immutable" PropMutable = "Mutable" SpecialFuncInit = "funcInit" SpecialFuncSetOwner = "setOwner" SpecialViewGetOwner = "getOwner" )
Variables ¶
View Source
var ( ModuleCwd = "???" ModuleName = "???" ModulePath = "???" )
View Source
var FieldTypes = map[string]int32{ "Address": wasmlib.TYPE_ADDRESS, "AgentID": wasmlib.TYPE_AGENT_ID, "Bytes": wasmlib.TYPE_BYTES, "ChainID": wasmlib.TYPE_CHAIN_ID, "Color": wasmlib.TYPE_COLOR, "Hash": wasmlib.TYPE_HASH, "Hname": wasmlib.TYPE_HNAME, "Int16": wasmlib.TYPE_INT16, "Int32": wasmlib.TYPE_INT32, "Int64": wasmlib.TYPE_INT64, "RequestID": wasmlib.TYPE_REQUEST_ID, "String": wasmlib.TYPE_STRING, }
Functions ¶
func FindModulePath ¶
func FindModulePath() error
Types ¶
type Field ¶
type FuncDefMap ¶
type GenBase ¶ added in v0.2.2
type Generator ¶ added in v0.2.2
type Generator interface {
// contains filtered or unexported methods
}
type GoGenerator ¶ added in v0.2.2
type GoGenerator struct {
GenBase
}
func NewGoGenerator ¶ added in v0.2.2
func NewGoGenerator() *GoGenerator
type RustGenerator ¶ added in v0.2.2
type RustGenerator struct {
GenBase
}
func NewRustGenerator ¶ added in v0.2.2
func NewRustGenerator() *RustGenerator
type Schema ¶
type Schema struct { Name string FullName string Description string KeyID int ConstLen int ConstNames []string ConstValues []string CoreContracts bool SchemaTime time.Time Funcs []*Func Params []*Field Results []*Field StateVars []*Field Structs []*Struct Typedefs []*Field Views []*Func }
func (*Schema) GenerateJava ¶
func (*Schema) GenerateJavaConsts ¶
func (*Schema) GenerateJavaFuncScanner ¶
func (*Schema) GenerateJavaFuncs ¶
func (*Schema) GenerateJavaFuncsNew ¶
func (*Schema) GenerateJavaLib ¶
func (*Schema) GenerateJavaThunk ¶
func (*Schema) GenerateJavaType ¶ added in v0.2.2
func (*Schema) GenerateJavaTypes ¶
type SchemaDef ¶
type SchemaDef struct { Name string `json:"name" yaml:"name"` Description string `json:"description" yaml:"description"` Structs StringMapMap `json:"structs" yaml:"structs"` Typedefs StringMap `json:"typedefs" yaml:"typedefs"` State StringMap `json:"state" yaml:"state"` Funcs FuncDefMap `json:"funcs" yaml:"funcs"` Views FuncDefMap `json:"views" yaml:"views"` }
type TypeScriptGenerator ¶ added in v0.2.2
type TypeScriptGenerator struct {
GenBase
}
func NewTypeScriptGenerator ¶ added in v0.2.2
func NewTypeScriptGenerator() *TypeScriptGenerator
Click to show internal directories.
Click to hide internal directories.