mirror of
https://github.com/astaxie/beego.git
synced 2025-07-13 16:21:03 +00:00
Deprecated old web module
This commit is contained in:
@ -17,11 +17,13 @@ package beego
|
||||
import "github.com/astaxie/beego/context"
|
||||
|
||||
// FilterFunc defines a filter function which is invoked before the controller handler is executed.
|
||||
// Deprecated: using pkg/, we will delete this in v2.1.0
|
||||
type FilterFunc func(*context.Context)
|
||||
|
||||
// FilterRouter defines a filter operation which is invoked before the controller handler is executed.
|
||||
// It can match the URL against a pattern, and execute a filter function
|
||||
// when a request with a matching URL arrives.
|
||||
// Deprecated: using pkg/, we will delete this in v2.1.0
|
||||
type FilterRouter struct {
|
||||
filterFunc FilterFunc
|
||||
tree *Tree
|
||||
@ -33,6 +35,7 @@ type FilterRouter struct {
|
||||
// ValidRouter checks if the current request is matched by this filter.
|
||||
// If the request is matched, the values of the URL parameters defined
|
||||
// by the filter pattern are also returned.
|
||||
// Deprecated: using pkg/, we will delete this in v2.1.0
|
||||
func (f *FilterRouter) ValidRouter(url string, ctx *context.Context) bool {
|
||||
isOk := f.tree.Match(url, ctx)
|
||||
if isOk != nil {
|
||||
|
Reference in New Issue
Block a user