dao

package
v0.0.0-...-0917db3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 12, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddBizCallBackRecord

func AddBizCallBackRecord(callbackMessage *model.WxCallbackBizRecord) error

AddBizCallBackRecord 增加小程序事件记录

func AddCommKv

func AddCommKv(key string, value string) error

AddCommKv 添加一个记录 key重复会报错

func AddComponentCallBackRecord

func AddComponentCallBackRecord(callbackMessage *model.WxCallbackComponentRecord) error

AddComponentCallBackRecord 增加第三方事件记录

func AddOne

func AddOne(key string, limit uint) error

AddOne +1 结果不可超过limit

func AddUserRecordIfNeeded

func AddUserRecordIfNeeded(username string, password string) error

AddUserRecordIfNeeded 增加用户,若username重复,则不做任何事

func AddWxCallBackRule

func AddWxCallBackRule(record *model.WxCallbackRule) error

AddWxCallBackRule 添加转发规则

func BatchCreateOrUpdateAuthorizerRecord

func BatchCreateOrUpdateAuthorizerRecord(record *[]model.Authorizer) error

BatchCreateOrUpdateAuthorizerRecord 批量创建或更新授权账号信息

func ClearAuthorizerRecordsBefore

func ClearAuthorizerRecordsBefore(time time.Time) error

ClearAuthorizerRecordsBefore 删除指定时间前的所有授权账号记录

func CreateOrUpdateAuthorizerRecord

func CreateOrUpdateAuthorizerRecord(record *model.Authorizer) error

CreateOrUpdateAuthorizerRecord 创建或更新授权账号信息

func DelAuthorizerRecord

func DelAuthorizerRecord(appid string) error

DelAuthorizerRecord 删除授权账号记录

func DelCommKv

func DelCommKv(key string) error

DelCommKv 删除记录

func DelExpiredCommKv

func DelExpiredCommKv(key string, d time.Duration) (int64, error)

DelExpiredCommKv 删除超时的记录

func DelWxCallBackRule

func DelWxCallBackRule(id int32) error

DelWxCallBackRule 删除转发规则

func GetAccessToken

func GetAccessToken(appid string, tokenType int) (*model.WxToken, bool, error)

GetAccessToken 获取AccessToken

func GetAuthorizerRecords

func GetAuthorizerRecords(appid string, offset int, limit int) ([]*model.Authorizer, int64, error)

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 GetCommKv

func GetCommKv(key string, defaultValue string) string

GetCommKv 读

func GetCommKvDecrypt

func GetCommKvDecrypt(key string, defaultValue string) string

GetCommKvDecrypt 解密读

func GetCommKvWithCache

func GetCommKvWithCache(key string, defaultValue string, d time.Duration) string

GetCommKvWithCache 先读缓存再读数据库,读取数据之后写到缓存

func GetComponentCallBackRecordList

func GetComponentCallBackRecordList(startTime time.Time, endTime time.Time,
	infoType string, offset int, limit int) ([]*model.WxCallbackComponentRecord, int64, error)

GetComponentCallBackRecordList 获取第三方事件记录

func GetCurrent

func GetCurrent(key string) (uint, error)

GetCurrent 获取当前数值

func GetDevWeAppRecords

func GetDevWeAppRecords(offset int, limit int, appid string) ([]*model.Authorizer, int64, error)

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 Init

func Init() error

Init 初始化

func Lock

func Lock(key string, value string, expire time.Duration) error

Lock 申请锁

func SetAccessToken

func SetAccessToken(record *model.WxToken) error

SetAccessToken 创建或更新wxtoken

func SetCommKv

func SetCommKv(key string, value string) error

SetCommKv 覆盖写

func SetCommKvEncrypt

func SetCommKvEncrypt(key string, value string) error

SetCommKvEncrypt 加密写

func SetCommKvWithCache

func SetCommKvWithCache(key string, value string, d time.Duration) error

SetCommKvWithCache 写kv并更新缓存

func UnLock

func UnLock(key string) error

Lock 释放锁

func UpdateUserRecord

func UpdateUserRecord(id int32, username string, password string, oldPassword string) error

UpdateUserRecord 更新用户

func UpdateWxCallBackRule

func UpdateWxCallBackRule(record *model.WxCallbackRule) error

UpdateWxCallBackRule 更新转发规则

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL