Documentation
¶
Index ¶
- type DB
- type Events
- func (repo *Events) Ballots(eventid event.EventID) ([]*event.Ballot, error)
- func (repo *Events) ByID(eventid event.EventID) (*event.Event, error)
- func (repo *Events) Create(ev *event.Event) error
- func (repo *Events) CreateIncompleteBallots(eventid event.EventID, userid user.UserID) (complete, incomplete []*event.BallotInfo, err error)
- func (repo *Events) CreateTeam(eventid event.EventID, team *event.Team) (event.TeamID, error)
- func (repo *Events) DeleteTeam(eventid event.EventID, teamid event.TeamID) error
- func (repo *Events) List() ([]*event.Event, error)
- func (repo *Events) Results(eventid event.EventID) ([]*event.TeamResult, error)
- func (repo *Events) SubmitBallot(eventid event.EventID, ballot *event.Ballot) error
- func (repo *Events) TeamBallots(eventid event.EventID, teamid event.TeamID) ([]*event.Ballot, error)
- func (repo *Events) TeamByID(eventid event.EventID, teamid event.TeamID) (*event.Team, error)
- func (repo *Events) Teams(eventid event.EventID) ([]*event.Team, error)
- func (repo *Events) TeamsByUser(userid user.UserID) ([]*event.EventTeam, error)
- func (repo *Events) Update(ev *event.Event) error
- func (repo *Events) UpdateTeam(eventid event.EventID, team *event.Team) error
- func (repo *Events) UserBallot(eventid event.EventID, userid user.UserID, teamid event.TeamID) (*event.Ballot, error)
- func (repo *Events) UserBallots(eventid event.EventID, userid user.UserID) ([]*event.BallotInfo, error)
- type Users
- func (repo *Users) ByCredentials(cred *auth.Credentials) (*user.User, error)
- func (repo *Users) ByID(id user.UserID) (*user.User, error)
- func (repo *Users) Create(cred *auth.Credentials, u *user.User) (user.UserID, error)
- func (repo *Users) CreateCredentialAlias(cred *auth.Credentials, existingUserID user.UserID) error
- func (repo *Users) FindCredentialByEmail(email string) (user.UserID, error)
- func (repo *Users) List() ([]*user.User, error)
- func (repo *Users) Update(u *user.User) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Events ¶
Events contains methods for managing events.
func (*Events) CreateIncompleteBallots ¶
func (repo *Events) CreateIncompleteBallots(eventid event.EventID, userid user.UserID) (complete, incomplete []*event.BallotInfo, err error)
CreateIncompleteBallots creates new incomplete ballots for a user.
func (*Events) CreateTeam ¶
CreateTeam creates a new team.
func (*Events) DeleteTeam ¶
DeleteTeam deletes a team.
func (*Events) SubmitBallot ¶
SubmitBallot submits a ballot.
func (*Events) TeamBallots ¶
func (repo *Events) TeamBallots(eventid event.EventID, teamid event.TeamID) ([]*event.Ballot, error)
TeamBallots retrieves all event ballots for a team.
func (*Events) TeamsByUser ¶
TeamsByUser returns all teams associated with the user.
func (*Events) UpdateTeam ¶
UpdateTeam updates a team.
func (*Events) UserBallot ¶
func (repo *Events) UserBallot(eventid event.EventID, userid user.UserID, teamid event.TeamID) (*event.Ballot, error)
UserBallot retrieves a user ballot.
func (*Events) UserBallots ¶
func (repo *Events) UserBallots(eventid event.EventID, userid user.UserID) ([]*event.BallotInfo, error)
UserBallots retrieves all user ballots.
type Users ¶
Users implements user.Repo.
func (*Users) ByCredentials ¶
ByCredentials finds user info based on credentials.
func (*Users) CreateCredentialAlias ¶
CreateCredentialAlias creates a new credential mapping pointing to an existing user.
func (*Users) FindCredentialByEmail ¶
FindCredentialByEmail scans all credentials for a matching email and returns the associated UserID.