40 changed files with 1042 additions and 878 deletions
-
2.gitignore
-
3bdxorm.bat
-
60cloud/api.go
-
5cloud/cloud.go
-
20cloud/commCloud/api.go
-
58cloud/commCloud/comm.go
-
101cloud/sysCloud/comm.go
-
59cloud/sysCloud/user.go
-
20cloud/userCloud/api.go
-
70cloud/userCloud/user.go
-
6core/bean/httpBean/comm.go
-
15core/bean/sysBean/comm.go
-
24core/bean/sysBean/user.go
-
9core/bean/sysLogin.go
-
1core/comm/const.go
-
27core/comm/db.go
-
17core/utils/code.go
-
10core/utils/conf.go
-
20go.mod
-
339go.sum
-
7goxorm/config
-
17goxorm/struct.go.tpl
-
28model_sys.yml
-
6models/mgoParam.go
-
4models/mgoUserInfo.go
-
45service/mgoService/info.go
-
17service/mgoService/param.go
-
8service/sysService/role.go
-
69service/userService/role.go
-
10service/userService/user.go
-
18service/utilService/login.go
-
30service/utilService/mids.go
-
22webs/sys/app.yml
-
165webs/sys/controller/comm.go
-
159webs/sys/controller/user.go
-
2webs/sys/custom.yml
-
82webs/sys/main.go
-
20webs/sys/route/index.go
-
136webs/sys/routehb/comm.go
-
207webs/sys/routehb/user.go
@ -1,2 +1 @@ |
|||
xorm reverse mysql "root:123@tcp(localhost:3306)/test?charset=utf8" goxorm |
|||
xorm reverse mysql "root:123@tcp(localhost:3306)/test?charset=utf8" goxorm |
|||
reverse -f model_sys.yml |
@ -0,0 +1,60 @@ |
|||
package cloud |
|||
|
|||
import ( |
|||
"fmt" |
|||
hbtp "github.com/mgr9525/HyperByte-Transfer-Protocol" |
|||
gocloud "github.com/mgr9525/go-cloud" |
|||
"time" |
|||
) |
|||
|
|||
func NewReq(code int, method string, ipr ...string) (*hbtp.Request, error) { |
|||
host := fmt.Sprintf("%v", gocloud.CloudConf.Custom["sysHbtpHost"]) |
|||
req, err := hbtp.NewRPCReq(host, code, method) |
|||
if err != nil { |
|||
return nil, err |
|||
} |
|||
hd := req.ReqHeader() |
|||
if len(ipr) > 0 { |
|||
hd.RelIp = ipr[1] |
|||
} |
|||
hd.Times = time.Now().Format(time.RFC3339Nano) |
|||
//hd.Token = ruisUtil.Md5String(hd.Path + hd.RelIp + hd.Times + HbtpMD5Token)
|
|||
return req, err |
|||
} |
|||
func DoJson(code int, method string, in, out interface{}, hd ...map[string]interface{}) error { |
|||
req, err := NewReq(code, method) |
|||
if err != nil { |
|||
return err |
|||
} |
|||
defer req.Close() |
|||
if len(hd) > 0 && hd[0] != nil { |
|||
for k, v := range hd[0] { |
|||
req.ReqHeader().Set(k, v) |
|||
} |
|||
} |
|||
err = req.Do(in) |
|||
if err != nil { |
|||
return err |
|||
} |
|||
if req.ResCode() != hbtp.ResStatusOk { |
|||
return fmt.Errorf("res err(%d):%s", req.ResCode(), string(req.ResBodyBytes())) |
|||
} |
|||
return req.ResBodyJson(out) |
|||
} |
|||
func DoString(code int, method string, in interface{}, hd ...hbtp.Mp) (int, []byte, error) { |
|||
req, err := NewReq(code, method) |
|||
if err != nil { |
|||
return 0, nil, err |
|||
} |
|||
defer req.Close() |
|||
if len(hd) > 0 && hd[0] != nil { |
|||
for k, v := range hd[0] { |
|||
req.ReqHeader().Set(k, v) |
|||
} |
|||
} |
|||
err = req.Do(in) |
|||
if err != nil { |
|||
return 0, nil, err |
|||
} |
|||
return req.ResCode(), req.ResBodyBytes(), nil |
|||
} |
@ -1,5 +0,0 @@ |
|||
package cloud |
|||
|
|||
import gocloud "github.com/mgr9525/go-cloud" |
|||
|
|||
var SysCloudExec = &gocloud.CloudExec{Serv: "go-cloud-sys"} |
@ -0,0 +1,20 @@ |
|||
package commCloud |
|||
|
|||
import ( |
|||
"GoClouds/cloud" |
|||
hbtp "github.com/mgr9525/HyperByte-Transfer-Protocol" |
|||
) |
|||
|
|||
const ( |
|||
RPCHostCode = 1 |
|||
) |
|||
|
|||
func NewReq(method string, ipr ...string) (*hbtp.Request, error) { |
|||
return cloud.NewReq(RPCHostCode, method, ipr...) |
|||
} |
|||
func DoJson(method string, in, out interface{}, hd ...map[string]interface{}) error { |
|||
return cloud.DoJson(RPCHostCode, method, in, out, hd...) |
|||
} |
|||
func DoString(method string, in interface{}, hd ...hbtp.Mp) (int, []byte, error) { |
|||
return cloud.DoString(RPCHostCode, method, in, hd...) |
|||
} |
@ -0,0 +1,58 @@ |
|||
package commCloud |
|||
|
|||
import ( |
|||
"GoClouds/core/bean/sysBean" |
|||
"fmt" |
|||
hbtp "github.com/mgr9525/HyperByte-Transfer-Protocol" |
|||
) |
|||
|
|||
func ClearCache(key string) error { |
|||
code, bts, err := DoString("ClearCache", key) |
|||
if err != nil { |
|||
return err |
|||
} |
|||
if code != hbtp.ResStatusOk { |
|||
return fmt.Errorf("%s", string(bts)) |
|||
} |
|||
return nil |
|||
} |
|||
func ClearUserCache(uid string) error { |
|||
code, bts, err := DoString("ClearUserCache", uid) |
|||
if err != nil { |
|||
return err |
|||
} |
|||
if code != hbtp.ResStatusOk { |
|||
return fmt.Errorf("%s", string(bts)) |
|||
} |
|||
return nil |
|||
} |
|||
func CheckPermission(uid, perm string) bool { |
|||
code, bts, err := DoString("CheckPermission", &sysBean.CheckPermissionReq{Uid: uid, Perm: perm}) |
|||
if err != nil { |
|||
return false |
|||
} |
|||
if code == hbtp.ResStatusOk && string(bts) == "true" { |
|||
return true |
|||
} |
|||
return false |
|||
} |
|||
func SendSms(phone, ips string) error { |
|||
code, bts, err := DoString("SendSms", &sysBean.SendSmsReq{Phone: phone, Ips: ips}) |
|||
if err != nil { |
|||
return err |
|||
} |
|||
if code != hbtp.ResStatusOk { |
|||
return fmt.Errorf("%s", string(bts)) |
|||
} |
|||
return nil |
|||
} |
|||
func ValidSms(phone, codes string) error { |
|||
code, bts, err := DoString("ValidSms", &sysBean.VaildSmsReq{Phone: phone, Code: codes}) |
|||
if err != nil { |
|||
return err |
|||
} |
|||
if code != hbtp.ResStatusOk { |
|||
return fmt.Errorf("%s", string(bts)) |
|||
} |
|||
return nil |
|||
} |
@ -1,101 +0,0 @@ |
|||
package sysCloud |
|||
|
|||
import ( |
|||
"GoClouds/cloud" |
|||
ruisUtil "github.com/mgr9525/go-ruisutil" |
|||
"gopkg.in/macaron.v1" |
|||
) |
|||
|
|||
func ClearCache(key string) (rb bool) { |
|||
defer ruisUtil.Recovers("CheckUPermmsion", func(errs string) { |
|||
rb = false |
|||
}) |
|||
|
|||
pars := ruisUtil.NewMap() |
|||
pars.Set("key", key) |
|||
code, _, err := cloud.SysCloudExec.ExecJSON("/comm/clearCache", pars) |
|||
if err != nil { |
|||
return false |
|||
} |
|||
if code == 200 { |
|||
return true |
|||
} |
|||
return false |
|||
} |
|||
func ClearUserCache(uid string) (rb bool) { |
|||
defer ruisUtil.Recovers("CheckUPermmsion", func(errs string) { |
|||
rb = false |
|||
}) |
|||
|
|||
pars := ruisUtil.NewMap() |
|||
pars.Set("uid", uid) |
|||
code, _, err := cloud.SysCloudExec.ExecJSON("/comm/clearUserCache", pars) |
|||
if err != nil { |
|||
return false |
|||
} |
|||
if code == 200 { |
|||
return true |
|||
} |
|||
return false |
|||
} |
|||
func CheckPermission(uid, perm string) (rb bool) { |
|||
defer ruisUtil.Recovers("CheckUPermmsion", func(errs string) { |
|||
rb = false |
|||
}) |
|||
|
|||
pars := ruisUtil.NewMap() |
|||
pars.Set("uid", uid) |
|||
pars.Set("perm", perm) |
|||
code, cont, err := cloud.SysCloudExec.ExecJSON("/comm/checkPermission", pars) |
|||
if err != nil { |
|||
return false |
|||
} |
|||
if code != 200 { |
|||
return false |
|||
} |
|||
return cont == "true" |
|||
} |
|||
func CheckUPermission(perm string, c *macaron.Context) (rb bool) { |
|||
defer ruisUtil.Recovers("CheckUPermmsion", func(errs string) { |
|||
rb = false |
|||
}) |
|||
lguser := CurrUser(c) |
|||
if lguser == nil { |
|||
return false |
|||
} |
|||
return CheckPermission(lguser.Xid, perm) |
|||
} |
|||
|
|||
func GetUserPerms(uid string) map[string]bool { |
|||
ret := make(map[string]bool) |
|||
pars := ruisUtil.NewMap() |
|||
pars.Set("uid", uid) |
|||
err := cloud.SysCloudExec.ExecObjJSON("/comm/getUserPerms", pars, &ret) |
|||
if err != nil { |
|||
println("getUserPerms err:" + err.Error()) |
|||
return ret |
|||
} |
|||
return ret |
|||
} |
|||
|
|||
func SendSms(phone, ips string) (int, string) { |
|||
pars := ruisUtil.NewMap() |
|||
pars.Set("phone", phone) |
|||
pars.Set("ips", ips) |
|||
code, conts, err := cloud.SysCloudExec.ExecJSON("/comm/sendSms", pars) |
|||
if err != nil { |
|||
println("SendSms err:" + err.Error()) |
|||
} |
|||
return code, conts |
|||
} |
|||
|
|||
func VaildSms(phone, codes string) (int, string) { |
|||
pars := ruisUtil.NewMap() |
|||
pars.Set("phone", phone) |
|||
pars.Set("code", codes) |
|||
code, conts, err := cloud.SysCloudExec.ExecJSON("/comm/vaildSms", pars) |
|||
if err != nil { |
|||
println("VaildSms err:" + err.Error()) |
|||
} |
|||
return code, conts |
|||
} |
@ -1,59 +0,0 @@ |
|||
package sysCloud |
|||
|
|||
import ( |
|||
"GoClouds/cloud" |
|||
"GoClouds/core/bean" |
|||
"GoClouds/models" |
|||
gocloud "github.com/mgr9525/go-cloud" |
|||
ruisUtil "github.com/mgr9525/go-ruisutil" |
|||
"gopkg.in/macaron.v1" |
|||
) |
|||
|
|||
func Login(name, pass string) (*bean.SysLogin, error) { |
|||
ret := &bean.SysLogin{} |
|||
pars := ruisUtil.NewMap() |
|||
pars.Set("name", name) |
|||
pars.Set("pass", pass) |
|||
err := cloud.SysCloudExec.ExecObjJSON("/user/login", pars, ret) |
|||
if err != nil { |
|||
return nil, err |
|||
} |
|||
|
|||
return ret, nil |
|||
} |
|||
|
|||
func FindUser(xid string) *models.SysUser { |
|||
e := &models.SysUser{} |
|||
pars := ruisUtil.NewMap() |
|||
pars.Set("xid", xid) |
|||
err := cloud.SysCloudExec.ExecObjJSON("/user/info", pars, e) |
|||
if err != nil { |
|||
return nil |
|||
} |
|||
return e |
|||
} |
|||
func CurrUser(c *macaron.Context) *models.SysUser { |
|||
tkm := gocloud.GetToken(c) |
|||
if tkm == nil { |
|||
return nil |
|||
} |
|||
xid, ok := (*tkm)["xid"].(string) |
|||
if !ok || len(xid) <= 0 { |
|||
return nil |
|||
} |
|||
return FindUser(xid) |
|||
} |
|||
|
|||
func Register(phone, pass, nick string) (*bean.SysLogin, error) { |
|||
ret := &bean.SysLogin{} |
|||
pars := ruisUtil.NewMap() |
|||
pars.Set("phone", phone) |
|||
pars.Set("pass", pass) |
|||
pars.Set("nick", nick) |
|||
err := cloud.SysCloudExec.ExecObjJSON("/user/reg", pars, ret) |
|||
if err != nil { |
|||
return nil, err |
|||
} |
|||
|
|||
return ret, nil |
|||
} |
@ -0,0 +1,20 @@ |
|||
package userCloud |
|||
|
|||
import ( |
|||
"GoClouds/cloud" |
|||
hbtp "github.com/mgr9525/HyperByte-Transfer-Protocol" |
|||
) |
|||
|
|||
const ( |
|||
RPCHostCode = 2 |
|||
) |
|||
|
|||
func NewReq(method string, ipr ...string) (*hbtp.Request, error) { |
|||
return cloud.NewReq(RPCHostCode, method, ipr...) |
|||
} |
|||
func DoJson(method string, in, out interface{}, hd ...map[string]interface{}) error { |
|||
return cloud.DoJson(RPCHostCode, method, in, out, hd...) |
|||
} |
|||
func DoString(method string, in interface{}, hd ...hbtp.Mp) (int, []byte, error) { |
|||
return cloud.DoString(RPCHostCode, method, in, hd...) |
|||
} |
@ -0,0 +1,70 @@ |
|||
package userCloud |
|||
|
|||
import ( |
|||
"GoClouds/core/bean/sysBean" |
|||
"GoClouds/models" |
|||
"fmt" |
|||
"github.com/gin-gonic/gin" |
|||
gocloud "github.com/mgr9525/go-cloud" |
|||
) |
|||
|
|||
func FindInfo(uid string) *models.SysUser { |
|||
e := &models.SysUser{} |
|||
err := DoJson("Info", uid, e) |
|||
if err != nil { |
|||
return nil |
|||
} |
|||
return e |
|||
} |
|||
func CurrUser(c *gin.Context) *models.SysUser { |
|||
tkm := gocloud.GetToken(c) |
|||
if tkm == nil { |
|||
return nil |
|||
} |
|||
xid := fmt.Sprintf("%v", tkm["xid"]) |
|||
if xid == "" { |
|||
return nil |
|||
} |
|||
return FindInfo(xid) |
|||
} |
|||
func GetUsrPerms(uid string) map[string]bool { |
|||
e := make(map[string]bool) |
|||
err := DoJson("GetUsrPerms", uid, &e) |
|||
if err != nil { |
|||
return nil |
|||
} |
|||
return e |
|||
} |
|||
func Login(m *sysBean.LoginReq) (*sysBean.LoginRes, error) { |
|||
e := &sysBean.LoginRes{} |
|||
err := DoJson("Login", m, e) |
|||
if err != nil { |
|||
return nil, err |
|||
} |
|||
return e, nil |
|||
} |
|||
func Reg(m *sysBean.RegReq) (*sysBean.LoginRes, error) { |
|||
e := &sysBean.LoginRes{} |
|||
err := DoJson("Reg", m, e) |
|||
if err != nil { |
|||
return nil, err |
|||
} |
|||
return e, nil |
|||
} |
|||
func Forgot(phone, pass string) (*sysBean.LoginRes, error) { |
|||
e := &sysBean.LoginRes{} |
|||
err := DoJson("Forgot", &sysBean.LoginReq{Name: phone, Pass: pass}, e) |
|||
if err != nil { |
|||
return nil, err |
|||
} |
|||
return e, nil |
|||
} |
|||
|
|||
func Uppass(m *sysBean.UppassReq) (*sysBean.LoginRes, error) { |
|||
e := &sysBean.LoginRes{} |
|||
err := DoJson("Forgot", m, e) |
|||
if err != nil { |
|||
return nil, err |
|||
} |
|||
return e, nil |
|||
} |
@ -0,0 +1,6 @@ |
|||
package httpBean |
|||
|
|||
type SearchBase struct { |
|||
Q string `json:"q"` |
|||
Page int64 `json:"page"` |
|||
} |
@ -0,0 +1,15 @@ |
|||
package sysBean |
|||
|
|||
type CheckPermissionReq struct { |
|||
Uid string |
|||
Perm string |
|||
} |
|||
|
|||
type SendSmsReq struct { |
|||
Phone string |
|||
Ips string |
|||
} |
|||
type VaildSmsReq struct { |
|||
Phone string |
|||
Code string |
|||
} |
@ -0,0 +1,24 @@ |
|||
package sysBean |
|||
|
|||
type LoginReq struct { |
|||
Name string |
|||
Pass string |
|||
} |
|||
|
|||
type LoginRes struct { |
|||
Stat int |
|||
Uid int64 |
|||
Xid string |
|||
Name string |
|||
Errs string |
|||
} |
|||
type RegReq struct { |
|||
Name string |
|||
Pass string |
|||
Nick string |
|||
} |
|||
type UppassReq struct { |
|||
Xid string |
|||
Pass string |
|||
NPass string |
|||
} |
@ -1,9 +0,0 @@ |
|||
package bean |
|||
|
|||
type SysLogin struct { |
|||
Stat int |
|||
Uid int64 |
|||
Xid string |
|||
Name string |
|||
Errs string |
|||
} |
@ -0,0 +1,10 @@ |
|||
package utils |
|||
|
|||
import gocloud "github.com/mgr9525/go-cloud" |
|||
|
|||
func GetUploadPath() string { |
|||
if gocloud.CloudConf.Custom == nil { |
|||
return "" |
|||
} |
|||
return gocloud.CloudConf.Custom.GetString("uploadpath") |
|||
} |
@ -1,205 +1,218 @@ |
|||
gitea.com/xorm/sqlfiddle v0.0.0-20180821085327-62ce714f951a h1:lSA0F4e9A2NcQSqGqTOXqu2aRi/XEQxDCBwM8yJtE6s= |
|||
gitea.com/xorm/sqlfiddle v0.0.0-20180821085327-62ce714f951a/go.mod h1:EXuID2Zs0pAQhH8yz+DNjUbjppKQzKFAn28TMYPB6IU= |
|||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= |
|||
github.com/Chronokeeper/anyxml v0.0.0-20160530174208-54457d8e98c6 h1:Etfj2lhXyrYemgmWzEtEQQb1kezeEXc8jVjkQUyJnWI= |
|||
github.com/Chronokeeper/anyxml v0.0.0-20160530174208-54457d8e98c6/go.mod h1:YzuYAe2hrrwKXkM9kqjbkTLlkbA+/xw2MA46f1+ENxc= |
|||
github.com/CloudyKit/fastprinter v0.0.0-20170127035650-74b38d55f37a h1:3SgJcK9l5uPdBC/X17wanyJAMxM33+4ZhEIV96MIH8U= |
|||
github.com/CloudyKit/fastprinter v0.0.0-20170127035650-74b38d55f37a/go.mod h1:EFZQ978U7x8IRnstaskI3IysnWY5Ao3QgZUKOXlsAdw= |
|||
github.com/CloudyKit/jet v2.1.2+incompatible h1:ybZoYzMBdoijK6I+Ke3vg9GZsmlKo/ZhKdNMWz0P26c= |
|||
github.com/CloudyKit/jet v2.1.2+incompatible/go.mod h1:HPYO+50pSWkPoj9Q/eq0aRGByCL6ScRlUmiEX5Zgm+w= |
|||
github.com/agrison/go-tablib v0.0.0-20160310143025-4930582c22ee h1:0RklYSvekYaIFI9JUx7TFPQvo++TdILmZiV17QI4nXk= |
|||
github.com/agrison/go-tablib v0.0.0-20160310143025-4930582c22ee/go.mod h1:M9nmO4lBRWR/bBv7UCOmDJ1MB2DVoqz19B4JchDA+K0= |
|||
github.com/agrison/mxj v0.0.0-20160310142625-1269f8afb3b4 h1:XBNSe5eibe5Fh131ah+xnO6s4A97U1T3tKZKLQQvqu0= |
|||
github.com/agrison/mxj v0.0.0-20160310142625-1269f8afb3b4/go.mod h1:n7qJAqL9BKqGqiJyjPbWtxpdswTL5wX0IVP2Uw4vVhQ= |
|||
github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= |
|||
github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da h1:8GUt8eRujhVEGZFFEjBj46YV4rDjvGrNxb0KMWYkL2I= |
|||
github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= |
|||
github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= |
|||
github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= |
|||
github.com/bndr/gotabulate v1.1.2 h1:yC9izuZEphojb9r+KYL4W9IJKO/ceIO8HDwxMA24U4c= |
|||
github.com/bndr/gotabulate v1.1.2/go.mod h1:0+8yUgaPTtLRTjf49E8oju7ojpU11YmXyvq1LbPAb3U= |
|||
github.com/bradfitz/gomemcache v0.0.0-20190329173943-551aad21a668/go.mod h1:H0wQNHz2YrLsuXOZozoeDmnHXkNCRmMW0gwFWDfEZDA= |
|||
github.com/cupcake/rdb v0.0.0-20161107195141-43ba34106c76/go.mod h1:vYwsqCOLxGiisLwp9rITslkFNpZD5rz43tf41QFkTWY= |
|||
github.com/PuerkitoBio/goquery v1.5.1/go.mod h1:GsLWisAFVj4WgDibEWF4pvYnkVQBpKBKeU+7zCJoLcc= |
|||
github.com/andybalholm/cascadia v1.1.0/go.mod h1:GsXiBklL0woXo1j/WYWtSYYC4ouU9PqHO0sqidkEA4Y= |
|||
github.com/aws/aws-sdk-go v1.29.15 h1:0ms/213murpsujhsnxnNKNeVouW60aJqSd992Ks3mxs= |
|||
github.com/aws/aws-sdk-go v1.29.15/go.mod h1:1KvfttTE3SPKMpo8g2c6jL3ZKfXtFvKscTgahTma5Xg= |
|||
github.com/boltdb/bolt v1.3.1 h1:JQmyP4ZBrce+ZQu0dY660FMfatumYDLun9hBCUVIkF4= |
|||
github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= |
|||
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/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= |
|||
github.com/denisenkom/go-mssqldb v0.0.0-20200428022330-06a60b6afbbc/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU= |
|||
github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= |
|||
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= |
|||
github.com/donnie4w/go-logger v0.0.0-20170827050443-4740c51383f4 h1:T9PR91sjTtrA1HmZB4G+M7OLCelch0f6rIEY7Mm1T4U= |
|||
github.com/donnie4w/go-logger v0.0.0-20170827050443-4740c51383f4/go.mod h1:L7S4x0R7vv3xoOhGuyAJyCO2MYzWOpccM4Isn8jIUgY= |
|||
github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= |
|||
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= |
|||
github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo= |
|||
github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= |
|||
github.com/flosch/pongo2 v0.0.0-20190707114632-bbf5a6c351f4 h1:GY1+t5Dr9OKADM64SYnQjw/w99HMYvQ0A8/JoUkxVmc= |
|||
github.com/flosch/pongo2 v0.0.0-20190707114632-bbf5a6c351f4/go.mod h1:T9YF2M40nIgbVgp3rreNmTged+9HrbNTIQf1PsaIiTA= |
|||
github.com/fogleman/gg v1.3.0 h1:/7zJX8F6AaYQc57WQCyN9cAIz+4bCJGO9B+dyW29am8= |
|||
github.com/fogleman/gg v1.3.0/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= |
|||
github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= |
|||
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= |
|||
github.com/getlantern/context v0.0.0-20190109183933-c447772a6520 h1:NRUJuo3v3WGC/g5YiyF790gut6oQr5f3FBI88Wv0dx4= |
|||
github.com/getlantern/context v0.0.0-20190109183933-c447772a6520/go.mod h1:L+mq6/vvYHKjCX2oez0CgEAJmbq1fbb/oNJIWQkBybY= |
|||
github.com/getlantern/errors v0.0.0-20190325191628-abdb3e3e36f7 h1:6uJ+sZ/e03gkbqZ0kUG6mfKoqDb4XMAzMIwlajq19So= |
|||
github.com/getlantern/errors v0.0.0-20190325191628-abdb3e3e36f7/go.mod h1:l+xpFBrCtDLpK9qNjxs+cHU6+BAdlBaxHqikB6Lku3A= |
|||
github.com/getlantern/hex v0.0.0-20190417191902-c6586a6fe0b7 h1:micT5vkcr9tOVk1FiH8SWKID8ultN44Z+yzd2y/Vyb0= |
|||
github.com/getlantern/hex v0.0.0-20190417191902-c6586a6fe0b7/go.mod h1:dD3CgOrwlzca8ed61CsZouQS5h5jIzkK9ZWrTcf0s+o= |
|||
github.com/getlantern/hidden v0.0.0-20190325191715-f02dbb02be55 h1:XYzSdCbkzOC0FDNrgJqGRo8PCMFOBFL9py72DRs7bmc= |
|||
github.com/getlantern/hidden v0.0.0-20190325191715-f02dbb02be55/go.mod h1:6mmzY2kW1TOOrVy+r41Za2MxXM+hhqTtY3oBKd2AgFA= |
|||
github.com/getlantern/ops v0.0.0-20190325191751-d70cb0d6f85f h1:wrYrQttPS8FHIRSlsrcuKazukx/xqO/PpLZzZXsF+EA= |
|||
github.com/getlantern/ops v0.0.0-20190325191751-d70cb0d6f85f/go.mod h1:D5ao98qkA6pxftxoqzibIBBrLSUli+kYnJqrgBf9cIA= |
|||
github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98= |
|||
github.com/go-macaron/cache v0.0.0-20190810181446-10f7c57e2196 h1:fqWZxyMLF6RVGmjvsZ9FijiU9UlAjuE6nu9RfNBZ+iE= |
|||
github.com/go-macaron/cache v0.0.0-20190810181446-10f7c57e2196/go.mod h1:O6fSdaYZbGh4clVMGMGO5k2KbMO0Cz8YdBnPrD0I8dM= |
|||
github.com/go-macaron/gzip v0.0.0-20160222043647-cad1c6580a07 h1:YSIA98PevNf1NtCa/J6cz7gjzpz99WVAOa9Eg0klKps= |
|||
github.com/go-macaron/gzip v0.0.0-20160222043647-cad1c6580a07/go.mod h1://cJFfDp/70L0oTNAMB+M8Jd0rpuIx/55iARuJ6StwE= |
|||
github.com/go-macaron/inject v0.0.0-20160627170012-d8a0b8677191 h1:NjHlg70DuOkcAMqgt0+XA+NHwtu66MkTVVgR4fFWbcI= |
|||
github.com/go-macaron/inject v0.0.0-20160627170012-d8a0b8677191/go.mod h1:VFI2o2q9kYsC4o7VP1HrEVosiZZTd+MVT3YZx4gqvJw= |
|||
github.com/go-macaron/pongo2 v0.0.0-20180906102555-6074d2551820 h1:BQw86zZNNZ6KOi6BHZtRQSMKMb6FrNVRXeDmnMHCZmE= |
|||
github.com/go-macaron/pongo2 v0.0.0-20180906102555-6074d2551820/go.mod h1:oz+8Lk9U8hDD4ohs3aUMZzTs+1PwmfYai9GXQR6MfNM= |
|||
github.com/go-sql-driver/mysql v1.4.1 h1:g24URVg0OFbNUTx9qqY1IRZ9D9z3iPyi5zKhQZpNwpA= |
|||
github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= |
|||
github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= |
|||
github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= |
|||
github.com/gin-gonic/gin v1.7.1 h1:qC89GU3p8TvKWMAVhEpmpB2CIb1hnqt2UdKZaP93mS8= |
|||
github.com/gin-gonic/gin v1.7.1/go.mod h1:jD2toBW3GZUr5UMcdrwQA10I7RuaFOl/SGeDjXkfUtY= |
|||
github.com/go-playground/assert/v2 v2.0.1 h1:MsBgLAaY856+nPRTKrp3/OZK38U/wa0CcBYNjji3q3A= |
|||
github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= |
|||
github.com/go-playground/locales v0.13.0 h1:HyWk6mgj5qFqCT5fjGBuRArbVDfE4hi8+e8ceBS/t7Q= |
|||
github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= |
|||
github.com/go-playground/universal-translator v0.17.0 h1:icxd5fm+REJzpZx7ZfpaD876Lmtgy7VtROAbHHXk8no= |
|||
github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= |
|||
github.com/go-playground/validator/v10 v10.4.1 h1:pH2c5ADXtd66mxoE0Zm9SUhxE20r7aM3F26W0hOn+GE= |
|||
github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn9GlaMV7XkbRSipzJ0Ii4= |
|||
github.com/go-sql-driver/mysql v1.5.0 h1:ozyZYNQW3x3HtqT1jira07DN2PArx2v7/mN66gGcHOs= |
|||
github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= |
|||
github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= |
|||
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= |
|||
github.com/go-xorm/sqlfiddle v0.0.0-20180821085327-62ce714f951a/go.mod h1:56xuuqnHyryaerycW3BfssRdxQstACi0Epw/yC5E2xM= |
|||
github.com/gobuffalo/attrs v0.0.0-20190224210810-a9411de4debd/go.mod h1:4duuawTqi2wkkpB4ePgWMaai6/Kc6WEz83bhFwpHzj0= |
|||
github.com/gobuffalo/depgen v0.0.0-20190329151759-d478694a28d3/go.mod h1:3STtPUQYuzV0gBVOY3vy6CfMm/ljR4pABfrTeHNLHUY= |
|||
github.com/gobuffalo/depgen v0.1.0/go.mod h1:+ifsuy7fhi15RWncXQQKjWS9JPkdah5sZvtHc2RXGlg= |
|||
github.com/gobuffalo/envy v1.6.15/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= |
|||
github.com/gobuffalo/envy v1.7.0/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= |
|||
github.com/gobuffalo/flect v0.1.0/go.mod h1:d2ehjJqGOH/Kjqcoz+F7jHTBbmDb38yXA598Hb50EGs= |
|||
github.com/gobuffalo/flect v0.1.1/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI= |
|||
github.com/gobuffalo/flect v0.1.3/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI= |
|||
github.com/gobuffalo/genny v0.0.0-20190329151137-27723ad26ef9/go.mod h1:rWs4Z12d1Zbf19rlsn0nurr75KqhYp52EAGGxTbBhNk= |
|||
github.com/gobuffalo/genny v0.0.0-20190403191548-3ca520ef0d9e/go.mod h1:80lIj3kVJWwOrXWWMRzzdhW3DsrdjILVil/SFKBzF28= |
|||
github.com/gobuffalo/genny v0.1.0/go.mod h1:XidbUqzak3lHdS//TPu2OgiFB+51Ur5f7CSnXZ/JDvo= |
|||
github.com/gobuffalo/genny v0.1.1/go.mod h1:5TExbEyY48pfunL4QSXxlDOmdsD44RRq4mVZ0Ex28Xk= |
|||
github.com/gobuffalo/gitgen v0.0.0-20190315122116-cc086187d211/go.mod h1:vEHJk/E9DmhejeLeNt7UVvlSGv3ziL+djtTr3yyzcOw= |
|||
github.com/gobuffalo/gogen v0.0.0-20190315121717-8f38393713f5/go.mod h1:V9QVDIxsgKNZs6L2IYiGR8datgMhB577vzTDqypH360= |
|||
github.com/gobuffalo/gogen v0.1.0/go.mod h1:8NTelM5qd8RZ15VjQTFkAW6qOMx5wBbW4dSCS3BY8gg= |
|||
github.com/gobuffalo/gogen v0.1.1/go.mod h1:y8iBtmHmGc4qa3urIyo1shvOD8JftTtfcKi+71xfDNE= |
|||
github.com/gobuffalo/logger v0.0.0-20190315122211-86e12af44bc2/go.mod h1:QdxcLw541hSGtBnhUc4gaNIXRjiDppFGaDqzbrBd3v8= |
|||
github.com/gobuffalo/mapi v1.0.1/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= |
|||
github.com/gobuffalo/mapi v1.0.2/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= |
|||
github.com/gobuffalo/packd v0.0.0-20190315124812-a385830c7fc0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4= |
|||
github.com/gobuffalo/packd v0.1.0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4= |
|||
github.com/gobuffalo/packr/v2 v2.0.9/go.mod h1:emmyGweYTm6Kdper+iywB6YK5YzuKchGtJQZ0Odn4pQ= |
|||
github.com/gobuffalo/packr/v2 v2.2.0/go.mod h1:CaAwI0GPIAv+5wKLtv8Afwl+Cm78K/I/VCm/3ptBN+0= |
|||
github.com/gobuffalo/syncx v0.0.0-20190224160051-33c29581e754/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw= |
|||
github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= |
|||
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 h1:DACJavvAHhabrF08vX0COfcOBJRhZ8lUbR+ZWIs0Y5g= |
|||
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= |
|||
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= |
|||
github.com/golang/protobuf v1.3.3 h1:gyjaxf+svBWX08ZjK86iN9geUJF0H6gp2IRKX6Nf6/I= |
|||
github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= |
|||
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= |
|||
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= |
|||
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= |
|||
github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= |
|||
github.com/gopherjs/gopherjs v0.0.0-20190430165422-3e4dfb77656c/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= |
|||
github.com/hashicorp/consul/api v1.1.0 h1:BNQPM9ytxj6jbjjdRPioQ94T6YXriSopn0i8COv6SRA= |
|||
github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= |
|||
github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= |
|||
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= |
|||
github.com/hashicorp/go-cleanhttp v0.5.1 h1:dH3aiDG9Jvb5r5+bYHsikaOUIpcM0xvgMXVoDkXMzJM= |
|||
github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= |
|||
github.com/hashicorp/go-immutable-radix v1.0.0 h1:AKDB1HM5PWEA7i4nhcpwOrO2byshxBjXVn/J/3+z5/0= |
|||
github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= |
|||
github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= |
|||
github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= |
|||
github.com/hashicorp/go-rootcerts v1.0.0 h1:Rqb66Oo1X/eSV1x66xbDccZjhJigjg0+e82kpwzSwCI= |
|||
github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= |
|||
github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= |
|||
github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= |
|||
github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= |
|||
github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= |
|||
github.com/hashicorp/go-xid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= |
|||
github.com/hashicorp/go-xid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= |
|||
github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= |
|||
github.com/hashicorp/golang-lru v0.5.0 h1:CL2msUPvZTLb5O648aiLNJw3hnBxN2+1Jq8rCOH9wdo= |
|||
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= |
|||
github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= |
|||
github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= |
|||
github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= |
|||
github.com/hashicorp/serf v0.8.2 h1:YZ7UKsJv+hKjqGVUUbtE3HNj79Eln2oQ75tniF6iPt0= |
|||
github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= |
|||
github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4= |
|||
github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= |
|||
github.com/google/go-cmp v0.2.0 h1:+dTQ8DZQJz0Mb/HjFlkptS1FeQ4cWSnN941F8aEG4SQ= |
|||
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= |
|||
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= |
|||
github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= |
|||
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= |
|||
github.com/jtolds/gls v4.2.1+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= |
|||
github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= |
|||
github.com/juju/errors v0.0.0-20181118221551-089d3ea4e4d5 h1:rhqTjzJlm7EbkELJDKMTU7udov+Se0xZkWmugr6zGok= |
|||
github.com/juju/errors v0.0.0-20181118221551-089d3ea4e4d5/go.mod h1:W54LbzXuIE0boCoNJfwqpmkKJ1O4TCTZMetAt6jGk7Q= |
|||
github.com/juju/loggo v0.0.0-20180524022052-584905176618/go.mod h1:vgyd7OREkbtVEN/8IXZe5Ooef3LQePvuBm9UWj6ZL8U= |
|||
github.com/juju/testing v0.0.0-20180920084828-472a3e8b2073/go.mod h1:63prj8cnj0tU0S9OHjGJn+b1h0ZghCndfnbQolrYTwA= |
|||
github.com/klauspost/compress v1.7.5 h1:NMapGoDIKPKpk2hpcgAU6XHfsREHG2p8PIg7C3f/jpI= |
|||
github.com/klauspost/compress v1.7.5/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= |
|||
github.com/klauspost/cpuid v1.2.1 h1:vJi+O/nMdFt0vqm8NZBI6wzALWdA2X+egi0ogNyrC/w= |
|||
github.com/klauspost/cpuid v1.2.1/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= |
|||
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= |
|||
github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af h1:pmfjZENx5imkbgOkpRUYLnmbU7UEFbjtDA2hxJ1ichM= |
|||
github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= |
|||
github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= |
|||
github.com/json-iterator/go v1.1.9 h1:9yzud/Ht36ygwatGx56VwCZtlI/2AD15T1X2sjSuGns= |
|||
github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= |
|||
github.com/karrick/godirwalk v1.8.0/go.mod h1:H5KPZjojv4lE+QYImBI8xVtrBRgYrIVsaRPx4tDPEn4= |
|||
github.com/karrick/godirwalk v1.10.3/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA= |
|||
github.com/klauspost/compress v1.9.5 h1:U+CaK85mrNNb4k8BNOfgJtJ/gr6kswUCFj6miSzVC6M= |
|||
github.com/klauspost/compress v1.9.5/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= |
|||
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= |
|||
github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= |
|||
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= |
|||
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 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= |
|||
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= |
|||
github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= |
|||
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= |
|||
github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= |
|||
github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= |
|||
github.com/mgr9525/go-cloud v1.0.6-0.20191115021000-e912b446b8a9 h1:B5IIZcHuFAO3m+0fd8v1fbgd4KxRfgtzsCSkdHPdijs= |
|||
github.com/mgr9525/go-cloud v1.0.6-0.20191115021000-e912b446b8a9/go.mod h1:Wc25es8QefcN6HXFUroKShVuzvfjjkkaZDNVAc5q2sA= |
|||
github.com/mgr9525/go-cloud v1.0.6-0.20200223053750-a28de55e43ad h1:lYXlkhs/rgnMFXF2N0yY90tIgWH0vtD52RBAF3l3rD8= |
|||
github.com/mgr9525/go-cloud v1.0.6-0.20200223053750-a28de55e43ad/go.mod h1:Wc25es8QefcN6HXFUroKShVuzvfjjkkaZDNVAc5q2sA= |
|||
github.com/mgr9525/go-cloud v1.0.6-0.20200530080456-3229a970df44 h1:j8H9U+W2T3vZAQZsnD5diulTNMoe/8mJfVaiaV4BQS8= |
|||
github.com/mgr9525/go-cloud v1.0.6-0.20200530080456-3229a970df44/go.mod h1:Wc25es8QefcN6HXFUroKShVuzvfjjkkaZDNVAc5q2sA= |
|||
github.com/mgr9525/go-cloud v1.0.6-0.20200721084908-63975034665b h1:ACQj3DqgTd/8PHVCa8P8W0WtNIB7p0OgChmz2L7/B8A= |
|||
github.com/mgr9525/go-cloud v1.0.6-0.20200721084908-63975034665b/go.mod h1:Wc25es8QefcN6HXFUroKShVuzvfjjkkaZDNVAc5q2sA= |
|||
github.com/mgr9525/go-ruisutil v1.0.8-0.20191105071958-41a4e7d87b4f h1:OkBmLGM6QfRasXO2qR46H4rvIcDb6sfowY5mS0rePM4= |
|||
github.com/mgr9525/go-ruisutil v1.0.8-0.20191105071958-41a4e7d87b4f/go.mod h1:qXUWVKpHdwoxR0KERCkvL1JH2DETY6b5TMG9t6g9Pls= |
|||
github.com/mgr9525/go-ruisutil v1.0.8-0.20200121153146-d276c7bde649 h1:cmIrpn9w25Mhyw+cMg35PnkzyAPbPN1LA0QTKS8P93E= |
|||
github.com/mgr9525/go-ruisutil v1.0.8-0.20200121153146-d276c7bde649/go.mod h1:qXUWVKpHdwoxR0KERCkvL1JH2DETY6b5TMG9t6g9Pls= |
|||
github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= |
|||
github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= |
|||
github.com/mitchellh/go-homedir v1.0.0 h1:vKb8ShqSby24Yrqr/yDYkuFz8d0WUjys40rvnGC8aR0= |
|||
github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= |
|||
github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= |
|||
github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= |
|||
github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= |
|||
github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= |
|||
github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= |
|||
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= |
|||
github.com/leodido/go-urn v1.2.0 h1:hpXL4XnriNwQ/ABnpepYM/1vCLWNDfUNts8dX3xTG6Y= |
|||
github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= |
|||
github.com/lib/pq v1.7.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= |
|||
github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= |
|||
github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= |
|||
github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= |
|||
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= |
|||
github.com/mattn/go-sqlite3 v1.14.0 h1:mLyGNKR8+Vv9CAU7PphKa2hkEqxxhn8i32J6FPj1/QA= |
|||
github.com/mattn/go-sqlite3 v1.14.0/go.mod h1:JIl7NbARA7phWnGvh0LKTyg7S9BA+6gx71ShQilpsus= |
|||
github.com/mgr9525/HyperByte-Transfer-Protocol v0.0.0-20210422034730-0b85fcf3afe0 h1:pnIfNO1DHHY5QSTZZD6bIJa2yDoI+saVY4YaQd8EdA8= |
|||
github.com/mgr9525/HyperByte-Transfer-Protocol v0.0.0-20210422034730-0b85fcf3afe0/go.mod h1:U2OZ06VD1PHu3ZLZ8tuEHooaOZnoke/4ZKAZfL44bUQ= |
|||
github.com/mgr9525/go-cloud v1.0.6-0.20210422133326-ed77993699d3 h1:4fldzNYpak0ntMTv8Bfz5FG/f8SlN8hT6uG6eUWjoDQ= |
|||
github.com/mgr9525/go-cloud v1.0.6-0.20210422133326-ed77993699d3/go.mod h1:VkCKgivVD2OX75Zwh+AO3zuJyxGCsuo0zdy+UXCYy9I= |
|||
github.com/mgr9525/go-ruisutil v1.0.8-0.20210317093428-f69295935056 h1:JhXsFUB3mFWwiDc8c//E/6cUazJUX1lIiLgiM0asNjA= |
|||
github.com/mgr9525/go-ruisutil v1.0.8-0.20210317093428-f69295935056/go.mod h1:qXUWVKpHdwoxR0KERCkvL1JH2DETY6b5TMG9t6g9Pls= |
|||
github.com/mgr9525/logrus-file-hook v0.0.0-20210315103109-42681d084c3b h1:sGrxWDbhC2XpDKOLdNrYVo3Ga9YIFMr0AfjnP2gli0o= |
|||
github.com/mgr9525/logrus-file-hook v0.0.0-20210315103109-42681d084c3b/go.mod h1:HVZotikIVp6fGh+N2AU+jWHhT5ucVyk67MsPEP4MZWg= |
|||
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc= |
|||
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= |
|||
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742 h1:Esafd1046DLDQ0W1YjYsBW+p8U2u7vzgW2SQVmlNazg= |
|||
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= |
|||
github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= |
|||
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= |
|||
github.com/onsi/ginkgo v1.7.0 h1:WSHQ+IS43OoUrWtD1/bbclrwK8TTH5hzp+umCiuxHgs= |
|||
github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= |
|||
github.com/onsi/gomega v1.4.3 h1:RE1xgDvH7imwFD45h+u2SgIfERHlS2yNG4DObb5BSKU= |
|||
github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= |
|||
github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= |
|||
github.com/pelletier/go-toml v1.4.0/go.mod h1:PN7xzY2wHTK0K9p34ErDQMlFxa51Fk0OUruD3k1mMwo= |
|||
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= |
|||
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= |
|||
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= |
|||
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= |
|||
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/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= |
|||
github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= |
|||
github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= |
|||
github.com/siddontang/go v0.0.0-20180604090527-bdc77568d726/go.mod h1:3yhqj7WBBfRhbBlzyOC3gUxftwsU0u8gqevxwIHQpMw= |
|||
github.com/siddontang/ledisdb v0.0.0-20190202134119-8ceb77e66a92/go.mod h1:mF1DpOSOUiJRMR+FDqaqu3EBqrybQtrDDszLUZ6oxPg= |
|||
github.com/siddontang/rdb v0.0.0-20150307021120-fc89ed2e418d/go.mod h1:AMEsy7v5z92TR1JKMkLLoaOQk++LVnOKL3ScbJ8GNGA= |
|||
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= |
|||
github.com/smartystreets/assertions v0.0.0-20190116191733-b6c0e53d7304/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= |
|||
github.com/smartystreets/assertions v1.0.1/go.mod h1:kHHU4qYBaI3q23Pp3VPrmWhuIUrLW/7eUrw0BU5VaoM= |
|||
github.com/smartystreets/goconvey v0.0.0-20181108003508-044398e4856c/go.mod h1:XDJAKZRPZ1CvBcN2aX5YOUTYGHki24fSF0Iv48Ibg0s= |
|||
github.com/smartystreets/goconvey v0.0.0-20190731233626-505e41936337/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= |
|||
github.com/qiniu/qmgo v0.9.2 h1:xBfKhjTpynPfmJQE0HqlfaPlMBbzwYdX9ayBsEHxb5A= |
|||
github.com/qiniu/qmgo v0.9.2/go.mod h1:kpR2EI9/fZw609zL4rS47bQWlg80VrwPpmtniNkQmZY= |
|||
github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= |
|||
github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= |
|||
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= |
|||
github.com/sirupsen/logrus v1.4.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= |
|||
github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= |
|||
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= |
|||
github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE= |
|||
github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= |
|||
github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= |
|||
github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= |
|||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= |
|||
github.com/stretchr/objx v0.1.1 h1:2vfRuCMp5sSVIDSqO8oNnWJq7mPa6KVP3iPIwFBuy8A= |
|||
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= |
|||
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= |
|||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= |
|||
github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= |
|||
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= |
|||
github.com/syndtr/goleveldb v1.0.0 h1:fBdIW9lB4Iz0n9khmH8w27SJ3QEJ7+IgjPEwGSZiFdE= |
|||
github.com/syndtr/goleveldb v1.0.0/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpPAyBWyWuQ= |
|||
github.com/tealeg/xlsx v1.0.3 h1:BXsDIQYBPq2HgbwUxrsVXIrnO0BDxmsdUfHSfvwfBuQ= |
|||
github.com/tealeg/xlsx v1.0.3/go.mod h1:uxu5UY2ovkuRPWKQ8Q7JG0JbSivrISjdPzZQKeo74mA= |
|||
github.com/unknwon/com v0.0.0-20190804042917-757f69c95f3e h1:GSGeB9EAKY2spCABz6xOX5DbxZEXolK+nBSvmsQwRjM= |
|||
github.com/unknwon/com v0.0.0-20190804042917-757f69c95f3e/go.mod h1:tOOxU81rwgoCLoOVVPHb6T/wt8HZygqH5id+GNnlCXM= |
|||
github.com/xormplus/builder v0.0.0-20190724032102-0ee351fedce9 h1:h7b9aRnem5U6YuCWZlAnRWyowAR8hIIyyqUkbuAn0ms= |
|||
github.com/xormplus/builder v0.0.0-20190724032102-0ee351fedce9/go.mod h1:DR+4rxdyeR2G5yyiNx6j3/0TLjG5g+CICZfXmL2AHBg= |
|||
github.com/xormplus/core v0.0.0-20190724072625-00f5a85ad6e0 h1:vqleyrxQwTNEr+jlW3VuOYlTRtoyDp/h6C6b0R9Ewro= |
|||
github.com/xormplus/core v0.0.0-20190724072625-00f5a85ad6e0/go.mod h1:V3p6iAR/MaICgU6GJqxGQxspfljTyfOTv4Czz0B5atU= |
|||
github.com/xormplus/xorm v0.0.0-20190815102311-3995c60c8bb6/go.mod h1:+v6b10b4x5IcQmp1/Cbo9IqaknxVeuhQng+fhya6bdI= |
|||
github.com/xormplus/xorm v0.0.0-20190926190243-42377f593eb1 h1:aAOoM0H2aCXMrbD29iHSQL8zjQDDCFLisrgVBI5zZVY= |
|||
github.com/xormplus/xorm v0.0.0-20190926190243-42377f593eb1/go.mod h1:+v6b10b4x5IcQmp1/Cbo9IqaknxVeuhQng+fhya6bdI= |
|||
golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= |
|||
github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4= |
|||
github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= |
|||
github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo= |
|||
github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= |
|||
github.com/ugorji/go/codec v1.1.7 h1:2SvQaVZ1ouYrrKKwoSk2pzd4A9evlKJb9oTL+OaLUSs= |
|||
github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= |
|||
github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c h1:u40Z8hqBAAQyv+vATcGgV0YCnDjqSL7/q/JyPhhJSPk= |
|||
github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I= |
|||
github.com/xdg/stringprep v0.0.0-20180714160509-73f8eece6fdc h1:n+nNi93yXLkJvKwXNP9d55HC7lGK4H/SRcwB5IaUZLo= |
|||
github.com/xdg/stringprep v0.0.0-20180714160509-73f8eece6fdc/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y= |
|||
github.com/ziutek/mymysql v1.5.4/go.mod h1:LMSpPZ6DbqWFxNCHW77HeMg9I646SAhApZ/wKdgO/C0= |
|||
go.mongodb.org/mongo-driver v1.4.0 h1:C8rFn1VF4GVEM/rG+dSoMmlm2pyQ9cs2/oRtUATejRU= |
|||
go.mongodb.org/mongo-driver v1.4.0/go.mod h1:llVBH2pkj9HywK0Dtdt6lDikOjFLbceHVu/Rc0iMKLs= |
|||
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= |
|||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= |
|||
golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4 h1:HuIa8hRrWRSrqYzx1qI49NNxhdi2PrY7gxVSq1JjLDc= |
|||
golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= |
|||
golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= |
|||
golang.org/x/crypto v0.0.0-20190422162423-af44ce270edf/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= |
|||
golang.org/x/crypto v0.0.0-20190530122614-20be4c3c3ed5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= |
|||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI= |
|||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= |
|||
golang.org/x/image v0.0.0-20210220032944-ac19c3e999fb h1:fqpd0EBDzlHRCjiphRR5Zo/RSWWQlWv34418dnEixWk= |
|||
golang.org/x/image v0.0.0-20210220032944-ac19c3e999fb/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= |
|||
golang.org/x/net v0.0.0-20180218175443-cbe0f9307d01/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= |
|||
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= |
|||
golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= |
|||
golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= |
|||
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= |
|||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= |
|||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= |
|||
golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= |
|||
golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= |
|||
golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e h1:3G+cUijn7XD+S4eJFddp53Pv7+slrESplyjG25HgL+k= |
|||
golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= |
|||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= |
|||
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= |
|||
golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= |
|||
golang.org/x/sync v0.0.0-20190412183630-56d357773e84/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= |
|||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= |
|||
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= |
|||
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e h1:vcxGaoTs7kV8m5Np9uUNQin4BrLOthgV7252N8V+FwY= |
|||
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= |
|||
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= |
|||
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= |
|||
golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= |
|||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= |
|||
golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= |
|||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= |
|||
golang.org/x/sys v0.0.0-20190804053845-51ab0e2deafa h1:KIDDMLT1O0Nr7TSxp8xM5tJcdn8tgyAONntO829og1M= |
|||
golang.org/x/sys v0.0.0-20190804053845-51ab0e2deafa/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= |
|||
golang.org/x/sys v0.0.0-20190419153524-e8e3143a4f4a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= |
|||
golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= |
|||
golang.org/x/sys v0.0.0-20190531175056-4c3a928424d2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= |
|||
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= |
|||
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= |
|||
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd h1:xhmwyvizuTgC2qz7ZlMluP20uW+C3Rm0FD/WLDX8884= |
|||
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= |
|||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= |
|||
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= |
|||
golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k= |
|||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= |
|||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= |
|||
golang.org/x/tools v0.0.0-20181221001348-537d06c36207/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= |
|||
golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= |
|||
golang.org/x/tools v0.0.0-20190802220118-1d1727260058/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI= |
|||
golang.org/x/tools v0.0.0-20190329151228-23e29df326fe/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= |
|||
golang.org/x/tools v0.0.0-20190416151739-9c9e1878f421/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= |
|||
golang.org/x/tools v0.0.0-20190420181800-aa740d480789/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= |
|||
golang.org/x/tools v0.0.0-20190531172133-b3315ee88b7d/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= |
|||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= |
|||
gopkg.in/flosch/pongo2.v3 v3.0.0-20141028000813-5e81b817a0c4 h1:eyQQg/uGuZ3ndaBhqteakHpVW+dSOPalilfC9RpM2TA= |
|||
gopkg.in/flosch/pongo2.v3 v3.0.0-20141028000813-5e81b817a0c4/go.mod h1:bJkYqV5pg6+Z7MsSu/hSb1zsPT955hBW2QHLE1jm4wA= |
|||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= |
|||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= |
|||
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= |
|||
gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= |
|||
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= |
|||
gopkg.in/ini.v1 v1.46.0 h1:VeDZbLYGaupuvIrsYCEOe/L/2Pcs5n7hdO1ZTjporag= |
|||
gopkg.in/ini.v1 v1.46.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= |
|||
gopkg.in/macaron.v1 v1.3.4 h1:HvIscOwxhFhx3swWM/979wh2QMYyuXrNmrF9l+j3HZs= |
|||
gopkg.in/macaron.v1 v1.3.4/go.mod h1:/RoHTdC8ALpyJ3+QR36mKjwnT1F1dyYtsGM9Ate6ZFI= |
|||
gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= |
|||
gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22 h1:VpOs+IwYnYBaFnrNAeB8UUWtL3vEUnzSCL1nVjPhqrw= |
|||
gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= |
|||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= |
|||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= |
|||
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= |
|||
gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= |
|||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= |
|||
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= |
|||
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= |
|||
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= |
|||
xorm.io/builder v0.3.7 h1:2pETdKRK+2QG4mLX4oODHEhn5Z8j1m8sXa7jfu+/SZI= |
|||
xorm.io/builder v0.3.7/go.mod h1:aUW0S9eb9VCaPohFCH3j7czOx1PMW3i1HrSzbLYGBSE= |
|||
xorm.io/xorm v1.0.6 h1:7eco1c8QUpGz+3dztpLDj9gU1bTiQdFC/KtmPaLxUJk= |
|||
xorm.io/xorm v1.0.6/go.mod h1:uF9EtbhODq5kNWxMbnBEj8hRRZnlcNSz2t2N7HW/+A4= |
@ -1,7 +0,0 @@ |
|||
lang=go |
|||
genJson=0 |
|||
prefix=cos_ |
|||
ignoreColumnsJSON= |
|||
created= |
|||
updated= |
|||
deleted= |
@ -1,17 +0,0 @@ |
|||
package {{.Models}} |
|||
|
|||
{{$ilen := len .Imports}} |
|||
{{if gt $ilen 0}} |
|||
import ( |
|||
{{range .Imports}}"{{.}}"{{end}} |
|||
) |
|||
{{end}} |
|||
|
|||
{{range .Tables}} |
|||
type {{Mapper .Name}} struct { |
|||
{{$table := .}} |
|||
{{range .ColumnsSeq}}{{$col := $table.GetColumn .}} {{Mapper $col.Name}} {{Type $col}} {{Tag $table $col}} |
|||
{{end}} |
|||
} |
|||
{{end}} |
|||
|
@ -0,0 +1,28 @@ |
|||
kind: reverse |
|||
name: mydb |
|||
source: |
|||
database: mysql |
|||
conn_str: 'mgr:maoguorui!123@tcp(main.jazpan.com)/pans?charset=utf8' |
|||
targets: |
|||
- type: codes |
|||
language: golang |
|||
output_dir: ./models |
|||
multiple_files: true |
|||
# table_prefix: "t_" # 表前缀 |
|||
template: | # 生成模板,如果这里定义了,优先级比 template_path 高 |
|||
package models |
|||
|
|||
{{$ilen := len .Imports}} |
|||
{{if gt $ilen 0}} |
|||
import ( |
|||
{{range .Imports}}"{{.}}"{{end}} |
|||
) |
|||
{{end}} |
|||
|
|||
{{range .Tables}} |
|||
type {{TableMapper .Name}} struct { |
|||
{{$table := .}} |
|||
{{range .ColumnsSeq}}{{$col := $table.GetColumn .}} {{ColumnMapper $col.Name}} {{Type $col}} `{{Tag $table $col}}` |
|||
{{end}} |
|||
} |
|||
{{end}} |
@ -1,16 +1,32 @@ |
|||
package utilService |
|||
|
|||
import ( |
|||
"GoClouds/cloud/sysCloud" |
|||
"gopkg.in/macaron.v1" |
|||
"reflect" |
|||
"GoClouds/cloud/userCloud" |
|||
"GoClouds/models" |
|||
"github.com/gin-gonic/gin" |
|||
) |
|||
|
|||
func MidCheckUser(c *macaron.Context) { |
|||
lguser := sysCloud.CurrUser(c) |
|||
const LgUserKey = "mid-lguser" |
|||
|
|||
func MidCheckUser(c *gin.Context) { |
|||
lguser := userCloud.CurrUser(c) |
|||
if lguser == nil { |
|||
c.PlainText(403, []byte("未登录")) |
|||
c.String(403, "未登录") |
|||
c.Abort() |
|||
return |
|||
} |
|||
|
|||
c.Set(reflect.TypeOf(lguser), reflect.ValueOf(lguser)) |
|||
c.Set(LgUserKey, lguser) |
|||
c.Next() |
|||
} |
|||
func GetMidLgUser(c *gin.Context) *models.SysUser { |
|||
usr, ok := c.Get(LgUserKey) |
|||
if !ok { |
|||
return nil |
|||
} |
|||
lguser, ok := usr.(*models.SysUser) |
|||
if !ok { |
|||
return nil |
|||
} |
|||
return lguser |
|||
} |
@ -1,165 +0,0 @@ |
|||
package controller |
|||
|
|||
import ( |
|||
"GoClouds/core/utils" |
|||
"GoClouds/service/userService" |
|||
"GoClouds/webs/sys/app" |
|||
"fmt" |
|||
"github.com/donnie4w/go-logger/logger" |
|||
"github.com/go-macaron/cache" |
|||
gocloud "github.com/mgr9525/go-cloud" |
|||
ruisUtil "github.com/mgr9525/go-ruisutil" |
|||
"gopkg.in/macaron.v1" |
|||
"io/ioutil" |
|||
"net/http" |
|||
"net/url" |
|||
"strings" |
|||
"time" |
|||
) |
|||
|
|||
type CommController struct{} |
|||
|
|||
func (e *CommController) GetPath() string { |
|||
return "/comm" |
|||
} |
|||
func (e *CommController) Routes() { |
|||
gocloud.Web.Any("/clearCache", e.clearCache) |
|||
gocloud.Web.Any("/clearUserCache", e.clearUserCache) |
|||
gocloud.Web.Any("/getUserPerms", e.getUserPerms) |
|||
gocloud.Web.Any("/checkPermission", e.checkPermission) |
|||
gocloud.Web.Any("/sendSms", e.sendSms) |
|||
gocloud.Web.Any("/vaildSms", e.vaildSms) |
|||
} |
|||
func (e *CommController) Mid() []macaron.Handler { |
|||
return []macaron.Handler{gocloud.AccessAllowFun} |
|||
} |
|||
|
|||
func (e *CommController) clearCache(c *macaron.Context, ch cache.Cache, ctj gocloud.ContJSON) { |
|||
key := ctj.GetString("key") |
|||
if len(key) > 0 { |
|||
ch.Delete(key) |
|||
} else { |
|||
ch.Flush() |
|||
} |
|||
c.PlainText(200, []byte("ok")) |
|||
} |
|||
func (e *CommController) clearUserCache(c *macaron.Context, ch cache.Cache, ctj gocloud.ContJSON) { |
|||
uid := ctj.GetString("uid") |
|||
if len(uid) <= 0 { |
|||
c.PlainText(500, []byte("param err:uid!")) |
|||
return |
|||
} |
|||
ch.Delete(fmt.Sprintf("uinfo:%s", uid)) |
|||
ch.Delete(fmt.Sprintf("user-permission:%s", uid)) |
|||
c.PlainText(200, []byte("ok")) |
|||
} |
|||
func (e *CommController) checkPermission(c *macaron.Context, ch cache.Cache, ctj gocloud.ContJSON) { |
|||
uid := ctj.GetString("uid") |
|||
perm := ctj.GetString("perm") |
|||
|
|||
if len(uid) <= 0 { |
|||
c.PlainText(500, []byte("param err:uid!")) |
|||
return |
|||
} |
|||
if len(perm) <= 0 { |
|||
c.PlainText(500, []byte("param err:perm!")) |
|||
return |
|||
} |
|||
|
|||
c.PlainText(200, []byte(fmt.Sprintf("%t", userService.CheckPermission(uid, perm, ch)))) |
|||
} |
|||
func (e *CommController) getUserPerms(c *macaron.Context, ch cache.Cache, ctj gocloud.ContJSON) { |
|||
uid := ctj.GetString("uid") |
|||
|
|||
if len(uid) <= 0 { |
|||
c.PlainText(500, []byte("param err:uid!")) |
|||
return |
|||
} |
|||
|
|||
c.JSON(200, userService.FindUserPermissionCache(uid, ch)) |
|||
} |
|||
func (e *CommController) sendSms(c *macaron.Context, ch cache.Cache, ctj gocloud.ContJSON) { |
|||
phone := ctj.GetString("phone") |
|||
ips := ctj.GetString("ips") |
|||
if len(phone) <= 0 { |
|||
c.PlainText(500, []byte("param err:phone!")) |
|||
return |
|||
} |
|||
if len(ips) <= 0 { |
|||
c.PlainText(500, []byte("param err:ips!")) |
|||
return |
|||
} |
|||
|
|||
key1 := fmt.Sprintf("smsSend:%s", phone) |
|||
key2 := fmt.Sprintf("smsCode:%s", phone) |
|||
//key3 := fmt.Sprintf("smsSendIP:%s", ips)
|
|||
if ch.Get(key1) != nil /*||ch.Get(key3) != nil*/ { |
|||
c.PlainText(511, []byte("1分钟后重试!")) |
|||
return |
|||
} |
|||
|
|||
code := utils.GenValidateCode(6) |
|||
|
|||
parm := url.Values{} |
|||
parm.Set("mobile", phone) |
|||
parm.Set("param", "code:"+code) |
|||
parm.Set("tpl_id", app.Conf.Codetmpid) |
|||
req, err := http.NewRequest("POST", "http://dingxin.market.alicloudapi.com/dx/sendSms", strings.NewReader(parm.Encode())) |
|||
if err != nil { |
|||
c.PlainText(512, []byte("服务器错误!")) |
|||
return |
|||
} |
|||
cli := http.Client{Timeout: time.Second * 3} |
|||
req.Header.Set("Authorization", "APPCODE "+app.Conf.Smskey) |
|||
req.Header.Set("Content-Type", "application/x-www-form-urlencoded") |
|||
ch.Put(key1, []byte(fmt.Sprintf("%d", time.Now().Unix())), 60) |
|||
//ch.Put(key3, []byte(fmt.Sprintf("%d", time.Now().Unix())), 60)
|
|||
res, err := cli.Do(req) |
|||
if err != nil { |
|||
logger.Info("sendSms http err:" + err.Error()) |
|||
c.PlainText(513, []byte("服务器错误!")) |
|||
return |
|||
} |
|||
defer res.Body.Close() |
|||
bts, err := ioutil.ReadAll(res.Body) |
|||
if err != nil { |
|||
c.PlainText(514, []byte("服务器错误!")) |
|||
return |
|||
} |
|||
mp := ruisUtil.NewMapo(bts) |
|||
if mp.GetString("return_code") != "00000" { |
|||
logger.Info("return_code err(", res.StatusCode, ":'", parm.Encode(), "'):", string(bts)) |
|||
c.PlainText(521, []byte("发送失败:"+mp.GetString("return_code"))) |
|||
return |
|||
} |
|||
|
|||
logger.Info("发送短信:", phone, ",IP:", ips, "!!:", string(bts)) |
|||
ch.Put(key2, []byte(code), 60*5) |
|||
c.PlainText(200, []byte("ok")) |
|||
} |
|||
func (e *CommController) vaildSms(c *macaron.Context, ch cache.Cache, ctj gocloud.ContJSON) { |
|||
phone := ctj.GetString("phone") |
|||
code := ctj.GetString("code") |
|||
if len(phone) <= 0 { |
|||
c.PlainText(500, []byte("param err:phone!")) |
|||
return |
|||
} |
|||
if len(code) <= 0 { |
|||
c.PlainText(500, []byte("param err:code!")) |
|||
return |
|||
} |
|||
|
|||
key := fmt.Sprintf("smsCode:%s", phone) |
|||
btscode := ch.Get(key) |
|||
if btscode == nil { |
|||
c.PlainText(511, []byte("未找到验证码!")) |
|||
return |
|||
} |
|||
if code != string(btscode.([]byte)) { |
|||
c.PlainText(512, []byte("验证码错误!")) |
|||
return |
|||
} |
|||
|
|||
ch.Delete(key) |
|||
c.PlainText(200, []byte("ok")) |
|||
} |
@ -1,159 +0,0 @@ |
|||
package controller |
|||
|
|||
import ( |
|||
"GoClouds/cloud/sysCloud" |
|||
"GoClouds/core/bean" |
|||
"GoClouds/core/comm" |
|||
"GoClouds/core/utils" |
|||
"GoClouds/models" |
|||
"GoClouds/service" |
|||
"GoClouds/service/userService" |
|||
"encoding/json" |
|||
"fmt" |
|||
"github.com/donnie4w/go-logger/logger" |
|||
"github.com/go-macaron/cache" |
|||
gocloud "github.com/mgr9525/go-cloud" |
|||
ruisUtil "github.com/mgr9525/go-ruisutil" |
|||
"gopkg.in/macaron.v1" |
|||
"gopkg.in/mgo.v2/bson" |
|||
"strings" |
|||
"time" |
|||
) |
|||
|
|||
type UserController struct{} |
|||
|
|||
func (e *UserController) GetPath() string { |
|||
return "/user" |
|||
} |
|||
func (e *UserController) Routes() { |
|||
gocloud.Web.Any("/info", e.info) |
|||
gocloud.Web.Any("/login", e.login) |
|||
gocloud.Web.Any("/reg", e.reg) |
|||
} |
|||
func (e *UserController) Mid() []macaron.Handler { |
|||
return []macaron.Handler{gocloud.AccessAllowFun} |
|||
} |
|||
|
|||
func (UserController) info(c *macaron.Context, ch cache.Cache, ctj gocloud.ContJSON) { |
|||
xid := ctj.GetString("xid") |
|||
if len(xid) <= 0 { |
|||
c.PlainText(500, []byte("param err")) |
|||
return |
|||
} |
|||
|
|||
e := &models.SysUser{} |
|||
key := fmt.Sprintf("uinfo:%s", xid) |
|||
if ch.Get(key) != nil { |
|||
bts := ch.Get(key).([]byte) |
|||
err := json.Unmarshal(bts, e) |
|||
if err == nil { |
|||
c.JSON(200, e) |
|||
return |
|||
} |
|||
} |
|||
e = userService.FindXid(xid) |
|||
if e == nil { |
|||
c.PlainText(404, []byte("not found")) |
|||
return |
|||
} |
|||
bts, err := json.Marshal(e) |
|||
if err == nil { |
|||
ch.Put(key, bts, 3600*5) |
|||
} |
|||
c.JSON(200, e) |
|||
} |
|||
func (e *UserController) login(c *macaron.Context, ctj gocloud.ContJSON) { |
|||
name := ctj.GetString("name") |
|||
pass := ctj.GetString("pass") |
|||
if len(name) <= 0 { |
|||
c.PlainText(511, []byte("param err:name!")) |
|||
return |
|||
} |
|||
if len(pass) <= 0 { |
|||
c.PlainText(511, []byte("param err:pass!")) |
|||
return |
|||
} |
|||
|
|||
ret := &bean.SysLogin{} |
|||
usr := userService.FindName(name) |
|||
if usr == nil { |
|||
ret.Errs = "未找到用户" |
|||
c.JSON(200, ret) |
|||
return |
|||
} |
|||
if len(usr.Xid) <= 0 { |
|||
usr.Xid = fmt.Sprintf("%d", usr.Id) |
|||
comm.DbSys.Cols("xid").Where("id=?", usr.Id).Update(usr) |
|||
} |
|||
if usr.Pass != strings.ToUpper(ruisUtil.Md5String(pass)) { |
|||
ret.Errs = "密码错误" |
|||
c.JSON(200, ret) |
|||
return |
|||
} |
|||
if !sysCloud.CheckPermission(usr.Xid, "login") { |
|||
c.PlainText(514, []byte("帐号禁止登录")) |
|||
return |
|||
} |
|||
|
|||
usr.Logintm = time.Now() |
|||
comm.DbSys.Cols("logintm").Where("xid=?", usr.Xid).Update(usr) |
|||
|
|||
ret.Stat = 1 |
|||
ret.Uid = usr.Id |
|||
ret.Xid = usr.Xid |
|||
ret.Name = usr.Name |
|||
c.JSON(200, ret) |
|||
} |
|||
func (e *UserController) reg(c *macaron.Context, ctj gocloud.ContJSON) { |
|||
phone := ctj.GetString("phone") |
|||
pass := ctj.GetString("pass") |
|||
nick := ctj.GetString("nick") |
|||
if len(phone) <= 0 { |
|||
c.PlainText(511, []byte("param err:phone!")) |
|||
return |
|||
} |
|||
/*if len(pass) <= 0 { |
|||
c.PlainText(511, []byte("param err:pass!")) |
|||
return |
|||
}*/ |
|||
|
|||
ret := &bean.SysLogin{} |
|||
ne := userService.FindName(phone) |
|||
if ne != nil { |
|||
ret.Errs = "用户已注册过" |
|||
c.JSON(200, ret) |
|||
return |
|||
} |
|||
|
|||
ne = &models.SysUser{} |
|||
ne.Xid = bson.NewObjectId().Hex() |
|||
ne.Name = phone |
|||
ne.Phone = phone |
|||
if len(pass) > 0 { |
|||
ne.Pass = strings.ToUpper(ruisUtil.Md5String(pass)) |
|||
} |
|||
ne.Times = time.Now() |
|||
ne.Logintm = time.Now() |
|||
_, err := comm.DbSys.Insert(ne) |
|||
if err != nil { |
|||
logger.Info("nes SysUser insert err:" + err.Error()) |
|||
c.PlainText(512, []byte("插入用户错误!!")) |
|||
return |
|||
} |
|||
info := &models.MgoUserInfo{} |
|||
info.Id = bson.NewObjectId() |
|||
info.Uid = ne.Xid |
|||
info.Name = ne.Name |
|||
if len(nick) > 0 { |
|||
info.Nick = nick |
|||
} else { |
|||
info.Nick = fmt.Sprintf("U%s", utils.GenValidateCode(7)) |
|||
} |
|||
service.MgoUserInfoDao.GetSession().C().Insert(info) |
|||
|
|||
ret.Stat = 1 |
|||
ret.Uid = ne.Id |
|||
ret.Xid = ne.Xid |
|||
ret.Name = ne.Name |
|||
c.JSON(200, ret) |
|||
} |
@ -1,2 +0,0 @@ |
|||
smskey: xxxxxxxxxxxxxxx |
|||
codetmpid: TP1711063 |
@ -0,0 +1,20 @@ |
|||
package route |
|||
|
|||
import ( |
|||
"github.com/gin-gonic/gin" |
|||
) |
|||
|
|||
type IndexHandler struct{} |
|||
|
|||
func (IndexHandler) GetPath() string { |
|||
return "" |
|||
} |
|||
func (IndexHandler) GetMid() gin.HandlerFunc { |
|||
return nil |
|||
} |
|||
func (c *IndexHandler) Routes(g gin.IRoutes) { |
|||
g.Any("/stat", c.stat) |
|||
} |
|||
func (IndexHandler) stat(c *gin.Context) { |
|||
c.String(200, "hello") |
|||
} |
@ -0,0 +1,136 @@ |
|||
package routehb |
|||
|
|||
import ( |
|||
"GoClouds/core/bean/sysBean" |
|||
"GoClouds/core/utils" |
|||
"GoClouds/service/userService" |
|||
"fmt" |
|||
hbtp "github.com/mgr9525/HyperByte-Transfer-Protocol" |
|||
gocloud "github.com/mgr9525/go-cloud" |
|||
ruisUtil "github.com/mgr9525/go-ruisutil" |
|||
"github.com/sirupsen/logrus" |
|||
"io/ioutil" |
|||
"net/http" |
|||
"net/url" |
|||
"strings" |
|||
"time" |
|||
) |
|||
|
|||
type CommRPC struct{} |
|||
|
|||
func (CommRPC) AuthFun() hbtp.AuthFun { |
|||
return nil |
|||
} |
|||
|
|||
func (CommRPC) ClearCache(c *hbtp.Context, key string) { |
|||
var err error |
|||
if key == "" { |
|||
err = gocloud.CacheFlush() |
|||
} else { |
|||
err = gocloud.CacheSet(key, nil) |
|||
} |
|||
if err != nil { |
|||
c.ResString(hbtp.ResStatusErr, "gocloud err:"+err.Error()) |
|||
return |
|||
} |
|||
c.ResString(hbtp.ResStatusOk, "ok") |
|||
} |
|||
func (CommRPC) ClearUserCache(c *hbtp.Context, uid string) { |
|||
gocloud.CacheSet(fmt.Sprintf("uinfo:%s", uid), nil) |
|||
gocloud.CacheSet(fmt.Sprintf("user-permission:%s", uid), nil) |
|||
c.ResString(hbtp.ResStatusOk, "ok") |
|||
} |
|||
func (CommRPC) CheckPermission(c *hbtp.Context, m *sysBean.CheckPermissionReq) { |
|||
if m.Uid == "" { |
|||
c.ResString(hbtp.ResStatusErr, "param err") |
|||
return |
|||
} |
|||
if m.Perm == "" { |
|||
c.ResString(hbtp.ResStatusErr, "param err") |
|||
return |
|||
} |
|||
c.ResString(hbtp.ResStatusOk, fmt.Sprintf("%t", userService.CheckPermission(m.Uid, m.Perm))) |
|||
} |
|||
func (CommRPC) SendSms(c *hbtp.Context, m *sysBean.SendSmsReq) { |
|||
if m.Phone == "" { |
|||
c.ResString(hbtp.ResStatusErr, "param err:phone!") |
|||
return |
|||
} |
|||
if m.Ips == "" { |
|||
c.ResString(hbtp.ResStatusErr, "param err:ips!") |
|||
return |
|||
} |
|||
|
|||
key1 := fmt.Sprintf("smsSend:%s", m.Phone) |
|||
key2 := fmt.Sprintf("smsCode:%s", m.Phone) |
|||
//key3 := fmt.Sprintf("smsSendIP:%s", ips)
|
|||
data, err := gocloud.CacheGet(key1) |
|||
logrus.Debugf("SendSms get(%s):data=%s ,err=%v", key1, string(data), err) |
|||
if err == nil { |
|||
c.ResString(hbtp.ResStatusErr, "1分钟后重试!") |
|||
return |
|||
} |
|||
|
|||
code := utils.GenValidateCode(6) |
|||
|
|||
parm := url.Values{} |
|||
parm.Set("mobile", m.Phone) |
|||
parm.Set("param", "code:"+code) |
|||
parm.Set("tpl_id", gocloud.CloudConf.Custom.GetString("codetmpid")) |
|||
req, err := http.NewRequest("POST", "http://dingxin.market.alicloudapi.com/dx/sendSms", strings.NewReader(parm.Encode())) |
|||
if err != nil { |
|||
c.ResString(hbtp.ResStatusErr, "send req err:"+err.Error()) |
|||
return |
|||
} |
|||
cli := http.Client{Timeout: time.Second * 3} |
|||
req.Header.Set("Authorization", "APPCODE "+gocloud.CloudConf.Custom.GetString("smskey")) |
|||
req.Header.Set("Content-Type", "application/x-www-form-urlencoded") |
|||
//ch.Put(key3, []byte(fmt.Sprintf("%d", time.Now().Unix())), 60)
|
|||
res, err := cli.Do(req) |
|||
if err != nil { |
|||
logrus.Debug("sendSms http err:" + err.Error()) |
|||
c.ResString(hbtp.ResStatusErr, "send do err:"+err.Error()) |
|||
return |
|||
} |
|||
defer res.Body.Close() |
|||
gocloud.CacheSet(key1, []byte(time.Now().Format(time.RFC3339Nano)), time.Second*60) |
|||
bts, err := ioutil.ReadAll(res.Body) |
|||
if err != nil { |
|||
c.ResString(hbtp.ResStatusErr, "send read err:"+err.Error()) |
|||
return |
|||
} |
|||
mp := ruisUtil.NewMapo(bts) |
|||
if mp.GetString("return_code") != "00000" { |
|||
logrus.Debug("return_code err(", res.StatusCode, ":'", parm.Encode(), "'):", string(bts)) |
|||
c.ResString(hbtp.ResStatusErr, "发送失败:"+mp.GetString("return_code")) |
|||
return |
|||
} |
|||
|
|||
logrus.Debug("发送短信:", m.Phone, ",IP:", m.Ips, "!!:", string(bts)) |
|||
gocloud.CacheSet(key2, []byte(code), time.Second*60*5) |
|||
c.ResString(hbtp.ResStatusOk, "ok") |
|||
} |
|||
func (CommRPC) ValidSms(c *hbtp.Context, m *sysBean.VaildSmsReq) { |
|||
if m.Phone == "" { |
|||
c.ResString(hbtp.ResStatusErr, "param err:phone!") |
|||
return |
|||
} |
|||
if m.Code == "" { |
|||
c.ResString(hbtp.ResStatusErr, "param err:code!") |
|||
return |
|||
} |
|||
|
|||
key := fmt.Sprintf("smsCode:%s", m.Phone) |
|||
btscode, err := gocloud.CacheGet(key) |
|||
if err != nil { |
|||
c.ResString(hbtp.ResStatusErr, "未找到验证码!") |
|||
return |
|||
} |
|||
if m.Code != string(btscode) { |
|||
c.ResString(hbtp.ResStatusErr, "验证码错误!") |
|||
return |
|||
} |
|||
|
|||
gocloud.CacheSet(key, nil) |
|||
c.ResString(hbtp.ResStatusOk, "ok") |
|||
} |
@ -0,0 +1,207 @@ |
|||
package routehb |
|||
|
|||
import ( |
|||
"GoClouds/core/bean/sysBean" |
|||
"GoClouds/core/comm" |
|||
"GoClouds/core/utils" |
|||
"GoClouds/models" |
|||
"GoClouds/service" |
|||
"GoClouds/service/userService" |
|||
"context" |
|||
"fmt" |
|||
hbtp "github.com/mgr9525/HyperByte-Transfer-Protocol" |
|||
gocloud "github.com/mgr9525/go-cloud" |
|||
ruisUtil "github.com/mgr9525/go-ruisutil" |
|||
"github.com/sirupsen/logrus" |
|||
"go.mongodb.org/mongo-driver/bson/primitive" |
|||
"strings" |
|||
"time" |
|||
) |
|||
|
|||
type UserRPC struct{} |
|||
|
|||
func (UserRPC) AuthFun() hbtp.AuthFun { |
|||
return nil |
|||
} |
|||
|
|||
func (UserRPC) GetUsrPerms(c *hbtp.Context, uid string) { |
|||
c.ResJson(hbtp.ResStatusOk, userService.FindUserPermissionCache(uid)) |
|||
} |
|||
func (UserRPC) Info(c *hbtp.Context, id string) { |
|||
if id == "" { |
|||
c.ResString(hbtp.ResStatusErr, "param err") |
|||
return |
|||
} |
|||
|
|||
e := &models.SysUser{} |
|||
key := fmt.Sprintf("uinfo:%s", id) |
|||
if err := gocloud.CacheGets(key, e); err != nil { |
|||
e = userService.FindXid(id) |
|||
gocloud.CacheSets(key, e, time.Hour*2) |
|||
} |
|||
c.ResJson(hbtp.ResStatusOk, e) |
|||
} |
|||
func (UserRPC) Login(c *hbtp.Context, m *sysBean.LoginReq) { |
|||
if m.Name == "" { |
|||
c.ResString(hbtp.ResStatusErr, "param err:name!") |
|||
return |
|||
} |
|||
if m.Pass == "" { |
|||
c.ResString(hbtp.ResStatusErr, "param err:pass!") |
|||
return |
|||
} |
|||
|
|||
ret := &sysBean.LoginRes{} |
|||
usr := userService.FindName(m.Name) |
|||
if usr == nil { |
|||
ret.Errs = "未找到用户" |
|||
c.ResJson(hbtp.ResStatusOk, ret) |
|||
return |
|||
} |
|||
if len(usr.Xid) <= 0 { |
|||
usr.Xid = fmt.Sprintf("%d", usr.Id) |
|||
comm.DbSysHelper.GetDB().Cols("xid").Where("id=?", usr.Id).Update(usr) |
|||
} |
|||
if usr.Pass != strings.ToUpper(ruisUtil.Md5String(m.Pass)) { |
|||
ret.Errs = "密码错误" |
|||
c.ResJson(hbtp.ResStatusOk, ret) |
|||
return |
|||
} |
|||
/*if !sysCloud.CheckPermission(usr.Xid, "login") { |
|||
c.PlainText(514, []byte("帐号禁止登录")) |
|||
return |
|||
}*/ |
|||
|
|||
usr.Logintm = time.Now() |
|||
comm.DbSysHelper.GetDB().Cols("logintm").Where("xid=?", usr.Xid).Update(usr) |
|||
|
|||
ret.Stat = 1 |
|||
ret.Uid = usr.Id |
|||
ret.Xid = usr.Xid |
|||
ret.Name = usr.Name |
|||
c.ResJson(hbtp.ResStatusOk, ret) |
|||
} |
|||
func (UserRPC) Reg(c *hbtp.Context, m *sysBean.RegReq) { |
|||
if m.Name == "" { |
|||
c.ResString(hbtp.ResStatusErr, "param err:name!") |
|||
return |
|||
} |
|||
ret := &sysBean.LoginRes{} |
|||
ne := userService.FindName(m.Name) |
|||
if ne != nil { |
|||
ret.Errs = "用户已注册过" |
|||
c.ResJson(hbtp.ResStatusOk, ret) |
|||
return |
|||
} |
|||
|
|||
ne = &models.SysUser{} |
|||
ne.Xid = ruisUtil.NewXid() |
|||
ne.Name = m.Name |
|||
ne.Phone = m.Name |
|||
if len(m.Pass) > 0 { |
|||
ne.Pass = strings.ToUpper(ruisUtil.Md5String(m.Pass)) |
|||
} |
|||
ne.Times = time.Now() |
|||
ne.Logintm = time.Now() |
|||
_, err := comm.DbSysHelper.GetDB().Insert(ne) |
|||
if err != nil { |
|||
logrus.Debug("nes SysUser insert err:" + err.Error()) |
|||
c.ResString(hbtp.ResStatusErr, "插入用户错误!!") |
|||
return |
|||
} |
|||
info := &models.MgoUserInfo{} |
|||
info.Id = primitive.NewObjectID() |
|||
info.Uid = ne.Xid |
|||
info.Name = ne.Name |
|||
if len(m.Nick) > 0 { |
|||
info.Nick = m.Nick |
|||
} else { |
|||
info.Nick = fmt.Sprintf("U%s", utils.GenValidateCode(7)) |
|||
} |
|||
_, err = service.MgoUserInfoDao.GetSession().C().InsertOne(context.Background(), info) |
|||
if err != nil { |
|||
c.ResString(hbtp.ResStatusErr, "qmgo err:"+err.Error()) |
|||
return |
|||
} |
|||
|
|||
ret.Stat = 1 |
|||
ret.Uid = ne.Id |
|||
ret.Xid = ne.Xid |
|||
ret.Name = ne.Name |
|||
c.ResJson(hbtp.ResStatusOk, ret) |
|||
} |
|||
func (UserRPC) Forgot(c *hbtp.Context, m *sysBean.LoginReq) { |
|||
if m.Name == "" { |
|||
c.ResString(hbtp.ResStatusErr, "param err:name!") |
|||
return |
|||
} |
|||
if m.Pass == "" { |
|||
c.ResString(hbtp.ResStatusErr, "param err:pass!") |
|||
return |
|||
} |
|||
|
|||
ret := &sysBean.LoginRes{} |
|||
ne := userService.FindName(m.Name) |
|||
if ne == nil { |
|||
ret.Errs = "用户未注册过" |
|||
c.ResJson(hbtp.ResStatusOk, ret) |
|||
return |
|||
} |
|||
|
|||
ne.Pass = strings.ToUpper(ruisUtil.Md5String(m.Pass)) |
|||
_, err := comm.DbSysHelper.GetDB().Cols("pass").Where("id=?", ne.Id).Update(ne) |
|||
if err != nil || ne.Id <= 0 { |
|||
ret.Errs = "修改用户错误" |
|||
c.ResJson(hbtp.ResStatusOk, ret) |
|||
return |
|||
} |
|||
|
|||
ret.Stat = 1 |
|||
ret.Uid = ne.Id |
|||
ret.Xid = ne.Xid |
|||
ret.Name = ne.Name |
|||
c.ResJson(hbtp.ResStatusOk, ret) |
|||
} |
|||
func (UserRPC) Uppass(c *hbtp.Context, m *sysBean.UppassReq) { |
|||
if m.Xid == "" { |
|||
c.ResString(hbtp.ResStatusErr, "param err:xid!") |
|||
return |
|||
} |
|||
if m.Pass == "" || m.NPass == "" { |
|||
c.ResString(hbtp.ResStatusErr, "param err:pass!") |
|||
return |
|||
} |
|||
|
|||
ret := &sysBean.LoginRes{} |
|||
ne := userService.FindXid(m.Xid) |
|||
if ne == nil { |
|||
ret.Errs = "用户未找到" |
|||
c.ResJson(hbtp.ResStatusOk, ret) |
|||
return |
|||
} |
|||
if ne.Name == "bbtpt" /*||sysCloud.CheckPermission(ne.Id,"user:uppass")*/ { |
|||
ret.Errs = "该用户禁止修改密码" |
|||
c.ResJson(hbtp.ResStatusOk, ret) |
|||
return |
|||
} |
|||
|
|||
if ne.Pass != strings.ToUpper(ruisUtil.Md5String(m.Pass)) { |
|||
ret.Errs = "旧密码错误" |
|||
c.ResJson(hbtp.ResStatusOk, ret) |
|||
return |
|||
} |
|||
|
|||
ne.Pass = strings.ToUpper(ruisUtil.Md5String(m.NPass)) |
|||
_, err := comm.DbSysHelper.GetDB().Cols("pass").Where("id=?", ne.Id).Update(ne) |
|||
if err != nil || ne.Id <= 0 { |
|||
ret.Errs = "修改用户错误" |
|||
c.ResJson(hbtp.ResStatusOk, ret) |
|||
return |
|||
} |
|||
|
|||
ret.Stat = 1 |
|||
ret.Uid = ne.Id |
|||
ret.Xid = ne.Xid |
|||
ret.Name = ne.Name |
|||
c.ResJson(hbtp.ResStatusOk, ret) |
|||
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue