Documentation ¶
Index ¶
- Constants
- Variables
- func Monitor(h http.Handler) http.Handler
- type APP
- func (a *APP) Badge(w http.ResponseWriter, r *http.Request)
- func (a *APP) Cron(spec string) error
- func (a *APP) HistoryChart(w http.ResponseWriter, r *http.Request)
- func (a *APP) IndexPage(w http.ResponseWriter, r *http.Request)
- func (a *APP) Profile(w http.ResponseWriter, r *http.Request)
- func (a *APP) Run() error
- func (a *APP) Version(w http.ResponseWriter, r *http.Request)
- type ChartShow
- type Config
- type MySQLConfig
- type RedisConfig
- type WaitGroupWrapper
Constants ¶
View Source
const ( Default badgeType = iota + 1 Ranking Solved SolvedRate Accepted AcceptedRate UserNotFound )
View Source
const (
// DefaultColor default color
DefaultColor = "brightgreen"
)
Variables ¶
View Source
var ( BuildTime = "" BuildVersion = "" BuildAppName = "lcbadge" CommitHash = "" )
Functions ¶
Types ¶
type APP ¶
type APP struct {
// contains filtered or unexported fields
}
func (*APP) HistoryChart ¶ added in v0.2.0
func (a *APP) HistoryChart(w http.ResponseWriter, r *http.Request)
HistoryChart history chart
func (*APP) IndexPage ¶ added in v0.2.3
func (a *APP) IndexPage(w http.ResponseWriter, r *http.Request)
IndexPage index page
type ChartShow ¶ added in v0.2.0
type ChartShow func(list []storage.HistoryRecord, name string) ([]byte, error)
ChartShow chart function
type Config ¶
type Config struct { Debug bool Address string CronSpec string CacheType string StorageType string RedisConfig RedisConfig MySQLConfig MySQLConfig }
type MySQLConfig ¶ added in v0.2.0
type RedisConfig ¶ added in v0.2.0
type WaitGroupWrapper ¶ added in v0.1.2
WaitGroupWrapper wrap sync.WaitGroup
func (*WaitGroupWrapper) Wrap ¶ added in v0.1.2
func (w *WaitGroupWrapper) Wrap(cb func())
Wrap wrap
Click to show internal directories.
Click to hide internal directories.