ctxutil

package
v0.4.7 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2020 License: Apache-2.0 Imports: 4 Imported by: 21

Documentation

Index

Constants

View Source
const (
	SenderKey = "sender"
	TokenType = "Bearer"
)

Variables

This section is empty.

Functions

func AddMessageId

func AddMessageId(ctx context.Context, messageId ...string) context.Context

func ClearMessageId

func ClearMessageId(ctx context.Context) context.Context

func ContextWithSender added in v0.4.0

func ContextWithSender(ctx context.Context, user *sender.Sender) context.Context

func Copy

func Copy(src, dst context.Context) context.Context

func GetLocale added in v0.4.3

func GetLocale(ctx context.Context) string

func GetMessageId

func GetMessageId(ctx context.Context) []string

func GetRequestId

func GetRequestId(ctx context.Context) string

func GetSender added in v0.4.0

func GetSender(ctx context.Context) *sender.Sender

func GetValueFromContext added in v0.2.2

func GetValueFromContext(ctx context.Context, key string) []string

func SetLocale added in v0.4.3

func SetLocale(ctx context.Context, locale string) context.Context

func SetMessageId

func SetMessageId(ctx context.Context, messageId []string) context.Context

func SetRequestId added in v0.2.2

func SetRequestId(ctx context.Context, requestId string) context.Context

Types

This section is empty.

Jump to

Keyboard shortcuts

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