comp

package
v0.0.0-...-ba06689 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 13, 2017 License: MIT Imports: 11 Imported by: 0

Documentation

Index

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 ListCompetitions(c *gin.Context)

func ParseCompetitions

func ParseCompetitions(c *gin.Context)

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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL