Documentation ¶
Index ¶
- Constants
- Variables
- func IndexPage(w http.ResponseWriter, r *http.Request)
- func Router(r *mux.Router, a *APP, w io.Writer)
- func Version() string
- type APP
- func (a *APP) Badge(bt BadgeType, name string, isCN bool, w http.ResponseWriter, r *http.Request)
- func (a *APP) Basic(badgeType BadgeType, name string, isCN bool, w http.ResponseWriter, ...)
- func (a *APP) Card(badgeType BadgeType, name string, isCN bool, w http.ResponseWriter, ...)
- func (a *APP) Chart(badgeType BadgeType, name string, isCN bool, w http.ResponseWriter, ...)
- func (a *APP) Cron(spec string)
- func (a *APP) HandlerFunc(badgeType BadgeType, isCN bool) http.Handler
- func (a *APP) Run() error
- func (a *APP) Setup() (err error)
- func (a *APP) ShowUserInfo(w http.ResponseWriter, r *http.Request)
- func (a *APP) SubCal(_ BadgeType, name string, isCN bool, w http.ResponseWriter, r *http.Request)
- func (a *APP) Version(w http.ResponseWriter, r *http.Request)
- type BadgeType
- type ChartShow
- type Config
- type MetricUserInfo
- type MySQLConfig
- type RedisConfig
Constants ¶
View Source
const (
CronSpec = "30 8 * * *"
)
View Source
const (
// DefaultColor default color
DefaultColor = "brightgreen"
)
Variables ¶
View Source
var ( BuildTime = "" BuildVersion = "" BuildAppName = "" CommitHash = "" )
View Source
var (
ErrUserNotSupport = errors.Errorf("user setting not support")
)
Functions ¶
Types ¶
type APP ¶
type APP struct {
// contains filtered or unexported fields
}
func (*APP) Basic ¶ added in v0.3.6
func (a *APP) Basic(badgeType BadgeType, name string, isCN bool, w http.ResponseWriter, r *http.Request)
Basic info
func (*APP) HandlerFunc ¶ added in v0.3.0
func (*APP) ShowUserInfo ¶ added in v0.6.2
func (a *APP) ShowUserInfo(w http.ResponseWriter, r *http.Request)
type BadgeType ¶ added in v0.3.0
type BadgeType int
const ( BadgeTypeProfile BadgeType = iota + 1 BadgeTypeUserNotFound BadgeTypeRanking BadgeTypeSolved BadgeTypeSolvedRate BadgeTypeAccepted BadgeTypeAcceptedRate BadgeTypeFollowing BadgeTypeFollowers BadgeTypeChartRanking BadgeTypeChartSolved BadgeTypeChartSubmissionCalendar BadgeTypeQuestionProcessCard BadgeTypeContestRankingCard )
type ChartShow ¶ added in v0.2.0
type ChartShow func(list []storage.HistoryRecord, name string) ([]byte, error)
ChartShow chart function
type MetricUserInfo ¶ added in v0.6.2
type MySQLConfig ¶ added in v0.2.0
type RedisConfig ¶ added in v0.2.0
Click to show internal directories.
Click to hide internal directories.