dao

package
v0.0.0-...-c266842 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountService

type AccountService struct {
	DB *postgres.DB
}

func NewAccountService

func NewAccountService(db *sqlx.DB) *AccountService

func (AccountService) Account

func (as AccountService) Account(id int64) (*hmm.Account, error)

func (AccountService) Accounts

func (as AccountService) Accounts() (hmm.Accounts, error)

func (AccountService) Create

func (as AccountService) Create(ctx context.Context, account *hmm.Account, password, confirmationCode string) (*hmm.Account, *hmm.Confirmation, error)

func (AccountService) PopulateAccount

func (as AccountService) PopulateAccount(account *hmm.Account) *hmm.Account

func (AccountService) PopulateAccounts

func (as AccountService) PopulateAccounts(accounts hmm.Accounts) hmm.Accounts

type ConfirmationService

type ConfirmationService struct {
	DB *postgres.DB
}

func NewConfirmationService

func NewConfirmationService(db *sqlx.DB) *ConfirmationService

func (ConfirmationService) Confirm

func (cs ConfirmationService) Confirm(id int64) (*hmm.Confirmation, error)

func (ConfirmationService) FailedConfirmationIncrease

func (cs ConfirmationService) FailedConfirmationIncrease(id int64) (*hmm.Confirmation, error)

func (ConfirmationService) PendingConfirmationByKey

func (cs ConfirmationService) PendingConfirmationByKey(key string) (*hmm.Confirmation, error)

type RoleService

type RoleService struct {
	DB *postgres.DB
}

func NewRoleService

func NewRoleService(db *sqlx.DB) *RoleService

func (RoleService) AddRoleToAccount

func (rs RoleService) AddRoleToAccount(accountID int64, roleID int64) (*hmm.AccountRole, error)

func (RoleService) Create

func (rs RoleService) Create(name string) (*hmm.Role, error)

func (RoleService) Role

func (rs RoleService) Role(id int64) (*hmm.Role, error)

func (RoleService) Roles

func (rs RoleService) Roles() (hmm.Roles, error)

func (RoleService) RolesForAccount

func (rs RoleService) RolesForAccount(id int64) (hmm.Roles, error)

func (RoleService) Update

func (rs RoleService) Update(id int64, permissionBit int) (*hmm.Role, error)

type SessionService

type SessionService struct {
	DB *postgres.DB
}

func NewSessionService

func NewSessionService(db *sqlx.DB) *SessionService

func (SessionService) Create

func (ss SessionService) Create(ctx context.Context, email, password string) (*hmm.Session, error)

func (SessionService) ExpireSession

func (ss SessionService) ExpireSession(token string) (*hmm.Session, error)

func (SessionService) SessionFromToken

func (ss SessionService) SessionFromToken(token string) (*hmm.Session, error)

func (SessionService) UpdateSession

func (ss SessionService) UpdateSession(token string) (*hmm.Session, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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