Documentation ¶
Index ¶
- Constants
- func AttachConsumer(r *http.Request, consumer resource.Consumer)
- func GetApisixVar(r *http.Request, key string) any
- func GetApisixVars(r *http.Request) map[string]any
- func GetBool(c context.Context, key string) (b bool)
- func GetBytes(c context.Context, key string) (b []byte)
- func GetDuration(c context.Context, key string) (d time.Duration)
- func GetInt(c context.Context, key string) (i int)
- func GetInt64(c context.Context, key string) (i int64)
- func GetMapStringAny(c context.Context, key string) (m map[string]any)
- func GetMapStringString(c context.Context, key string) (m map[string]string)
- func GetRequestVar(r *http.Request, key string) any
- func GetRequestVars(r *http.Request) map[string]any
- func GetSliceString(c context.Context, key string) (s []string)
- func GetString(c context.Context, key string) (s string)
- func GetTime(c context.Context, key string) (t time.Time)
- func ReadRequestBody(r *http.Request) ([]byte, error)
- func RecycleVars(r *http.Request)
- func RegisterApisixVar(r *http.Request, key string, val any)
- func RegisterRequestVar(r *http.Request, key string, val any)
- func WithApisixVars(r *http.Request, vars map[string]string) *http.Request
- func WithRequestVars(r *http.Request) *http.Request
Constants ¶
View Source
const ApisixVarsKey = "apisix_vars"
View Source
const RequestBodyKey = "$request_body"
View Source
const RequestVarsKey = "request_vars"
Variables ¶
This section is empty.
Functions ¶
func GetDuration ¶
GetDuration returns the value associated with the key as a time.Duration.
func GetMapStringAny ¶
GetMapStringAny returns the value associated with the key as a map[string]any.
func GetMapStringString ¶
GetMapStringString returns the value associated with the key as a map[string]string.
func GetSliceString ¶
GetSliceString returns the value associated with the key as a []string.
func ReadRequestBody ¶
ReadRequestBody will return the body in []byte, without change the origin body
func RecycleVars ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.