Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetReqId ¶
GetReqId extract request id from given context. This is a shortcut for Get with ReqId to get the request id from given context.
func PassToContext ¶ added in v0.5.0
PassToContext pass Metadata from http.Context to context.
func Set ¶ added in v0.5.0
Set inject given Metadata to context with custom key to make sure that the value is correct.
func SetFromRequestHeader ¶
SetFromRequestHeader set any available metadata from given http context in the request header.
Types ¶
type Metadata ¶
type Metadata struct {
Authorization string
UserAgent string
CacheControl string
ForwardedFor string
RequestFrom string
DeviceId string
App string
VersionApp string
ReqId string
ReqTags string
ReqUser string
ReqNama string
ReqKodeJabatan string
ReqNamaJabatan string
ReqKodeUker string
ReqNamaUker string
ReqJenisUker string
ReqKodeMainUker string
ReqKodeRegion string
PathGateway string
ApiKey string
}
Metadata holds any request-scoped shared data within brispot microservice.
func ParseRequest ¶
ParseRequest return Metadata from given http context but return empty data instead if no data were found.
Click to show internal directories.
Click to hide internal directories.