Documentation ¶
Index ¶
- func GetMainContentFromForumHtml(body []byte) string
- func GetMainTitleFromForumHtml(body []byte) string
- func NewNullInt64(i *int64) sql.NullInt64
- type BeginState
- type Dancer
- type DbInserter
- type FAState
- type FinalTechResult
- type ForumDao
- type ForumDaoImpl
- type ForumDbFiller
- type ForumResults
- type InsertDao
- type InsertDaoImpl
- func (d *InsertDaoImpl) CreateJudge(judge *Judge) *Judge
- func (d *InsertDaoImpl) CreateNomination(nomination *Nomination) *Nomination
- func (d *InsertDaoImpl) CreatePartition(index int, compId int64) int64
- func (d *InsertDaoImpl) CreatePlace(p *Place) *Place
- func (d *InsertDaoImpl) DeleteDancerClubsByCompId(compId int64)
- func (d *InsertDaoImpl) DeleteJudgesByCompId(compId int64)
- func (d *InsertDaoImpl) DeleteNominationsByCompId(compId int64)
- func (d *InsertDaoImpl) DeletePartitionsByCompId(compId int64)
- func (d *InsertDaoImpl) DeletePlacesByCompId(compId int64)
- func (d *InsertDaoImpl) FindClubByName(clubName string) *int64
- func (d *InsertDaoImpl) FindDancer(compId int64, dTitle string) *int64
- func (d *InsertDaoImpl) FindResult(compId int64, dancerId int64, isJnj bool) *parser.RawCompetitionResult
- func (d *InsertDaoImpl) FindResultNom(compId, nomId, dancerId int64) *int64
- func (d *InsertDaoImpl) InsertDancerClub(compId, dancerId, clubId int64)
- type Judge
- type JudgeTeam
- type JudgeTeamState
- type Nomination
- type Place
- type PlacesState
- type Stage
- type TechResult
- type TechStage
- type TechnicalFinalState
- type TechnicalPrepFinalState
- type TechnicalState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewNullInt64 ¶
Types ¶
type BeginState ¶
type BeginState struct { }
func (*BeginState) ProcessLine ¶
func (s *BeginState) ProcessLine(fr *ForumResults, line string) FAState
type DbInserter ¶
type DbInserter struct {
// contains filtered or unexported fields
}
func NewDbInserter ¶
func NewDbInserter(dao InsertDao) *DbInserter
func (*DbInserter) Insert ¶
func (in *DbInserter) Insert(results *ForumResults)
type FAState ¶
type FAState interface {
ProcessLine(fr *ForumResults, line string) FAState
}
type FinalTechResult ¶
type FinalTechResult struct {
Value string
}
type ForumDao ¶
type ForumDaoImpl ¶
type ForumDaoImpl struct {
// contains filtered or unexported fields
}
func (*ForumDaoImpl) FindCompetitionId ¶
func (f *ForumDaoImpl) FindCompetitionId(compUrl string) int64
func (*ForumDaoImpl) FindJudgeIdByTitle ¶
func (f *ForumDaoImpl) FindJudgeIdByTitle(title string) int64
type ForumDbFiller ¶
type ForumDbFiller struct {
// contains filtered or unexported fields
}
func NewForumDbFiller ¶
func NewForumDbFiller(compUrl string, dao ForumDao) *ForumDbFiller
func (*ForumDbFiller) FillDbInfo ¶
func (f *ForumDbFiller) FillDbInfo(fr *ForumResults)
type ForumResults ¶
type ForumResults struct { JudgesResults []*JudgeTeam Date time.Time Title string Remaining string CompetitionId int64 }
func ParseForum ¶
func ParseForum(data []byte, mainTitle string) *ForumResults
type InsertDao ¶
type InsertDao interface { CreatePartition(index int, compId int64) int64 DeletePartitionsByCompId(compId int64) DeleteJudgesByCompId(compId int64) DeletePlacesByCompId(compId int64) DeleteNominationsByCompId(compId int64) DeleteDancerClubsByCompId(compId int64) CreateJudge(j *Judge) *Judge CreateNomination(n *Nomination) *Nomination CreatePlace(p *Place) *Place FindDancer(compId int64, dTitle string) *int64 FindResult(compId int64, dancerId int64, isJnj bool) *parser.RawCompetitionResult FindResultNom(compId, nomId, dancerId int64) *int64 FindClubByName(clubName string) *int64 InsertDancerClub(compId, dancerId, clubId int64) }
func NewInsertDao ¶
func NewInsertDao(db *runner.DB) InsertDao
type InsertDaoImpl ¶
type InsertDaoImpl struct {
// contains filtered or unexported fields
}
func (*InsertDaoImpl) CreateJudge ¶
func (d *InsertDaoImpl) CreateJudge(judge *Judge) *Judge
func (*InsertDaoImpl) CreateNomination ¶
func (d *InsertDaoImpl) CreateNomination(nomination *Nomination) *Nomination
func (*InsertDaoImpl) CreatePartition ¶
func (d *InsertDaoImpl) CreatePartition(index int, compId int64) int64
func (*InsertDaoImpl) CreatePlace ¶
func (d *InsertDaoImpl) CreatePlace(p *Place) *Place
func (*InsertDaoImpl) DeleteDancerClubsByCompId ¶
func (d *InsertDaoImpl) DeleteDancerClubsByCompId(compId int64)
func (*InsertDaoImpl) DeleteJudgesByCompId ¶
func (d *InsertDaoImpl) DeleteJudgesByCompId(compId int64)
func (*InsertDaoImpl) DeleteNominationsByCompId ¶
func (d *InsertDaoImpl) DeleteNominationsByCompId(compId int64)
func (*InsertDaoImpl) DeletePartitionsByCompId ¶
func (d *InsertDaoImpl) DeletePartitionsByCompId(compId int64)
func (*InsertDaoImpl) DeletePlacesByCompId ¶
func (d *InsertDaoImpl) DeletePlacesByCompId(compId int64)
func (*InsertDaoImpl) FindClubByName ¶
func (d *InsertDaoImpl) FindClubByName(clubName string) *int64
func (*InsertDaoImpl) FindDancer ¶
func (d *InsertDaoImpl) FindDancer(compId int64, dTitle string) *int64
func (*InsertDaoImpl) FindResult ¶
func (d *InsertDaoImpl) FindResult(compId int64, dancerId int64, isJnj bool) *parser.RawCompetitionResult
func (*InsertDaoImpl) FindResultNom ¶
func (d *InsertDaoImpl) FindResultNom(compId, nomId, dancerId int64) *int64
func (*InsertDaoImpl) InsertDancerClub ¶
func (d *InsertDaoImpl) InsertDancerClub(compId, dancerId, clubId int64)
type JudgeTeam ¶
type JudgeTeam struct { Judges []*Judge Nominations []*Nomination }
type JudgeTeamState ¶
type JudgeTeamState struct { }
func (*JudgeTeamState) ProcessLine ¶
func (s *JudgeTeamState) ProcessLine(fr *ForumResults, line string) FAState
type Nomination ¶
type Place ¶
type Place struct { ID int64 `db:"id"` PlaceFrom int `db:"place_from"` PlaceTo int `db:"place_to"` Number int `db:"number"` Dancer1 *Dancer Dancer2 *Dancer StageTitle string `db:"stage_title"` NominationId int64 `db:"nomination_id"` Dancer1Id int64 `db:"dancer1_id"` Dancer2Id sql.NullInt64 `db:"dancer2_id"` Result1Id sql.NullInt64 `db:"result1_id"` Result2Id sql.NullInt64 `db:"result2_id"` }
type PlacesState ¶
type PlacesState struct { }
func (*PlacesState) ProcessLine ¶
func (s *PlacesState) ProcessLine(fr *ForumResults, line string) FAState
type TechResult ¶
type TechResult struct {
Value string
}
type TechStage ¶
type TechStage struct { Title string Results []*TechResult }
type TechnicalFinalState ¶
type TechnicalFinalState struct { }
func (*TechnicalFinalState) ProcessLine ¶
func (s *TechnicalFinalState) ProcessLine(fr *ForumResults, line string) FAState
type TechnicalPrepFinalState ¶
type TechnicalPrepFinalState struct { }
func (*TechnicalPrepFinalState) ProcessLine ¶
func (s *TechnicalPrepFinalState) ProcessLine(fr *ForumResults, line string) FAState
type TechnicalState ¶
type TechnicalState struct { }
func (*TechnicalState) ProcessLine ¶
func (s *TechnicalState) ProcessLine(fr *ForumResults, line string) FAState
Click to show internal directories.
Click to hide internal directories.