Documentation ¶
Index ¶
- func GetListener() net.Listener
- func GetQueriesCount(ctx *fasthttp.RequestCtx) int
- func JSONHandler(ctx *fasthttp.RequestCtx)
- func JSONMarshal(ctx *fasthttp.RequestCtx, v interface{})
- func PlaintextHandler(ctx *fasthttp.RequestCtx)
- func RandomWorldNum() int
- func SortFortunesByMessage(fortunes []templates.Fortune)
- func SortWorldsByID(worlds []World)
- type JSONResponse
- type World
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetListener ¶
func GetQueriesCount ¶
func GetQueriesCount(ctx *fasthttp.RequestCtx) int
func JSONHandler ¶
func JSONHandler(ctx *fasthttp.RequestCtx)
func JSONMarshal ¶
func JSONMarshal(ctx *fasthttp.RequestCtx, v interface{})
func PlaintextHandler ¶
func PlaintextHandler(ctx *fasthttp.RequestCtx)
func RandomWorldNum ¶
func RandomWorldNum() int
func SortFortunesByMessage ¶
func SortWorldsByID ¶
func SortWorldsByID(worlds []World)
Types ¶
type JSONResponse ¶
type JSONResponse struct {
Message string `json:"message"`
}
func (JSONResponse) MarshalEasyJSON ¶
func (v JSONResponse) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (JSONResponse) MarshalJSON ¶
func (v JSONResponse) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*JSONResponse) UnmarshalEasyJSON ¶
func (v *JSONResponse) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*JSONResponse) UnmarshalJSON ¶
func (v *JSONResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type World ¶
func (World) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (World) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*World) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*World) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
Click to show internal directories.
Click to hide internal directories.