added @request.context field

This commit is contained in:
Gani Georgiev
2024-02-17 15:01:09 +02:00
parent 6aaf98215d
commit a11abef84b
42 changed files with 79 additions and 43 deletions
+8
View File
@@ -6,9 +6,17 @@ import (
"github.com/pocketbase/pocketbase/models/schema"
)
const (
RequestInfoContextDefault = "default"
RequestInfoContextRealtime = "realtime"
RequestInfoContextProtectedFile = "protectedFile"
RequestInfoContextOAuth2 = "oauth2"
)
// RequestInfo defines a HTTP request data struct, usually used
// as part of the `@request.*` filter resolver.
type RequestInfo struct {
Context string `json:"context"`
Query map[string]any `json:"query"`
Data map[string]any `json:"data"`
Headers map[string]any `json:"headers"`