contexter

package
v0.1.27 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2025 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetProjectID

func GetProjectID(ctx context.Context) string

func GetRequestID

func GetRequestID(ctx context.Context) string

func GetUserID

func GetUserID(ctx context.Context) string

func WithProjectID

func WithProjectID(ctx context.Context, projectID string) context.Context

func WithRequestID

func WithRequestID(ctx context.Context, requestID string) context.Context

func WithUserID

func WithUserID(ctx context.Context, userID string) context.Context

Types

type ContextKey

type ContextKey string
const (
	ContextKeyRequestID ContextKey = "request-id"
	ContextKeyProjectID ContextKey = "project-id"
	ContextKeyAPIKey    ContextKey = "api-key"
	ContextKeyAPISecret ContextKey = "api-secret"
	ContextKeyUserID    ContextKey = "user-id"
)

Jump to

Keyboard shortcuts

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