Documentation
¶
Index ¶
- Constants
- Variables
- func GetChanels() et.Json
- func GetRoutes() map[string]et.Json
- func HttpDelete(w http.ResponseWriter, r *http.Request)
- func HttpGet(w http.ResponseWriter, r *http.Request)
- func HttpSet(w http.ResponseWriter, r *http.Request)
- func OnDelete(f DeleteFn)
- func OnGet(f GetFn)
- func OnSet(f SetFn)
- func Private(r *chi.Mux, method, path string, h http.HandlerFunc, ...) *chi.Mux
- func Protect(r *chi.Mux, method, path string, h http.HandlerFunc, ...) *chi.Mux
- func Public(r *chi.Mux, method, path string, h http.HandlerFunc, ...) *chi.Mux
- func PushApiGateway(method, path, resolve string, tpHeader TpHeader, header et.Json, ...)
- func RemoveApiGateway(id string)
- func SetAutentication(fn func(http.Handler) http.Handler)
- func SetChannels(channels *Channels)
- func With(r *chi.Mux, method, path string, middlewares []func(http.Handler) http.Handler, ...) *chi.Mux
- type Channels
- type DeleteFn
- type GetFn
- type Routes
- type SetFn
- type TpHeader
Constants ¶
const ( Get = "GET" Post = "POST" Put = "PUT" Patch = "PATCH" Delete = "DELETE" Head = "HEAD" Options = "OPTIONS" HandlerFunc = "HandlerFunc" )
Variables ¶
var ( EVENT_SET_ROUTER = "event:set:router" EVENT_REMOVE_ROUTER = "event:remove:router" EVENT_RESET_ROUTER = "event:reset:router" )
Functions ¶
func HttpDelete ¶ added in v1.0.11
func HttpDelete(w http.ResponseWriter, r *http.Request)
* * HttpDelete handles DELETE requests to delete solver data * @param w http.ResponseWriter, r *http.Request *
func HttpGet ¶ added in v1.0.11
func HttpGet(w http.ResponseWriter, r *http.Request)
* * HttpGet handles GET requests to get solver data * @param w http.ResponseWriter, r *http.Request *
func HttpSet ¶ added in v1.0.11
func HttpSet(w http.ResponseWriter, r *http.Request)
* * HttpSet handles POST requests to set solver data * @param w http.ResponseWriter, r *http.Request *
func Private ¶ added in v0.1.1
func Private(r *chi.Mux, method, path string, h http.HandlerFunc, packageName, packagePath, host string) *chi.Mux
* * Private * @param r *chi.Mux, method string, path string, h http.HandlerFunc, packageName string, packagePath string, host string * @return *chi.Mux *
func Protect ¶
func Protect(r *chi.Mux, method, path string, h http.HandlerFunc, packageName, packagePath, host string) *chi.Mux
* * Protect * @param r *chi.Mux, method string, path string, h http.HandlerFunc, packageName string, packagePath string, host string * @return *chi.Mux *
func Public ¶
func Public(r *chi.Mux, method, path string, h http.HandlerFunc, packageName, packagePath, host string) *chi.Mux
* * Public * @param r *chi.Mux, method string, path string, h http.HandlerFunc, packageName string, packagePath string, host string * @return *chi.Mux *
func PushApiGateway ¶
func PushApiGateway(method, path, resolve string, tpHeader TpHeader, header et.Json, excludeHeader []string, version int, packageName string)
* * PushApiGateway * @param method, path, resolve string, header et.Json, tpHeader TpHeader, excludeHeader []string, version int, packageName string *
func RemoveApiGateway ¶ added in v0.1.17
func RemoveApiGateway(id string)
* * RemoveApiGateway * @param id string *
func SetAutentication ¶ added in v1.0.12
* * SetAutentication * @param fn func(http.Handler) http.Handler *
func SetChannels ¶ added in v0.1.12
func SetChannels(channels *Channels)
* * SetChannels * @param vars et.Json *
func With ¶
func With(r *chi.Mux, method, path string, middlewares []func(http.Handler) http.Handler, h http.HandlerFunc, packageName, packagePath, host string) *chi.Mux
* * With * @param r *chi.Mux, method string, path string, middlewares []func(http.Handler) http.Handler, h http.HandlerFunc, packageName string, packagePath string, host string * @return *chi.Mux *
Types ¶
type TpHeader ¶
type TpHeader int
func IntToTpHeader ¶
* * IntToTpHeader * @param tp int * @return TpHeader *
func ToTpHeader ¶
* * ToTpHeader * @param str string * @return TpHeader *