Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrAccountInfoNotFound = errors.New("account info not found")
)
View Source
var (
ErrNotFound = errors.New("account info not found")
)
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache interface { // Put puts a list of account info associated with the given owner. Put(ctx context.Context, info *accountpb.AccountInfo) error // Get gets an account's info, if it exists in the cache. // // ErrAccountInfoNotFound is returned if no account info was found for the provided key. Get(ctx context.Context, key ed25519.PublicKey) (*accountpb.AccountInfo, error) // Delete a cached entry. Del(ctx context.Context, key ed25519.PublicKey) (ok bool, err error) }
type StateStore ¶
type StateStore interface { // Put puts an account's state into the store. Put(ctx context.Context, state *State) error // Get gets an account's state, if it exists in the store. // // ErrNotFound is returned if no account state was found for the provided key. Get(ctx context.Context, account ed25519.PublicKey) (*State, error) // Delete deletes an account's state. // // Delete is idempotent Delete(ctx context.Context, account ed25519.PublicKey) error // Returns token accounts by owner // // If no token accounts are associated with the owner, an empty slice will be returned. GetAccountsByOwner(ctx context.Context, owner ed25519.PublicKey) ([]ed25519.PublicKey, error) }
Click to show internal directories.
Click to hide internal directories.