Versions in this module Expand all Collapse all v0 v0.0.2 Dec 9, 2021 v0.0.1 Oct 19, 2021 Changes in this version + var RandomLogID = func() string + func AccepLanguages(req *http.Request) []string + func DuplicateEntryError(err error) bool + func GainLogID(ctx context.Context) string + func Int64BoolMap2Slice(m map[int64]bool) (s []int64) + func Int64Map2Slice(m map[int64]bool) []int64 + func LoadConf(fileName string, data interface{}, fileSuffix string) error + func LoadConfAuto(fileName string, data interface{}) error + func NewLogContext(ctx context.Context) context.Context + func PBool(v bool) *bool + func PInt(v int) *int + func PInt32(v int32) *int32 + func PInt64(v int64) *int64 + func PInt8(v int8) *int8 + func PString(v string) *string + func PTime(v time.Time) *time.Time + func PTimeNow() *time.Time + func PUint32(v uint32) *uint32 + func RDBTxnExecute(dc *DBContext, handler func(context.Context) error) error + func ReqFactory(url string, reqHeader, rspHeader map[string]string, method string) (*bfe_basic.Request, error) + func SortMapInt642String(m map[int64]string) []int64 + func StringBoolMap2Slice(m map[string]bool) (s []string) + func StringMap2Slice(m map[string]bool) []string + func StringSlice2Map(ss []string) map[string]bool + func StringSliceHasElement(s []string, e string) bool + func StringSliceSub(a, b []string) (diff []string) + func StringSliceSubtract(a, b []string) (r []string) + func Transaction(conn *sql.DB, do func(*sql.Tx) error) error + func WantBlockWrite(ops ...*Op) bool + func WantOpenTxn(ops ...*Op) bool + type DBContext struct + func NewDBContext(ctx context.Context, conn *sql.DB) *DBContext + func (ctx *DBContext) BeginTrans() error + func (ctx *DBContext) Conn() *sql.DB + type DBContextFactory func(ctx context.Context, ops ...*Op) (*DBContext, error) + type DBContexter interface + Conn func() *sql.DB + type Op struct + func BlockWrite() *Op + func OpenTxn() *Op