Documentation ¶
Index ¶
- Constants
- func GetAccountID(ctx context.Context) string
- func GetMetadata(ctx context.Context) (metadata.MD, bool)
- func GetRequestID(ctx context.Context) string
- func GetUserID(ctx context.Context) string
- func Has(ctx context.Context, key string) bool
- func HasAccountID(ctx context.Context) bool
- func HasUserID(ctx context.Context) bool
Constants ¶
View Source
const ( RequestID string = "requestId" AccountID string = "accountId" UserID string = "userId" TraceID string = "zipkinTraceId" )
Variables ¶
This section is empty.
Functions ¶
func GetAccountID ¶
GetAccountID tries to extract the accountId key from the given context. If no AccountID exists, an empty string is returned.
func GetMetadata ¶
GetMetadata is a convenience function which can be used in order to not have to import two metadata libraries (grpc/metadata and go-godin/metadata)
func GetRequestID ¶
GetRequestID tries to extract the requestId key from the given context.
func GetUserID ¶
GetUserID tries to extract the userId key from the given context. If no UserID exists, an empty string is returned
func HasAccountID ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.