Versions in this module Expand all Collapse all v1 v1.0.0 Nov 7, 2021 Changes in this version + func OutputErr(w http.ResponseWriter, err error) + type API interface + GetAPIs func() []*APIHandler + GetName func() string + type APIConf struct + Apis map[string]bool + Cors bool + Middle map[string]bool + Port string + func (ac *APIConf) EnableCORS() bool + func (ac *APIConf) GetPort() string + func (ac *APIConf) InitAPI(r *mux.Router, middles []mid.Middle, authMiddle mid.AuthMidInter, apis ...API) + type APIHandler struct + Auth bool + Group []auth.UserPerm + Method string + Next func(http.ResponseWriter, *http.Request) + Path string + type ApiDI interface + EnableCORS func() bool + GetPort func() string + InitAPI func(r *mux.Router, middles []mid.Middle, authMiddle mid.AuthMidInter, apis ...API) + type ApiError interface + GetStatus func() int + func NewApiError(status int, msg string) ApiError