Documentation ¶
Index ¶
- type Store
- func (s Store) Add(ctx domain.RequestContext, account account.Account) (err error)
- func (s Store) CountOrgAccounts(ctx domain.RequestContext) (c int)
- func (s Store) DeleteAccount(ctx domain.RequestContext, ID string) (rows int64, err error)
- func (s Store) GetAccountsByOrg(ctx domain.RequestContext) (t []account.Account, err error)
- func (s Store) GetUserAccount(ctx domain.RequestContext, userID string) (account account.Account, err error)
- func (s Store) GetUserAccounts(ctx domain.RequestContext, userID string) (t []account.Account, err error)
- func (s Store) HasOrgAccount(ctx domain.RequestContext, orgID, userID string) bool
- func (s Store) UpdateAccount(ctx domain.RequestContext, account account.Account) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct { store.Context store.AccountStorer }
Store provides data access to account information.
func (Store) CountOrgAccounts ¶
func (s Store) CountOrgAccounts(ctx domain.RequestContext) (c int)
CountOrgAccounts returns the numnber of active user accounts for specified organization.
func (Store) DeleteAccount ¶
DeleteAccount deletes the database record in the account table for user ID.
func (Store) GetAccountsByOrg ¶
GetAccountsByOrg returns a slice of database account records, for all users in the client's organization.
func (Store) GetUserAccount ¶
func (s Store) GetUserAccount(ctx domain.RequestContext, userID string) (account account.Account, err error)
GetUserAccount returns the database account record corresponding to the given userID, using the client's current organizaion.
func (Store) GetUserAccounts ¶
func (s Store) GetUserAccounts(ctx domain.RequestContext, userID string) (t []account.Account, err error)
GetUserAccounts returns a slice of database account records, for all organizations that the userID is a member of, in organization title order.
func (Store) HasOrgAccount ¶
func (s Store) HasOrgAccount(ctx domain.RequestContext, orgID, userID string) bool
HasOrgAccount returns if the given orgID has valid userID.
func (Store) UpdateAccount ¶
UpdateAccount updates the database record for the given account to the given values.