diff --git a/go.mod b/go.mod index 5693af5..12c168d 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module git.fsdpf.net/go/contracts go 1.21 require ( - git.fsdpf.net/go/condition v0.0.0-20240509034445-afc243ea916e + git.fsdpf.net/go/condition v0.0.0-20241126090116-c3471706f4d4 git.fsdpf.net/go/db v0.0.0-20241125095839-f186c88c5c2a github.com/go-chi/chi/v5 v5.0.12 github.com/golang/protobuf v1.5.2 @@ -21,7 +21,7 @@ require ( ) require ( - git.fsdpf.net/go/req v0.0.0-20240509034400-4ef8c130a758 // indirect + git.fsdpf.net/go/req v0.0.0-20241126090024-bccb0382d886 // indirect git.fsdpf.net/go/utils v0.0.0-20240509025914-c03a9cb48aff // indirect github.com/bufbuild/protocompile v0.4.0 // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.0-20210816181553-5444fa50b93d // indirect diff --git a/go.sum b/go.sum index 7f637d0..f7338ad 100644 --- a/go.sum +++ b/go.sum @@ -46,6 +46,10 @@ git.fsdpf.net/go/condition v0.0.0-20240509030058-b0e337133e44 h1:XHJxWJuofEL7TLM git.fsdpf.net/go/condition v0.0.0-20240509030058-b0e337133e44/go.mod h1:xgX0fc3LEgrPk9tihGQqoQND4EWlNgYbLCi70TuCvvM= git.fsdpf.net/go/condition v0.0.0-20240509034445-afc243ea916e h1:ZfwjqZS5URF4Y0JfQeytSdmXimJ4l74ooWRppza+3Tk= git.fsdpf.net/go/condition v0.0.0-20240509034445-afc243ea916e/go.mod h1:K5ocyKVxgC5mI1k/crgrEozK0r51qAavWg0hweXo6PU= +git.fsdpf.net/go/condition v0.0.0-20241126084857-bb134581146e h1:GR7OmszSIcutwYfYkL0wGJXKlLzOHCszjN7Oy2jAcRU= +git.fsdpf.net/go/condition v0.0.0-20241126084857-bb134581146e/go.mod h1:cQhj0R7Q1GP4qxOvqRAwpGPSdYCX/c6dN3WSHhjmMvw= +git.fsdpf.net/go/condition v0.0.0-20241126090116-c3471706f4d4 h1:BMO+OujDukHDKD0RLUEu7w1ZZyHvtz8k69pHUiP7yPE= +git.fsdpf.net/go/condition v0.0.0-20241126090116-c3471706f4d4/go.mod h1:uKIEYgBdHFFnNQs6y7cvwsi4b/0Jk1QDneDgemo3Oa0= git.fsdpf.net/go/db v0.0.0-20230621051209-5740d112407f h1:H+/H6j+hyFMgSy+tUNmymRy7/PWQRjjp8qY/DrhwrsY= git.fsdpf.net/go/db v0.0.0-20230621051209-5740d112407f/go.mod h1:397Sdx1cJS0OlHtTX1bVl//9k3Xn0Klnc6jC4MAkb6w= git.fsdpf.net/go/db v0.0.0-20230731125324-11651ea6640b h1:fRgWNOQ9dAYuUZHQ24oi1XqRbJIcJvZGbnQDaAKI7IY= @@ -64,6 +68,10 @@ git.fsdpf.net/go/req v0.0.0-20240509033936-f8a11598db60 h1:hHrEcUSbtajC2LAo2fvEo git.fsdpf.net/go/req v0.0.0-20240509033936-f8a11598db60/go.mod h1:S+p7t3XclKxsvaXQng7AMmqEGq11FSnMzxOtv1z8JUw= git.fsdpf.net/go/req v0.0.0-20240509034400-4ef8c130a758 h1:nHys8Bwb29b/FvnE100KVH62aD2j5CEPxTQ/RRHo27k= git.fsdpf.net/go/req v0.0.0-20240509034400-4ef8c130a758/go.mod h1:S+p7t3XclKxsvaXQng7AMmqEGq11FSnMzxOtv1z8JUw= +git.fsdpf.net/go/req v0.0.0-20241126084545-fd3625802b40 h1:Ik3m4G4fY0kEHGX7qg01L2Q7OXjXAvRRqg8ErwQd2Hs= +git.fsdpf.net/go/req v0.0.0-20241126084545-fd3625802b40/go.mod h1:S+p7t3XclKxsvaXQng7AMmqEGq11FSnMzxOtv1z8JUw= +git.fsdpf.net/go/req v0.0.0-20241126090024-bccb0382d886 h1:LOKgXrnJT4xmxf9KkvZBOZDQYEhNz3h0TZl13R2GCtk= +git.fsdpf.net/go/req v0.0.0-20241126090024-bccb0382d886/go.mod h1:S+p7t3XclKxsvaXQng7AMmqEGq11FSnMzxOtv1z8JUw= git.fsdpf.net/go/utils v0.0.0-20240509025914-c03a9cb48aff h1:1hokQGKGIstoI7WDBir2N24OGgnussZ3GmucK4TQRuI= git.fsdpf.net/go/utils v0.0.0-20240509025914-c03a9cb48aff/go.mod h1:NUoyQtFr905YT+pi850mvSf4YX0WghQIcMQkTvize5o= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= diff --git a/http.go b/http.go index 0c24d38..f47841b 100644 --- a/http.go +++ b/http.go @@ -32,7 +32,7 @@ type HttpController interface { Route() req.Route // 内部调用 - Call(code string, params map[string]any, category ...req.RouteCategory) (req.HttpResponse, error) + Call(code string, params map[string]any, category ...req.RouteFilterOption) (req.HttpResponse, error) // 内部调用 // Invoke() @@ -57,8 +57,8 @@ func (this HttpHandleController) User() req.User { return this.Request().Context().Value(req.RouteCtx{Name: "User"}).(req.User) } -func (this HttpHandleController) Call(code string, params map[string]any, category ...req.RouteCategory) (req.HttpResponse, error) { - return do.MustInvoke[req.Router](this.Container()).Call(this.Request(), code, params, category...) +func (this HttpHandleController) Call(code string, params map[string]any, opts ...req.RouteFilterOption) (req.HttpResponse, error) { + return do.MustInvoke[req.Router](this.Container()).Call(this.Request(), code, params, opts...) } func (HttpHandleController) Execute(params req.GlobalParams) any {