context

package
v2.7.6 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAuthorizer

func GetAuthorizer(ctx context.Context) (influxdb.Authorizer, error)

GetAuthorizer retrieves an authorizer from context.

func GetToken

func GetToken(ctx context.Context) (string, error)

GetToken retrieves a token from the context; errors if no token.

func GetUserID

func GetUserID(ctx context.Context) (platform.ID, error)

GetUserID retrieves the user ID from the authorizer on the context.

func ProvideAuthorizerStorage added in v2.7.5

func ProvideAuthorizerStorage(ctx context.Context, ap *influxdb.Authorizer) context.Context

ProvideAuthorizerStorage puts a pointer to an Authorizer in the context. This is used to pass an Authorizer up the stack for logging purposes

func SetAuthorizer

func SetAuthorizer(ctx context.Context, a influxdb.Authorizer) context.Context

SetAuthorizer sets an authorizer on context.

func StoreAuthorizer added in v2.7.5

func StoreAuthorizer(ctx context.Context, auth influxdb.Authorizer) bool

StoreAuthorizer stores an Authorizer in a pointer from the Context. This permits functions deep in the stack to set the pointer to return values up the call chain

Types

This section is empty.

Jump to

Keyboard shortcuts

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