ctx

package
v0.0.0-...-f5b340a Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFromContext

func GetFromContext(ctx context.Context, key ContextKey) (interface{}, error)

GetFromContext set tenant data in context

func SetInContext

func SetInContext(ctx context.Context, key ContextKey, data interface{}) context.Context

SetInContext set info in context

Types

type ContextKey

type ContextKey string

ContextKey is the type that should be used

const (
	AccountIDContextField ContextKey = "AccountId"
	UserIDContextField    ContextKey = "UserId"
	ProjectIDContextField ContextKey = "ProjectId"
)

Jump to

Keyboard shortcuts

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