Documentation
¶
Overview ¶
Package whs @Author Bing @Date 2024/2/27 10:44:00 @Desc
Package whs @Author Bing @Date 2024/2/3 21:01:00 @Desc
Package whs @Author Bing @Date 2024/2/3 20:11:00 @Desc
Package whs @Author Bing @Date 2024/2/2 17:07:00 @Desc
Package whs @Author Bing @Date 2024/2/4 20:58:00 @Desc
Package whs @Author Bing @Date 2024/2/3 20:37:00 @Desc
Package whs @Author Bing @Date 2024/2/3 20:11:00 @Desc
Package whs @Author Bing @Date 2024/2/10 20:46:00 @Desc
Package whs @Author Bing @Date 2024/2/3 22:00:00 @Desc
Index ¶
- func ErrorHandler(c *Context, status int, err error)
- func NotFoundHandler(c *Context)
- type Context
- type Handler
- type IRoute
- type IService
- type Message
- type Route
- func (r *Route) DELETE(url string, handler Handler)
- func (r *Route) GET(url string, handler Handler)
- func (r *Route) Group(prefix string) *Route
- func (r *Route) POST(url string, handler Handler)
- func (r *Route) PUT(url string, handler Handler)
- func (r *Route) RegisterRouter(method, url string, handler Handler)
- func (r *Route) Router(method, url string) *Route
- func (r *Route) UseMiddleware(middleware Handler)
- type Service
- func (s *Service) Func(fun template.FuncMap)
- func (s *Service) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (s *Service) Start()
- func (s *Service) Static(url, path string)
- func (s *Service) Stop()
- func (s *Service) Template(webPah string)
- func (s *Service) TemplateDelim(left, right, webPah string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrorHandler ¶ added in v1.5.8
func NotFoundHandler ¶ added in v1.2.0
func NotFoundHandler(c *Context)
Types ¶
type Context ¶ added in v1.4.0
type Context struct { // request *http.Request // response http.ResponseWriter // contains filtered or unexported fields }
Context for encapsulating request data and processing responses
func NewContent ¶
func NewContent(r *http.Request, w http.ResponseWriter) *Context
NewContent returns a new Context
type Route ¶ added in v1.3.0
type Route struct {
// contains filtered or unexported fields
}
Route struct
func (*Route) RegisterRouter ¶ added in v1.3.0
RegisterRouter for add router
func (*Route) UseMiddleware ¶ added in v1.4.0
UseMiddleware complete