useraccountmanager

package
v0.21.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 12, 2024 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UserAccountManager

type UserAccountManager struct {
	// contains filtered or unexported fields
}

UserAccountManager is a struct that stores one account manager per user and other required data

func NewUserAccountManager

func NewUserAccountManager(unauthenticatedClient rpc.Client, logger gethlog.Logger, storage storage.Storage, hostRPCBindAddrHTTP string, hostRPCBindAddrWS string) UserAccountManager

func (*UserAccountManager) AddAndReturnAccountManager

func (m *UserAccountManager) AddAndReturnAccountManager(userID string) *accountmanager.AccountManager

AddAndReturnAccountManager adds new UserAccountManager if it doesn't exist and returns it, if UserAccountManager already exists for that user just return it

func (*UserAccountManager) DeleteUserAccountManager

func (m *UserAccountManager) DeleteUserAccountManager(userID string) error

DeleteUserAccountManager removes the UserAccountManager associated with the given userID. It returns an error if no UserAccountManager exists for that userID.

func (*UserAccountManager) GetUserAccountManager

func (m *UserAccountManager) GetUserAccountManager(userID string) (*accountmanager.AccountManager, error)

GetUserAccountManager retrieves the UserAccountManager associated with the given userID. it returns the UserAccountManager and nil error if one exists. before returning it checks the database and creates all missing clients for that userID (we are not loading all of them at startup to limit the number of established connections) If a UserAccountManager does not exist for the userID, it returns nil and an error.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL