Documentation ¶
Index ¶
- Variables
- func CreateMethod(method string, key string, meta SubstrateMetadata) types.StorageFunction
- func KeyBestHash() types.StorageFunction
- func KeyBestNumber() types.StorageFunction
- func KeyBlockByHash() types.StorageFunction
- func KeyHashByNumber() types.StorageFunction
- func KeyHeaderByHash() types.StorageFunction
- type Base
- type BlockDB
- type Config
- type DB
- type InterfaceChainDbs
- type MetadataType
- type StateDB
- type StorageMethodBn
- type StorageMethodU8a
- type SubstrateMetadata
Constants ¶
This section is empty.
Variables ¶
View Source
var DBConfigType = "disk" // other option is "memory"
DBConfigType ...
View Source
var DBPathPrefix = "database"
DBPathPrefix ...
View Source
var DefaultPath = "~/.golkadot"
DefaultPath ...
View Source
var DefaultType = "disk"
DefaultType ...
Functions ¶
func CreateMethod ¶
func CreateMethod(method string, key string, meta SubstrateMetadata) types.StorageFunction
CreateMethod is small helper function to factorize code on this page
Types ¶
type BlockDB ¶
type BlockDB struct { DB db.BaseDB BestHash StorageMethodU8a BestNumber StorageMethodBn BlockData StorageMethodU8a Hash StorageMethodU8a Header StorageMethodU8a }
BlockDB ...
type Config ¶
type Config struct { Compact bool IsTrieDb bool Path string Snapshot bool Type string // DBConfigType }
Config ...
type DB ¶
type DB struct { BlocksDB *BlockDB StateDB *StateDB BasePath string Config *clientdbtypes.Config }
DB ...
func NewDB ¶
func NewDB(config *clienttypes.ConfigClient, chain *clientchainloader.Loader) *DB
NewDB ...
type StorageMethodBn ¶
type StorageMethodBn struct {
// contains filtered or unexported fields
}
StorageMethodBn ...
func NewStorageMethodBn ¶
func NewStorageMethodBn(dbs db.BaseDB, createKey types.StorageFunction, bitLen int) StorageMethodBn
NewStorageMethodBn ...
func (*StorageMethodBn) Get ¶
func (s *StorageMethodBn) Get(keyParams ...interface{}) *big.Int
Get ...
func (*StorageMethodBn) OnUpdate ¶
func (s *StorageMethodBn) OnUpdate(callback func(value []uint8))
OnUpdate ...
func (*StorageMethodBn) Set ¶
func (s *StorageMethodBn) Set(value *big.Int, keyParams ...interface{})
Set ...
type StorageMethodU8a ¶
type StorageMethodU8a struct {
// contains filtered or unexported fields
}
StorageMethodU8a ...
func NewStorageMethodU8a ¶
func NewStorageMethodU8a(dbs db.BaseDB, createKey types.StorageFunction) StorageMethodU8a
NewStorageMethodU8a ...
func (*StorageMethodU8a) OnUpdate ¶
func (s *StorageMethodU8a) OnUpdate(callback func(value []uint8))
OnUpdate ...
func (*StorageMethodU8a) Set ¶
func (s *StorageMethodU8a) Set(value []uint8, keyParam interface{})
Set ...
type SubstrateMetadata ¶
type SubstrateMetadata struct { Documentation []string Type MetadataType }
SubstrateMetadata ...
Click to show internal directories.
Click to hide internal directories.