Versions in this module Expand all Collapse all v0 v0.8.0 Jun 24, 2017 Changes in this version + var RegisteredAPIFuncHandler map[string]func(http.ResponseWriter, *http.Request) + var RegisteredAPIHandler map[string]http.Handler + var RegisteredAPIMethodHandler map[string]map[string]func(w http.ResponseWriter, req *http.Request, ps httprouter.Params) + var RegisteredUIFuncHandler map[string]func(http.ResponseWriter, *http.Request) + var RegisteredUIHandler map[string]http.Handler + var RegisteredUIMethodHandler map[string]map[string]func(w http.ResponseWriter, req *http.Request, ps httprouter.Params) + func BasicAuth(h httprouter.Handle, requiredUser, requiredPassword string) httprouter.Handle + func GetFlash(w http.ResponseWriter, r *http.Request) (bool, []interface{}) + func GetSession(w http.ResponseWriter, r *http.Request, key string) (bool, interface{}) + func HandleAPI(pattern string, handler http.Handler) + func HandleAPIFunc(pattern string, handler func(http.ResponseWriter, *http.Request)) + func HandleAPIMethod(method Method, pattern string, ...) + func HandleUI(pattern string, handler http.Handler) + func HandleUIFunc(pattern string, handler func(http.ResponseWriter, *http.Request)) + func HandleUIMethod(method Method, pattern string, ...) + func SetFlash(w http.ResponseWriter, r *http.Request, msg string) bool + func SetSession(w http.ResponseWriter, r *http.Request, key string, value interface{}) bool + type ErrEmptyJson struct + type Handler struct + func (this Handler) Error(w http.ResponseWriter, err error) + func (this Handler) Error404(w http.ResponseWriter) + func (this Handler) Error500(w http.ResponseWriter, msg string) + func (this Handler) Flush(w http.ResponseWriter) + func (this Handler) Get(req *http.Request, key string, defaultValue string) string + func (this Handler) GetIntOrDefault(r *http.Request, key string, defaultValue int) int + func (this Handler) GetJson(r *http.Request) (*jsonq.JsonQuery, error) + func (this Handler) GetParameter(r *http.Request, key string) string + func (this Handler) GetParameterOrDefault(r *http.Request, key string, defaultValue string) string + func (this Handler) GetRawBody(r *http.Request) ([]byte, error) + func (this Handler) Write(w http.ResponseWriter, b []byte) (int, error) + func (this Handler) WriteHeader(w http.ResponseWriter, code int) + func (this Handler) WriteJson(w http.ResponseWriter, v interface{}, statusCode int) error + func (this Handler) WriteJsonHeader(w http.ResponseWriter) + func (this Handler) WriteListResultJson(w http.ResponseWriter, total int, v interface{}, statusCode int) error + func (w Handler) EncodeJson(v interface{}) (b []byte, err error) + type Method string + const DELETE + const GET + const HEAD + const POST + const PUT + func (this Method) String() string + type Result struct + Result interface{} + Total int