utils

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// RequestIDKey requestID key
	RequestIDKey = "x-request-id"
	// UsernameKey username key
	UsernameKey = "x-username"
)

Variables

This section is empty.

Functions

func GetHeaderFirst

func GetHeaderFirst(ctx context.Context, key string) string

GetHeaderFirst get header first value

func GetRequestID

func GetRequestID(ctx context.Context) string

GetRequestID request id from header

func GetUsername

func GetUsername(ctx context.Context) string

GetUsername get username from header

func NewRequestID

func NewRequestID() string

NewRequestID generate a RequestId

Types

This section is empty.

Jump to

Keyboard shortcuts

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