account

package
v2.4.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2019 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

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) Add

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

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

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

func (Store) DeleteAccount

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

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

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

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.

Jump to

Keyboard shortcuts

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