Documentation ¶
Index ¶
- Constants
- func DeserializeMap(f goja.FunctionCall, vm *goja.Runtime) goja.Value
- func NewOrderedMapReader(f goja.FunctionCall, vm *goja.Runtime) goja.Value
- func SerializeMaps(f goja.FunctionCall, vm *goja.Runtime) goja.Value
- type BufBuilder
- type LambdaJob
- type LambdaResult
- func (z *LambdaResult) DecodeMsg(dc *msgp.Reader) (err error)
- func (z *LambdaResult) EncodeMsg(en *msgp.Writer) (err error)
- func (z *LambdaResult) MarshalMsg(b []byte) (o []byte, err error)
- func (z *LambdaResult) Msgsize() (s int)
- func (z *LambdaResult) UnmarshalMsg(bts []byte) (o []byte, err error)
- type OrderedBufMap
- func (m *OrderedBufMap) Clear()
- func (m *OrderedBufMap) Delete(k string)
- func (m *OrderedBufMap) Get(f goja.FunctionCall, vm *goja.Runtime) goja.Value
- func (m *OrderedBufMap) Len() int
- func (m *OrderedBufMap) Seek(k string) (OrderedBufMapIter, bool)
- func (m *OrderedBufMap) SeekFirst() (OrderedBufMapIter, error)
- func (m *OrderedBufMap) SeekLast() (OrderedBufMapIter, error)
- func (m *OrderedBufMap) Set(k string, buf goja.ArrayBuffer)
- type OrderedBufMapIter
- type OrderedIntMap
- func (m *OrderedIntMap) Clear()
- func (m *OrderedIntMap) Delete(k string)
- func (m *OrderedIntMap) Get(k string) (int64, bool)
- func (m *OrderedIntMap) Len() int
- func (m *OrderedIntMap) Seek(k string) (OrderedIntMapIter, bool)
- func (m *OrderedIntMap) SeekFirst() (OrderedIntMapIter, error)
- func (m *OrderedIntMap) SeekLast() (OrderedIntMapIter, error)
- func (m *OrderedIntMap) Set(k string, v int64)
- type OrderedIntMapIter
- type OrderedMapReader
- type OrderedStrMap
- func (m *OrderedStrMap) Clear()
- func (m *OrderedStrMap) Delete(k string)
- func (m *OrderedStrMap) Get(k string) (string, bool)
- func (m *OrderedStrMap) Len() int
- func (m *OrderedStrMap) Seek(k string) (OrderedStrMapIter, bool)
- func (m *OrderedStrMap) SeekFirst() (OrderedStrMapIter, error)
- func (m *OrderedStrMap) SeekLast() (OrderedStrMapIter, error)
- func (m *OrderedStrMap) Set(k string, v string)
- type OrderedStrMapIter
- type Sint256
- func (s Sint256) Abs() Sint256
- func (s Sint256) Add(v Sint256) Sint256
- func (s Sint256) Div(v Sint256) Sint256
- func (s Sint256) Equal(v Sint256) bool
- func (s Sint256) Gt(v Sint256) bool
- func (s Sint256) GtNum(v int64) bool
- func (s Sint256) Gte(v Sint256) bool
- func (s Sint256) GteNum(v int64) bool
- func (s Sint256) IsSafeInteger() bool
- func (s Sint256) IsZero() bool
- func (s Sint256) Lsh(v uint) Sint256
- func (s Sint256) Lt(v Sint256) bool
- func (s Sint256) LtNum(v int64) bool
- func (s Sint256) Lte(v Sint256) bool
- func (s Sint256) LteNum(v int64) bool
- func (s Sint256) Mul(v Sint256) Sint256
- func (s Sint256) Neg() Sint256
- func (s Sint256) Rsh(v uint) Sint256
- func (s Sint256) Sign() int
- func (s Sint256) String() string
- func (s Sint256) Sub(v Sint256) Sint256
- func (s Sint256) ToBuf(f goja.FunctionCall, vm *goja.Runtime) goja.Value
- func (s Sint256) ToHex(f goja.FunctionCall, vm *goja.Runtime) goja.Value
- func (s Sint256) ToSafeInteger() int64
- func (s Sint256) ToU256() Uint256
- type Uint256
- func (u Uint256) Add(v Uint256) Uint256
- func (u Uint256) And(v Uint256) Uint256
- func (u Uint256) Div(v Uint256) Uint256
- func (u Uint256) DivMod(v Uint256) [2]Uint256
- func (u Uint256) Equal(v Uint256) bool
- func (u Uint256) Exp(v Uint256) Uint256
- func (u Uint256) Gt(v Uint256) bool
- func (u Uint256) GtNum(v uint64) bool
- func (u Uint256) Gte(v Uint256) bool
- func (u Uint256) GteNum(v uint64) bool
- func (u Uint256) Incr() Uint256
- func (u Uint256) IsSafeInteger() bool
- func (u Uint256) IsZero() bool
- func (u Uint256) Lsh(v uint) Uint256
- func (u Uint256) Lt(v Uint256) bool
- func (u Uint256) LtNum(v uint64) bool
- func (u Uint256) Lte(v Uint256) bool
- func (u Uint256) LteNum(v uint64) bool
- func (u Uint256) Mod(v Uint256) Uint256
- func (u Uint256) Mul(v Uint256) Uint256
- func (u Uint256) Not() Uint256
- func (u Uint256) Or(v Uint256) Uint256
- func (u Uint256) Rsh(v uint) Uint256
- func (u Uint256) Sqrt() Uint256
- func (u Uint256) String() string
- func (u Uint256) Sub(v Uint256) Uint256
- func (u Uint256) ToBuf(f goja.FunctionCall, vm *goja.Runtime) goja.Value
- func (u Uint256) ToHex(f goja.FunctionCall, vm *goja.Runtime) goja.Value
- func (u Uint256) ToS256() Sint256
- func (u Uint256) ToSafeInteger() int64
- func (u Uint256) UnsafeAdd(v Uint256) Uint256
- func (u Uint256) UnsafeMul(v Uint256) Uint256
- func (u Uint256) UnsafeSub(v Uint256) Uint256
Constants ¶
View Source
const ( OrderedIntMapTag = byte(0) OrderedStrMapTag = byte(1) OrderedBufMapTag = byte(2) )
Variables ¶
This section is empty.
Functions ¶
func DeserializeMap ¶
Note: Each call deserializes only one map and returns the rest of the array buffer arguments: bz goja.ArrayBuffer, tag uint8
func NewOrderedMapReader ¶
func SerializeMaps ¶
arguments: maps ...interface{}
Types ¶
type BufBuilder ¶
type BufBuilder struct {
// contains filtered or unexported fields
}
func NewBufBuilder ¶
func NewBufBuilder() BufBuilder
func (BufBuilder) Len ¶
func (b BufBuilder) Len() int
func (BufBuilder) Reset ¶
func (b BufBuilder) Reset()
func (BufBuilder) ToBuf ¶
func (b BufBuilder) ToBuf(f goja.FunctionCall, vm *goja.Runtime) goja.Value
func (BufBuilder) Write ¶
func (b BufBuilder) Write(f goja.FunctionCall, vm *goja.Runtime) goja.Value
type LambdaJob ¶
type LambdaJob struct { Script string `msg:"script"` // lambdaJs Certs []string `msg:"certs"` // certs script will access Config string `msg:"config"` // script config Inputs [][]byte `msg:"inputs"` State []byte `msg:"state"` // to be resolved to orderedMap in sandbox }
func (*LambdaJob) MarshalMsg ¶
MarshalMsg implements msgp.Marshaler
type LambdaResult ¶
type LambdaResult struct { Outputs [][]byte `msg:"outputs"` State []byte `msg:"state"` // usually, this is the serialized result of ordered map Error string `msg:"error"` }
todo: add error and status field
func (*LambdaResult) DecodeMsg ¶
func (z *LambdaResult) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (*LambdaResult) EncodeMsg ¶
func (z *LambdaResult) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (*LambdaResult) MarshalMsg ¶
func (z *LambdaResult) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*LambdaResult) Msgsize ¶
func (z *LambdaResult) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*LambdaResult) UnmarshalMsg ¶
func (z *LambdaResult) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type OrderedBufMap ¶
type OrderedBufMap struct {
// contains filtered or unexported fields
}
func NewOrderedBufMap ¶
func NewOrderedBufMap() OrderedBufMap
func (*OrderedBufMap) Clear ¶
func (m *OrderedBufMap) Clear()
func (*OrderedBufMap) Delete ¶
func (m *OrderedBufMap) Delete(k string)
func (*OrderedBufMap) Get ¶
func (m *OrderedBufMap) Get(f goja.FunctionCall, vm *goja.Runtime) goja.Value
func (*OrderedBufMap) Len ¶
func (m *OrderedBufMap) Len() int
func (*OrderedBufMap) Seek ¶
func (m *OrderedBufMap) Seek(k string) (OrderedBufMapIter, bool)
func (*OrderedBufMap) SeekFirst ¶
func (m *OrderedBufMap) SeekFirst() (OrderedBufMapIter, error)
func (*OrderedBufMap) SeekLast ¶
func (m *OrderedBufMap) SeekLast() (OrderedBufMapIter, error)
func (*OrderedBufMap) Set ¶
func (m *OrderedBufMap) Set(k string, buf goja.ArrayBuffer)
type OrderedBufMapIter ¶
type OrderedBufMapIter struct {
// contains filtered or unexported fields
}
func (OrderedBufMapIter) Close ¶
func (iter OrderedBufMapIter) Close()
func (OrderedBufMapIter) Next ¶
func (iter OrderedBufMapIter) Next(f goja.FunctionCall, vm *goja.Runtime) goja.Value
func (OrderedBufMapIter) Prev ¶
func (iter OrderedBufMapIter) Prev(f goja.FunctionCall, vm *goja.Runtime) goja.Value
type OrderedIntMap ¶
type OrderedIntMap struct {
// contains filtered or unexported fields
}
func NewOrderedIntMap ¶
func NewOrderedIntMap() OrderedIntMap
func (*OrderedIntMap) Clear ¶
func (m *OrderedIntMap) Clear()
func (*OrderedIntMap) Delete ¶
func (m *OrderedIntMap) Delete(k string)
func (*OrderedIntMap) Len ¶
func (m *OrderedIntMap) Len() int
func (*OrderedIntMap) Seek ¶
func (m *OrderedIntMap) Seek(k string) (OrderedIntMapIter, bool)
func (*OrderedIntMap) SeekFirst ¶
func (m *OrderedIntMap) SeekFirst() (OrderedIntMapIter, error)
func (*OrderedIntMap) SeekLast ¶
func (m *OrderedIntMap) SeekLast() (OrderedIntMapIter, error)
func (*OrderedIntMap) Set ¶
func (m *OrderedIntMap) Set(k string, v int64)
type OrderedIntMapIter ¶
type OrderedIntMapIter struct {
// contains filtered or unexported fields
}
func (OrderedIntMapIter) Close ¶
func (iter OrderedIntMapIter) Close()
func (OrderedIntMapIter) Next ¶
func (iter OrderedIntMapIter) Next() (string, int64)
func (OrderedIntMapIter) Prev ¶
func (iter OrderedIntMapIter) Prev() (string, int64)
type OrderedMapReader ¶
type OrderedMapReader struct {
// contains filtered or unexported fields
}
func (*OrderedMapReader) Read ¶
func (r *OrderedMapReader) Read(f goja.FunctionCall, vm *goja.Runtime) goja.Value
Note: Each call read only one map, and keep the remaining bytes in OrderedMapReader arguments: tag uint8
func (*OrderedMapReader) Reset ¶
func (r *OrderedMapReader) Reset()
type OrderedStrMap ¶
type OrderedStrMap struct {
// contains filtered or unexported fields
}
func NewOrderedStrMap ¶
func NewOrderedStrMap() OrderedStrMap
func (*OrderedStrMap) Clear ¶
func (m *OrderedStrMap) Clear()
func (*OrderedStrMap) Delete ¶
func (m *OrderedStrMap) Delete(k string)
func (*OrderedStrMap) Len ¶
func (m *OrderedStrMap) Len() int
func (*OrderedStrMap) Seek ¶
func (m *OrderedStrMap) Seek(k string) (OrderedStrMapIter, bool)
func (*OrderedStrMap) SeekFirst ¶
func (m *OrderedStrMap) SeekFirst() (OrderedStrMapIter, error)
func (*OrderedStrMap) SeekLast ¶
func (m *OrderedStrMap) SeekLast() (OrderedStrMapIter, error)
func (*OrderedStrMap) Set ¶
func (m *OrderedStrMap) Set(k string, v string)
type OrderedStrMapIter ¶
type OrderedStrMapIter struct {
// contains filtered or unexported fields
}
func (OrderedStrMapIter) Close ¶
func (iter OrderedStrMapIter) Close()
func (OrderedStrMapIter) Next ¶
func (iter OrderedStrMapIter) Next() (string, string)
func (OrderedStrMapIter) Prev ¶
func (iter OrderedStrMapIter) Prev() (string, string)
type Sint256 ¶
type Sint256 struct {
// contains filtered or unexported fields
}
func BufToS256 ¶
func BufToS256(buf goja.ArrayBuffer) Sint256
func (Sint256) IsSafeInteger ¶
func (Sint256) ToSafeInteger ¶
type Uint256 ¶
func BufToU256 ¶
func BufToU256(buf goja.ArrayBuffer) Uint256
func (Uint256) IsSafeInteger ¶
func (Uint256) ToSafeInteger ¶
Click to show internal directories.
Click to hide internal directories.