Documentation ¶
Index ¶
- type AuthService
- type CheevosService
- func (cs *CheevosService) AwardCheevoToUser(ctx context.Context, recipientID, cheevoID string) error
- func (cs *CheevosService) CreateCheevo(ctx context.Context, name, description, orgID string) (*domain.Cheevo, error)
- func (cs *CheevosService) GetCheevo(ctx context.Context, id string) (*domain.Cheevo, error)
- type Database
- type DeleteInvitationByCodeArgs
- type Emailer
- type GetCheevoArgs
- type GetInvitationArgs
- type GetInvitationByCodeArgs
- type GetMembershipArgs
- type GetUserArgs
- type InsertAwardArgs
- type InsertCheevoArgs
- type InsertInvitationArgs
- type InsertMembershipArgs
- type InsertOrganizationArgs
- type InsertUserArgs
- type Repository
- func (repo *Repository) DeleteInvitationByCode(ctx context.Context, tx pg.Tx, code string) error
- func (repo *Repository) GetCheevo(ctx context.Context, tx pg.Tx, cheevo *domain.Cheevo, id string) error
- func (repo *Repository) GetInvitation(ctx context.Context, tx pg.Tx, i *domain.Invitation, id string) error
- func (repo *Repository) GetInvitationByCode(ctx context.Context, tx pg.Tx, i *domain.Invitation, code string) error
- func (repo *Repository) GetMembership(ctx context.Context, tx pg.Tx, m *domain.Membership, orgID, userID string) error
- func (repo *Repository) GetUser(ctx context.Context, tx pg.Tx, u *domain.User, id string) error
- func (repo *Repository) InsertAward(ctx context.Context, tx pg.Tx, a *domain.Award) error
- func (repo *Repository) InsertCheevo(ctx context.Context, tx pg.Tx, cheevo *domain.Cheevo) error
- func (repo *Repository) InsertInvitation(ctx context.Context, tx pg.Tx, i *domain.Invitation, hashedCode string) error
- func (repo *Repository) InsertMembership(ctx context.Context, tx pg.Tx, m *domain.Membership) error
- func (repo *Repository) InsertOrganization(ctx context.Context, tx pg.Tx, org *domain.Organization) error
- func (repo *Repository) InsertUser(ctx context.Context, tx pg.Tx, u *domain.User, hashedPassword string) error
- func (repo *Repository) UpdateInvitation(ctx context.Context, tx pg.Tx, i *domain.Invitation, hashedCode string) error
- type RosterService
- func (rs *RosterService) AcceptInvitation(ctx context.Context, userID, code string) error
- func (rs *RosterService) AddMemberToOrganization(ctx context.Context, userID, orgID string) error
- func (rs *RosterService) CreateOrganization(ctx context.Context, name, ownerID string) (*domain.Organization, error)
- func (rs *RosterService) DeclineInvitation(ctx context.Context, code string) error
- func (rs *RosterService) GetInvitation(ctx context.Context, id string) (*domain.Invitation, error)
- func (rs *RosterService) InviteUserToOrganization(ctx context.Context, email, orgID string) (*domain.Invitation, error)
- func (rs *RosterService) IsMember(ctx context.Context, orgID, userID string) error
- func (rs *RosterService) RefreshInvitation(ctx context.Context, id string) (*domain.Invitation, error)
- type SendInvitationArgs
- type UpdateInvitationArgs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthService ¶
type AuthService struct { GetUserFn func(ctx context.Context, id string) (*domain.User, error) SignUpFn func(ctx context.Context, username string, password password.Password) (*domain.User, error) }
type CheevosService ¶
type CheevosService struct { AwardCheevoToUserFn func(ctx context.Context, recipientID, cheevoID string) error CreateCheevoFn func(ctx context.Context, name, description, orgID string) (*domain.Cheevo, error) GetCheevoFn func(ctx context.Context, id string) (*domain.Cheevo, error) }
func (*CheevosService) AwardCheevoToUser ¶
func (cs *CheevosService) AwardCheevoToUser(ctx context.Context, recipientID, cheevoID string) error
func (*CheevosService) CreateCheevo ¶
type Database ¶
type Database struct{}
type DeleteInvitationByCodeArgs ¶
type DeleteInvitationByCodeArgs struct {
Code string
}
type Emailer ¶
type GetCheevoArgs ¶
type GetCheevoArgs struct {
ID string
}
type GetInvitationArgs ¶
type GetInvitationArgs struct {
ID string
}
type GetInvitationByCodeArgs ¶
type GetInvitationByCodeArgs struct {
Code string
}
type GetMembershipArgs ¶
type GetUserArgs ¶
type GetUserArgs struct {
ID string
}
type InsertAwardArgs ¶
type InsertCheevoArgs ¶
type InsertInvitationArgs ¶
type InsertInvitationArgs struct { Invitation *domain.Invitation HashedCode string }
type InsertMembershipArgs ¶
type InsertMembershipArgs struct {
Membership *domain.Membership
}
type InsertOrganizationArgs ¶
type InsertOrganizationArgs struct {
Organization *domain.Organization
}
type InsertUserArgs ¶
type Repository ¶
type Repository struct { DeleteInvitationByCodeFn func(ctx context.Context, tx pg.Tx, code string) error DeleteInvitationByCodeCalled struct { Count int With DeleteInvitationByCodeArgs } GetCheevoFn func(ctx context.Context, tx pg.Tx, cheevo *domain.Cheevo, id string) error GetCheevoCalled struct { Count int With GetCheevoArgs } GetInvitationFn func(ctx context.Context, tx pg.Tx, i *domain.Invitation, id string) error GetInvitationCalled struct { Count int With GetInvitationArgs } GetInvitationByCodeFn func(ctx context.Context, tx pg.Tx, i *domain.Invitation, code string) error GetInvitationByCodeCalled struct { Count int With GetInvitationByCodeArgs } GetMembershipFn func(ctx context.Context, tx pg.Tx, m *domain.Membership, orgID, userID string) error GetMembershipCalled struct { Count int With GetMembershipArgs } GetUserFn func(ctx context.Context, tx pg.Tx, u *domain.User, id string) error GetUserCalled struct { Count int With GetUserArgs } InsertAwardFn func(ctx context.Context, tx pg.Tx, a *domain.Award) error InsertAwardCalled struct { Count int With InsertAwardArgs } InsertCheevoFn func(ctx context.Context, tx pg.Tx, cheevo *domain.Cheevo) error InsertCheevoCalled struct { Count int With InsertCheevoArgs } InsertInvitationFn func(ctx context.Context, tx pg.Tx, i *domain.Invitation, hashedCode string) error InsertInvitationCalled struct { Count int With InsertInvitationArgs } InsertMembershipFn func(ctx context.Context, tx pg.Tx, m *domain.Membership) error InsertMembershipCalled struct { Count int With InsertMembershipArgs } InsertOrganizationFn func(ctx context.Context, tx pg.Tx, org *domain.Organization) error InsertOrganizationCalled struct { Count int With InsertOrganizationArgs } InsertUserFn func(ctx context.Context, tx pg.Tx, u *domain.User, hashedPassword string) error InsertUserCalled struct { Count int With InsertUserArgs } UpdateInvitationFn func(ctx context.Context, tx pg.Tx, i *domain.Invitation, hashedCode string) error UpdateInvitationCalled struct { Count int With UpdateInvitationArgs } }
func (*Repository) DeleteInvitationByCode ¶
func (*Repository) GetInvitation ¶
func (repo *Repository) GetInvitation(ctx context.Context, tx pg.Tx, i *domain.Invitation, id string) error
func (*Repository) GetInvitationByCode ¶
func (repo *Repository) GetInvitationByCode(ctx context.Context, tx pg.Tx, i *domain.Invitation, code string) error
func (*Repository) GetMembership ¶
func (repo *Repository) GetMembership(ctx context.Context, tx pg.Tx, m *domain.Membership, orgID, userID string) error
func (*Repository) InsertAward ¶
func (*Repository) InsertCheevo ¶
func (*Repository) InsertInvitation ¶
func (repo *Repository) InsertInvitation(ctx context.Context, tx pg.Tx, i *domain.Invitation, hashedCode string) error
func (*Repository) InsertMembership ¶
func (repo *Repository) InsertMembership(ctx context.Context, tx pg.Tx, m *domain.Membership) error
func (*Repository) InsertOrganization ¶
func (repo *Repository) InsertOrganization(ctx context.Context, tx pg.Tx, org *domain.Organization) error
func (*Repository) InsertUser ¶
func (*Repository) UpdateInvitation ¶
func (repo *Repository) UpdateInvitation(ctx context.Context, tx pg.Tx, i *domain.Invitation, hashedCode string) error
type RosterService ¶
type RosterService struct { AcceptInvitationFn func(ctx context.Context, userID, code string) error AddMemberToOrganizationFn func(ctx context.Context, userID, orgID string) error CreateOrganizationFn func(ctx context.Context, name, ownerID string) (*domain.Organization, error) DeclineInvitationFn func(ctx context.Context, code string) error GetInvitationFn func(ctx context.Context, id string) (*domain.Invitation, error) InviteUserToOrganizationFn func(ctx context.Context, email, orgID string) (*domain.Invitation, error) IsMemberFn func(ctx context.Context, orgID, userID string) error RefreshInvitationFn func(ctx context.Context, id string) (*domain.Invitation, error) }
func (*RosterService) AcceptInvitation ¶
func (rs *RosterService) AcceptInvitation(ctx context.Context, userID, code string) error
func (*RosterService) AddMemberToOrganization ¶
func (rs *RosterService) AddMemberToOrganization(ctx context.Context, userID, orgID string) error
func (*RosterService) CreateOrganization ¶
func (rs *RosterService) CreateOrganization(ctx context.Context, name, ownerID string) (*domain.Organization, error)
func (*RosterService) DeclineInvitation ¶
func (rs *RosterService) DeclineInvitation(ctx context.Context, code string) error
func (*RosterService) GetInvitation ¶
func (rs *RosterService) GetInvitation(ctx context.Context, id string) (*domain.Invitation, error)
func (*RosterService) InviteUserToOrganization ¶
func (rs *RosterService) InviteUserToOrganization(ctx context.Context, email, orgID string) (*domain.Invitation, error)
func (*RosterService) IsMember ¶
func (rs *RosterService) IsMember(ctx context.Context, orgID, userID string) error
func (*RosterService) RefreshInvitation ¶
func (rs *RosterService) RefreshInvitation(ctx context.Context, id string) (*domain.Invitation, error)
type SendInvitationArgs ¶
type SendInvitationArgs struct{ Email, Code string }
type UpdateInvitationArgs ¶
type UpdateInvitationArgs struct { Invitation *domain.Invitation HashedCode string }
Click to show internal directories.
Click to hide internal directories.