Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Chain ¶
type Chain struct {
// contains filtered or unexported fields
}
func (*Chain) Use ¶
func (c *Chain) Use(m Middleware) *Chain
type Context ¶
type Context struct {
Request *http.Request
Response http.ResponseWriter
Params map[string]string
Locals map[string]any
// contains filtered or unexported fields
}
func NewContext ¶
func NewContext(w http.ResponseWriter, r *http.Request) *Context
type HandlerFunc ¶
type LoadedMiddleware ¶
type LoadedMiddleware struct {
OnRequest Middleware
Sequence []Middleware
}
func Load ¶
func Load(projectDir string) (*LoadedMiddleware, error)
func LoadPlugin ¶
func LoadPlugin(pluginPath string) (*LoadedMiddleware, error)
type Middleware ¶
func Sequence ¶
func Sequence(middlewares ...Middleware) []Middleware
type MiddlewareCompiler ¶
type MiddlewareCompiler struct {
CacheDir string
BaseDir string
ModuleName string
// contains filtered or unexported fields
}
func NewCompiler ¶
func NewCompiler(baseDir, cacheDir string) *MiddlewareCompiler
func (*MiddlewareCompiler) Load ¶
func (c *MiddlewareCompiler) Load(filePath string) (*LoadedMiddleware, error)
Click to show internal directories.
Click to hide internal directories.