forked from golang/hotime
框架优化
This commit is contained in:
parent
cb04dc6c34
commit
ce515d991a
@ -359,7 +359,7 @@ func (that *Application) handler(w http.ResponseWriter, req *http.Request) {
|
|||||||
//访问拦截true继续false暂停
|
//访问拦截true继续false暂停
|
||||||
connectListenerLen := len(that.connectListener)
|
connectListenerLen := len(that.connectListener)
|
||||||
|
|
||||||
for i := connectListenerLen - 1; i > 0; i-- {
|
for i := connectListenerLen - 1; i >= 0; i-- {
|
||||||
|
|
||||||
if that.connectListener[i](&context) {
|
if that.connectListener[i](&context) {
|
||||||
|
|
||||||
@ -566,7 +566,9 @@ func Init(config string) Application {
|
|||||||
appIns.Router[codeMake.GetString("name")][k1] = appIns.Router[codeMake.GetString("name")]["hotimeCommon"]
|
appIns.Router[codeMake.GetString("name")][k1] = appIns.Router[codeMake.GetString("name")]["hotimeCommon"]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
go func() {
|
||||||
setMakeCodeLintener(codeMake.GetString("name"), &appIns)
|
setMakeCodeLintener(codeMake.GetString("name"), &appIns)
|
||||||
|
}()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -634,24 +636,8 @@ func SetSqliteDB(appIns *Application, config Map) {
|
|||||||
|
|
||||||
func setMakeCodeLintener(name string, appIns *Application) {
|
func setMakeCodeLintener(name string, appIns *Application) {
|
||||||
appIns.SetConnectListener(func(context *Context) (isFinished bool) {
|
appIns.SetConnectListener(func(context *Context) (isFinished bool) {
|
||||||
if len(context.RouterString) < 2 || appIns.MakeCodeRouter[context.RouterString[0]] == nil {
|
|
||||||
return isFinished
|
|
||||||
}
|
|
||||||
codeIns := appIns.MakeCodeRouter[name]
|
codeIns := appIns.MakeCodeRouter[name]
|
||||||
if len(context.RouterString) > 1 && context.RouterString[0] == name {
|
|
||||||
if context.RouterString[1] == "hotime" && context.RouterString[2] == "login" {
|
|
||||||
return isFinished
|
|
||||||
}
|
|
||||||
if context.RouterString[1] == "hotime" && context.RouterString[2] == "logout" {
|
|
||||||
return isFinished
|
|
||||||
}
|
|
||||||
|
|
||||||
if context.Session(codeIns.FileConfig.GetString("table")+"_id").Data == nil {
|
|
||||||
context.Display(2, "你还没有登录")
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//文件上传接口
|
//文件上传接口
|
||||||
if len(context.RouterString) == 1 && context.RouterString[0] == "file" && context.Req.Method == "POST" {
|
if len(context.RouterString) == 1 && context.RouterString[0] == "file" && context.Req.Method == "POST" {
|
||||||
if context.Session(codeIns.FileConfig.GetString("table")+"_id").Data == nil {
|
if context.Session(codeIns.FileConfig.GetString("table")+"_id").Data == nil {
|
||||||
@ -695,6 +681,24 @@ func setMakeCodeLintener(name string, appIns *Application) {
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if len(context.RouterString) < 2 || appIns.MakeCodeRouter[context.RouterString[0]] == nil {
|
||||||
|
return isFinished
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(context.RouterString) > 1 && context.RouterString[0] == name {
|
||||||
|
if context.RouterString[1] == "hotime" && context.RouterString[2] == "login" {
|
||||||
|
return isFinished
|
||||||
|
}
|
||||||
|
if context.RouterString[1] == "hotime" && context.RouterString[2] == "logout" {
|
||||||
|
return isFinished
|
||||||
|
}
|
||||||
|
|
||||||
|
if context.Session(codeIns.FileConfig.GetString("table")+"_id").Data == nil {
|
||||||
|
context.Display(2, "你还没有登录")
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if len(context.RouterString) < 2 || len(context.RouterString) > 3 ||
|
if len(context.RouterString) < 2 || len(context.RouterString) > 3 ||
|
||||||
!(context.Router[context.RouterString[0]] != nil &&
|
!(context.Router[context.RouterString[0]] != nil &&
|
||||||
context.Router[context.RouterString[0]][context.RouterString[1]] != nil) {
|
context.Router[context.RouterString[0]][context.RouterString[1]] != nil) {
|
||||||
|
100
example/app/init.go
Normal file
100
example/app/init.go
Normal file
@ -0,0 +1,100 @@
|
|||||||
|
package app
|
||||||
|
|
||||||
|
import (
|
||||||
|
. "code.hoteas.com/golang/hotime"
|
||||||
|
. "code.hoteas.com/golang/hotime/common"
|
||||||
|
"fmt"
|
||||||
|
"github.com/silenceper/wechat/v2"
|
||||||
|
"github.com/silenceper/wechat/v2/officialaccount"
|
||||||
|
|
||||||
|
//"github.com/silenceper/wechat/v2/cache"
|
||||||
|
"gopkg.in/chanxuehong/wechat.v2/mch/core"
|
||||||
|
"gopkg.in/chanxuehong/wechat.v2/mch/pay"
|
||||||
|
"time"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Project 管理端项目
|
||||||
|
var Project = Proj{
|
||||||
|
"wechat": Wechat,
|
||||||
|
}
|
||||||
|
var weixin *wechat.Wechat //微信登录实例
|
||||||
|
var officialAccount *officialaccount.OfficialAccount
|
||||||
|
|
||||||
|
//var appIns = Application{}
|
||||||
|
var wxpayClient *core.Client
|
||||||
|
|
||||||
|
//生成随机码的4位随机数
|
||||||
|
func getCode() string {
|
||||||
|
//res := ""
|
||||||
|
//for i := 0; i < 4; i++ {
|
||||||
|
res := ObjToStr(RandX(1000, 9999))
|
||||||
|
//}
|
||||||
|
return res
|
||||||
|
}
|
||||||
|
|
||||||
|
//微信获取个人信息
|
||||||
|
//func Weixin(that *Context) *wechat.Wechat {
|
||||||
|
// if weixin == nil {
|
||||||
|
// cache1 := cache.Cache(WechatCache{that.CacheIns})
|
||||||
|
// config := wechat.Config{Cache: cache1, AppID: that.Config.GetString("wechatAppID"), AppSecret: that.Config.GetString("wechatAppSecret")}
|
||||||
|
// weixin = wechat.NewWechat(&config)
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// return weixin
|
||||||
|
//}
|
||||||
|
|
||||||
|
//微信获取个人信息
|
||||||
|
func WxPayClient(that *Context, sn string, money int64, openid string) Map {
|
||||||
|
if wxpayClient == nil {
|
||||||
|
wxpayClient = core.NewClient(that.Config.GetString("wechatAppID"), that.Config.GetString("wechatChid"), that.Config.GetString("wechatChkey"), nil)
|
||||||
|
}
|
||||||
|
|
||||||
|
res, err := pay.UnifiedOrder2(wxpayClient, &pay.UnifiedOrderRequest{
|
||||||
|
|
||||||
|
// 必选参数
|
||||||
|
Body: "微信充值", // 商品或支付单简要描述
|
||||||
|
OutTradeNo: sn, // 商户系统内部的订单号,32个字符内、可包含字母, 其他说明见商户订单号
|
||||||
|
TotalFee: money, // ObjToInt64(umoney*100), // `xml:"total_fee"` // 订单总金额,单位为分,详见支付金额
|
||||||
|
//SpbillCreateIP string `xml:"spbill_create_ip"` // APP和网页支付提交用户端ip,Native支付填调用微信支付API的机器IP。
|
||||||
|
NotifyURL: that.Config.GetString("wechatPayCallBack"), // string `xml:"notify_url"` // 接收微信支付异步通知回调地址,通知url必须为直接可访问的url,不能携带参数。
|
||||||
|
TradeType: "JSAPI", // string `xml:"trade_type"` // 取值如下:JSAPI,NATIVE,APP,详细说明见参数规定
|
||||||
|
|
||||||
|
// 可选参数
|
||||||
|
DeviceInfo: "WEB", // string `xml:"device_info"` // 终端设备号(门店号或收银设备ID),注意:PC网页或公众号内支付请传"WEB"
|
||||||
|
// NonceStr string `xml:"nonce_str"` // 随机字符串,不长于32位。NOTE: 如果为空则系统会自动生成一个随机字符串。
|
||||||
|
//SignType string `xml:"sign_type"` // 签名类型,默认为MD5,支持HMAC-SHA256和MD5。
|
||||||
|
// Detail:"充值",// string `xml:"detail"` // 商品名称明细列表
|
||||||
|
//Attach string `xml:"attach"` // 附加数据,在查询API和支付通知中原样返回,该字段主要用于商户携带订单的自定义数据
|
||||||
|
//FeeType string `xml:"fee_type"` // 符合ISO 4217标准的三位字母代码,默认人民币:CNY,其他值列表详见货币类型
|
||||||
|
//TimeStart time.Time `xml:"time_start"` // 订单生成时间,格式为yyyyMMddHHmmss,如2009年12月25日9点10分10秒表示为20091225091010。其他详见时间规则
|
||||||
|
//TimeExpire time.Time `xml:"time_expire"` // 订单失效时间,格式为yyyyMMddHHmmss,如2009年12月27日9点10分10秒表示为20091227091010。其他详见时间规则
|
||||||
|
//GoodsTag string `xml:"goods_tag"` // 商品标记,代金券或立减优惠功能的参数,说明详见代金券或立减优惠
|
||||||
|
// ProductId :"CHONGZHI",// string `xml:"product_id"` // trade_type=NATIVE,此参数必传。此id为二维码中包含的商品ID,商户自行定义。
|
||||||
|
// LimitPay string `xml:"limit_pay"` // no_credit--指定不能使用信用卡支付
|
||||||
|
OpenId: openid, //user.GetString("wuid"), // string `xml:"openid"` // rade_type=JSAPI,此参数必传,用户在商户appid下的唯一标识。
|
||||||
|
// SubOpenId string `xml:"sub_openid"` // trade_type=JSAPI,此参数必传,用户在子商户appid下的唯一标识。openid和sub_openid可以选传其中之一,如果选择传sub_openid,则必须传sub_appid。
|
||||||
|
// SceneInfo string `xml:"scene_info"` // 该字段用于上报支付的场景信息,针对H5支付有以下三种场景,请根据对应场景上报,H5支付不建议在APP端
|
||||||
|
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
|
||||||
|
fmt.Println(err)
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
wcpay := Map{
|
||||||
|
"appId": that.Config.Get("wechatAppID"),
|
||||||
|
"timeStamp": ObjToStr(time.Now().Unix()),
|
||||||
|
"nonceStr": getSn(),
|
||||||
|
"package": "prepay_id=" + res.PrepayId,
|
||||||
|
"signType": "MD5",
|
||||||
|
}
|
||||||
|
wcpay["paySign"] = core.JsapiSign(that.Config.GetString("wechatAppID"), wcpay.GetString("timeStamp"), wcpay.GetString("nonceStr"), wcpay.GetString("package"), "MD5", that.Config.GetString("wechatChkey"))
|
||||||
|
|
||||||
|
return wcpay
|
||||||
|
}
|
||||||
|
|
||||||
|
//生成随机码的6位md5
|
||||||
|
func getSn() string {
|
||||||
|
x := Rand(8)
|
||||||
|
return Substr(Md5(ObjToStr(int64(x)+time.Now().UnixNano()+int64(Rand(6)))), 0, 6)
|
||||||
|
}
|
191
example/app/wechat.go
Normal file
191
example/app/wechat.go
Normal file
@ -0,0 +1,191 @@
|
|||||||
|
package app
|
||||||
|
|
||||||
|
import (
|
||||||
|
. "code.hoteas.com/golang/hotime"
|
||||||
|
. "code.hoteas.com/golang/hotime/cache"
|
||||||
|
. "code.hoteas.com/golang/hotime/common"
|
||||||
|
"github.com/silenceper/wechat/v2/cache"
|
||||||
|
|
||||||
|
//"fmt"
|
||||||
|
"github.com/silenceper/wechat/v2"
|
||||||
|
//"github.com/silenceper/wechat/v2/cache"
|
||||||
|
"github.com/silenceper/wechat/v2/officialaccount/config"
|
||||||
|
"time"
|
||||||
|
)
|
||||||
|
|
||||||
|
type WechatCache struct {
|
||||||
|
CacheIns
|
||||||
|
}
|
||||||
|
|
||||||
|
func (that WechatCache) Get(key string) interface{} {
|
||||||
|
return that.Cache("x" + key).Data
|
||||||
|
//return nil
|
||||||
|
}
|
||||||
|
func (that WechatCache) Set(key string, val interface{}, timeout time.Duration) error {
|
||||||
|
|
||||||
|
that.Cache("x"+key, val, ObjToInt64(timeout.Seconds()))
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (that WechatCache) IsExist(key string) bool {
|
||||||
|
c := that.Cache("x" + key).Data
|
||||||
|
if c != nil {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
|
||||||
|
}
|
||||||
|
func (that WechatCache) Delete(key string) error {
|
||||||
|
that.Cache("x"+key, nil)
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
var Wechat = Ctr{
|
||||||
|
"user": func(that *Context) {
|
||||||
|
if that.Session("wechatInfo").Data == nil {
|
||||||
|
that.Display(2, "没有登录")
|
||||||
|
}
|
||||||
|
|
||||||
|
that.Display(0, that.Session("wechatInfo").ToMap())
|
||||||
|
},
|
||||||
|
////微信注册,0已经完整的注册了,1还没有注册
|
||||||
|
//"codebase": func(that *Context) {
|
||||||
|
// wx := Weixin(that)
|
||||||
|
// auth := wx.GetOauth()
|
||||||
|
// resToken, err := auth.GetUserAccessToken(that.Req.FormValue("code"))
|
||||||
|
// if err != nil {
|
||||||
|
// that.Display(6, "code错误")
|
||||||
|
// return
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// //判断用户是否已经注册
|
||||||
|
// user := that.Db.Get("wechat", Map{"[><]user": "wechat.user_id=user.id"}, "user.id,user.state", Map{"openid": resToken.OpenID})
|
||||||
|
// if user != nil {
|
||||||
|
// that.Session("user_id", user.Get("id"))
|
||||||
|
// that.Display(0, 0)
|
||||||
|
// return
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// user_id := that.Db.Insert("user", Map{"time": time.Now().Unix(), "state": 2})
|
||||||
|
// if user_id == 0 {
|
||||||
|
// that.Display(4, "创建用户失败")
|
||||||
|
// return
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// wid := that.Db.Insert("wechat", Map{"openid": resToken.OpenID, "appid": that.Config.GetString("wechatAppID"), "state": 1, "user_id": user_id})
|
||||||
|
// if wid == 0 {
|
||||||
|
// that.Display(4, "关联微信失败!")
|
||||||
|
// return
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// that.Session("user_id", user.Get("id"))
|
||||||
|
//
|
||||||
|
// that.Display(0, 1)
|
||||||
|
//},
|
||||||
|
////微信注册,0已经完整的注册了,1还没有注册
|
||||||
|
//"code": func(that *Context) {
|
||||||
|
//
|
||||||
|
// orgId := ObjToInt(that.Req.FormValue("org_id"))
|
||||||
|
// //if orgId==0{
|
||||||
|
// // that.Display(3, "缺少组织id")
|
||||||
|
// // return
|
||||||
|
// //}
|
||||||
|
//
|
||||||
|
// wx := Weixin(that)
|
||||||
|
// auth := wx.GetOauth()
|
||||||
|
// resToken, err := auth.GetUserAccessToken(that.Req.FormValue("code"))
|
||||||
|
// if err != nil {
|
||||||
|
// that.Display(5, "code错误")
|
||||||
|
// return
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// //判断用户是否已经注册
|
||||||
|
// user := that.Db.Get("wechat", Map{"[><]user": "wechat.user_id=user.id"}, "user.id,user.state", Map{"openid": resToken.OpenID})
|
||||||
|
// if user != nil && user.GetCeilInt("id") != 0 && user.GetCeilInt("state") == 0 {
|
||||||
|
// that.Session("user_id", user.Get("id"))
|
||||||
|
// that.Display(0, Map{"type": 0, "token": that.SessionId})
|
||||||
|
// return
|
||||||
|
// }
|
||||||
|
// //getUserInfo
|
||||||
|
// userInfo, err := auth.GetUserInfo(resToken.AccessToken, resToken.OpenID)
|
||||||
|
// if err != nil {
|
||||||
|
// that.Display(6, "微信个人信息无法获取")
|
||||||
|
// return
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// //wechatInfo := ObjToMap(userInfo)
|
||||||
|
// t := time.Now().Unix()
|
||||||
|
// wechatInfo := Map{
|
||||||
|
// "openid": userInfo.OpenID,
|
||||||
|
// "acttoken": resToken.AccessToken,
|
||||||
|
// "retoken": resToken.RefreshToken,
|
||||||
|
// "appid": that.Config.GetString("wechatAppID"),
|
||||||
|
// "unionid": userInfo.Unionid,
|
||||||
|
// "nickname": userInfo.Nickname,
|
||||||
|
// "avatar": userInfo.HeadImgURL,
|
||||||
|
// }
|
||||||
|
// if orgId != 0 {
|
||||||
|
// wechatInfo["org_id"] = orgId
|
||||||
|
// wechatInfo["status"] = 0
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// wechatDb := that.Db.Get("wechat", "*", Map{"openid": wechatInfo.GetString("openid")})
|
||||||
|
//
|
||||||
|
// if wechatDb != nil {
|
||||||
|
//
|
||||||
|
// that.Db.Update("wechat", wechatInfo, Map{"id": wechatDb.GetCeilInt("id")})
|
||||||
|
// //userInfo["wid"]=wechatDb.GetCeilInt("wid")
|
||||||
|
// } else {
|
||||||
|
// wechatInfo["create_time"] = t
|
||||||
|
// wechatInfo["id"] = that.Db.Insert("wechat", wechatInfo)
|
||||||
|
// }
|
||||||
|
// wechatDb = that.Db.Get("wechat", "*", Map{"openid": wechatInfo.GetString("openid")})
|
||||||
|
//
|
||||||
|
// that.Session("wechatInfo", wechatDb)
|
||||||
|
// fmt.Println(wechatDb)
|
||||||
|
// fmt.Println(that.Session("wechatInfo"))
|
||||||
|
// //that.Display(0, 1)
|
||||||
|
// that.Display(0, Map{"type": 1, "token": that.SessionId})
|
||||||
|
//},
|
||||||
|
//网页签名
|
||||||
|
"sign": func(that *Context) {
|
||||||
|
|
||||||
|
if that.Req.FormValue("sign_url") == "" {
|
||||||
|
that.Display(2, "参数不足")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
signUrl := that.Req.FormValue("sign_url")
|
||||||
|
signUrl = "https://hycb.hoteas.com/wxapp"
|
||||||
|
if weixin == nil {
|
||||||
|
weixin = wechat.NewWechat()
|
||||||
|
memory := cache.NewMemory()
|
||||||
|
cfg := &config.Config{
|
||||||
|
AppID: that.Config.GetString("wechatAppID"),
|
||||||
|
AppSecret: that.Config.GetString("wechatAppSecret"),
|
||||||
|
//Token: "xxx",
|
||||||
|
//EncodingAESKey: "xxxx",
|
||||||
|
Cache: memory,
|
||||||
|
}
|
||||||
|
//config := wechat.Config{ AppID: that.Config.GetString("wechatAppID"), AppSecret: that.Config.GetString("wechatAppSecret")}
|
||||||
|
//weixin = wechat.NewWechat()
|
||||||
|
officialAccount = weixin.GetOfficialAccount(cfg)
|
||||||
|
}
|
||||||
|
js := officialAccount.GetJs()
|
||||||
|
//js.GetConfig()
|
||||||
|
//js := weixin.GetJs()
|
||||||
|
cfg1, e := js.GetConfig(signUrl)
|
||||||
|
if e != nil {
|
||||||
|
that.Display(7, e)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
sign := Map{
|
||||||
|
"appId": cfg1.AppID,
|
||||||
|
"timestamp": cfg1.Timestamp,
|
||||||
|
"nonceStr": cfg1.NonceStr,
|
||||||
|
"signature": cfg1.Signature,
|
||||||
|
}
|
||||||
|
|
||||||
|
that.Display(0, sign)
|
||||||
|
|
||||||
|
},
|
||||||
|
}
|
@ -2,6 +2,8 @@ package main
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
. "code.hoteas.com/golang/hotime"
|
. "code.hoteas.com/golang/hotime"
|
||||||
|
"code.hoteas.com/golang/hotime/example/app"
|
||||||
|
|
||||||
//. "code.hoteas.com/golang/hotime/common"
|
//. "code.hoteas.com/golang/hotime/common"
|
||||||
"fmt"
|
"fmt"
|
||||||
"time"
|
"time"
|
||||||
@ -15,17 +17,20 @@ func main() {
|
|||||||
//a:=Map{}
|
//a:=Map{}
|
||||||
//a.GetBool()
|
//a.GetBool()
|
||||||
appIns.SetConnectListener(func(that *Context) (isFinished bool) {
|
appIns.SetConnectListener(func(that *Context) (isFinished bool) {
|
||||||
if len(that.RouterString) == 3 {
|
|
||||||
if that.HandlerStr == "/app/hotime/test" {
|
|
||||||
that.Session("admin_id", 1)
|
that.Session("admin_id", 1)
|
||||||
that.Display(0, "开始测试")
|
//if len(that.RouterString) == 3 {
|
||||||
return true
|
// if that.HandlerStr == "/app/hotime/test" {
|
||||||
}
|
// that.Session("admin_id", 1)
|
||||||
}
|
// that.Display(0, "开始测试")
|
||||||
|
// return true
|
||||||
|
// }
|
||||||
|
//}
|
||||||
return isFinished
|
return isFinished
|
||||||
})
|
})
|
||||||
//appIns.Db.Action(func(db db.HoTimeDB) (isSuccess bool) {
|
//appIns.Db.Action(func(db db.HoTimeDB) (isSuccess bool) {
|
||||||
// return isSuccess
|
// return isSuccess
|
||||||
//})
|
//})
|
||||||
appIns.Run(Router{})
|
appIns.Run(Router{
|
||||||
|
"app": app.Project,
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
5
go.mod
5
go.mod
@ -3,11 +3,16 @@ module code.hoteas.com/golang/hotime
|
|||||||
go 1.16
|
go 1.16
|
||||||
|
|
||||||
require (
|
require (
|
||||||
|
github.com/chanxuehong/rand v0.0.0-20211009035549-2f07823e8e99 // indirect
|
||||||
|
github.com/chanxuehong/util v0.0.0-20200304121633-ca8141845b13 // indirect
|
||||||
github.com/garyburd/redigo v1.6.3
|
github.com/garyburd/redigo v1.6.3
|
||||||
github.com/go-sql-driver/mysql v1.6.0
|
github.com/go-sql-driver/mysql v1.6.0
|
||||||
github.com/mattn/go-sqlite3 v1.14.12
|
github.com/mattn/go-sqlite3 v1.14.12
|
||||||
|
github.com/silenceper/wechat v1.2.6
|
||||||
|
github.com/silenceper/wechat/v2 v2.1.2
|
||||||
github.com/sirupsen/logrus v1.8.1
|
github.com/sirupsen/logrus v1.8.1
|
||||||
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.364
|
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.364
|
||||||
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/ocr v1.0.364
|
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/ocr v1.0.364
|
||||||
golang.org/x/net v0.0.0-20220225172249-27dd8689420f
|
golang.org/x/net v0.0.0-20220225172249-27dd8689420f
|
||||||
|
gopkg.in/chanxuehong/wechat.v2 v2.0.0-20190402080805-fa408c6cc20d
|
||||||
)
|
)
|
||||||
|
60
go.sum
60
go.sum
@ -1,27 +1,85 @@
|
|||||||
|
github.com/astaxie/beego v1.7.1/go.mod h1:0R4++1tUqERR0WYFWdfkcrsyoVBCG4DgpDGokT3yb+U=
|
||||||
|
github.com/bradfitz/gomemcache v0.0.0-20160117192205-fb1f79c6b65a/go.mod h1:PmM6Mmwb0LSuEubjR8N7PtNe1KxZLtOUHtbeikc5h60=
|
||||||
|
github.com/bradfitz/gomemcache v0.0.0-20190913173617-a41fca850d0b h1:L/QXpzIa3pOvUGt1D1lA5KjYhPBAN/3iWdP7xeFS9F0=
|
||||||
|
github.com/bradfitz/gomemcache v0.0.0-20190913173617-a41fca850d0b/go.mod h1:H0wQNHz2YrLsuXOZozoeDmnHXkNCRmMW0gwFWDfEZDA=
|
||||||
|
github.com/chanxuehong/rand v0.0.0-20211009035549-2f07823e8e99 h1:K62Lb6bsgLOB++z/VAvRvtiEBdNCuMfmQGTGGWMdPpM=
|
||||||
|
github.com/chanxuehong/rand v0.0.0-20211009035549-2f07823e8e99/go.mod h1:9+sJ9zvvkXC5sPjPEZM3Jpb9n2Q2VtcrGZly0UHYF5I=
|
||||||
|
github.com/chanxuehong/util v0.0.0-20200304121633-ca8141845b13 h1:c1vUDbnwvu5d2ucfzXvMzBWzeu5IxPvtESOFPl3CieA=
|
||||||
|
github.com/chanxuehong/util v0.0.0-20200304121633-ca8141845b13/go.mod h1:XEYt99iTxMqkv+gW85JX/DdUINHUe43Sbe5AtqSaDAQ=
|
||||||
|
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
|
||||||
|
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
|
github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo=
|
||||||
|
github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M=
|
||||||
github.com/garyburd/redigo v1.6.3 h1:HCeeRluvAgMusMomi1+6Y5dmFOdYV/JzoRrrbFlkGIc=
|
github.com/garyburd/redigo v1.6.3 h1:HCeeRluvAgMusMomi1+6Y5dmFOdYV/JzoRrrbFlkGIc=
|
||||||
github.com/garyburd/redigo v1.6.3/go.mod h1:rTb6epsqigu3kYKBnaF028A7Tf/Aw5s0cqA47doKKqw=
|
github.com/garyburd/redigo v1.6.3/go.mod h1:rTb6epsqigu3kYKBnaF028A7Tf/Aw5s0cqA47doKKqw=
|
||||||
|
github.com/gin-gonic/gin v1.1.4/go.mod h1:7cKuhb5qV2ggCFctp2fJQ+ErvciLZrIeoOSOm6mUr7Y=
|
||||||
github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE=
|
github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE=
|
||||||
github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
|
github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
|
||||||
|
github.com/golang/protobuf v0.0.0-20161117033126-8ee79997227b/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||||
|
github.com/gomodule/redigo v1.8.1/go.mod h1:P9dn9mFrCBvWhGE1wpxx6fgq7BAeLBk+UUUzlpkBYO0=
|
||||||
|
github.com/gomodule/redigo v1.8.5 h1:nRAxCa+SVsyjSBrtZmG/cqb6VbTmuRzpg/PoTFlpumc=
|
||||||
|
github.com/gomodule/redigo v1.8.5/go.mod h1:P9dn9mFrCBvWhGE1wpxx6fgq7BAeLBk+UUUzlpkBYO0=
|
||||||
|
github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542 h1:2VTzZjLZBgl62/EtslCrtky5vbi9dd7HrQPQIx6wqiw=
|
||||||
|
github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542/go.mod h1:Ow0tF8D4Kplbc8s8sSb3V2oUCygFHVp8gC3Dn6U4MNI=
|
||||||
|
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
||||||
|
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||||
|
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
||||||
|
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
|
||||||
|
github.com/manucorporat/sse v0.0.0-20160126180136-ee05b128a739/go.mod h1:zUx1mhth20V3VKgL5jbd1BSQcW4Fy6Qs4PZvQwRFwzM=
|
||||||
|
github.com/mattn/go-isatty v0.0.0-20161123143637-30a891c33c7c/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
|
||||||
github.com/mattn/go-sqlite3 v1.14.12 h1:TJ1bhYJPV44phC+IMu1u2K/i5RriLTPe+yc68XDJ1Z0=
|
github.com/mattn/go-sqlite3 v1.14.12 h1:TJ1bhYJPV44phC+IMu1u2K/i5RriLTPe+yc68XDJ1Z0=
|
||||||
github.com/mattn/go-sqlite3 v1.14.12/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=
|
github.com/mattn/go-sqlite3 v1.14.12/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=
|
||||||
|
github.com/nbio/st v0.0.0-20140626010706-e9e8d9816f32/go.mod h1:9wM+0iRr9ahx58uYLpLIr5fm8diHn0JbqRycJi6w0Ms=
|
||||||
|
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
|
||||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||||
|
github.com/silenceper/wechat v1.2.6 h1:FED3ko2yD96YD153xIV0I0bDjII4GxWaggjsYKdjQQc=
|
||||||
|
github.com/silenceper/wechat v1.2.6/go.mod h1:7Wf0sCqQgJG65zCnl4TcDFk2XYxRCfqwQjg0Cf/lKeM=
|
||||||
|
github.com/silenceper/wechat/v2 v2.1.2 h1:+QfIMiYfwST2ZloTwmYp0O0p5Y1LYRZxfLWfMuSE30k=
|
||||||
|
github.com/silenceper/wechat/v2 v2.1.2/go.mod h1:0OprxYCCp2CZAKw06BBlnaczInTk2KxOLsKeiopshGg=
|
||||||
github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE=
|
github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE=
|
||||||
github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
|
github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
|
||||||
github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w=
|
github.com/spf13/cast v1.3.1 h1:nFm6S0SMdyzrzcmThSipiEubIDy8WEXKNZ0UOgiRpng=
|
||||||
|
github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
|
||||||
|
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||||
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
||||||
|
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
|
||||||
|
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
|
||||||
|
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||||
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.364 h1:X1Jws4XqrTH+p7FBQ7BpjW4qFXObKHWm0/XhW/GvqRs=
|
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.364 h1:X1Jws4XqrTH+p7FBQ7BpjW4qFXObKHWm0/XhW/GvqRs=
|
||||||
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.364/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y=
|
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.364/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y=
|
||||||
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/ocr v1.0.364 h1:kbor60vo37v7Hu+i17gooox9Rw281fVHNna8zwtDG1w=
|
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/ocr v1.0.364 h1:kbor60vo37v7Hu+i17gooox9Rw281fVHNna8zwtDG1w=
|
||||||
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/ocr v1.0.364/go.mod h1:LeIUBOLhc+Y5YCEpZrULPD9lgoXXV4/EmIcoEvmHz9c=
|
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/ocr v1.0.364/go.mod h1:LeIUBOLhc+Y5YCEpZrULPD9lgoXXV4/EmIcoEvmHz9c=
|
||||||
|
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||||
|
golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83 h1:/ZScEX8SfEmUGRHs0gxpqteO5nfNW6axyZbBdw9A12g=
|
||||||
|
golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=
|
||||||
|
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||||
|
golang.org/x/net v0.0.0-20191125084936-ffdde1057850/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||||
golang.org/x/net v0.0.0-20220225172249-27dd8689420f h1:oA4XRj0qtSt8Yo1Zms0CUlsT3KG69V2UGQWPBxujDmc=
|
golang.org/x/net v0.0.0-20220225172249-27dd8689420f h1:oA4XRj0qtSt8Yo1Zms0CUlsT3KG69V2UGQWPBxujDmc=
|
||||||
golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
|
golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
|
||||||
|
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
|
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
|
golang.org/x/sys v0.0.0-20210309074719-68d13333faf2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e h1:fLOSk5Q00efkSvAm+4xcoXD+RRmLmmulPn5I3Y9F2EM=
|
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e h1:fLOSk5Q00efkSvAm+4xcoXD+RRmLmmulPn5I3Y9F2EM=
|
||||||
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
|
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
|
||||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||||
|
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||||
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||||
|
gopkg.in/chanxuehong/wechat.v2 v2.0.0-20190402080805-fa408c6cc20d h1:+Z31q68nGNYelwR3t5pTQ0qjB8zCo5fG4eYc9r972h8=
|
||||||
|
gopkg.in/chanxuehong/wechat.v2 v2.0.0-20190402080805-fa408c6cc20d/go.mod h1:HuIcE5yEmuAHBXNX5U4KUQRCki6sXCbLjPauW+ppvI0=
|
||||||
|
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||||
|
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||||
|
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||||
|
gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE=
|
||||||
|
gopkg.in/go-playground/validator.v8 v8.18.1/go.mod h1:RX2a/7Ha8BgOhfk7j780h4/u/RRjR0eouCJSH80/M2Y=
|
||||||
|
gopkg.in/h2non/gock.v1 v1.0.15 h1:SzLqcIlb/fDfg7UvukMpNcWsu7sI5tWwL+KCATZqks0=
|
||||||
|
gopkg.in/h2non/gock.v1 v1.0.15/go.mod h1:sX4zAkdYX1TRGJ2JY156cFspQn4yRWn6p9EMdODlynE=
|
||||||
|
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||||
|
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
|
||||||
|
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||||
|
Loading…
Reference in New Issue
Block a user