Documentation ¶
Index ¶
- Constants
- func Generate(name string, schema api.JSONSchema, result *ContractTypeResult) (string, error)
- func GenerateBigMap(bigMap api.BigMapJSONSchema, result *ContractTypeResult) error
- type Address
- func (Address) AsCode(name, path string, schema api.JSONSchema, result *ContractTypeResult) (Code, error)
- func (Address) AsField(name, path string, schema api.JSONSchema, isRequired bool, ...) (jen.Code, error)
- func (Address) AsType(name, path string, schema api.JSONSchema, result *ContractTypeResult) (Code, error)
- type BigMap
- func (BigMap) AsCode(name, path string, schema api.JSONSchema, result *ContractTypeResult) (Code, error)
- func (BigMap) AsField(name, path string, schema api.JSONSchema, isRequired bool, ...) (jen.Code, error)
- func (BigMap) AsType(name, path string, schema api.JSONSchema, result *ContractTypeResult) (Code, error)
- type BigMapData
- type Bool
- func (Bool) AsCode(name, path string, schema api.JSONSchema, result *ContractTypeResult) (Code, error)
- func (Bool) AsField(name, path string, schema api.JSONSchema, isRequired bool, ...) (jen.Code, error)
- func (Bool) AsType(name, path string, schema api.JSONSchema, result *ContractTypeResult) (Code, error)
- type Bytes
- func (Bytes) AsCode(name, path string, schema api.JSONSchema, result *ContractTypeResult) (Code, error)
- func (Bytes) AsField(name, path string, schema api.JSONSchema, isRequired bool, ...) (jen.Code, error)
- func (Bytes) AsType(name, path string, schema api.JSONSchema, result *ContractTypeResult) (Code, error)
- type Code
- type Contract
- func (Contract) AsCode(name, path string, schema api.JSONSchema, result *ContractTypeResult) (Code, error)
- func (Contract) AsField(name, path string, schema api.JSONSchema, isRequired bool, ...) (jen.Code, error)
- func (Contract) AsType(name, path string, schema api.JSONSchema, result *ContractTypeResult) (Code, error)
- type ContractTypeResult
- type EntrypointData
- type Int
- func (Int) AsCode(name, path string, schema api.JSONSchema, result *ContractTypeResult) (Code, error)
- func (Int) AsField(name, path string, schema api.JSONSchema, isRequired bool, ...) (jen.Code, error)
- func (Int) AsType(name, path string, schema api.JSONSchema, result *ContractTypeResult) (Code, error)
- type KeyHash
- func (KeyHash) AsCode(name, path string, schema api.JSONSchema, result *ContractTypeResult) (Code, error)
- func (KeyHash) AsField(name, path string, schema api.JSONSchema, isRequired bool, ...) (jen.Code, error)
- func (KeyHash) AsType(name, path string, schema api.JSONSchema, result *ContractTypeResult) (Code, error)
- type Lambda
- func (Lambda) AsCode(name, path string, schema api.JSONSchema, result *ContractTypeResult) (Code, error)
- func (Lambda) AsField(name, path string, schema api.JSONSchema, isRequired bool, ...) (jen.Code, error)
- func (Lambda) AsType(name, path string, schema api.JSONSchema, result *ContractTypeResult) (Code, error)
- type List
- func (l List) AsCode(name, path string, schema api.JSONSchema, result *ContractTypeResult) (Code, error)
- func (List) AsField(name, path string, schema api.JSONSchema, isRequired bool, ...) (jen.Code, error)
- func (l List) AsType(name, path string, schema api.JSONSchema, result *ContractTypeResult) (Code, error)
- type Map
- func (m Map) AsCode(name, path string, schema api.JSONSchema, result *ContractTypeResult) (Code, error)
- func (m Map) AsField(name, path string, schema api.JSONSchema, isRequired bool, ...) (jen.Code, error)
- func (m Map) AsType(name, path string, schema api.JSONSchema, result *ContractTypeResult) (Code, error)
- type Object
- func (obj Object) AsCode(name, path string, schema api.JSONSchema, result *ContractTypeResult) (Code, error)
- func (Object) AsField(name, path string, schema api.JSONSchema, isRequired bool, ...) (jen.Code, error)
- func (obj Object) AsType(name, path string, schema api.JSONSchema, result *ContractTypeResult) (Code, error)
- type Option
- func (opt Option) AsCode(name, path string, schema api.JSONSchema, result *ContractTypeResult) (Code, error)
- func (Option) AsField(name, path string, schema api.JSONSchema, isRequired bool, ...) (jen.Code, error)
- func (opt Option) AsType(name, path string, schema api.JSONSchema, result *ContractTypeResult) (Code, error)
- type Or
- func (obj Or) AsCode(name, path string, schema api.JSONSchema, result *ContractTypeResult) (Code, error)
- func (Or) AsField(name, path string, schema api.JSONSchema, isRequired bool, ...) (jen.Code, error)
- func (obj Or) AsType(name, path string, schema api.JSONSchema, result *ContractTypeResult) (Code, error)
- type SaplingState
- func (SaplingState) AsCode(name, path string, schema api.JSONSchema, result *ContractTypeResult) (Code, error)
- func (SaplingState) AsField(name, path string, schema api.JSONSchema, isRequired bool, ...) (jen.Code, error)
- func (SaplingState) AsType(name, path string, schema api.JSONSchema, result *ContractTypeResult) (Code, error)
- type SaplingTransaction
- func (SaplingTransaction) AsCode(name, path string, schema api.JSONSchema, result *ContractTypeResult) (Code, error)
- func (SaplingTransaction) AsField(name, path string, schema api.JSONSchema, isRequired bool, ...) (jen.Code, error)
- func (SaplingTransaction) AsType(name, path string, schema api.JSONSchema, result *ContractTypeResult) (Code, error)
- type Set
- func (s Set) AsCode(name, path string, schema api.JSONSchema, result *ContractTypeResult) (Code, error)
- func (s Set) AsField(name, path string, schema api.JSONSchema, isRequired bool, ...) (jen.Code, error)
- func (s Set) AsType(name, path string, schema api.JSONSchema, result *ContractTypeResult) (Code, error)
- type String
- func (String) AsCode(name, path string, schema api.JSONSchema, result *ContractTypeResult) (Code, error)
- func (String) AsField(name, path string, schema api.JSONSchema, isRequired bool, ...) (jen.Code, error)
- func (String) AsType(name, path string, schema api.JSONSchema, result *ContractTypeResult) (Code, error)
- type Ticket
- func (Ticket) AsCode(name, path string, schema api.JSONSchema, result *ContractTypeResult) (Code, error)
- func (Ticket) AsField(name, path string, schema api.JSONSchema, isRequired bool, ...) (jen.Code, error)
- func (Ticket) AsType(name, path string, schema api.JSONSchema, result *ContractTypeResult) (Code, error)
- type Timestamp
- func (Timestamp) AsCode(name, path string, schema api.JSONSchema, result *ContractTypeResult) (Code, error)
- func (Timestamp) AsField(name, path string, schema api.JSONSchema, isRequired bool, ...) (jen.Code, error)
- func (Timestamp) AsType(name, path string, schema api.JSONSchema, result *ContractTypeResult) (Code, error)
- type Type
- type Unit
- func (Unit) AsCode(name, path string, schema api.JSONSchema, result *ContractTypeResult) (Code, error)
- func (Unit) AsField(name, path string, schema api.JSONSchema, isRequired bool, ...) (jen.Code, error)
- func (Unit) AsType(name, path string, schema api.JSONSchema, result *ContractTypeResult) (Code, error)
Constants ¶
const ( TypeString = "string" TagRequired = "string" )
consts
Variables ¶
This section is empty.
Functions ¶
func Generate ¶
func Generate(name string, schema api.JSONSchema, result *ContractTypeResult) (string, error)
Generate -
func GenerateBigMap ¶
func GenerateBigMap(bigMap api.BigMapJSONSchema, result *ContractTypeResult) error
GenerateBigMap -
Types ¶
type Address ¶
type Address struct{}
Address -
func (Address) AsCode ¶
func (Address) AsCode(name, path string, schema api.JSONSchema, result *ContractTypeResult) (Code, error)
AsCode -
func (Address) AsField ¶
func (Address) AsField(name, path string, schema api.JSONSchema, isRequired bool, result *ContractTypeResult) (jen.Code, error)
AsField -
func (Address) AsType ¶
func (Address) AsType(name, path string, schema api.JSONSchema, result *ContractTypeResult) (Code, error)
AsType -
type BigMap ¶
type BigMap struct{}
BigMap -
func (BigMap) AsCode ¶
func (BigMap) AsCode(name, path string, schema api.JSONSchema, result *ContractTypeResult) (Code, error)
AsCode -
func (BigMap) AsField ¶
func (BigMap) AsField(name, path string, schema api.JSONSchema, isRequired bool, result *ContractTypeResult) (jen.Code, error)
AsField -
func (BigMap) AsType ¶
func (BigMap) AsType(name, path string, schema api.JSONSchema, result *ContractTypeResult) (Code, error)
AsType -
type BigMapData ¶
BigMapData -
type Bool ¶
type Bool struct{}
Bool -
func (Bool) AsCode ¶
func (Bool) AsCode(name, path string, schema api.JSONSchema, result *ContractTypeResult) (Code, error)
AsCode -
func (Bool) AsField ¶
func (Bool) AsField(name, path string, schema api.JSONSchema, isRequired bool, result *ContractTypeResult) (jen.Code, error)
AsField -
func (Bool) AsType ¶
func (Bool) AsType(name, path string, schema api.JSONSchema, result *ContractTypeResult) (Code, error)
AsType -
type Bytes ¶
type Bytes struct{}
Bytes -
func (Bytes) AsCode ¶
func (Bytes) AsCode(name, path string, schema api.JSONSchema, result *ContractTypeResult) (Code, error)
AsCode -
func (Bytes) AsField ¶
func (Bytes) AsField(name, path string, schema api.JSONSchema, isRequired bool, result *ContractTypeResult) (jen.Code, error)
AsField -
func (Bytes) AsType ¶
func (Bytes) AsType(name, path string, schema api.JSONSchema, result *ContractTypeResult) (Code, error)
AsType -
type Contract ¶
type Contract struct{}
Contract -
func (Contract) AsCode ¶
func (Contract) AsCode(name, path string, schema api.JSONSchema, result *ContractTypeResult) (Code, error)
AsCode -
func (Contract) AsField ¶
func (Contract) AsField(name, path string, schema api.JSONSchema, isRequired bool, result *ContractTypeResult) (jen.Code, error)
AsField -
func (Contract) AsType ¶
func (Contract) AsType(name, path string, schema api.JSONSchema, result *ContractTypeResult) (Code, error)
AsType -
type ContractTypeResult ¶
type ContractTypeResult struct { File *jen.File Entrypoints map[string]EntrypointData BigMaps map[string]BigMapData PackageName string // contains filtered or unexported fields }
ContractTypeResult -
func GenerateContractTypes ¶
func GenerateContractTypes(schema api.ContractJSONSchema, packageName string) (ContractTypeResult, error)
GenerateContractTypes -
func (*ContractTypeResult) GetName ¶
func (result *ContractTypeResult) GetName(typ, name string) string
GetName -
type Int ¶
type Int struct{}
Int -
func (Int) AsCode ¶
func (Int) AsCode(name, path string, schema api.JSONSchema, result *ContractTypeResult) (Code, error)
AsCode -
func (Int) AsField ¶
func (Int) AsField(name, path string, schema api.JSONSchema, isRequired bool, result *ContractTypeResult) (jen.Code, error)
AsField -
func (Int) AsType ¶
func (Int) AsType(name, path string, schema api.JSONSchema, result *ContractTypeResult) (Code, error)
AsType -
type KeyHash ¶
type KeyHash struct{}
KeyHash -
func (KeyHash) AsCode ¶
func (KeyHash) AsCode(name, path string, schema api.JSONSchema, result *ContractTypeResult) (Code, error)
AsCode -
func (KeyHash) AsField ¶
func (KeyHash) AsField(name, path string, schema api.JSONSchema, isRequired bool, result *ContractTypeResult) (jen.Code, error)
AsField -
func (KeyHash) AsType ¶
func (KeyHash) AsType(name, path string, schema api.JSONSchema, result *ContractTypeResult) (Code, error)
AsType -
type Lambda ¶
type Lambda struct{}
Lambda -
func (Lambda) AsCode ¶
func (Lambda) AsCode(name, path string, schema api.JSONSchema, result *ContractTypeResult) (Code, error)
AsCode -
func (Lambda) AsField ¶
func (Lambda) AsField(name, path string, schema api.JSONSchema, isRequired bool, result *ContractTypeResult) (jen.Code, error)
AsField -
func (Lambda) AsType ¶
func (Lambda) AsType(name, path string, schema api.JSONSchema, result *ContractTypeResult) (Code, error)
AsType -
type List ¶
type List struct{}
List -
func (List) AsCode ¶
func (l List) AsCode(name, path string, schema api.JSONSchema, result *ContractTypeResult) (Code, error)
AsCode -
func (List) AsField ¶
func (List) AsField(name, path string, schema api.JSONSchema, isRequired bool, result *ContractTypeResult) (jen.Code, error)
AsField -
func (List) AsType ¶
func (l List) AsType(name, path string, schema api.JSONSchema, result *ContractTypeResult) (Code, error)
AsType -
type Map ¶
type Map struct{}
Map -
func (Map) AsCode ¶
func (m Map) AsCode(name, path string, schema api.JSONSchema, result *ContractTypeResult) (Code, error)
AsCode -
func (Map) AsField ¶
func (m Map) AsField(name, path string, schema api.JSONSchema, isRequired bool, result *ContractTypeResult) (jen.Code, error)
AsField -
func (Map) AsType ¶
func (m Map) AsType(name, path string, schema api.JSONSchema, result *ContractTypeResult) (Code, error)
AsType -
type Object ¶
type Object struct{}
Object -
func (Object) AsCode ¶
func (obj Object) AsCode(name, path string, schema api.JSONSchema, result *ContractTypeResult) (Code, error)
AsCode -
func (Object) AsField ¶
func (Object) AsField(name, path string, schema api.JSONSchema, isRequired bool, result *ContractTypeResult) (jen.Code, error)
AsField -
func (Object) AsType ¶
func (obj Object) AsType(name, path string, schema api.JSONSchema, result *ContractTypeResult) (Code, error)
AsType -
type Option ¶
type Option struct{}
Option -
func (Option) AsCode ¶
func (opt Option) AsCode(name, path string, schema api.JSONSchema, result *ContractTypeResult) (Code, error)
AsCode -
func (Option) AsField ¶
func (Option) AsField(name, path string, schema api.JSONSchema, isRequired bool, result *ContractTypeResult) (jen.Code, error)
AsField -
func (Option) AsType ¶
func (opt Option) AsType(name, path string, schema api.JSONSchema, result *ContractTypeResult) (Code, error)
AsType -
type Or ¶
type Or struct{}
Object -
func (Or) AsCode ¶
func (obj Or) AsCode(name, path string, schema api.JSONSchema, result *ContractTypeResult) (Code, error)
AsCode -
func (Or) AsField ¶
func (Or) AsField(name, path string, schema api.JSONSchema, isRequired bool, result *ContractTypeResult) (jen.Code, error)
AsField -
func (Or) AsType ¶
func (obj Or) AsType(name, path string, schema api.JSONSchema, result *ContractTypeResult) (Code, error)
AsType -
type SaplingState ¶
type SaplingState struct{}
SaplingState -
func (SaplingState) AsCode ¶
func (SaplingState) AsCode(name, path string, schema api.JSONSchema, result *ContractTypeResult) (Code, error)
AsCode -
func (SaplingState) AsField ¶
func (SaplingState) AsField(name, path string, schema api.JSONSchema, isRequired bool, result *ContractTypeResult) (jen.Code, error)
AsField -
func (SaplingState) AsType ¶
func (SaplingState) AsType(name, path string, schema api.JSONSchema, result *ContractTypeResult) (Code, error)
AsType -
type SaplingTransaction ¶
type SaplingTransaction struct{}
SaplingTransaction -
func (SaplingTransaction) AsCode ¶
func (SaplingTransaction) AsCode(name, path string, schema api.JSONSchema, result *ContractTypeResult) (Code, error)
AsCode -
func (SaplingTransaction) AsField ¶
func (SaplingTransaction) AsField(name, path string, schema api.JSONSchema, isRequired bool, result *ContractTypeResult) (jen.Code, error)
AsField -
func (SaplingTransaction) AsType ¶
func (SaplingTransaction) AsType(name, path string, schema api.JSONSchema, result *ContractTypeResult) (Code, error)
AsType -
type Set ¶
type Set struct{}
Set -
func (Set) AsCode ¶
func (s Set) AsCode(name, path string, schema api.JSONSchema, result *ContractTypeResult) (Code, error)
AsCode -
func (Set) AsField ¶
func (s Set) AsField(name, path string, schema api.JSONSchema, isRequired bool, result *ContractTypeResult) (jen.Code, error)
AsField -
func (Set) AsType ¶
func (s Set) AsType(name, path string, schema api.JSONSchema, result *ContractTypeResult) (Code, error)
AsType -
type String ¶
type String struct{}
String -
func (String) AsCode ¶
func (String) AsCode(name, path string, schema api.JSONSchema, result *ContractTypeResult) (Code, error)
AsCode -
func (String) AsField ¶
func (String) AsField(name, path string, schema api.JSONSchema, isRequired bool, result *ContractTypeResult) (jen.Code, error)
AsField -
func (String) AsType ¶
func (String) AsType(name, path string, schema api.JSONSchema, result *ContractTypeResult) (Code, error)
AsType -
type Ticket ¶
type Ticket struct{}
Ticket -
func (Ticket) AsCode ¶
func (Ticket) AsCode(name, path string, schema api.JSONSchema, result *ContractTypeResult) (Code, error)
AsCode -
func (Ticket) AsField ¶
func (Ticket) AsField(name, path string, schema api.JSONSchema, isRequired bool, result *ContractTypeResult) (jen.Code, error)
AsField -
func (Ticket) AsType ¶
func (Ticket) AsType(name, path string, schema api.JSONSchema, result *ContractTypeResult) (Code, error)
AsType -
type Timestamp ¶
type Timestamp struct{}
Timestamp -
func (Timestamp) AsCode ¶
func (Timestamp) AsCode(name, path string, schema api.JSONSchema, result *ContractTypeResult) (Code, error)
AsCode -
func (Timestamp) AsField ¶
func (Timestamp) AsField(name, path string, schema api.JSONSchema, isRequired bool, result *ContractTypeResult) (jen.Code, error)
AsField -
func (Timestamp) AsType ¶
func (Timestamp) AsType(name, path string, schema api.JSONSchema, result *ContractTypeResult) (Code, error)
AsType -
type Type ¶
type Type interface { AsField(name, path string, schema api.JSONSchema, isRequired bool, result *ContractTypeResult) (jen.Code, error) AsCode(name, path string, schema api.JSONSchema, result *ContractTypeResult) (Code, error) AsType(name, path string, schema api.JSONSchema, result *ContractTypeResult) (Code, error) }
Type -
type Unit ¶
type Unit struct{}
Unit -
func (Unit) AsCode ¶
func (Unit) AsCode(name, path string, schema api.JSONSchema, result *ContractTypeResult) (Code, error)
AsCode -
func (Unit) AsField ¶
func (Unit) AsField(name, path string, schema api.JSONSchema, isRequired bool, result *ContractTypeResult) (jen.Code, error)
AsField -
func (Unit) AsType ¶
func (Unit) AsType(name, path string, schema api.JSONSchema, result *ContractTypeResult) (Code, error)
AsType -