httpctx

package
v1.10.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 22, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCtx added in v1.10.0

func NewCtx(app *fiber.App) fiber.CustomCtx

NewCtx returns a new Ctx of app.

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)

func (ContextKey) Get

func (ck ContextKey) Get(ctx fiber.Ctx) any

func (ContextKey) IsSet

func (ck ContextKey) IsSet(ctx fiber.Ctx) bool

func (ContextKey) Set

func (ck ContextKey) Set(ctx fiber.Ctx, val any)

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

func (c *Ctx) Path(override ...string) string

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL