Documentation ¶
Index ¶
- func AddBizCallBackRecord(callbackMessage *model.WxCallbackBizRecord) error
- func AddCommKv(key string, value string) error
- func AddComponentCallBackRecord(callbackMessage *model.WxCallbackComponentRecord) error
- func AddOne(key string, limit uint) error
- func AddUserRecordIfNeeded(username string, password string) error
- func AddWxCallBackRule(record *model.WxCallbackRule) error
- func BatchCreateOrUpdateAuthorizerRecord(record *[]model.Authorizer) error
- func ClearAuthorizerRecordsBefore(time time.Time) error
- func CreateOrUpdateAuthorizerRecord(record *model.Authorizer) error
- func DelAuthorizerRecord(appid string) error
- func DelCommKv(key string) error
- func DelExpiredCommKv(key string, d time.Duration) (int64, error)
- func DelWxCallBackRule(id int32) error
- func GetAccessToken(appid string, tokenType int) (*model.WxToken, bool, error)
- func GetAuthorizerRecords(appid string, offset int, limit int) ([]*model.Authorizer, int64, error)
- func GetBizCallBackRecordList(startTime time.Time, endTime time.Time, appid string, msgType string, ...) ([]*model.WxCallbackBizRecord, int64, error)
- func GetCommKv(key string, defaultValue string) string
- func GetCommKvDecrypt(key string, defaultValue string) string
- func GetCommKvWithCache(key string, defaultValue string, d time.Duration) string
- func GetComponentCallBackRecordList(startTime time.Time, endTime time.Time, infoType string, offset int, limit int) ([]*model.WxCallbackComponentRecord, int64, error)
- func GetCurrent(key string) (uint, error)
- func GetDevWeAppRecords(offset int, limit int, appid string) ([]*model.Authorizer, int64, error)
- func GetUserRecord(username string, password string) ([]*model.UserRecord, error)
- func GetWxCallBackRuleById(id int32) (*model.WxCallbackRule, error)
- func GetWxCallBackRuleList(offset int, limit int, callbackType int) ([]*model.WxCallbackRule, int64, error)
- func GetWxCallBackRuleWithCache(infoType string, msgType string, event string) (*model.WxCallbackRule, error)
- func Init() error
- func Lock(key string, value string, expire time.Duration) error
- func SetAccessToken(record *model.WxToken) error
- func SetCommKv(key string, value string) error
- func SetCommKvEncrypt(key string, value string) error
- func SetCommKvWithCache(key string, value string, d time.Duration) error
- func UnLock(key string) error
- func UpdateUserRecord(id int32, username string, password string, oldPassword string) error
- func UpdateWxCallBackRule(record *model.WxCallbackRule) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddBizCallBackRecord ¶
func AddBizCallBackRecord(callbackMessage *model.WxCallbackBizRecord) error
AddBizCallBackRecord 增加小程序事件记录
func AddComponentCallBackRecord ¶
func AddComponentCallBackRecord(callbackMessage *model.WxCallbackComponentRecord) error
AddComponentCallBackRecord 增加第三方事件记录
func AddUserRecordIfNeeded ¶
AddUserRecordIfNeeded 增加用户,若username重复,则不做任何事
func AddWxCallBackRule ¶
func AddWxCallBackRule(record *model.WxCallbackRule) error
AddWxCallBackRule 添加转发规则
func BatchCreateOrUpdateAuthorizerRecord ¶
func BatchCreateOrUpdateAuthorizerRecord(record *[]model.Authorizer) error
BatchCreateOrUpdateAuthorizerRecord 批量创建或更新授权账号信息
func ClearAuthorizerRecordsBefore ¶
ClearAuthorizerRecordsBefore 删除指定时间前的所有授权账号记录
func CreateOrUpdateAuthorizerRecord ¶
func CreateOrUpdateAuthorizerRecord(record *model.Authorizer) error
CreateOrUpdateAuthorizerRecord 创建或更新授权账号信息
func DelAuthorizerRecord ¶
DelAuthorizerRecord 删除授权账号记录
func DelExpiredCommKv ¶
DelExpiredCommKv 删除超时的记录
func GetAccessToken ¶
GetAccessToken 获取AccessToken
func GetAuthorizerRecords ¶
GetAuthorizerRecords 获取授权账号记录
func GetBizCallBackRecordList ¶
func GetBizCallBackRecordList(startTime time.Time, endTime time.Time, appid string, msgType string, event string, offset int, limit int) ([]*model.WxCallbackBizRecord, int64, error)
GetBizCallBackRecordList 获取小程序事件记录
func GetCommKvDecrypt ¶
GetCommKvDecrypt 解密读
func GetCommKvWithCache ¶
GetCommKvWithCache 先读缓存再读数据库,读取数据之后写到缓存
func GetComponentCallBackRecordList ¶
func GetComponentCallBackRecordList(startTime time.Time, endTime time.Time, infoType string, offset int, limit int) ([]*model.WxCallbackComponentRecord, int64, error)
GetComponentCallBackRecordList 获取第三方事件记录
func GetDevWeAppRecords ¶
GetDevWeAppRecords 获取代开发小程序
func GetUserRecord ¶
func GetUserRecord(username string, password string) ([]*model.UserRecord, error)
GetUserRecord 获取用户记录
func GetWxCallBackRuleById ¶
func GetWxCallBackRuleById(id int32) (*model.WxCallbackRule, error)
GetWxCallBackRuleById 通过id获取转发规则
func GetWxCallBackRuleList ¶
func GetWxCallBackRuleList(offset int, limit int, callbackType int) ([]*model.WxCallbackRule, int64, error)
GetWxCallBackRules 获取所有转发规则
func GetWxCallBackRuleWithCache ¶
func GetWxCallBackRuleWithCache(infoType string, msgType string, event string) (*model.WxCallbackRule, error)
GetWxCallBackRuleWithCache 通过消息类型获取转发规则 有缓存
func SetCommKvWithCache ¶
SetCommKvWithCache 写kv并更新缓存
func UpdateUserRecord ¶
UpdateUserRecord 更新用户
func UpdateWxCallBackRule ¶
func UpdateWxCallBackRule(record *model.WxCallbackRule) error
UpdateWxCallBackRule 更新转发规则
Types ¶
This section is empty.