context

package
v2.2.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2021 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package context manipulates context metadata

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendCellsMetaFromContext

func AppendCellsMetaFromContext(ctx context.Context, req *http.Request)

AppendCellsMetaFromContext extract valid header names from context and push them to the request Headers

func CanonicalMeta added in v1.5.0

func CanonicalMeta(ctx context.Context, name string) (string, bool)

CanonicalMeta extract header name or its lowercase version

func ContextMetadata

func ContextMetadata(ctx context.Context) (map[string]string, bool)

ContextMetadata wraps micro lib metadata.FromContext call

func MinioMetaFromContext

func MinioMetaFromContext(ctx context.Context) (md map[string]string, ok bool)

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

func WithAdditionalMetadata(ctx context.Context, meta map[string]string) context.Context

WithAdditionalMetadata retrieves existing meta, adds new key/values to the map and produces a new context

func WithMetaCopy

func WithMetaCopy(ctx context.Context) context.Context

ContextWithMetaCopy makes sure the metadata map will is replicated and unique to this context

func WithMetadata

func WithMetadata(ctx context.Context, md map[string]string) context.Context

WithMetadata wraps micro lib metadata.NewContext call

func WithUserNameMetadata

func WithUserNameMetadata(ctx context.Context, userName string) context.Context

WithUserNameMetadata appends a user name to both the context metadata and as context key.

Types

This section is empty.

Jump to

Keyboard shortcuts

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