Documentation
¶
Index ¶
- type Handler
- func (h *Handler) Error(err error, c echo.Context)
- func (h *Handler) HealthCheck(c echo.Context) error
- func (h *Handler) Icon(c echo.Context) error
- func (h *Handler) IconAll(c echo.Context) error
- func (h *Handler) Index(c echo.Context) error
- func (h *Handler) Wasm(c echo.Context) error
- func (h *Handler) WebSocket(c echo.Context) error
- type HitCounterContext
- func (c *HitCounterContext) ExtraLog() map[string]interface{}
- func (c *HitCounterContext) GetContext() context.Context
- func (c *HitCounterContext) SetContext(ctx context.Context)
- func (c *HitCounterContext) ValueContext(key interface{}) interface{}
- func (c *HitCounterContext) WithContext(key, val interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
Counter counter.Counter
LocalCache *cache.Cache
AsyncTask task.Keeper
WebSocketBreaker websocket.Breaker
IndexTemplate *template.Template
Badge badge.Writer
Icons map[string]badge.Icon
IconsList []map[string]string
}
func NewHandler ¶
NewHandler 创建 handler 对象
func (*Handler) HealthCheck ¶
HealthCheck is API for checking server status.
type HitCounterContext ¶
It's custom context.
func (*HitCounterContext) ExtraLog ¶
func (c *HitCounterContext) ExtraLog() map[string]interface{}
ExtraLog returns log struct.
func (*HitCounterContext) GetContext ¶
func (c *HitCounterContext) GetContext() context.Context
GetContext returns a context in request.
func (*HitCounterContext) SetContext ¶
func (c *HitCounterContext) SetContext(ctx context.Context)
SetContext sets a context to request.
func (*HitCounterContext) ValueContext ¶
func (c *HitCounterContext) ValueContext(key interface{}) interface{}
ValueContext returns values in request context.
func (*HitCounterContext) WithContext ¶
func (c *HitCounterContext) WithContext(key, val interface{})
WithContext set a context with new value to request.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.