Documentation ¶
Index ¶
- Constants
- Variables
- func ConformRoute(app *BiliBiliApplication)
- func MakeFailedJsonMap(code string, message string) map[string]string
- type BangumiInfoTask
- type BangumiListTask
- type BannerTask
- type BiliBiliApplication
- type CacheManager
- type Config
- type CornService
- type CornTask
- type CornTaskImpl
- type IndexInfoTask
- type LiveIndexTask
- type SortRankInfo
- type TopRankTask
Constants ¶
View Source
const ( INDEX_CACHE = "index" ALL_RANK_CACHE = "all_rank" BANGUMI_CACHE = "bangumi" BANGUMI_LIST_CACHE = "bangumi_list" SORT_TOP_CACHE = "sort-" LIVE_INDEX_CACHE = "live_index" INDEX_BANNER_CACHE = "index_banner" )
Variables ¶
View Source
var ( ProdLevels = []log.Level{ log.InfoLevel, log.NoticeLevel, log.WarnLevel, log.ErrorLevel, log.PanicLevel, log.AlertLevel, log.FatalLevel, } )
Functions ¶
func ConformRoute ¶
func ConformRoute(app *BiliBiliApplication)
Types ¶
type BangumiInfoTask ¶
type BangumiInfoTask struct { CornTask // contains filtered or unexported fields }
func (*BangumiInfoTask) Run ¶
func (i *BangumiInfoTask) Run() error
type BangumiListTask ¶
type BangumiListTask struct { CornTask // contains filtered or unexported fields }
func (*BangumiListTask) Run ¶
func (i *BangumiListTask) Run() error
type BannerTask ¶
type BannerTask struct { CornTask // contains filtered or unexported fields }
func (*BannerTask) Run ¶
func (b *BannerTask) Run() error
type BiliBiliApplication ¶
type BiliBiliApplication struct { Router *gin.Engine Corn *CornService Conf *Config Client *client.BCli Cache *CacheManager }
func NewApplication ¶
func NewApplication(configFile string) (*BiliBiliApplication, error)
type CacheManager ¶
type CacheManager struct {
// contains filtered or unexported fields
}
func NewCacheManager ¶
func NewCacheManager() *CacheManager
func (*CacheManager) GetCache ¶
func (c *CacheManager) GetCache(key string) interface{}
func (*CacheManager) SetCache ¶
func (c *CacheManager) SetCache(key string, value interface{})
type Config ¶
type Config struct { Debug bool `json:"debug"` Appkey string `json:"appkey"` Secret string `json:"secret"` AllowHost string `json:"allow_host"` IsPrivate bool `json:"private"` }
func ReadConfigFromFile ¶
type CornService ¶
type CornService struct {
// contains filtered or unexported fields
}
func NewCornService ¶
func NewCornService() *CornService
func (*CornService) RegisterTask ¶
func (c *CornService) RegisterTask(task CornTaskImpl)
func (*CornService) Start ¶
func (c *CornService) Start()
func (*CornService) Stop ¶
func (c *CornService) Stop()
type CornTask ¶
func (*CornTask) GetDuration ¶
func (*CornTask) GetLastRun ¶
func (*CornTask) SyncLastRunTime ¶
func (t *CornTask) SyncLastRunTime()
type CornTaskImpl ¶
type IndexInfoTask ¶
type IndexInfoTask struct { CornTask // contains filtered or unexported fields }
func (*IndexInfoTask) Run ¶
func (i *IndexInfoTask) Run() error
type LiveIndexTask ¶
type LiveIndexTask struct { CornTask // contains filtered or unexported fields }
func (*LiveIndexTask) Run ¶
func (i *LiveIndexTask) Run() error
type SortRankInfo ¶
type SortRankInfo struct { SortId int `json:"sort_id"` Videos []interface{} `json:"videos"` }
type TopRankTask ¶
type TopRankTask struct { CornTask // contains filtered or unexported fields }
func (*TopRankTask) Run ¶
func (i *TopRankTask) Run() error
Click to show internal directories.
Click to hide internal directories.