Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ContextKey ¶
type ContextKey string
ContextKey names a request-local value stored in fiber.Ctx locals.
const ( ContextKeyRegion ContextKey = "region" ContextKeyStartTime ContextKey = "start-time" ContextKeyIsRoot ContextKey = "is-root" ContextKeyRootAccessKey ContextKey = "root-access-key" ContextKeyAccount ContextKey = "account" ContextKeyAuthenticated ContextKey = "authenticated" ContextKeyPublicBucket ContextKey = "public-bucket" ContextKeyParsedAcl ContextKey = "parsed-acl" ContextKeySkipResBodyLog ContextKey = "skip-res-body-log" ContextKeyBodyReader ContextKey = "body-reader" ContextKeyBodyStream ContextKey = "body-stream" ContextKeySkip ContextKey = "__skip" ContextKeyStack ContextKey = "stack" ContextKeyBucketOwner ContextKey = "bucket-owner" ContextKeyObjectPostResult ContextKey = "object-post-result" ContextKeyRequestID ContextKey = "request-id" ContextKeyHostID ContextKey = "host-id" ContextKeyWebsiteConfig ContextKey = "website-config" ContextKeyCallerIdentity ContextKey = "iam-caller-identity" ContextKeyOriginalURIPath ContextKey = "original-uri-path" ContextKeyClientIP ContextKey = "client-ip" )
func (ContextKey) Delete ¶
func (ck ContextKey) Delete(ctx fiber.Ctx)
type Ctx ¶ added in v1.10.0
type Ctx struct {
*fiber.DefaultCtx
// contains filtered or unexported fields
}
Ctx is the request context of the gateway servers, created by fiber.NewWithCustomCtx(NewCtx). Fiber normalizes every path it routes as RFC 3986 Section 6.2.2 describes: it decodes the escapes of unreserved characters and removes the "." and ".." segments, and DefaultCtx.Path returns that normalized path, an override included. An S3 path names a bucket and an object key, and S3 takes the key as it is: "a/../b", "x/." and "a%41" are keys of their own. Ctx keeps a path set by Path as it is and has fiber route routePath of it instead.
func (*Ctx) Path ¶ added in v1.10.0
Path returns the path set by the last override, or fiber's normalized path before one. An override is set as the request URI path, like fiber sets it, and fiber routes routePath of it.
func (*Ctx) Reset ¶ added in v1.10.0
func (c *Ctx) Reset(fctx *fasthttp.RequestCtx)
Reset prepares c for the request of fctx.