Documentation ¶
Index ¶
- func NewAuthService(db Database, logger logger.Logger, repo AuthRepository, pwv PasswordValidator) domain.AuthService
- func NewCheevosService(db Database, logger logger.Logger, repo CheevosRepository) domain.CheevosService
- func NewRosterService(db Database, email Emailer, logger logger.Logger, repo RosterRepository) domain.RosterService
- type AuthRepository
- type CheevosRepository
- type Database
- type Emailer
- type PasswordValidator
- type RosterRepository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAuthService ¶
func NewAuthService(db Database, logger logger.Logger, repo AuthRepository, pwv PasswordValidator) domain.AuthService
func NewCheevosService ¶
func NewCheevosService(db Database, logger logger.Logger, repo CheevosRepository) domain.CheevosService
func NewRosterService ¶
func NewRosterService(db Database, email Emailer, logger logger.Logger, repo RosterRepository) domain.RosterService
Types ¶
type AuthRepository ¶
type CheevosRepository ¶
type Database ¶
type Database interface { // WithTx is responsible for opening a transaction boundary on the parent // database and calling the provided function, passing the transaction in for // use by the service layer. If an error is returned from the function // closure, the transaction is rolled back and WithTx returns an error as // well. WithTx(context.Context, func(ctx context.Context, tx pg.Tx) error) error }
Database represents a connection to a persistence layer. A Database is only responsible for opening a transaction which is then responsible for all of the heavy lifting.
type PasswordValidator ¶
type RosterRepository ¶
type RosterRepository interface { DeleteInvitationByCode(ctx context.Context, tx pg.Tx, hashedCode string) error GetInvitation(ctx context.Context, tx pg.Tx, i *domain.Invitation, id string) error GetInvitationByCode(ctx context.Context, tx pg.Tx, i *domain.Invitation, hashedCode string) error InsertInvitation(ctx context.Context, tx pg.Tx, i *domain.Invitation, hashedCode string) error UpdateInvitation(ctx context.Context, tx pg.Tx, i *domain.Invitation, hashedCode string) error GetMembership(ctx context.Context, tx pg.Tx, m *domain.Membership, orgID, userID string) error InsertMembership(ctx context.Context, tx pg.Tx, m *domain.Membership) error InsertOrganization(ctx context.Context, tx pg.Tx, org *domain.Organization) error }
Click to show internal directories.
Click to hide internal directories.