Documentation ¶
Index ¶
- Constants
- Variables
- func AESEncrypt(plantText, key []byte) ([]byte, error)
- func AESGCMDecrypter(key string, cipherbyte []byte) (plaintext string, err error)
- func AESGCMEncrypt(key, plaintext string) (cipherbyte []byte, err error)
- func Abort(ctx *gin.Context, code int32)
- func AbortEx(ctx *gin.Context, code int32, data any, msg string)
- func AbortWithData(ctx *gin.Context, code int32, data any)
- func AbortWithMsg(ctx *gin.Context, code int32, msg string)
- func AddHook(hook logrus.Hook)
- func AesDecrypt(crypted, key, iv []byte) ([]byte, error)
- func BuildResult(w http.ResponseWriter, r *http.Request, code int32, msg string, data any)
- func BuildResult1(w http.ResponseWriter, r *http.Request, code int32)
- func BuildResult2(w http.ResponseWriter, r *http.Request, code int32, msg string)
- func BuildResultEx(w http.ResponseWriter, r *http.Request, result string)
- func C(p []byte)
- func CheckDay()
- func CheckDayForLogBig()
- func CheckHttpHeader(w http.ResponseWriter, r *http.Request, isProduct bool, preFix, subFix string) (bool, string)
- func CheckHttpOptions(w http.ResponseWriter, r *http.Request) bool
- func CloseLogCtx()
- func CompileVer(ver1, ver2 string) int
- func ConvertVersion(version string) int64
- func CrossMidW(ctx *gin.Context)
- func D(format string, args ...any)
- func Decode(input, outputPtr any, weakly bool) error
- func DecodeDb(input, output any) error
- func DecodeEx(input, outputPtr any, weakly bool, hook mapstructure.DecodeHookFuncType) error
- func DecodeRedis(input, outputPtr any) error
- func DingWarn(dingMsg *ReqDingMsg, secret string) (bool, string)
- func DingWarnMidW(ctx *gin.Context)
- func E(format string, args ...any)
- func EarthDistance(lat1, lng1, lat2, lng2 float64) float64
- func EasyGet(ctx *gin.Context, key string, output any) bool
- func EasyGetMap(dict *sync.Map, key any, output any) bool
- func GetDingWarnMidW(secret string) gin.HandlerFunc
- func GetFullPath(filename string) (string, error)
- func GetRandSeed() int64
- func GetRandom(maxValue int) int
- func GetRandomI32(maxValue int) int32
- func GetRandomString(l int) string
- func GetRedisLockCustomMidW(f CustomKey, limit int64, ttl time.Duration) gin.HandlerFunc
- func GetRedisLockMidW(key string, limit int64, ttl time.Duration) gin.HandlerFunc
- func GetSafeUserInput(input string) string
- func GetTodayMidnight() time.Time
- func GetTodayMidnightEx(theTime *time.Time) time.Time
- func GetTomorrowMidnight() time.Time
- func HMACSHA1(text, key []byte) string
- func HMACSHA1Base64(text, key []byte) string
- func HMACSHA1Buf(text, key []byte) []byte
- func HMACSHA256(text, key []byte) string
- func HMACSHA256Buf(text, key []byte) []byte
- func HttpGet(host, api string, param map[string]any, preFix, subFix string) (string, error)
- func HttpGetEx(host, api string, param map[string]any, preFix, subFix string, needSign bool) (string, error)
- func HttpGetUrl(httpUrl string, param map[string]any, preFix, subFix string, needSign bool) (string, error)
- func HttpGetUrlEx(httpUrl string, param, customHead map[string]any, preFix, subFix string, ...) (string, error)
- func HttpGetUrlNoSign(url string, param map[string]any) (string, error)
- func HttpGetUrlValues(httpUrl string, query url.Values, customHead map[string]any, ...) (string, error)
- func HttpPost(strURL, body string, heads map[string]any) (string, error)
- func HttpPostForm(strURL string, params, heads map[string]any) (string, error)
- func HttpPostFormWithQuery(strURL string, params, heads map[string]any, query url.Values) (string, error)
- func HttpPostFormWithQuery2(strURL string, params url.Values, heads map[string]any, query url.Values) (string, error)
- func HttpPostJson(strURL string, params, heads map[string]any) (string, error)
- func HttpPostJsonString(strURL, bodyStr string, heads map[string]any) (string, error)
- func HttpPostWithQuery(strURL, body string, heads map[string]any, query url.Values) (string, error)
- func I(format string, args ...any)
- func InitGinMidW(wall HelpRedisFirewall)
- func InitLogBigFile(isProd bool, dir, prefix string, limitSize int64, limitDay time.Duration) error
- func InitLogModule(dir, fileName string, day int, isInProduct bool, debugLv logrus.Level) error
- func InitNoFile()
- func InitReport(appId, bizId, appSecret, url string)
- func LoadCfg(filename string, cfg any) error
- func LogBig(format string, args ...any)
- func MD5(text string) string
- func OnDebugHttpReq()
- func P(format string, args ...any)
- func PKCS7Padding(ciphertext []byte, blockSize int) []byte
- func PostReportData(data *GovReportData)
- func RandInt(minValue, maxValue int) int
- func RedisLockMidW(ctx *gin.Context)
- func SameTransfer(input, outputPtr any)
- func SameTypeAdd(dest, src any)
- func SendReport()
- func SetDefaultHttpTimeout(t time.Duration)
- func SortParam(param map[string]any) string
- func T(format string, args ...any)
- func UrlEncode(param string) string
- func W(format string, args ...any)
- func WrapSql(query string, args ...any) string
- func Xor(buf []byte, key string) []byte
- type At
- type AtomicSet
- type CustomKey
- type DBMgrBase
- func (d *DBMgrBase) CallExec(query string, args ...interface{}) (int64, error)
- func (d *DBMgrBase) CallExecNoStmt(rawSql string, insert bool) (int64, error)
- func (d *DBMgrBase) CallExecNoStmtWithLog(log bool, rawSql string, insert bool) (int64, error)
- func (d *DBMgrBase) CallQuery(v interface{}, query string, args ...interface{}) error
- func (d *DBMgrBase) CallQueryResultSets(v []interface{}, query string, args ...interface{}) error
- func (d *DBMgrBase) CallQueryResultSetsOnlyFirst(v []interface{}, query string, args ...interface{}) error
- func (d *DBMgrBase) CallQueryWithLog(v interface{}, query string, args ...interface{}) error
- func (d *DBMgrBase) CallQuerys(v interface{}, query string, args ...interface{}) error
- func (d *DBMgrBase) CheckDBConnect() error
- func (d *DBMgrBase) CheckDBConnectEx(withRedis bool) error
- func (d *DBMgrBase) GetCnt(query string, args ...any) int64
- func (d *DBMgrBase) GetCntEx(query string, args ...any) (int64, bool)
- func (d *DBMgrBase) GetSum(query string, args ...any) int64
- func (d *DBMgrBase) GetSumFloat64(query string, args ...any) float64
- func (d *DBMgrBase) Insert(query string, args ...interface{}) (int64, error)
- func (d *DBMgrBase) InsertEx(query string, args ...interface{}) (int64, error, bool)
- func (d *DBMgrBase) InsertExWithLastId(lastId bool, query string, args ...interface{}) (int64, error, bool)
- func (d *DBMgrBase) InsertExWithLastIdEx(log, lastId bool, query string, args ...interface{}) (int64, error, bool)
- func (d *DBMgrBase) LoadTable(query string, args ...any) ([]map[string]any, error)
- func (d *DBMgrBase) LoadTableEx(query string, args ...any) ([][]map[string]any, error)
- func (d *DBMgrBase) RedisCheckFireWall(key string, limit int64, ttl time.Duration) bool
- func (d *DBMgrBase) RedisDel(key string) bool
- func (d *DBMgrBase) RedisExists(key string) bool
- func (d *DBMgrBase) RedisExpire(key string, duration time.Duration)
- func (d *DBMgrBase) RedisExpireAt(key string, tm time.Time)
- func (d *DBMgrBase) RedisGet(key string) (string, error)
- func (d *DBMgrBase) RedisHGetAll(key string, dataPtr interface{}) error
- func (d *DBMgrBase) RedisHGetAllEx(key string, dataPtr interface{}) error
- func (d *DBMgrBase) RedisHGetAllExLoop(key string, dataPtr interface{}, tryCnt int, force bool) error
- func (d *DBMgrBase) RedisHIncrBy(key, field string, incr int64) (int64, error)
- func (d *DBMgrBase) RedisHIncrByFlagAdd(key string) (int64, error)
- func (d *DBMgrBase) RedisHIncrByFlagCheck(key string) (int64, error)
- func (d *DBMgrBase) RedisHIncrByFlagRelease(key string) (int64, error)
- func (d *DBMgrBase) RedisHIncrByGetVer(key string) (int64, error)
- func (d *DBMgrBase) RedisHMSet(key string, data interface{}, expire time.Duration) error
- func (d *DBMgrBase) RedisHMSetEx(key string, data interface{}, ver int64, ignoreVer bool, expire time.Duration) error
- func (d *DBMgrBase) RedisHMSetExLoop(key string, dataPtr interface{}, ver int64, expire time.Duration, ...) error
- func (d *DBMgrBase) RedisIncrBy(key string, incr int64) (int64, error)
- func (d *DBMgrBase) RedisIncrByFlagAdd(key string) (int64, error)
- func (d *DBMgrBase) RedisIncrByFlagCheck(key string) (int64, error)
- func (d *DBMgrBase) RedisIncrByFlagRelease(key string) (int64, error)
- func (d *DBMgrBase) RedisKeys(pattern string) ([]string, error)deprecated
- func (d *DBMgrBase) RedisPersist(key string)
- func (d *DBMgrBase) RedisSAdd(key string, members ...interface{}) error
- func (d *DBMgrBase) RedisSCard(key string) int64
- func (d *DBMgrBase) RedisSMembers(key string) ([]string, error)
- func (d *DBMgrBase) RedisSRem(key string, members ...interface{}) error
- func (d *DBMgrBase) RedisScan(pattern string, count int64) (keys []string, err error)
- func (d *DBMgrBase) RedisScanLimit(pattern string, count int64, limit int) (keys []string, err error)
- func (d *DBMgrBase) RedisScanWithCount(pattern string, cursorStart uint64, count int64) (keys []string, cursor uint64, err error)
- func (d *DBMgrBase) RedisSet(key string, value interface{}) (bool, error)
- func (d *DBMgrBase) RedisSetEx(key string, value interface{}, expiration time.Duration) (bool, error)
- func (d *DBMgrBase) RedisTTL(key string) (time.Duration, error)
- func (d *DBMgrBase) SelectObject(v any, query string, args ...any) error
- func (d *DBMgrBase) SelectObjectNoWarn(v any, query string, args ...any) error
- func (d *DBMgrBase) SelectObjectsEx(v any, query string, args ...any) error
- func (d *DBMgrBase) SelectObjectsEx2(logWarn bool, v any, query string, args ...interface{}) error
- func (d *DBMgrBase) SelectObjectsExNoWarn(v any, query string, args ...any) error
- func (d *DBMgrBase) Update(query string, args ...interface{}) bool
- func (d *DBMgrBase) Update2(logWarn bool, query string, args ...interface{}) int64
- func (d *DBMgrBase) UpdateNoWarn(query string, args ...interface{}) bool
- type DealWithConflict
- type GovReportData
- type GovReportDatas
- type H
- func (e H) ForceInt64(key string) int64
- func (e H) ForceString(key string) string
- func (e H) Get(key string, output any) bool
- func (e H) GetBool(key string) (bool, bool)
- func (e H) GetFloat64(key string) (float64, bool)
- func (e H) GetH(key string) (H, bool)
- func (e H) GetInt(key string) (int, bool)
- func (e H) GetInt32(key string) (ret int32, ok bool)
- func (e H) GetInt64(key string) (ret int64, ok bool)
- func (e H) GetInterface(key string) (any, bool)
- func (e H) GetString(key string) (string, bool)
- func (e H) GetUInt64(key string) (uint64, bool)
- func (e H) Set(key string, val any)
- type HelpRedisFirewall
- type HttpResult
- type LogWriter
- type LogWriterError
- type MsgDing
- type MyRand
- type PrintHook
- type ReqDingMsg
- type UsrCheckIn
- type UsrInRedis
Constants ¶
const ( //redis 缓存信息的版本号,从数据库第一次取出来放进去是0 VerInRedis = "ver_in_redis" //redis写入标志位 请求写入的时候 incrBy 1,如果返回1表示可以写入,大于1表示已有其他服务器正在写入,要么等待要么直接返回 WritingInRedis = "writing_in_redis" )
const ( GinKeyDingDSecret = "gin_key_dingd_secret" DingDingUrl = "https://oapi.dingtalk.com/robot/send?access_token=" )
const ( GinKeyRedisLockKey = "gin_key_redis_lock_key" //string GinKeyRedisLockCnt = "gin_key_redis_lock_cnt" //int64 GinKeyRedisLockTtl = "gin_key_redis_lock_ttl" //time.Duration )
const ( TimeFmt = "2006/01/02 15:04:05.000" //毫秒保留3位有效数字 TimeFmtDB = "2006-01-02 15:04:05" //写入数据库用的时间 TimeFmtDB2 = "2006-01-02 15:04:05.000" //写入数据库用的时间 带上毫秒 TimeFmtSeq = "20060102150405" //yyyyMMddHHmmss TimeFmtSeqHW = "20060102150405000" DateFmtDB = "2006-01-02" //写入数据库用的日期 AesKey string = "Aabc#123admin@12" )
const ( WGSuccess = iota //成功 WGFail //请求失败 WGErrorParam //参数非法 WGErrorTime //时间戳非法 WGErrorSign //签名错误 WGErrorTip //提示msg信息 WGErrorNeedLogin //需要重新登录 WGErrorParse //json格式解析出错 WGErrorNet //网络异常 WGErrorDataBase //数据库操作失败 WGErrorNoReg //尚未注册 WGIPForbidden //该IP禁止访问 WGErrorBusy //客户端提示请勿频繁操作 12 WGErrorRegistered //已注册 13 WGErrorNoImp //未实现 14 WGErrorEmpty //当前库存为0 WGNeedKefu //请求可能成功,但是需要客服进一步处理 WGSuccessWithTipDeprecated //成功处理,但是还需要异步回调通知。客户端可以先给提示。--该提示有被刷风险,尽量避免 WGLimitToday //今日次数已达上限 18 WGIdSuspend //账号封禁 19 WGErrConf //配置异常 20 WGErrStat //状态异常 21 WGErrNoChance //次数不足 22 WGErrServer //服务器异常 23 WGErrData //数据解析失败 24 WGErrBuyed //您已买过此类商品 25 WGServerBusy //服务器繁忙 26 WGErrorExtBegin = 1000 //扩展错误码起始 )
Http 返回值中的code状态码
const ( Reset = "\033[0m" Red = "\033[31m" Green = "\033[32m" Yellow = "\033[33m" Blue = "\033[34m" Magenta = "\033[35m" Cyan = "\033[36m" White = "\033[37m" BlueBold = "\033[34;1m" MagentaBold = "\033[35;1m" RedBold = "\033[31;1m" YellowBold = "\033[33;1m" Custom = logrus.Level(1000) Custom2 = logrus.Level(1001) ChangeFile = 2000 )
Colors
const TimeFmtLog = "2006/01/02 15:04:05.000" //毫秒保留3位有效数字
const TimeFmtLog2 = "15:04:05.000" //毫秒保留3位有效数字
Variables ¶
var ( ErrNoDB = errors.New("db not init") ErrNoImp = errors.New("no implementation") ErrNoRedis = errors.New("redis not init") ErrParse = errors.New("parse error") ErrNoData = errors.New("database/redis no data") ErrData = errors.New("redis data error") ErrDataOld = errors.New("data not new,need reget") //你的数据不是最新的请重新获取 ErrIsWriting = errors.New("data is writing by someone") //这个数据正在被某个服务器改写 ErrAbort = errors.New("abort") ErrTryMax = errors.New("try max limit") //重试次数已达上限 ErrOccur = errors.New("err occur") //发生了一次错误 ErrInner = errors.New("inner error") ErrThird = errors.New("third platform error") ErrParam = errors.New("param error") )
var ( SmAppId = "" SmBizId = "" SmAppSecret = "" SmlUrl = "" )
var SqlRegExp *regexp.Regexp
Functions ¶
func AESEncrypt ¶
func AESGCMDecrypter ¶
AES CBC 解码 key:解密key ciphertext:加密返回的串 plaintext:解密后的字符串
func AESGCMEncrypt ¶
func AesDecrypt ¶
func BuildResult ¶
构造http返回结果
func BuildResult1 ¶
func BuildResult1(w http.ResponseWriter, r *http.Request, code int32)
func BuildResult2 ¶
func BuildResultEx ¶
func BuildResultEx(w http.ResponseWriter, r *http.Request, result string)
func CheckDayForLogBig ¶
func CheckDayForLogBig()
func CheckHttpHeader ¶
func CheckHttpOptions ¶
func CheckHttpOptions(w http.ResponseWriter, r *http.Request) bool
func CompileVer ¶
func ConvertVersion ¶
func Decode ¶
* map[string]any ->数据结构 数据结构 -> map[string]any
@param input []map[string]any 或者 map[string]any 或者 结构 @param output 结构指针 或者 map指针 @param weakly 是否支持弱转换 比如 string=>int int=>string
@return nil无错误
func DecodeEx ¶
func DecodeEx(input, outputPtr any, weakly bool, hook mapstructure.DecodeHookFuncType) error
* @outputPtr 需要指针类型
func DecodeRedis ¶
* map[string]any ->结构指针 相比于Decode;DecodeRedis会自动转换需要的数据类型;
比如string转换成int。当然前提是该数据类型支持转换
func DingWarnMidW ¶
func EarthDistance ¶
func GetDingWarnMidW ¶
func GetDingWarnMidW(secret string) gin.HandlerFunc
func GetFullPath ¶
func GetRandSeed ¶
func GetRandSeed() int64
func GetRandomI32 ¶
func GetRandomString ¶
func GetRedisLockCustomMidW ¶
互斥请求。防止多线程请求
func GetRedisLockMidW ¶
互斥请求。防止多线程请求
func GetTodayMidnightEx ¶
获取到指定时间的0点的time.Time
func HMACSHA1Base64 ¶
func HMACSHA1Buf ¶
func HMACSHA256 ¶
func HMACSHA256Buf ¶
func HttpGetUrl ¶
func HttpGetUrlEx ¶
func HttpGetUrlValues ¶
func HttpPostFormWithQuery ¶
func HttpPostFormWithQuery2 ¶
func HttpPostJsonString ¶
func HttpPostWithQuery ¶
直接调用这个HttpPost 需要指定heads["Content-Type"]
func InitGinMidW ¶
func InitGinMidW(wall HelpRedisFirewall)
func InitLogBigFile ¶
func InitLogModule ¶
func InitNoFile ¶
func InitNoFile()
func InitReport ¶ added in v0.0.4
func InitReport(appId, bizId, appSecret, url string)
func PKCS7Padding ¶
func PostReportData ¶ added in v0.0.4
func PostReportData(data *GovReportData)
func RedisLockMidW ¶
互斥请求。防止多线程请求。请求完毕后会解锁。 @注意:如果是防止暴力破解的话,需要在那个具体的业务上加锁。
func SendReport ¶ added in v0.0.4
func SendReport()
func SetDefaultHttpTimeout ¶ added in v0.0.32
设置http请求超时时间,默认10s
Types ¶
type DBMgrBase ¶
type DBMgrBase struct { DbInst *sql.DB RedisInst *redis.Client // contains filtered or unexported fields }
func (*DBMgrBase) CallExecNoStmt ¶
执行存储过程或者多个sql语句 @insert 是否需要返回最后的插入自增ID
func (*DBMgrBase) CallExecNoStmtWithLog ¶
@insert 是否需要返回最后的插入自增ID
func (*DBMgrBase) CallQueryResultSets ¶
* 存储过程,返回多个数据表的信息,每个表信息需要单独存放。
多张表返回,每张表含有多行数据 @v 存储数据结构指针,每个位置对应了存储过程返回的指定位置的表结构信息 是一个二维数组结构指针 类似 *[*[]Struct1,*[]Struct2,*[]Struct3...]
如果只需要取第一张表的数据,可以直接调用CallQuery或CallQuerys
func (*DBMgrBase) CallQueryResultSetsOnlyFirst ¶
func (d *DBMgrBase) CallQueryResultSetsOnlyFirst(v []interface{}, query string, args ...interface{}) error
多张表返回,每张表只取一行数据 @v 是一个数组结构指针 类似 *[*Struct1,*Struct2,*Struct3...]
func (*DBMgrBase) CallQueryWithLog ¶
打印一下日志,适用于重要的过程调用。
func (*DBMgrBase) CallQuerys ¶
* @param v 必须是指针类型 //*[]Struct1{}
func (*DBMgrBase) CheckDBConnect ¶
func (*DBMgrBase) CheckDBConnectEx ¶
func (*DBMgrBase) GetSumFloat64 ¶
func (*DBMgrBase) InsertExWithLastId ¶
func (*DBMgrBase) InsertExWithLastIdEx ¶
func (*DBMgrBase) LoadTableEx ¶
读取多个数据库表到 [][]map[string]any 中
func (*DBMgrBase) RedisCheckFireWall ¶
* 防刷,防止暴力破解
func (*DBMgrBase) RedisExists ¶
func (*DBMgrBase) RedisExpire ¶
* 设置过期时间
func (*DBMgrBase) RedisHGetAll ¶
* 正常读取redis的数据,不管是否有其他服务器正在写入
func (*DBMgrBase) RedisHGetAllEx ¶
* 正常读取redis的数据,如果有其他服务器正在写入,那么直接返回错误
func (*DBMgrBase) RedisHGetAllExLoop ¶
func (d *DBMgrBase) RedisHGetAllExLoop(key string, dataPtr interface{}, tryCnt int, force bool) error
* 正常读取redis的数据,如果有其他服务器正在写入,那么等待写完毕,获取最新的数据 @tryCnt 重试次数,如果为-1表示永远等待
func (*DBMgrBase) RedisHIncrBy ¶
* 不存在的key或者field,redis中默认存0
func (*DBMgrBase) RedisHIncrByFlagAdd ¶
* 多个服务器分布式,读取redis中的标志位
func (*DBMgrBase) RedisHIncrByFlagCheck ¶
func (*DBMgrBase) RedisHIncrByFlagRelease ¶
func (*DBMgrBase) RedisHIncrByGetVer ¶
func (*DBMgrBase) RedisHMSet ¶
* 正常写入redis的数据,不管是否有其他服务器正在写入
@注意 谨慎使用该函数,该函数会导致之前的缓存数据被改写!!! @expire 单位秒,传入负数表示永不过期或者不想改变原本的有效时间
func (*DBMgrBase) RedisHMSetEx ¶
func (d *DBMgrBase) RedisHMSetEx(key string, data interface{}, ver int64, ignoreVer bool, expire time.Duration) error
* 正常写入redis的数据,如果其他服务器正在写入,那么直接返回错误,如果缓存的信息比本地版本高也返回错误
func (*DBMgrBase) RedisHMSetExLoop ¶
func (d *DBMgrBase) RedisHMSetExLoop(key string, dataPtr interface{}, ver int64, expire time.Duration, hook DealWithConflict, tryCnt int) error
* 正常写入redis的数据,如果其他服务器正在写入或者缓存中的信息版本比较高,那么我们等待写完毕把他取出来
@dataPtr 需要数据结构指针 @tryCnt 重试次数 -1表示永远尝试直到成功为止
func (*DBMgrBase) RedisIncrBy ¶
func (*DBMgrBase) RedisIncrByFlagAdd ¶
* 多个服务器分布式,读取redis中的标志位
func (*DBMgrBase) RedisIncrByFlagCheck ¶
func (*DBMgrBase) RedisIncrByFlagRelease ¶
func (*DBMgrBase) RedisPersist ¶
func (*DBMgrBase) RedisSCard ¶
func (*DBMgrBase) RedisScanLimit ¶ added in v0.0.5
func (*DBMgrBase) RedisScanWithCount ¶
func (*DBMgrBase) RedisSetEx ¶
func (d *DBMgrBase) RedisSetEx(key string, value interface{}, expiration time.Duration) (bool, error)
* @expiration 0 永久有效 ,-1也是永久有效 但是需要redis>6.0
func (*DBMgrBase) SelectObject ¶
the v must be a pointer to a map or struct.
func (*DBMgrBase) SelectObjectNoWarn ¶
func (*DBMgrBase) SelectObjectsEx ¶
* 跟SelectObject比,这个SelectObjectsEx是返回一个数组的。
@param v 必须是存放map或是struct的数组的指针.
func (*DBMgrBase) SelectObjectsEx2 ¶
func (*DBMgrBase) SelectObjectsExNoWarn ¶
func (*DBMgrBase) UpdateNoWarn ¶
type DealWithConflict ¶
type DealWithConflict func(oldPtr, newPtr interface{}) (interface{}, int64)
type GovReportData ¶ added in v0.0.4
type GovReportDatas ¶ added in v0.0.4
type GovReportDatas struct {
Collections []*GovReportData `json:"collections"`
}
type HelpRedisFirewall ¶
type HttpResult ¶
type LogWriterError ¶ added in v0.0.10
type LogWriterError struct { }
type ReqDingMsg ¶
type UsrCheckIn ¶
type UsrCheckIn struct {
Day int8 `json:"day"` //签到第几天。
}
type UsrInRedis ¶
type UsrInRedis struct { ProtoData string `json:"proto_data"` //base64加密过的数据 ProtoDataOrgin []byte `json:"proto_data_orgin"` //proto 原始数据 VerInRedis int64 `json:"ver_in_redis"` //redis中的版本,0表示刚从数据库写入,每次改写redis中的数据的时候都必须判断版本是否大于这个值 FlagSyncDB int32 `json:"flag_sync_db"` //是否已经将数据同步到数据库 0标识已经同步过,1标识尚未同步 }