app

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2019 License: MIT Imports: 24 Imported by: 0

Documentation

Index

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"
)

Functions

func Monitor added in v0.1.2

func Monitor(h http.Handler) http.Handler

Monitor Monitor

Types

type APP

type APP struct {
	// contains filtered or unexported fields
}

func New

func New(c *Config) *APP

func (*APP) Badge

func (a *APP) Badge(w http.ResponseWriter, r *http.Request)

func (*APP) Profile

func (a *APP) Profile(w http.ResponseWriter, r *http.Request)

func (*APP) Run

func (a *APP) Run() error

func (*APP) Version

func (a *APP) Version(w http.ResponseWriter, r *http.Request)

type Config

type Config struct {
	CacheType   cache.CacheType
	CacheAddr   string
	CachePasswd string
	ListenAddr  string
	Debug       bool
}

type WaitGroupWrapper added in v0.1.2

type WaitGroupWrapper struct {
	sync.WaitGroup
}

func (*WaitGroupWrapper) Wrap added in v0.1.2

func (w *WaitGroupWrapper) Wrap(cb func())

Jump to

Keyboard shortcuts

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