Documentation
¶
Index ¶
Constants ¶
View Source
const Int32ByteSize = 4
View Source
const Int64ByteSize = 8
Variables ¶
View Source
var ( Bool = SimpleType{/* contains filtered or unexported fields */} Int32 = SimpleType{/* contains filtered or unexported fields */} Int64 = SimpleType{/* contains filtered or unexported fields */} UInt8 = SimpleType{/* contains filtered or unexported fields */} UInt32 = SimpleType{/* contains filtered or unexported fields */} UInt64 = SimpleType{/* contains filtered or unexported fields */} UInt128 = SimpleType{/* contains filtered or unexported fields */} UInt256 = SimpleType{/* contains filtered or unexported fields */} UInt512 = SimpleType{/* contains filtered or unexported fields */} Unit = SimpleType{/* contains filtered or unexported fields */} String = SimpleType{/* contains filtered or unexported fields */} Key = SimpleType{/* contains filtered or unexported fields */} Uref = SimpleType{/* contains filtered or unexported fields */} Any = SimpleType{/* contains filtered or unexported fields */} PublicKey = SimpleType{/* contains filtered or unexported fields */} )
View Source
var ( BufferConstructorNotDetectedError = errors.New("buffer constructor not detected") ComplexTypeFormatInvalidError = errors.New("complex type format is invalid") ErrComplexTypeFormatNotDetected = errors.New("complex type format is not detected") ErrJsonConstructorNotFound = errors.New("json type constructor is not found") )
View Source
var MapJsonParsingError = errors.New("map type parsing error")
Functions ¶
This section is empty.
Types ¶
type ByteArray ¶
type ByteArray struct {
Size uint32
}
func NewByteArray ¶
func NewByteArrayFromBuffer ¶
func NewByteArrayFromJson ¶
func (ByteArray) MarshalJSON ¶
type CLType ¶
func FromRawJson ¶
func FromRawJson(source json.RawMessage) (CLType, error)
func GetSimpleTypeByName ¶
type Dynamic ¶
func (Dynamic) MarshalJSON ¶
type List ¶
type List struct {
ElementsType CLType
}
func NewListFromJson ¶
func (*List) MarshalJSON ¶
type Option ¶
type Option struct {
Inner CLType
}
func NewOptionFromJson ¶
func NewOptionType ¶
func (*Option) MarshalJSON ¶
type Result ¶
type Result struct {
Inner CLType
}
func NewResultFromJson ¶
func NewResultType ¶
func (*Result) MarshalJSON ¶
type SimpleType ¶
type SimpleType struct {
// contains filtered or unexported fields
}
func (SimpleType) Bytes ¶
func (c SimpleType) Bytes() []byte
func (SimpleType) GetTypeID ¶
func (c SimpleType) GetTypeID() TypeID
func (SimpleType) MarshalJSON ¶
func (c SimpleType) MarshalJSON() ([]byte, error)
func (SimpleType) Name ¶
func (c SimpleType) Name() TypeName
func (SimpleType) String ¶
func (c SimpleType) String() string
type Tuple1 ¶
type Tuple1 struct {
Inner CLType
}
func NewTuple1FromJson ¶
func (*Tuple1) MarshalJSON ¶
type TypeName ¶
type TypeName = string
const ( TypeNameBool TypeName = "Bool" TypeNameI32 TypeName = "I32" TypeNameI64 TypeName = "I64" TypeNameU8 TypeName = "U8" TypeNameU32 TypeName = "U32" TypeNameU64 TypeName = "U64" TypeNameU128 TypeName = "U128" TypeNameU256 TypeName = "U256" TypeNameU512 TypeName = "U512" TypeNameUnit TypeName = "Unit" TypeNameString TypeName = "String" TypeNameKey TypeName = "Key" TypeNameURef TypeName = "URef" TypeNameOption TypeName = "Option" TypeNameList TypeName = "List" TypeNameByteArray TypeName = "ByteArray" TypeNameResult TypeName = "Result" TypeNameMap TypeName = "Map" TypeNameTuple1 TypeName = "Tuple1" TypeNameTuple2 TypeName = "Tuple2" TypeNameTuple3 TypeName = "Tuple3" TypeNameAny TypeName = "Any" TypeNamePublicKey TypeName = "PublicKey" )
Click to show internal directories.
Click to hide internal directories.