Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidArgs = errors.New("pstorage: invalid arguments") ErrNotExists = errors.New("pstorage: not exists") ErrExists = errors.New("pstorage: exists") ErrAccountNotExists = fmt.Errorf("%w: account", ErrNotExists) ErrAccountExists = fmt.Errorf("%w: account", ErrExists) ErrCertificateNotExists = fmt.Errorf("%w: certificate", ErrNotExists) ErrCertificateExists = fmt.Errorf("%w: certificate", ErrExists) )
Functions ¶
This section is empty.
Types ¶
type Storage ¶
type Storage interface {
StorageR
StorageW
BidEngine() BidEngine
Verification() Verification
Close() error
}
type StorageW ¶
type StorageW interface {
AddAccount(context.Context, sdk.Address, cryptotypes.PubKey) error
DelAccount(context.Context, sdk.Address) error
AddAccountCertificate(context.Context, sdk.Address, *x509.Certificate, crypto.PublicKey) error
DelAccountCertificate(context.Context, sdk.Address, *big.Int) error
}
type Verification ¶
type Verification interface {
SetSnapshotPosterState(context.Context, []byte) error
GetSnapshotPosterState(context.Context) ([]byte, error)
SetInventorySnapshot(context.Context, string, []byte, []byte) error
GetInventorySnapshot(context.Context, string, []byte) ([]byte, error)
GetLatestInventorySnapshot(context.Context, string) ([]byte, error)
}
Click to show internal directories.
Click to hide internal directories.