Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*option)
func WithDisableAccessLog ¶
func WithDisableAccessLog() Option
func WithDumpRequest ¶
WithDumpRequest Whether to print the request body in the routing log
func WithGinEngine ¶
func WithResponseRender ¶
WithResponseRender custom response rendering
type Router ¶
type Router interface {
// rpc模式路由方法
// handler 支持rpc方法和gin.HandleFunc(为了支持gin中间件)
Get(path string, handler ...any)
Post(path string, handler ...any)
Put(path string, handler ...any)
Patch(path string, handler ...any)
Delete(path string, handler ...any)
Handle(method, path string, handler ...any)
// 同gin
Use(handler ...gin.HandlerFunc) Router
Group(path string, handler ...gin.HandlerFunc) Router
}
type Server ¶
type Server struct {
Router
// contains filtered or unexported fields
}
func (*Server) HandleFunc ¶
func (s *Server) HandleFunc(v any) gin.HandlerFunc
Click to show internal directories.
Click to hide internal directories.