Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶ added in v0.8.0
type Config struct {
Path string `mapstructure:"path"`
}
Config defines the configuration for the replace_path middleware.
type Middleware ¶ added in v0.10.0
type Middleware struct {
// contains filtered or unexported fields
}
Middleware is a middleware that replaces the request path.
func NewMiddleware ¶
func NewMiddleware(newPath string) *Middleware
NewMiddleware creates a new ReplacePathMiddleware instance.
func (*Middleware) ServeHTTP ¶ added in v0.10.0
func (m *Middleware) ServeHTTP(ctx context.Context, c *app.RequestContext)
Click to show internal directories.
Click to hide internal directories.