Documentation ¶
Index ¶
- Variables
- 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
- type DBContextFactory
- type DBContexter
- type Op
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func AccepLanguages ¶
func DuplicateEntryError ¶
func Int64BoolMap2Slice ¶
func Int64Map2Slice ¶
func LoadConfAuto ¶
LoadConfAuto load config from file. auto calculate file type by suffix
func ReqFactory ¶
func SortMapInt642String ¶
func StringBoolMap2Slice ¶
func StringMap2Slice ¶
func StringSlice2Map ¶
func StringSliceHasElement ¶
func StringSliceSub ¶
func StringSliceSubtract ¶
StringSliceSubtract a - b
func WantBlockWrite ¶
func WantOpenTxn ¶
Types ¶
type DBContext ¶
func (*DBContext) BeginTrans ¶
type DBContextFactory ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.