Documentation ¶
Index ¶
- Variables
- func IsErrorTeamMembersEnough(err error) bool
- func TeamLeaderRole() string
- type City
- type Competition
- type CompetitionBonus
- type CompetitionDesc
- type CompetitionDuration
- type CompetitionHost
- type CompetitionIdentity
- type CompetitionName
- type CompetitionPhase
- type CompetitionScoreOrder
- type CompetitionStatus
- type CompetitionSummary
- type CompetitionTag
- type CompetitionType
- type Competitor
- type CompetitorAppliedEvent
- type CompetitorName
- type Forum
- type Language
- type PhaseSubmission
- type Phone
- type Player
- func (p *Player) ChangeTeamName(name TeamName) error
- func (p *Player) CompetitorsCount() int
- func (p *Player) CreateTeam(name TeamName) error
- func (p *Player) Delete(c types.Account) error
- func (p *Player) Has(u types.Account) bool
- func (p *Player) IsATeam() bool
- func (p *Player) IsIndividual() bool
- func (p *Player) IsIndividualOrLeader() bool
- func (p *Player) JoinTo(team *Player) error
- func (p *Player) Members() []Competitor
- func (p *Player) Name() string
- func (p *Player) Quit() error
- func (p *Player) RoleOfCurrentCompetitor() string
- func (p *Player) SetCurrentUser(a types.Account)
- func (p *Player) TransferLeader(newOne types.Account) error
- type PlayerIndex
- type Province
- type Submission
- type SubmissionService
- type SubmissionUpdatingInfo
- type Team
- type TeamName
- type TeamRole
- type URL
- type Winners
- type Work
- func (w *Work) BestOne(phase CompetitionPhase, order CompetitionScoreOrder) (r *Submission)
- func (w *Work) HasSubmittedToday(phase CompetitionPhase) bool
- func (w *Work) NewSubmissionMessage(s *PhaseSubmission) WorkSubmittedEvent
- func (w *Work) Submissions(phase CompetitionPhase) []Submission
- func (w *Work) UpdateSubmission(info *SubmissionUpdatingInfo) *Submission
- type WorkIndex
- type WorkSubmittedEvent
Constants ¶
This section is empty.
Variables ¶
View Source
var ( CompetitionPhaseFinal = competitionPhase("final") CompetitionPhasePreliminary = competitionPhase("preliminary") )
Functions ¶
func TeamLeaderRole ¶
func TeamLeaderRole() string
Types ¶
type Competition ¶
type Competition struct { CompetitionSummary Doc URL Forum Forum Winners Winners DatasetDoc URL DatasetURL URL Type CompetitionType Phase CompetitionPhase Order CompetitionScoreOrder }
func (*Competition) IsFinal ¶
func (c *Competition) IsFinal() bool
func (*Competition) IsOver ¶
func (c *Competition) IsOver() bool
func (*Competition) IsPreliminary ¶
func (c *Competition) IsPreliminary() bool
type CompetitionBonus ¶
type CompetitionBonus interface {
CompetitionBonus() int
}
CompetitionBonus
func NewCompetitionBonus ¶
func NewCompetitionBonus(v int) (CompetitionBonus, error)
type CompetitionDesc ¶
type CompetitionDesc interface {
CompetitionDesc() string
}
CompetitionDesc
func NewCompetitionDesc ¶
func NewCompetitionDesc(v string) (CompetitionDesc, error)
type CompetitionDuration ¶
type CompetitionDuration interface {
CompetitionDuration() string
}
CompetitionDuration
func NewCompetitionDuration ¶
func NewCompetitionDuration(v string) (CompetitionDuration, error)
type CompetitionHost ¶
type CompetitionHost interface {
CompetitionHost() string
}
func NewCompetitionHost ¶
func NewCompetitionHost(v string) (CompetitionHost, error)
type CompetitionIdentity ¶
type CompetitionIdentity interface {
CompetitionIdentity() string
}
CompetitionIdentity
func NewcompetitionIdentity ¶
func NewcompetitionIdentity(v string) (CompetitionIdentity, error)
type CompetitionName ¶
type CompetitionName interface {
CompetitionName() string
}
CompetitionName
func NewCompetitionName ¶
func NewCompetitionName(v string) (CompetitionName, error)
type CompetitionPhase ¶
CompetitionPhase
func NewCompetitionPhase ¶
func NewCompetitionPhase(v string) (CompetitionPhase, error)
type CompetitionScoreOrder ¶
CompetitionScoreOrder
func NewCompetitionScoreOrder ¶
func NewCompetitionScoreOrder(b bool) CompetitionScoreOrder
type CompetitionStatus ¶
CompetitionStatus
func NewCompetitionStatus ¶
func NewCompetitionStatus(v string) (CompetitionStatus, error)
type CompetitionSummary ¶
type CompetitionSummary struct { Id string Name CompetitionName Desc CompetitionDesc Host CompetitionHost Bonus CompetitionBonus Status CompetitionStatus Duration CompetitionDuration Poster URL Tags []CompetitionTag Lang Language }
type CompetitionTag ¶
type CompetitionTag interface {
CompetitionTag() string
}
CompetitionTag
func NewCompetitionTag ¶
func NewCompetitionTag(v string) (CompetitionTag, error)
type CompetitionType ¶
type CompetitionType interface {
CompetitionType() string
}
CompetitionType
func NewCompetitionType ¶
func NewCompetitionType(v string) (CompetitionType, error)
type Competitor ¶
type CompetitorAppliedEvent ¶
type CompetitorAppliedEvent struct { Account types.Account CompetitionName types.CompetitionName }
CompetitorAppliedEvent
type CompetitorName ¶
type CompetitorName interface {
CompetitorName() string
}
CompetitorName
func NewCompetitorName ¶
func NewCompetitorName(v string) (CompetitorName, error)
type PhaseSubmission ¶
type PhaseSubmission struct { Phase CompetitionPhase Submission }
PhaseSubmission
type Player ¶
type Player struct { PlayerIndex IsFinalist bool Leader Competitor Team Team // contains filtered or unexported fields }
func (*Player) ChangeTeamName ¶
func (*Player) CompetitorsCount ¶
func (*Player) CreateTeam ¶
func (*Player) IsIndividual ¶
func (*Player) IsIndividualOrLeader ¶
func (*Player) Members ¶
func (p *Player) Members() []Competitor
func (*Player) RoleOfCurrentCompetitor ¶
func (*Player) SetCurrentUser ¶
type Submission ¶
Submission
type SubmissionService ¶
type SubmissionService struct {
// contains filtered or unexported fields
}
SubmissionService
func NewSubmissionService ¶
func NewSubmissionService(v uploader.SubmissionFileUploader) SubmissionService
func (*SubmissionService) Submit ¶
func (s *SubmissionService) Submit( w *Work, phase CompetitionPhase, fileName string, data io.Reader, ) (PhaseSubmission, error)
type SubmissionUpdatingInfo ¶
type SubmissionUpdatingInfo struct { Index WorkIndex Phase CompetitionPhase Id string Status string Score float32 }
SubmissionUpdatingInfo
type Work ¶
type Work struct { WorkIndex PlayerName string Repo string Final []Submission Preliminary []Submission }
Work
func (*Work) BestOne ¶
func (w *Work) BestOne(phase CompetitionPhase, order CompetitionScoreOrder) ( r *Submission, )
func (*Work) HasSubmittedToday ¶
func (w *Work) HasSubmittedToday(phase CompetitionPhase) bool
func (*Work) NewSubmissionMessage ¶
func (w *Work) NewSubmissionMessage(s *PhaseSubmission) WorkSubmittedEvent
func (*Work) Submissions ¶
func (w *Work) Submissions(phase CompetitionPhase) []Submission
func (*Work) UpdateSubmission ¶
func (w *Work) UpdateSubmission(info *SubmissionUpdatingInfo) *Submission
type WorkIndex ¶
func NewWorkIndex ¶
Click to show internal directories.
Click to hide internal directories.