Documentation ¶
Index ¶
- func GetValue(ctx context.Context, key types.ContextKey) interface{}
- func GetValueBool(ctx context.Context, key types.ContextKey) bool
- func GetValueInt64(ctx context.Context, key types.ContextKey) int64
- func GetValueString(ctx context.Context, key types.ContextKey) string
- func WithValue(parent context.Context, key types.ContextKey, value interface{}) context.Context
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetValue ¶
func GetValue(ctx context.Context, key types.ContextKey) interface{}
GetValue returns result with key
func GetValueBool ¶
func GetValueBool(ctx context.Context, key types.ContextKey) bool
GetValueBool returns bool result with key if type is not bool or not exist, return false
func GetValueInt64 ¶
func GetValueInt64(ctx context.Context, key types.ContextKey) int64
GetValueInt64 returns int64 result with key if type is not int64 or not exist, return 0
func GetValueString ¶
func GetValueString(ctx context.Context, key types.ContextKey) string
GetValueString returns string result with key if type is not string or not exist, return ""
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.