Documentation ¶
Index ¶
- type Data
- type MemoryStorage
- func (storage *MemoryStorage) DeleteBlock(block blockchain.Block) error
- func (storage *MemoryStorage) LoadBlocks(cursor interface{}, count int) (blocks blockchain.BlockGroup, nextCursor interface{}, err error)
- func (storage MemoryStorage) LoadLastBlock() (blockchain.Block, error)
- func (storage *MemoryStorage) StoreBlock(block blockchain.Block) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Data ¶ added in v1.4.0
type Data interface { blockchain.Data }
Data ...
It's used only for mock generating.
type MemoryStorage ¶
type MemoryStorage struct {
// contains filtered or unexported fields
}
MemoryStorage ...
func NewMemoryStorage ¶ added in v1.4.0
func NewMemoryStorage(blocks blockchain.BlockGroup) *MemoryStorage
NewMemoryStorage ...
func (*MemoryStorage) DeleteBlock ¶ added in v1.4.0
func (storage *MemoryStorage) DeleteBlock(block blockchain.Block) error
DeleteBlock ...
func (*MemoryStorage) LoadBlocks ¶ added in v1.3.2
func (storage *MemoryStorage) LoadBlocks(cursor interface{}, count int) ( blocks blockchain.BlockGroup, nextCursor interface{}, err error, )
LoadBlocks ...
func (MemoryStorage) LoadLastBlock ¶
func (storage MemoryStorage) LoadLastBlock() (blockchain.Block, error)
LoadLastBlock ...
func (*MemoryStorage) StoreBlock ¶
func (storage *MemoryStorage) StoreBlock(block blockchain.Block) error
StoreBlock ...
Click to show internal directories.
Click to hide internal directories.