Documentation ¶
Overview ¶
Package context manipulates context metadata
Index ¶
- func AppendCellsMetaFromContext(ctx context.Context, req *http.Request)
- func CanonicalMeta(ctx context.Context, name string) (string, bool)
- func ContextMetadata(ctx context.Context) (map[string]string, bool)
- func MinioMetaFromContext(ctx context.Context) (md map[string]string, ok bool)
- func NewBackgroundWithMetaCopy(ctx context.Context) context.Context
- func NewBackgroundWithUserKey(userName string) context.Context
- func WithAdditionalMetadata(ctx context.Context, meta map[string]string) context.Context
- func WithMetaCopy(ctx context.Context) context.Context
- func WithMetadata(ctx context.Context, md map[string]string) context.Context
- func WithUserNameMetadata(ctx context.Context, userName string) context.Context
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendCellsMetaFromContext ¶
AppendCellsMetaFromContext extract valid header names from context and push them to the request Headers
func CanonicalMeta ¶ added in v1.5.0
CanonicalMeta extract header name or its lowercase version
func ContextMetadata ¶
ContextMetadata wraps micro lib metadata.FromContext call
func MinioMetaFromContext ¶
MinioMetaFromContext prepares metadata for minio client, merging context medata and eventually the Context User Key value (X-Pydio-User). Used to prepare metadata sent by Minio Clients
func WithAdditionalMetadata ¶ added in v1.5.0
WithAdditionalMetadata retrieves existing meta, adds new key/values to the map and produces a new context It enforces case-conflicts on all keys
func WithMetaCopy ¶
WithMetaCopy makes sure the metadata map will is replicated and unique to this context
func WithMetadata ¶
WithMetadata wraps micro lib metadata.NewContext call
Types ¶
This section is empty.