Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Controller ¶
type Controller interface { Slug() string Middlewares() []Middleware APIs() []API }
type HTTPServer ¶
type HTTPServer interface { With(Controller) Serve() error }
func NewHTTPServer ¶
func NewHTTPServer(lc fx.Lifecycle, opt Option, logger *slog.Logger, cs ...Controller) HTTPServer
type Middleware ¶
type Middleware struct { Middleware func(http.Handler) http.Handler Scope MiddlewareScope }
type MiddlewareScope ¶
type MiddlewareScope int
const ( ScopeController MiddlewareScope = iota // controller 层面 ScopeGlobal // 全局中间件 )
Click to show internal directories.
Click to hide internal directories.