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 (*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.