Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrorHandler ¶
type ErrorHandler func(v ...interface{})
type Middleware ¶
type Middleware struct { Handler routing.Handler After bool }
type RouteDescription ¶
type RouteDescription struct { Path string Handler routing.Handler Middleware []Middleware Method string }
type Server ¶
type Server struct { ErrorLogger func(v ...interface{}) SwaggerSpec string Router *routing.Router OnStart func(router *routing.Router) // contains filtered or unexported fields }
func NewServer ¶
func NewServer(opts *ServerOpts) *Server
NewServer initializes a new Server instance with a middleware handler. middleware represents middleware handler that will be executed before or after the actual handler of each server endpoint.
type ServerOpts ¶
type ServerOpts struct { ErrorHandler ErrorHandler Middleware []Middleware OnStart func(router *routing.Router) }
Click to show internal directories.
Click to hide internal directories.