types

package
v1.6.0-alpha Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 10, 2019 License: LGPL-3.0 Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	ByteArrayType byte = 0x00
	BooleanType   byte = 0x01
	IntegerType   byte = 0x02
	InterfaceType byte = 0x40
	ArrayType     byte = 0x80
	StructType    byte = 0x81
	MapType       byte = 0x82
)
View Source
const (
	MAX_STRUCT_DEPTH = 10
	MAX_CLONE_LENGTH = 1024
)

Variables

This section is empty.

Functions

func BigIntFromBytes

func BigIntFromBytes(ba []byte) *big.Int

func BigIntToBytes

func BigIntToBytes(data *big.Int) []byte

Types

type Array

type Array struct {
	// contains filtered or unexported fields
}

func NewArray

func NewArray(value []StackItems) *Array

func (*Array) Add

func (this *Array) Add(item StackItems)

func (*Array) Count added in v0.9.2

func (this *Array) Count() int

func (*Array) Equals

func (this *Array) Equals(other StackItems) bool

func (*Array) GetArray

func (this *Array) GetArray() ([]StackItems, error)

func (*Array) GetBigInteger

func (this *Array) GetBigInteger() (*big.Int, error)

func (*Array) GetBoolean

func (this *Array) GetBoolean() (bool, error)

func (*Array) GetByteArray

func (this *Array) GetByteArray() ([]byte, error)

func (*Array) GetInterface

func (this *Array) GetInterface() (interfaces.Interop, error)

func (*Array) GetMap

func (this *Array) GetMap() (map[StackItems]StackItems, error)

func (*Array) GetStruct

func (this *Array) GetStruct() ([]StackItems, error)

func (*Array) IsMapKey added in v1.0.3

func (this *Array) IsMapKey() bool

func (*Array) RemoveAt added in v1.0.3

func (this *Array) RemoveAt(index int)

type Boolean

type Boolean struct {
	// contains filtered or unexported fields
}

func NewBoolean

func NewBoolean(value bool) *Boolean

func (*Boolean) Equals

func (this *Boolean) Equals(other StackItems) bool

func (*Boolean) GetArray

func (this *Boolean) GetArray() ([]StackItems, error)

func (*Boolean) GetBigInteger

func (this *Boolean) GetBigInteger() (*big.Int, error)

func (*Boolean) GetBoolean

func (this *Boolean) GetBoolean() (bool, error)

func (*Boolean) GetByteArray

func (this *Boolean) GetByteArray() ([]byte, error)

func (*Boolean) GetInterface

func (this *Boolean) GetInterface() (interfaces.Interop, error)

func (*Boolean) GetMap

func (this *Boolean) GetMap() (map[StackItems]StackItems, error)

func (*Boolean) GetStruct

func (this *Boolean) GetStruct() ([]StackItems, error)

func (*Boolean) IsMapKey added in v1.0.3

func (this *Boolean) IsMapKey() bool

type ByteArray

type ByteArray struct {
	// contains filtered or unexported fields
}

func NewByteArray

func NewByteArray(value []byte) *ByteArray

func (*ByteArray) Equals

func (this *ByteArray) Equals(other StackItems) bool

func (*ByteArray) GetArray

func (this *ByteArray) GetArray() ([]StackItems, error)

func (*ByteArray) GetBigInteger

func (this *ByteArray) GetBigInteger() (*big.Int, error)

func (*ByteArray) GetBoolean

func (this *ByteArray) GetBoolean() (bool, error)

func (*ByteArray) GetByteArray

func (this *ByteArray) GetByteArray() ([]byte, error)

func (*ByteArray) GetInterface

func (this *ByteArray) GetInterface() (interfaces.Interop, error)

func (*ByteArray) GetMap

func (this *ByteArray) GetMap() (map[StackItems]StackItems, error)

func (*ByteArray) GetStruct

func (this *ByteArray) GetStruct() ([]StackItems, error)

func (*ByteArray) IsMapKey added in v1.0.3

func (this *ByteArray) IsMapKey() bool

type Integer

type Integer struct {
	// contains filtered or unexported fields
}

func NewInteger

func NewInteger(value *big.Int) *Integer

func (*Integer) Equals

func (this *Integer) Equals(other StackItems) bool

func (*Integer) GetArray

func (this *Integer) GetArray() ([]StackItems, error)

func (*Integer) GetBigInteger

func (this *Integer) GetBigInteger() (*big.Int, error)

func (*Integer) GetBoolean

func (this *Integer) GetBoolean() (bool, error)

func (*Integer) GetByteArray

func (this *Integer) GetByteArray() ([]byte, error)

func (*Integer) GetInterface

func (this *Integer) GetInterface() (interfaces.Interop, error)

func (*Integer) GetMap

func (this *Integer) GetMap() (map[StackItems]StackItems, error)

func (*Integer) GetStruct

func (this *Integer) GetStruct() ([]StackItems, error)

func (*Integer) IsMapKey added in v1.0.3

func (this *Integer) IsMapKey() bool

type Interop

type Interop struct {
	// contains filtered or unexported fields
}

func NewInteropInterface

func NewInteropInterface(value interfaces.Interop) *Interop

func (*Interop) Equals

func (this *Interop) Equals(other StackItems) bool

func (*Interop) GetArray

func (this *Interop) GetArray() ([]StackItems, error)

func (*Interop) GetBigInteger

func (this *Interop) GetBigInteger() (*big.Int, error)

func (*Interop) GetBoolean

func (this *Interop) GetBoolean() (bool, error)

func (*Interop) GetByteArray

func (this *Interop) GetByteArray() ([]byte, error)

func (*Interop) GetInterface

func (this *Interop) GetInterface() (interfaces.Interop, error)

func (*Interop) GetMap

func (this *Interop) GetMap() (map[StackItems]StackItems, error)

func (*Interop) GetStruct

func (this *Interop) GetStruct() ([]StackItems, error)

func (*Interop) IsMapKey added in v1.0.3

func (this *Interop) IsMapKey() bool

type Map

type Map struct {
	// contains filtered or unexported fields
}

func NewMap

func NewMap() *Map

func (*Map) Add

func (this *Map) Add(key StackItems, value StackItems)

func (*Map) Clear

func (this *Map) Clear()

func (*Map) Equals

func (this *Map) Equals(that StackItems) bool

func (*Map) GetArray

func (this *Map) GetArray() ([]StackItems, error)

func (*Map) GetBigInteger

func (this *Map) GetBigInteger() (*big.Int, error)

func (*Map) GetBoolean

func (this *Map) GetBoolean() (bool, error)

func (*Map) GetByteArray

func (this *Map) GetByteArray() ([]byte, error)

func (*Map) GetInterface

func (this *Map) GetInterface() (interfaces.Interop, error)

func (*Map) GetMap

func (this *Map) GetMap() (map[StackItems]StackItems, error)

func (*Map) GetStruct

func (this *Map) GetStruct() ([]StackItems, error)

func (*Map) IsMapKey added in v1.0.3

func (this *Map) IsMapKey() bool

func (*Map) Remove

func (this *Map) Remove(key StackItems)

func (*Map) TryGetValue

func (this *Map) TryGetValue(key StackItems) StackItems

type StackItems

type StackItems interface {
	Equals(other StackItems) bool
	GetBigInteger() (*big.Int, error)
	GetBoolean() (bool, error)
	GetByteArray() ([]byte, error)
	GetInterface() (interfaces.Interop, error)
	GetArray() ([]StackItems, error)
	GetStruct() ([]StackItems, error)
	GetMap() (map[StackItems]StackItems, error)
	IsMapKey() bool
}

type Struct

type Struct struct {
	// contains filtered or unexported fields
}

func NewStruct

func NewStruct(value []StackItems) *Struct

func (*Struct) Add

func (this *Struct) Add(item StackItems)

func (*Struct) Clone

func (s *Struct) Clone() (StackItems, error)

func (*Struct) Count added in v0.9.2

func (this *Struct) Count() int

func (*Struct) Equals

func (this *Struct) Equals(other StackItems) bool

func (*Struct) GetArray

func (s *Struct) GetArray() ([]StackItems, error)

func (*Struct) GetBigInteger

func (this *Struct) GetBigInteger() (*big.Int, error)

func (*Struct) GetBoolean

func (this *Struct) GetBoolean() (bool, error)

func (*Struct) GetByteArray

func (this *Struct) GetByteArray() ([]byte, error)

func (*Struct) GetInterface

func (this *Struct) GetInterface() (interfaces.Interop, error)

func (*Struct) GetMap

func (this *Struct) GetMap() (map[StackItems]StackItems, error)

func (*Struct) GetStruct

func (s *Struct) GetStruct() ([]StackItems, error)

func (*Struct) IsMapKey added in v1.0.3

func (this *Struct) IsMapKey() bool

func (*Struct) RemoveAt added in v1.0.3

func (this *Struct) RemoveAt(index int)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL