Documentation ¶
Index ¶
- Constants
- Variables
- type DataType
- func (t DataType) ConvertBytesToJSO(bs []byte) (interface{}, error)
- func (t DataType) ConvertBytesToTypedObj(bs []byte) (*codec.TypedObj, error)
- func (t DataType) ConvertJSONToTypedObj(bs []byte, fields []Field, nullable bool) (*codec.TypedObj, error)
- func (t DataType) Elem() DataType
- func (t DataType) IsList() bool
- func (t DataType) ListDepth() int
- func (t DataType) String() string
- func (t DataType) Tag() TypeTag
- func (t DataType) ValidateEvent(bs []byte) error
- func (t DataType) ValidateInput(obj *codec.TypedObj, fields []Field, nullable bool) error
- func (t DataType) ValidateOutput(obj *codec.TypedObj) error
- type Field
- type Info
- func (info *Info) Bytes() ([]byte, error)
- func (info *Info) CheckEventData(indexed [][]byte, data [][]byte) error
- func (info *Info) ConvertParamsToTypedObj(method string, params []byte) (*codec.TypedObj, error)
- func (info *Info) EnsureParamsSequential(method string, params *codec.TypedObj) (*codec.TypedObj, error)
- func (info *Info) Equal(info2 *Info) bool
- func (info *Info) GetMethod(name string) *Method
- func (info *Info) RLPDecodeSelf(d codec.Decoder) error
- func (info *Info) RLPEncodeSelf(e codec.Encoder) error
- func (info *Info) SetBytes(bs []byte) error
- func (info *Info) String() string
- func (info *Info) ToJSON(v module.JSONVersion) (interface{}, error)
- type Method
- func (a *Method) CheckEventData(indexed [][]byte, data [][]byte) error
- func (a *Method) ConvertParamsToTypedObj(bs []byte) (*codec.TypedObj, error)
- func (a *Method) EnsureParamsSequential(paramObj *codec.TypedObj) (*codec.TypedObj, error)
- func (a *Method) EnsureResult(result *codec.TypedObj) error
- func (a *Method) IsCallable() bool
- func (a *Method) IsEvent() bool
- func (a *Method) IsExternal() bool
- func (a *Method) IsFallback() bool
- func (a *Method) IsIsolated() bool
- func (a *Method) IsPayable() bool
- func (a *Method) IsReadOnly() bool
- func (a *Method) Signature() string
- func (a *Method) ToJSON(version module.JSONVersion) (interface{}, error)
- type MethodType
- type Parameter
- type TypeTag
Constants ¶
View Source
const ( NoSignatureError = errorBase + iota IllegalEventError )
View Source
const ( FlagReadOnly = 1 << iota FlagExternal FlagPayable FlagIsolated )
View Source
const (
FallbackMethodName = ""
)
Variables ¶
View Source
var ( ErrNoSignature = errors.NewBase(NoSignatureError, "NoSignatureError") ErrIllegalEvent = errors.NewBase(IllegalEventError, "IllegalEventError") )
Functions ¶
This section is empty.
Types ¶
type DataType ¶
type DataType int
DataType composed of following bits. ListDepth(4bits) + TypeTag(4bits)
func DataTypeOf ¶
DataTypeOf returns type for the specified name.
func ListTypeOf ¶
func (DataType) ConvertBytesToJSO ¶
DecodeForJSON convert default bytes and event bytes into JSON value type.
func (DataType) ConvertBytesToTypedObj ¶
Decode convert default bytes into native type
func (DataType) ConvertJSONToTypedObj ¶
func (t DataType) ConvertJSONToTypedObj(bs []byte, fields []Field, nullable bool) (*codec.TypedObj, error)
DecodeJSO decode json object comes from JSON.
func (DataType) ValidateEvent ¶
ValidateBytes validate event bytes.
func (DataType) ValidateInput ¶
type Info ¶
type Info struct {
// contains filtered or unexported fields
}
func (*Info) CheckEventData ¶
func (*Info) ConvertParamsToTypedObj ¶
func (*Info) EnsureParamsSequential ¶
type Method ¶
type Method struct { Type MethodType Name string Flags int Indexed int Inputs []Parameter Outputs []DataType }
func (*Method) CheckEventData ¶
func (*Method) ConvertParamsToTypedObj ¶
func (*Method) EnsureParamsSequential ¶
func (*Method) IsCallable ¶
func (*Method) IsExternal ¶
func (*Method) IsFallback ¶
func (*Method) IsIsolated ¶
func (*Method) IsReadOnly ¶
type MethodType ¶
type MethodType int
const ( Function MethodType = iota Fallback Event )
func (MethodType) String ¶
func (t MethodType) String() string
Click to show internal directories.
Click to hide internal directories.