Documentation ¶
Index ¶
- Variables
- func GetCompCron() func()
- func ListCompetitions(c *gin.Context)
- func ParseCompetitions(c *gin.Context)
- type FCompDaoImpl
- func (d *FCompDaoImpl) CreateCompetition(comp *FCompetition) *FCompetition
- func (d *FCompDaoImpl) FindCompByUrl(compUrl string) *FCompetition
- func (d *FCompDaoImpl) ListCompetitions() []FCompetition
- func (d *FCompDaoImpl) UpdateChangeFixed(existed *FCompetition)
- func (d *FCompDaoImpl) UpdateHasChange(existed *FCompetition, downloadDate time.Time, currentRaw string)
- type FCompService
- type FCompetition
Constants ¶
This section is empty.
Variables ¶
View Source
var FCompetitionInsert = []string{"url", "title", "date", "description", "city", "approved_ash", "raw_text", "raw_text_changed", "download_date", "has_change"}
Functions ¶
func GetCompCron ¶
func GetCompCron() func()
func ListCompetitions ¶
func ParseCompetitions ¶
Types ¶
type FCompDaoImpl ¶
type FCompDaoImpl struct {
// contains filtered or unexported fields
}
func NewCompDao ¶
func NewCompDao(db *runner.DB) *FCompDaoImpl
func (*FCompDaoImpl) CreateCompetition ¶
func (d *FCompDaoImpl) CreateCompetition(comp *FCompetition) *FCompetition
func (*FCompDaoImpl) FindCompByUrl ¶
func (d *FCompDaoImpl) FindCompByUrl(compUrl string) *FCompetition
func (*FCompDaoImpl) ListCompetitions ¶
func (d *FCompDaoImpl) ListCompetitions() []FCompetition
func (*FCompDaoImpl) UpdateChangeFixed ¶
func (d *FCompDaoImpl) UpdateChangeFixed(existed *FCompetition)
func (*FCompDaoImpl) UpdateHasChange ¶
func (d *FCompDaoImpl) UpdateHasChange(existed *FCompetition, downloadDate time.Time, currentRaw string)
type FCompService ¶
type FCompService struct {
// contains filtered or unexported fields
}
func GetFCompService ¶
func GetFCompService() *FCompService
func (*FCompService) ListCompetitions ¶
func (s *FCompService) ListCompetitions() []FCompetition
func (*FCompService) ParseCompetitions ¶
func (s *FCompService) ParseCompetitions()
func (*FCompService) ProcessCompetition ¶
func (s *FCompService) ProcessCompetition(fromForum *FCompetition)
type FCompetition ¶
type FCompetition struct { ID int64 `json:"id" db:"id"` Url string `json:"url" db:"url"` Title string `json:"title" db:"title"` Date time.Time `json:"date" db:"date"` Desc string `json:"desc" db:"description"` City *string `json:"city" db:"city"` ApprovedASH bool `json:"approved" db:"approved_ash"` // Утверждено АСХ, конкурс не отменён, рейтинг не снят RawText string `json:"raw_text" db:"raw_text"` RawTextChanged string `json:"raw_text_changed" db:"raw_text_changed"` DownloadDate time.Time `json:"download_date" db:"download_date"` HasChange bool `db:"has_change"` }
func ParseCompetitionListFromForum ¶
func ParseCompetitionListFromForum() (comps []FCompetition, err error)
Click to show internal directories.
Click to hide internal directories.