Documentation
¶
Index ¶
- Constants
- func CtxWithTxo(parent context.Context) context.Context
- func ErrCtx(ctx context.Context) error
- func GetCache(client *redis.Client, key string, val interface{}) (err error)
- func SetCache(client *redis.Client, key string, val interface{}, exp time.Duration) error
- func SetErrCtx(ctx context.Context, err error) error
- func SetTxCtx(ctx context.Context, tx sq.BaseRunner) error
- func TxCtx(ctx context.Context, t sq.BaseRunner) sq.BaseRunner
- type JSON
- type Txo
Constants ¶
View Source
const ( // TxoKey is key for Txo TxoKey key = iota )
Variables ¶
This section is empty.
Functions ¶
func CtxWithTxo ¶
CtxWithTxo return context with txo
func SetTxCtx ¶
func SetTxCtx(ctx context.Context, tx sq.BaseRunner) error
SetTxCtx to set tx in ctx
func TxCtx ¶
func TxCtx(ctx context.Context, t sq.BaseRunner) sq.BaseRunner
TxCtx return transaction from context if any or return t params
Types ¶
type JSON ¶
type JSON json.RawMessage
JSON type
func (*JSON) MarshalJSON ¶
MarshalJSON to marshal to json formatted
func (*JSON) UnmarshalJSON ¶
UnmarshalJSON to unmarshal
Click to show internal directories.
Click to hide internal directories.