Documentation ¶
Index ¶
- Constants
- type UserStorage
- type UserStorageWithCache
- func (s *UserStorageWithCache) AddAccount(userID []byte, accountAddress []byte, signature []byte, ...) error
- func (s *UserStorageWithCache) AddUser(userID []byte, privateKey []byte) error
- func (s *UserStorageWithCache) DeleteUser(userID []byte) error
- func (s *UserStorageWithCache) GetUser(userID []byte) (*wecommon.GWUser, error)
Constants ¶
View Source
const UserCacheSize = 10_000
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UserStorage ¶ added in v0.28.0
type UserStorageWithCache ¶ added in v0.28.0
type UserStorageWithCache struct {
// contains filtered or unexported fields
}
UserStorageWithCache implements the UserStorage interface with caching
func NewUserStorageWithCache ¶ added in v0.28.0
func NewUserStorageWithCache(storage UserStorage, logger log.Logger) (*UserStorageWithCache, error)
NewUserStorageWithCache creates a new UserStorageWithCache instance
func (*UserStorageWithCache) AddAccount ¶ added in v0.28.0
func (s *UserStorageWithCache) AddAccount(userID []byte, accountAddress []byte, signature []byte, signatureType viewingkey.SignatureType) error
AddAccount adds an account to a user and invalidates the cache for the userID
func (*UserStorageWithCache) AddUser ¶ added in v0.28.0
func (s *UserStorageWithCache) AddUser(userID []byte, privateKey []byte) error
AddUser adds a new user and invalidates the cache for the userID
func (*UserStorageWithCache) DeleteUser ¶ added in v0.28.0
func (s *UserStorageWithCache) DeleteUser(userID []byte) error
DeleteUser deletes a user and invalidates the cache for the userID
Click to show internal directories.
Click to hide internal directories.