header

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2022 License: Apache-2.0 Imports: 1 Imported by: 23

Documentation

Index

Constants

View Source
const (
	RequestID = "Request-Id"

	Timezone = "Timezone"

	TenantID = "Tenant-Id"
)

predefined header

Variables

This section is empty.

Functions

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 added in v0.0.6

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