Documentation ¶
Overview ¶
Package badger represent a persistence storage system service, based on badger lib.
Index ¶
- type Config
- type Persistence
- func (p *Persistence) Close() error
- func (p *Persistence) DBExists() bool
- func (p *Persistence) GetCurrentHashSerialize(hash []byte) ([]byte, error)
- func (p *Persistence) GetLastHash() ([]byte, error)
- func (p *Persistence) LastHash() []byte
- func (p *Persistence) SetLastHash(lastHash []byte)
- func (p *Persistence) Update(lastHash []byte, hashSerialize []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Persistence ¶
type Persistence struct {
// contains filtered or unexported fields
}
Persistence represent a persistence adapter structure.
func (*Persistence) DBExists ¶
func (p *Persistence) DBExists() bool
DBExists test if a DB already exist.
func (*Persistence) GetCurrentHashSerialize ¶
func (p *Persistence) GetCurrentHashSerialize(hash []byte) ([]byte, error)
GetCurrentHashSerialize the last hash serialize in the current DB.
func (*Persistence) GetLastHash ¶
func (p *Persistence) GetLastHash() ([]byte, error)
GetLastHash the last hash in the current DB.
func (*Persistence) LastHash ¶
func (p *Persistence) LastHash() []byte
LastHash get the last hash linked to the current DB.
func (*Persistence) SetLastHash ¶
func (p *Persistence) SetLastHash(lastHash []byte)
SetLastHash update the last hash linked to the current DB.
Click to show internal directories.
Click to hide internal directories.