localstorage

package
v0.7.4 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2019 License: LGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BoolMap

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

func (*BoolMap) Delete

func (bmap *BoolMap) Delete(map_offset []byte)

func (*BoolMap) Get

func (bmap *BoolMap) Get(map_offset []byte) bool

func (*BoolMap) Set

func (bmap *BoolMap) Set(map_offset []byte, value bool)

type Bytable

type Bytable interface {
	Bytes() []byte
}

type BytesArray

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

func (*BytesArray) Append

func (barr *BytesArray) Append(value []byte)

func (*BytesArray) Delete

func (barr *BytesArray) Delete(arr_offset uint64)

func (*BytesArray) Get

func (barr *BytesArray) Get(arr_offset uint64) []byte

func (*BytesArray) Length

func (barr *BytesArray) Length() uint64

func (*BytesArray) Set

func (barr *BytesArray) Set(arr_offset uint64, value []byte)

type BytesMap

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

func (*BytesMap) Delete

func (bmap *BytesMap) Delete(map_offset []byte)

func (*BytesMap) Get

func (bmap *BytesMap) Get(map_offset []byte) []byte

func (*BytesMap) Set

func (bmap *BytesMap) Set(map_offset []byte, value []byte)

type CommitEvent

type CommitEvent func()

type FromBytesHelper

type FromBytesHelper func([]byte) interface{}

type GeneralMap

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

func (*GeneralMap) Delete

func (udMap *GeneralMap) Delete(Map_offset interface{})

func (*GeneralMap) Get

func (udMap *GeneralMap) Get(Map_offset interface{}) interface{}

func (*GeneralMap) Set

func (udMap *GeneralMap) Set(Map_offset interface{}, value interface{})

type Int64Map

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

func (*Int64Map) Delete

func (i64map *Int64Map) Delete(map_offset int64)

func (*Int64Map) Get

func (i64map *Int64Map) Get(map_offset int64) []byte

func (*Int64Map) Set

func (i64map *Int64Map) Set(map_offset int64, value []byte)

type JsonBytesMap

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

func (*JsonBytesMap) Delete

func (jsonBytesMap *JsonBytesMap) Delete(Map_offset []byte)

func (*JsonBytesMap) Get

func (jsonBytesMap *JsonBytesMap) Get(Map_offset []byte, value interface{})

func (*JsonBytesMap) Set

func (jsonBytesMap *JsonBytesMap) Set(Map_offset []byte, value interface{})

type LocalStorage

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

func NewLocalStorage

func NewLocalStorage(accountAddress []byte, storageRoot interface{}, db *leveldb.DB) (*LocalStorage, error)

func (*LocalStorage) Commit

func (sto *LocalStorage) Commit() (root []byte, err error)

func (*LocalStorage) GetBool

func (sto *LocalStorage) GetBool(variName string) bool

func (*LocalStorage) GetBytes

func (sto *LocalStorage) GetBytes(variName string) []byte

func (*LocalStorage) GetInt64

func (sto *LocalStorage) GetInt64(variName string) int64

func (*LocalStorage) GetInt8

func (sto *LocalStorage) GetInt8(variName string) int8

func (*LocalStorage) GetString

func (sto *LocalStorage) GetString(variName string) string

func (*LocalStorage) GetUint256

func (sto *LocalStorage) GetUint256(variName string) *math.Uint256

func (*LocalStorage) GetUint64

func (sto *LocalStorage) GetUint64(variName string) uint64

func (*LocalStorage) GetUint8

func (sto *LocalStorage) GetUint8(variName string) uint8

func (*LocalStorage) NewBoolMap

func (sto *LocalStorage) NewBoolMap(mapName string) *BoolMap

func (*LocalStorage) NewBytesArray

func (sto *LocalStorage) NewBytesArray(arrName string) *BytesArray

func (*LocalStorage) NewBytesMap

func (sto *LocalStorage) NewBytesMap(mapName string) *BytesMap

func (*LocalStorage) NewGeneralMap

func (sto *LocalStorage) NewGeneralMap(
	mapName string,
	leftToBytesHelperFunc func(interface{}) []byte,
	rightToBytesHelperFunc func(interface{}) []byte,
	rightFromBytesHelperFunc func([]byte) interface{},
) *GeneralMap

func (*LocalStorage) NewInt64Map

func (sto *LocalStorage) NewInt64Map(mapName string) *Int64Map

func (*LocalStorage) NewJsonBytesMap

func (sto *LocalStorage) NewJsonBytesMap(mapName string) *JsonBytesMap

func (*LocalStorage) NewMap

func (sto *LocalStorage) NewMap(mapName string) *Map

func (*LocalStorage) NewStringMap

func (sto *LocalStorage) NewStringMap(mapName string) *StringMap

func (*LocalStorage) NewUint64Map

func (sto *LocalStorage) NewUint64Map(mapName string) *Uint64Map

func (*LocalStorage) SetAny

func (sto *LocalStorage) SetAny(variName string, value Bytable)

func (*LocalStorage) SetBool

func (sto *LocalStorage) SetBool(variName string, value bool)

func (*LocalStorage) SetBytes

func (sto *LocalStorage) SetBytes(variName string, value []byte)

func (*LocalStorage) SetInt64

func (sto *LocalStorage) SetInt64(variName string, value int64)

func (*LocalStorage) SetInt8

func (sto *LocalStorage) SetInt8(variName string, value int8)

func (*LocalStorage) SetString

func (sto *LocalStorage) SetString(variName string, value string)

func (*LocalStorage) SetUint256

func (sto *LocalStorage) SetUint256(variName string, value *math.Uint256)

func (*LocalStorage) SetUint64

func (sto *LocalStorage) SetUint64(variName string, value uint64)

func (*LocalStorage) SetUint8

func (sto *LocalStorage) SetUint8(variName string, value uint8)

type Map

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

func (*Map) Delete

func (udMap *Map) Delete(Map_offset Bytable)

func (*Map) Get

func (udMap *Map) Get(Map_offset Bytable) []byte

func (*Map) Set

func (udMap *Map) Set(Map_offset Bytable, value []byte)

type StringMap

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

func (*StringMap) Delete

func (smap *StringMap) Delete(map_offset string)

func (*StringMap) Get

func (smap *StringMap) Get(map_offset string) []byte

func (*StringMap) Set

func (smap *StringMap) Set(map_offset string, value []byte)

type ToBytesHelper

type ToBytesHelper func(interface{}) []byte

type Uint64Map

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

func (*Uint64Map) Delete

func (ui64map *Uint64Map) Delete(map_offset uint64)

func (*Uint64Map) Get

func (ui64map *Uint64Map) Get(map_offset uint64) []byte

func (*Uint64Map) Set

func (ui64map *Uint64Map) Set(map_offset uint64, value []byte)

Jump to

Keyboard shortcuts

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