community: Index | Files

package account

import ""


Package Files


type Store Uses

type Store struct {

Store provides data access to account information.

func (Store) Add Uses

func (s Store) Add(ctx domain.RequestContext, account account.Account) (err error)

Add inserts the given record into the datbase account table.

func (Store) CountOrgAccounts Uses

func (s Store) CountOrgAccounts(ctx domain.RequestContext) (c int)

CountOrgAccounts returns the numnber of active user accounts for specified organization.

func (Store) DeleteAccount Uses

func (s Store) DeleteAccount(ctx domain.RequestContext, ID string) (rows int64, err error)

DeleteAccount deletes the database record in the account table for user ID.

func (Store) GetAccountsByOrg Uses

func (s Store) GetAccountsByOrg(ctx domain.RequestContext) (t []account.Account, err error)

GetAccountsByOrg returns a slice of database account records, for all users in the client's organization.

func (Store) GetUserAccount Uses

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 Uses

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 Uses

func (s Store) HasOrgAccount(ctx domain.RequestContext, orgID, userID string) bool

HasOrgAccount returns if the given orgID has valid userID.

func (Store) UpdateAccount Uses

func (s Store) UpdateAccount(ctx domain.RequestContext, account account.Account) (err error)

UpdateAccount updates the database record for the given account to the given values.

Package account imports 7 packages (graph) and is imported by 1 packages. Updated 2019-05-31. Refresh now. Tools for package owners.