header

package
v0.0.0-...-1569ab3 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	RequestID = "Request-Id"

	Timezone = "Timezone"

	TenantID = "Tenant-Id"
)

predefined header

Variables

This section is empty.

Functions

func GINRequestID

func GINRequestID(ctx *gin.Context) zap.Field

func GetRequestId

func GetRequestId(ctx context.Context) string

GetRequestIDKV return request id

func MutateContext

func MutateContext(c CTX) context.Context

MutateContext return context.Context, carry request id and timezone if value exists.

Types

type CTX

type CTX interface {
	GetHeader(key string) string
}

CTX context

type KV

type KV []string

func GetRequestIDKV

func GetRequestIDKV(ctx context.Context) KV

GetRequestIDKV return request id

func GetTenantID

func GetTenantID(ctx context.Context) KV

GetTenantID return tenantID

func GetTimezone

func GetTimezone(ctx context.Context) KV

GetTimezone return timezone

func (KV) Fuzzy

func (k KV) Fuzzy() (result []interface{})

Fuzzy return key and value as []interface

func (KV) Wreck

func (k KV) Wreck() (string, string)

Jump to

Keyboard shortcuts

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