Documentation ¶
Index ¶
Constants ¶
View Source
const ( GET = "GET" POST = "POST" PUT = "PUT" PATCH = "PATCH" DELETE = "DELETE" STATIC = "STATIC" )
View Source
const ( Path = "path" Query = "query" Body = "body" Header = "header" Form = "form" Multipart = "multipart" Context = "context" Request = "request" Response = "response" App = "app" Stream = "stream" )
Variables ¶
Functions ¶
This section is empty.
Types ¶
type ApiHandler ¶ added in v1.3.0
type Container ¶ added in v1.1.5
type Container interface { bean.Bean ApiHandler() ApiHandler StaticHandler() StaticHandler ListenAndServe(port int) }
type Filter ¶ added in v1.1.5
type Filter interface { bean.Bean Order() int UrlPatterns() Patterns DoFilter(w http.ResponseWriter, r *http.Request, chain FilterChain) error }
type FilterChain ¶ added in v1.1.8
type FilterChain interface { GetFilter() Filter SetNext(chain FilterChain) GetNext() FilterChain DoFilter(w http.ResponseWriter, r *http.Request) error SetService(service Service) DoService(w http.ResponseWriter, r *http.Request) error }
type ParamMapper ¶ added in v1.3.0
type ParamMapper interface { //PathParamMapper GetStringFromPath(param Param) string GetIntFromPath(param Param) int GetBoolFromPath(param Param) bool GetFloatFromPath(param Param) float64 //QueryParamMapper GetStringFromQuery(param Param) string GetIntFromQuery(param Param) int GetBoolFromQuery(param Param) bool GetFloatFromQuery(param Param) float64 GetStructFromQuery(param Param) interface{} //BodyParamMapper GetStructFromBody(param Param) interface{} GetMapFromBody(param Param) interface{} //HeaderParamMapper GetStringFromHeader(param Param) string //FormParamMapper GetStringFromForm(param Param) string GetIntFromForm(param Param) int GetBoolFromForm(param Param) bool GetFloatFromForm(param Param) float64 GetMapFromForm() map[string][]string //UploadMapper GetStringFromMultipart(param Param) string GetMultipartHeader(param Param) *multipart.FileHeader GetMultipartFile(param Param) multipart.File GetStream() []byte //HttpMapper GetRequest() *http.Request GetResponseWriter() http.ResponseWriter //ExtendedParamMapper Get(param Param) interface{} }
type StaticHandler ¶ added in v1.3.2
type StaticHandler func(url, dir string)
Click to show internal directories.
Click to hide internal directories.