Documentation ¶
Index ¶
- func AsErrNoRecord(e error) bool
- type ErrNoRecord
- type PostgresService
- func (ps *PostgresService) ClaimScore(pid string, score int, proof string) (submissionID string, e error)
- func (ps *PostgresService) DeleteScore(sid string) error
- func (ps *PostgresService) GetOneUnverified() (*ScoreRecord, error)
- func (ps *PostgresService) GetOneUnverifiedForEvent(eid string) (*ScoreRecord, error)
- func (ps *PostgresService) MakeReportScoreSum(eid string) ([]SummaryRecord, error)
- func (ps *PostgresService) MakeReportScoreTop(eid string) ([]SummaryRecord, error)
- func (ps *PostgresService) UpdateScoreAndVerify(sid string, score int) error
- func (ps *PostgresService) VerificationStatus(eid string) (total, verified int, e error)
- func (ps *PostgresService) Verify(sid string) error
- type ScoreRecord
- type ScoresService
- type SummaryRecord
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AsErrNoRecord ¶
Types ¶
type ErrNoRecord ¶
type ErrNoRecord struct{}
func (*ErrNoRecord) Error ¶
func (e *ErrNoRecord) Error() string
type PostgresService ¶
type PostgresService struct { DB *sqlx.DB Logger *zap.Logger ScoresTableName string ParticipationTableName string UserIGNTableName string }
func (*PostgresService) ClaimScore ¶
func (*PostgresService) DeleteScore ¶
func (ps *PostgresService) DeleteScore(sid string) error
func (*PostgresService) GetOneUnverified ¶
func (ps *PostgresService) GetOneUnverified() (*ScoreRecord, error)
func (*PostgresService) GetOneUnverifiedForEvent ¶
func (ps *PostgresService) GetOneUnverifiedForEvent(eid string) (*ScoreRecord, error)
func (*PostgresService) MakeReportScoreSum ¶
func (ps *PostgresService) MakeReportScoreSum(eid string) ([]SummaryRecord, error)
func (*PostgresService) MakeReportScoreTop ¶
func (ps *PostgresService) MakeReportScoreTop(eid string) ([]SummaryRecord, error)
func (*PostgresService) UpdateScoreAndVerify ¶
func (ps *PostgresService) UpdateScoreAndVerify(sid string, score int) error
func (*PostgresService) VerificationStatus ¶
func (ps *PostgresService) VerificationStatus(eid string) (total, verified int, e error)
func (*PostgresService) Verify ¶
func (ps *PostgresService) Verify(sid string) error
type ScoreRecord ¶
type ScoresService ¶
type ScoresService interface { ClaimScore(pid string, score int, proof string) (submissionID string, e error) GetOneUnverified() (*ScoreRecord, error) GetOneUnverifiedForEvent(eid string) (*ScoreRecord, error) Verify(sid string) error MakeReportScoreSum(eid string) ([]SummaryRecord, error) MakeReportScoreTop(eid string) ([]SummaryRecord, error) VerificationStatus(eid string) (total, verified int, e error) DeleteScore(sid string) error UpdateScoreAndVerify(sid string, score int) error }
type SummaryRecord ¶
Click to show internal directories.
Click to hide internal directories.