Compare commits
3 Commits
Author | SHA1 | Date |
---|---|---|
文武 | 14c63d1881 | 6 months ago |
文武 | c9bd17d7a1 | 6 months ago |
文武 | c67413f1a3 | 6 months ago |
289 changed files with 51368 additions and 1 deletions
@ -0,0 +1,49 @@ |
|||
workspace: |
|||
base: /project |
|||
path: src/demo |
|||
|
|||
branches: [ master,develop,uat ] |
|||
|
|||
|
|||
pipeline: |
|||
|
|||
build: |
|||
image: golang:1.20-alpine |
|||
commands: |
|||
- export GO111MODULE=on |
|||
- export GOPROXY=https://goproxy.cn,direct |
|||
- CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o server.app |
|||
# - make build |
|||
|
|||
docker-dev: |
|||
image: plugins/docker |
|||
repo: registry.cn-shenzhen.aliyuncs.com/ax-stor/ax-bkb-seller |
|||
registry: registry.cn-shenzhen.aliyuncs.com |
|||
use_cache: true |
|||
dockerfile: Dockerfile |
|||
secrets: [ docker_username, docker_password ] |
|||
tags: seller-api |
|||
when: |
|||
branch: develop |
|||
|
|||
# deploy-dev: |
|||
# image: roffe/kubectl |
|||
# commands: |
|||
# - rm -rf /root/.kube && cp -r .kube /root |
|||
# - kubectl delete -f deployDev.yaml || true |
|||
# - kubectl apply -f deployDev.yaml |
|||
# when: |
|||
# branch: develop |
|||
deploy-dev: |
|||
image: appleboy/drone-ssh |
|||
host: 1.92.109.79 |
|||
username: root |
|||
password: |
|||
from_secret: ssh_password |
|||
port: 22 # 可选,指定 SSH 端口,默认为 22 |
|||
script: |
|||
- docker rm -f seller-api |
|||
- docker pull registry.cn-shenzhen.aliyuncs.com/ax-stor/ax-bkb-seller:seller-api |
|||
- docker run --name=seller-api -p 30203:8001 -d registry.cn-shenzhen.aliyuncs.com/ax-stor/ax-bkb-seller:seller-api |
|||
when: |
|||
branch: develop |
@ -0,0 +1,21 @@ |
|||
# Binaries for programs and plugins |
|||
*.exe |
|||
*.exe~ |
|||
*.dll |
|||
*.so |
|||
*.dylib |
|||
|
|||
# Test binary, build with `go test -c` |
|||
*.test |
|||
|
|||
# Output of the go coverage tool, specifically when used with LiteIDE |
|||
*.out |
|||
*.log |
|||
log |
|||
|
|||
*.DS_Store |
|||
/.idea |
|||
*.vscode |
|||
/.history |
|||
__debug* |
|||
cache |
@ -0,0 +1,8 @@ |
|||
FROM registry.cn-shanghai.aliyuncs.com/lj-go/alpine |
|||
LABEL MAINTAINER="template" |
|||
|
|||
WORKDIR /go/src/show |
|||
COPY . /go/src/show |
|||
RUN ls |
|||
EXPOSE 8001 |
|||
ENTRYPOINT ./server.app |
@ -1,2 +1,3 @@ |
|||
# seller-api |
|||
# admin-pure-api |
|||
|
|||
模版仓库 admin-api |
@ -0,0 +1,93 @@ |
|||
package bkb |
|||
|
|||
import ( |
|||
"bkb-seller/api/sys" |
|||
"bkb-seller/global" |
|||
"bkb-seller/model/request" |
|||
"bkb-seller/model/response" |
|||
"bkb-seller/service" |
|||
"bkb-seller/utils" |
|||
"github.com/gin-gonic/gin" |
|||
"go.uber.org/zap" |
|||
"time" |
|||
) |
|||
|
|||
// SellAnalyses
|
|||
// @Summary 获取销售额/订单数统计【v1.0】
|
|||
// @Description
|
|||
// @Tags console
|
|||
// @Security ApiKeyAuth
|
|||
// @Param data query request.MissionAnalyses false "params"
|
|||
// @Success 200 {object} model.CoordinateData "{"code": 200, "data": {}}"
|
|||
// @Router /console/sell-analyses [get]
|
|||
func SellAnalyses(c *gin.Context) { |
|||
var info request.MissionAnalyses |
|||
_ = c.ShouldBindQuery(&info) |
|||
if err := utils.Verify(info.Chart, utils.ChartVerify); err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
info.TimeZone, _ = time.LoadLocation(c.GetHeader("Time-Zone")) |
|||
if err, data := service.GetSellAnalyses1(sys.GetUserUuid(c), info); err != nil { |
|||
global.MG_LOG.Error("获取失败!", zap.Any("err", err)) |
|||
response.FailWithMessage("获取失败", c) |
|||
} else { |
|||
response.OkWithData(data, c) |
|||
} |
|||
} |
|||
|
|||
// SellAnalysesInfluencer
|
|||
// @Summary 获取网红销售额/订单数统计【v1.0】
|
|||
// @Description
|
|||
// @Tags console
|
|||
// @Security ApiKeyAuth
|
|||
// @Param data query request.MissionInfluencerAnalyses false "params"
|
|||
// @Success 200 {object} model.CoordinateData "{"code": 200, "data": {}}"
|
|||
// @Router /console/influencer-sell-analyses [get]
|
|||
func SellAnalysesInfluencer(c *gin.Context) { |
|||
var info request.MissionInfluencerAnalyses |
|||
_ = c.ShouldBindQuery(&info) |
|||
if err := utils.Verify(info.Chart, utils.ChartVerify); err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
if err := utils.Verify(info, utils.MissionIdVerify); err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
info.TimeZone, _ = time.LoadLocation(c.GetHeader("Time-Zone")) |
|||
if err, data := service.GetInfluencerSellAnalyses(getUserUuid(c), info); err != nil { |
|||
global.MG_LOG.Error("获取失败!", zap.Any("err", err)) |
|||
response.FailWithMessage("获取失败", c) |
|||
} else { |
|||
response.OkWithData(data, c) |
|||
} |
|||
} |
|||
|
|||
// SellRankInfluencer
|
|||
// @Summary 获取网红销售额排名【v1.0】
|
|||
// @Description
|
|||
// @Tags console
|
|||
// @Security ApiKeyAuth
|
|||
// @Param data query request.MissionInfluencerRank false "params"
|
|||
// @Success 200 {array} model.RankDataObj "{"code": 200, "data": {}}"
|
|||
// @Router /console/influencer-sell-rank [get]
|
|||
func SellRankInfluencer(c *gin.Context) { |
|||
var info request.MissionInfluencerRank |
|||
_ = c.ShouldBindQuery(&info) |
|||
if err := utils.Verify(info.PageInfo, utils.PageInfoVerify); err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
if err, list, total := service.SellRankInfluencer(getUserUuid(c), info); err != nil { |
|||
global.MG_LOG.Error("获取失败!", zap.Any("err", err)) |
|||
response.FailWithMessage("获取失败", c) |
|||
} else { |
|||
response.OkWithDetailed(response.PageResult{ |
|||
List: list, |
|||
Total: total, |
|||
Page: info.Page, |
|||
PageSize: info.PageSize, |
|||
}, "获取成功", c) |
|||
} |
|||
} |
@ -0,0 +1,36 @@ |
|||
package bkb |
|||
|
|||
import ( |
|||
"bkb-seller/model/request" |
|||
"bkb-seller/model/response" |
|||
"bkb-seller/service" |
|||
"bkb-seller/utils" |
|||
"github.com/gin-gonic/gin" |
|||
) |
|||
|
|||
// GetChainInfo
|
|||
// @Summary 获取区块链数据
|
|||
// @Description
|
|||
// @Tags Chain
|
|||
// @Param data query request.ChainParams false "data..."
|
|||
// @Success 200 {object} []response.ChainResp "{"code": 0, "data": [...]}"
|
|||
// @Success 201 {string} string "{"code": 1, "message": ""}"
|
|||
// @Router /base/chain [get]
|
|||
func GetChainInfo(c *gin.Context) { |
|||
var ( |
|||
err error |
|||
params request.ChainParams |
|||
result []response.ChainResp |
|||
) |
|||
_ = c.ShouldBindQuery(¶ms) |
|||
if err = utils.Verify(params, utils.ChainVerify); err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
err, result = service.GetChainInfo(params.Hash) |
|||
if err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
response.OkWithData(result, c) |
|||
} |
@ -0,0 +1,40 @@ |
|||
package bkb |
|||
|
|||
import ( |
|||
"github.com/gin-gonic/gin" |
|||
|
|||
"bkb-seller/model/request" |
|||
"bkb-seller/model/response" |
|||
"bkb-seller/service" |
|||
"bkb-seller/utils" |
|||
) |
|||
|
|||
// GetSysDictDataList
|
|||
// @Tags dict
|
|||
// @Summary 获取数据字典取值列表【v1.0】
|
|||
// @Security ApiKeyAuth
|
|||
// @accept application/json
|
|||
// @Produce application/json
|
|||
// @Param data query request.SearchDictDataParams true "data"
|
|||
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
|
|||
// @Router /dict/getDictDataList [get]
|
|||
func GetSysDictDataList(c *gin.Context) { |
|||
var ( |
|||
err error |
|||
list any |
|||
params request.SearchDictDataParams |
|||
) |
|||
_ = c.ShouldBindQuery(¶ms) |
|||
if err = utils.Verify(params, utils.DictDataVerity); err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
if err, list = service.GetSysDictDataList(params); err != nil { |
|||
// //global.MG_LOG.Error("获取失败!", zap.Any("err", err))
|
|||
response.FailWithMessage("获取失败", c) |
|||
} else { |
|||
response.OkWithDetailed(response.SelectListResult{ |
|||
List: list, |
|||
}, "获取成功", c) |
|||
} |
|||
} |
@ -0,0 +1,38 @@ |
|||
package bkb |
|||
|
|||
import ( |
|||
"bkb-seller/model/request" |
|||
"bkb-seller/model/response" |
|||
"bkb-seller/service" |
|||
|
|||
"github.com/gin-gonic/gin" |
|||
) |
|||
|
|||
// @Summary 获取用户基本信息
|
|||
// @Security Bearer
|
|||
// @Description
|
|||
// @Tags influencer
|
|||
// @Param data query request.SearchInfluencerUser false "data..."
|
|||
// @Success 200 {object} model.InfluencerUserDesc "{"code": 0, "data": [...]}"
|
|||
// @Success 200 {string} string "{"code": 1, "message": ""}"
|
|||
// @Router /influencer/user [get]
|
|||
func GetUserDetail(c *gin.Context) { |
|||
var ( |
|||
err error |
|||
req request.SearchInfluencerUser |
|||
userID string |
|||
data interface{} |
|||
) |
|||
c.ShouldBind(&req) |
|||
if req.ID == "" { |
|||
response.FailWithMessage("用户id不可为空", c) |
|||
return |
|||
} |
|||
userID = req.ID |
|||
err, data = service.GetInfluencerUserDetail(userID) |
|||
if err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
response.OkWithData(data, c) |
|||
} |
@ -0,0 +1,394 @@ |
|||
package bkb |
|||
|
|||
import ( |
|||
"bkb-seller/api/sys" |
|||
"bkb-seller/global" |
|||
"bkb-seller/model/request" |
|||
"bkb-seller/model/response" |
|||
"bkb-seller/service" |
|||
"bkb-seller/utils" |
|||
|
|||
"github.com/gin-gonic/gin" |
|||
"go.uber.org/zap" |
|||
) |
|||
|
|||
// GetMissionDetail
|
|||
// @Summary 获取任务详情【v1.0】
|
|||
// @Description
|
|||
// @Tags mission
|
|||
// @Security ApiKeyAuth
|
|||
// @Param data query request.IdReq false "params"
|
|||
// @Success 200 {object} response.MissionResponse "{"code": 200, "data": {}}"
|
|||
// @Router /mission/mission [get]
|
|||
func GetMissionDetail(c *gin.Context) { |
|||
var info request.IdReq |
|||
_ = c.ShouldBindQuery(&info) |
|||
if err := utils.Verify(info, utils.IdVerify); err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
if err, data := service.GetMissionDetail(getUserUuid(c), info.ID); err != nil { |
|||
global.MG_LOG.Error("获取失败!", zap.Any("err", err)) |
|||
response.FailWithMessage("获取失败", c) |
|||
} else { |
|||
response.OkWithData(response.MissionResponse{Mission: data}, c) |
|||
} |
|||
} |
|||
|
|||
// GetMissionList
|
|||
// @Summary 获取任务列表【v1.0】
|
|||
// @Description
|
|||
// @Tags mission
|
|||
// @Security ApiKeyAuth
|
|||
// @Param data query request.SearchMission false "params"
|
|||
// @Success 200 {object} response.PageResult "{"code": 200, "data": {}}"
|
|||
// @Router /mission/mission-list [get]
|
|||
func GetMissionList(c *gin.Context) { |
|||
var info request.SearchMission |
|||
_ = c.ShouldBindQuery(&info) |
|||
if err := utils.Verify(info.PageInfo, utils.PageInfoVerify); err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
//if timeZone := c.GetHeader("Time-Zone"); timeZone != "" {
|
|||
// info.TimeZone, _ = time.LoadLocation(timeZone)
|
|||
//} else {
|
|||
// info.TimeZone = time.Local
|
|||
//}
|
|||
if err, list, total := service.GetMissionList(getUserUuid(c), info); err != nil { |
|||
global.MG_LOG.Error("获取失败!", zap.Any("err", err)) |
|||
response.FailWithMessage("获取失败", c) |
|||
} else { |
|||
response.OkWithDetailed(response.PageResult{ |
|||
List: list, |
|||
Total: total, |
|||
Page: info.Page, |
|||
PageSize: info.PageSize, |
|||
}, "获取成功", c) |
|||
} |
|||
} |
|||
|
|||
// CreateMission
|
|||
// @Summary 创建任务【v1.0】
|
|||
// @Description
|
|||
// @Tags mission
|
|||
// @Security ApiKeyAuth
|
|||
// @Param data body request.CreateMission false "params"
|
|||
// @Success 200 {object} response.IDResponse "{"code": 200, "data": {}}"
|
|||
// @Router /mission/mission [post]
|
|||
func CreateMission(c *gin.Context) { |
|||
var info request.CreateMission |
|||
_ = c.ShouldBindJSON(&info) |
|||
if err := utils.Verify(info, utils.CreateMissionVerity); err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
user := sys.GetUserInfo(c) |
|||
if err, id := service.CreateMission(user.UUID, user.RelationID, info); err != nil { |
|||
global.MG_LOG.Error("创建失败!", zap.Any("err", err)) |
|||
response.FailWithMessage(err.Error(), c) |
|||
} else { |
|||
response.OkWithDetailed(gin.H{"id": id}, "创建成功", c) |
|||
} |
|||
} |
|||
|
|||
// UpdateMission
|
|||
// @Summary 编辑任务【v1.0】
|
|||
// @Description
|
|||
// @Tags mission
|
|||
// @Security ApiKeyAuth
|
|||
// @Param data body request.UpdateMission false "params"
|
|||
// @Success 200 {object} response.IDResponse "{"code": 200, "data": {}}"
|
|||
// @Router /mission/mission [put]
|
|||
func UpdateMission(c *gin.Context) { |
|||
var info request.UpdateMission |
|||
_ = c.ShouldBindJSON(&info) |
|||
if err := utils.Verify(info, utils.IdVerify); err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
user := sys.GetUserInfo(c) |
|||
if err, id := service.UpdateMission(user.RelationID, info); err != nil { |
|||
global.MG_LOG.Error("更新失败!", zap.Any("err", err)) |
|||
response.FailWithMessage(err.Error(), c) |
|||
} else { |
|||
response.OkWithDetailed(gin.H{"id": id}, "更新成功", c) |
|||
} |
|||
} |
|||
|
|||
// DeleteMission
|
|||
// @Summary 删除任务
|
|||
// @Description
|
|||
// @Tags mission
|
|||
// @Security ApiKeyAuth
|
|||
// @Param data body request.IdsReq false "params"
|
|||
// @Success 200 {string} string "{"code": 200, "data": {}}"
|
|||
// @Router /mission/mission [delete]
|
|||
func DeleteMission(c *gin.Context) { |
|||
var info request.IdsReq |
|||
_ = c.ShouldBindJSON(&info) |
|||
if err := utils.Verify(info, utils.IdVerify); err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
if err := service.BatchDeleteMission(getUserUuid(c), info); err != nil { |
|||
global.MG_LOG.Error("操作失败!", zap.Any("err", err)) |
|||
response.FailWithMessage("操作失败", c) |
|||
} else { |
|||
response.OkWithMessage("操作成功", c) |
|||
} |
|||
} |
|||
|
|||
// StopMission
|
|||
// @Summary 结束任务【v1.0】
|
|||
// @Description
|
|||
// @Tags mission
|
|||
// @Security ApiKeyAuth
|
|||
// @Param data body request.StopMission false "params"
|
|||
// @Success 200 {string} string "{"code": 200, "data": {}}"
|
|||
// @Router /mission/stop [put]
|
|||
func StopMission(c *gin.Context) { |
|||
var info request.StopMission |
|||
_ = c.ShouldBindJSON(&info) |
|||
if err := utils.Verify(info, utils.IdVerify); err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
if err := service.StopMission(getUserUuid(c), info); err != nil { |
|||
global.MG_LOG.Error("操作失败!", zap.Any("err", err)) |
|||
response.FailWithMessage("操作失败,"+err.Error(), c) |
|||
} else { |
|||
response.OkWithMessage("操作成功", c) |
|||
} |
|||
} |
|||
|
|||
// GetMissionClaimList
|
|||
// @Summary 获取任务领取列表【v1.0】
|
|||
// @Description
|
|||
// @Tags mission
|
|||
// @Security ApiKeyAuth
|
|||
// @Param data query request.SearchMissionClaim false "params"
|
|||
// @Success 200 {array} model.MissionClaimDetail "{"code": 200, "data": {}}"
|
|||
// @Router /mission/claim-list [get]
|
|||
func GetMissionClaimList(c *gin.Context) { |
|||
var info request.SearchMissionClaim |
|||
_ = c.ShouldBindQuery(&info) |
|||
if err := utils.Verify(info.PageInfo, utils.PageInfoVerify); err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
if err := utils.Verify(info, utils.MissionIdVerify); err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
info.CreateBy = getUserUuid(c) |
|||
if err, list, total := service.GetMissionClaimList(info); err != nil { |
|||
global.MG_LOG.Error("获取失败!", zap.Any("err", err)) |
|||
response.FailWithMessage("获取失败", c) |
|||
} else { |
|||
response.OkWithDetailed(response.PageResult{ |
|||
List: list, |
|||
Total: total, |
|||
Page: info.Page, |
|||
PageSize: info.PageSize, |
|||
}, "获取成功", c) |
|||
} |
|||
} |
|||
|
|||
// GetMissionClaimOrder
|
|||
// @Summary 获取任务订单详情【v1.0】
|
|||
// @Description
|
|||
// @Tags mission
|
|||
// @Security ApiKeyAuth
|
|||
// @Param data query request.OrderId false "params"
|
|||
// @Success 200 {object} response.MissionClaimOrderResponse "{"code": 200, "data": {}}"
|
|||
// @Router /mission/claim-order [get]
|
|||
func GetMissionClaimOrder(c *gin.Context) { |
|||
var info request.OrderId |
|||
_ = c.ShouldBindQuery(&info) |
|||
if err := utils.Verify(info, utils.OrderIDVerify); err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
if err, data := service.GetMissionClaimOrder(getUserUuid(c), info.OrderID); err != nil { |
|||
global.MG_LOG.Error("获取失败!", zap.Any("err", err)) |
|||
response.FailWithMessage("获取失败", c) |
|||
} else { |
|||
response.OkWithData(response.MissionClaimOrderResponse{Order: data}, c) |
|||
} |
|||
} |
|||
|
|||
// GetMissionClaimOrderList
|
|||
// @Summary 获取任务订单列表【v1.0】
|
|||
// @Description
|
|||
// @Tags mission
|
|||
// @Security ApiKeyAuth
|
|||
// @Param data query request.SearchMissionClaimOrder false "params"
|
|||
// @Success 200 {array} model.MissionClaimOrderDetail "{"code": 200, "data": {}}"
|
|||
// @Router /mission/claim-order-list [get]
|
|||
func GetMissionClaimOrderList(c *gin.Context) { |
|||
var info request.SearchMissionClaimOrder |
|||
_ = c.ShouldBindQuery(&info) |
|||
if err := utils.Verify(info.PageInfo, utils.PageInfoVerify); err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
if err, list, total := service.GetMissionClaimOrderList(getUserUuid(c), info); err != nil { |
|||
global.MG_LOG.Error("获取失败!", zap.Any("err", err)) |
|||
response.FailWithMessage("获取失败", c) |
|||
} else { |
|||
response.OkWithDetailed(response.PageResult{ |
|||
List: list, |
|||
Total: total, |
|||
Page: info.Page, |
|||
PageSize: info.PageSize, |
|||
}, "获取成功", c) |
|||
} |
|||
} |
|||
|
|||
// MissionClaimOrderSend
|
|||
// @Summary 获取任务订单发货【v1.0】
|
|||
// @Description
|
|||
// @Tags mission
|
|||
// @Security ApiKeyAuth
|
|||
// @Param data body request.MissionClaimOrderSend false "params"
|
|||
// @Success 200 {string} string "{"code": 200, "data": {}}"
|
|||
// @Router /mission/claim-order-send [post]
|
|||
func MissionClaimOrderSend(c *gin.Context) { |
|||
var info request.MissionClaimOrderSend |
|||
_ = c.ShouldBindJSON(&info) |
|||
if err := utils.Verify(info, utils.MissionClaimOrderSendVerify); err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
if err := service.SendMissionClaimOrder(getUserUuid(c), info); err != nil { |
|||
global.MG_LOG.Error("操作失败!", zap.Any("err", err)) |
|||
response.FailWithMessage("操作失败", c) |
|||
} else { |
|||
response.OkWithMessage("操作成功", c) |
|||
} |
|||
} |
|||
|
|||
// GetMissionClaimVideoList
|
|||
// @Summary 任务视频审核列表【v1.0】
|
|||
// @Description
|
|||
// @Tags mission
|
|||
// @Security ApiKeyAuth
|
|||
// @Param data query request.SearchMissionClaimVideo false "params"
|
|||
// @Success 200 {array} response.MissionClaimVideo "{"code": 200, "data": {}}"
|
|||
// @Router /mission/claim-video-list [get]
|
|||
func GetMissionClaimVideoList(c *gin.Context) { |
|||
var info request.SearchMissionClaimVideo |
|||
_ = c.ShouldBindQuery(&info) |
|||
if err := utils.Verify(info.PageInfo, utils.PageInfoVerify); err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
if err, list, total := service.GetMissionClaimVideoList(info, getUserUuid(c)); err != nil { |
|||
global.MG_LOG.Error("获取失败!", zap.Any("err", err)) |
|||
response.FailWithMessage("获取失败", c) |
|||
} else { |
|||
response.OkWithDetailed(response.PageResult{ |
|||
List: list, |
|||
Total: total, |
|||
Page: info.Page, |
|||
PageSize: info.PageSize, |
|||
}, "获取成功", c) |
|||
} |
|||
} |
|||
|
|||
// DealMissionClaimVideoStatus
|
|||
// @Summary 任务视频审核【v1.0】
|
|||
// @Description
|
|||
// @Tags mission
|
|||
// @Security ApiKeyAuth
|
|||
// @Param data body request.StatusParamInt false "params"
|
|||
// @Success 200 {string} string "{"code": 200, "data": {}}"
|
|||
// @Router /mission/claim-video-audit [post]
|
|||
func DealMissionClaimVideoStatus(c *gin.Context) { |
|||
var info request.StatusParamInt |
|||
_ = c.ShouldBindJSON(&info) |
|||
if err := utils.Verify(info, utils.IdVerify); err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
if err := service.DealMissionClaimVideoStatus(info); err != nil { |
|||
global.MG_LOG.Error("审核失败!", zap.Any("err", err)) |
|||
response.FailWithMessage("审核失败,"+err.Error(), c) |
|||
} else { |
|||
response.OkWithMessage("审核成功", c) |
|||
} |
|||
} |
|||
|
|||
// GetMissionClaimVideoDetail
|
|||
// @Summary 任务视频审核详情【v1.0】
|
|||
// @Description
|
|||
// @Tags mission
|
|||
// @Security ApiKeyAuth
|
|||
// @Param data query request.IdReq false "params"
|
|||
// @Success 200 {array} response.MissionClaimVideoDetail "{"code": 200, "data": {}}"
|
|||
// @Router /mission/claim-video-detail [get]
|
|||
func GetMissionClaimVideoDetail(c *gin.Context) { |
|||
var info request.IdReq |
|||
_ = c.ShouldBindQuery(&info) |
|||
|
|||
if err := utils.Verify(info, utils.IdVerify); err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
if err, res := service.GetMissionClaimVideoDetail(info.ID, getUserUuid(c)); err != nil { |
|||
global.MG_LOG.Error("获取失败!", zap.Any("err", err)) |
|||
response.FailWithMessage("获取失败", c) |
|||
} else { |
|||
response.OkWithDetailed(res, "获取成功", c) |
|||
} |
|||
} |
|||
|
|||
// GetAllMissionClaimInfluencers
|
|||
// @Summary 获取任务网红合集【v1.0】
|
|||
// @Description
|
|||
// @Tags mission
|
|||
// @Security ApiKeyAuth
|
|||
// @Param data query request.MissionInfluencers false "params"
|
|||
// @Success 200 {array} model.MissionClaimInfluencer "{"code": 200, "data": {}}"
|
|||
// @Router /mission/claim-influencers [get]
|
|||
func GetAllMissionClaimInfluencers(c *gin.Context) { |
|||
var info request.MissionInfluencers |
|||
_ = c.ShouldBindQuery(&info) |
|||
|
|||
if err := utils.Verify(info, utils.MissionIdVerify); err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
//info.SalesType = 1
|
|||
if err, res, _ := service.GetAllMissionClaimInfluencers(info); err != nil { |
|||
global.MG_LOG.Error("获取失败!", zap.Any("err", err)) |
|||
response.FailWithMessage("获取失败", c) |
|||
} else { |
|||
response.OkWithDetailed(res, "获取成功", c) |
|||
} |
|||
} |
|||
|
|||
// SendVideoReward
|
|||
// @Summary 发送固定费用任务奖励
|
|||
// @Description
|
|||
// @Tags mission
|
|||
// @Security ApiKeyAuth
|
|||
// @Param data body request.IdReq false "params"
|
|||
// @Success 200 {string} string "{"code": 200, "data": {}}"
|
|||
// @Router /mission/send-video-reward [post]
|
|||
func SendVideoReward(c *gin.Context) { |
|||
var info request.IdReq |
|||
_ = c.ShouldBindJSON(&info) |
|||
if err := utils.Verify(info, utils.IdVerify); err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
user := sys.GetUserInfo(c) |
|||
if err := service.SendVideoMissionReward(user.RelationID, info); err != nil { |
|||
global.MG_LOG.Error("操作失败!", zap.Any("err", err)) |
|||
response.FailWithMessage("操作失败,"+err.Error(), c) |
|||
} else { |
|||
response.OkWithMessage("操作成功", c) |
|||
} |
|||
} |
@ -0,0 +1,303 @@ |
|||
package bkb |
|||
|
|||
import ( |
|||
"bkb-seller/api/sys" |
|||
"bkb-seller/global" |
|||
"bkb-seller/model" |
|||
"bkb-seller/model/request" |
|||
"bkb-seller/model/response" |
|||
"bkb-seller/service" |
|||
"strings" |
|||
|
|||
"github.com/gin-gonic/gin" |
|||
"go.uber.org/zap" |
|||
) |
|||
|
|||
// @Summary 获取订单列表
|
|||
// @Security Bearer
|
|||
// @Description
|
|||
// @Tags order
|
|||
// @Param data query request.SearchOrderList false "data..."
|
|||
// @Success 200 {object} []model.OrderList "{"code": 0, "data": [...]}"
|
|||
// @Success 201 {string} string "{"code": 1, "message": ""}"
|
|||
// @Router /order/list [get]
|
|||
func GetUserOrderList(c *gin.Context) { |
|||
var ( |
|||
err error |
|||
list interface{} |
|||
total int64 |
|||
data request.SearchOrderList |
|||
) |
|||
_ = c.ShouldBindQuery(&data) |
|||
user := sys.GetUserInfo(c) |
|||
err, list, total = service.GetUserOrderList(user.RelationID, &data) |
|||
if err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
response.OkWithDetailed(response.PageResult{ |
|||
List: list, |
|||
Total: total, |
|||
Page: data.Page, |
|||
PageSize: data.PageSize, |
|||
}, "获取成功", c) |
|||
} |
|||
|
|||
// @Summary 获取订单详情
|
|||
// @Security Bearer
|
|||
// @Description
|
|||
// @Tags order
|
|||
// @Param data query request.SearchOrderDetail false "data..."
|
|||
// @Success 200 {object} model.OrderDetail "{"code": 0, "data": [...]}"
|
|||
// @Success 201 {string} string "{"code": 1, "message": ""}"
|
|||
// @Router /order/detail [get]
|
|||
func GetUserOrderDetail(c *gin.Context) { |
|||
var ( |
|||
err error |
|||
list interface{} |
|||
data request.SearchOrderDetail |
|||
) |
|||
_ = c.ShouldBindQuery(&data) |
|||
user := sys.GetUserInfo(c) |
|||
err, list = service.GetUserOrderDetail(user.RelationID, &data) |
|||
if err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
response.OkWithDetailed(list, "获取成功", c) |
|||
} |
|||
|
|||
// @Summary 发货
|
|||
// @Security Bearer
|
|||
// @Description
|
|||
// @Tags order
|
|||
// @Param data body request.SendOrder false "data..."
|
|||
// @Success 200 {string} string "{"code": 0, "data": [...]}"
|
|||
// @Success 201 {string} string "{"code": 1, "message": ""}"
|
|||
// @Router /order/send [put]
|
|||
func SendUserOrder(c *gin.Context) { |
|||
var ( |
|||
err error |
|||
data request.SendOrder |
|||
) |
|||
_ = c.ShouldBind(&data) |
|||
user := sys.GetUserInfo(c) |
|||
err = service.SendOrder(user.RelationID, &data) |
|||
if err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
response.OkWithMessage("发货完成", c) |
|||
} |
|||
|
|||
// @Summary 批量发货
|
|||
// @Security Bearer
|
|||
// @Description
|
|||
// @Tags order
|
|||
// @Param data body model.PutDeliver false "data..."
|
|||
// @Success 200 {string} string "{"code": 0, "data": [...]}"
|
|||
// @Success 201 {string} string "{"code": 1, "message": ""}"
|
|||
// @Router /order/batchSend [put]
|
|||
func SendUserOrderBatch(c *gin.Context) { |
|||
var ( |
|||
err error |
|||
data model.PutDeliver |
|||
) |
|||
_ = c.ShouldBind(&data) |
|||
user := sys.GetUserInfo(c) |
|||
err = service.SendOrderBatch(user.RelationID, data) |
|||
if err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
response.OkWithMessage("发货完成", c) |
|||
} |
|||
|
|||
// @Tags order
|
|||
// @Summary 导入发货数据
|
|||
// @Security ApiKeyAuth
|
|||
// @accept application/json
|
|||
// @Produce application/json
|
|||
// @Param data body request.ParamsUploadDesc true "新增内容"
|
|||
// @Success 200 {object} []model.OrderDeliver "{"success":true,"data":{},"msg":"添加成功"}"
|
|||
// @Router /order/batchSend [post]
|
|||
func ImportSendOrderExcel(c *gin.Context) { |
|||
var ( |
|||
err error |
|||
fff request.ParamsUpload |
|||
data interface{} |
|||
) |
|||
err = c.ShouldBind(&fff) |
|||
if err != nil { |
|||
global.MG_LOG.Error("读取文件失败!1", zap.Any("err", err)) |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
if !strings.HasSuffix(fff.File.Filename, ".xlsx") { |
|||
// global.MG_LOG.Error("文件格式不正确", zap.Any("err", ""))
|
|||
response.FailWithMessage("文件格式不正确,需要xlsx格式的文件,", c) |
|||
return |
|||
} |
|||
fileBuf, err := fff.File.Open() |
|||
if err != nil { |
|||
global.MG_LOG.Error("读取文件失败!2", zap.Any("err", err)) |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
err, data = service.ImportSendOrderExcel(fileBuf, fff.File.Filename) |
|||
if err != nil { |
|||
global.MG_LOG.Error("导入失败!", zap.Any("err", err)) |
|||
response.FailWithMessage("导入失败", c) |
|||
return |
|||
} |
|||
response.OkWithDataMessage(data, "导入成功", c) |
|||
} |
|||
|
|||
// @Summary 批量发货记录
|
|||
// @Security Bearer
|
|||
// @Description
|
|||
// @Tags order
|
|||
// @Param data query request.SearchBatchList false "data..."
|
|||
// @Success 200 {object} []model.BatchDeliverList "{"code": 0, "data": [...]}"
|
|||
// @Success 201 {string} string "{"code": 1, "message": ""}"
|
|||
// @Router /order/batchList [get]
|
|||
func GetBatchSendList(c *gin.Context) { |
|||
var ( |
|||
err error |
|||
list interface{} |
|||
total int64 |
|||
data request.SearchBatchList |
|||
) |
|||
_ = c.ShouldBindQuery(&data) |
|||
user := sys.GetUserInfo(c) |
|||
err, list, total = service.GetBatchSendList(user.RelationID, &data) |
|||
if err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
response.OkWithDetailed(response.PageResult{ |
|||
List: list, |
|||
Total: total, |
|||
Page: data.Page, |
|||
PageSize: data.PageSize, |
|||
}, "获取成功", c) |
|||
} |
|||
|
|||
// @Summary 批量发货记录统计
|
|||
// @Security Bearer
|
|||
// @Description
|
|||
// @Tags order
|
|||
// @Param data query model.BatchDeliverTotal false "data..."
|
|||
// @Success 200 {object} []model.BatchDeliverList "{"code": 0, "data": [...]}"
|
|||
// @Success 201 {string} string "{"code": 1, "message": ""}"
|
|||
// @Router /order/batchListTotal [get]
|
|||
func GetBatchSendListTotal(c *gin.Context) { |
|||
var ( |
|||
err error |
|||
list interface{} |
|||
) |
|||
user := sys.GetUserInfo(c) |
|||
err, list = service.GetBatchSendListTotal(user.RelationID) |
|||
if err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
response.OkWithDetailed(list, "获取成功", c) |
|||
} |
|||
|
|||
// @Summary 获取订单退款申请详情
|
|||
// @Security Bearer
|
|||
// @Description
|
|||
// @Tags order
|
|||
// @Param data query request.IdReq false "data..."
|
|||
// @Success 200 {object} model.OrderPostSaleDetail "{"code": 0, "data": [...]}"
|
|||
// @Success 201 {string} string "{"code": 1, "message": ""}"
|
|||
// @Router /order/postSale [get]
|
|||
func GetOrderPostSale(c *gin.Context) { |
|||
var ( |
|||
err error |
|||
params request.IdReq |
|||
result model.OrderPostSaleDetail |
|||
) |
|||
_ = c.ShouldBindQuery(¶ms) |
|||
user := sys.GetUserInfo(c) |
|||
if err, result = service.GetOrderPostSale(user.RelationID, ¶ms); err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
response.OkWithDetailed(result, "获取成功", c) |
|||
} |
|||
|
|||
// @Summary 获取订单退款申请列表
|
|||
// @Security Bearer
|
|||
// @Description
|
|||
// @Tags order
|
|||
// @Param data query request.SearchOrderPostSale false "data..."
|
|||
// @Success 200 {object} []model.OrderPostSaleDetail "{"code": 0, "data": [...]}"
|
|||
// @Success 201 {string} string "{"code": 1, "message": ""}"
|
|||
// @Router /order/postSale/list [get]
|
|||
func GetOrderPostSaleList(c *gin.Context) { |
|||
var ( |
|||
err error |
|||
params request.SearchOrderPostSale |
|||
total int64 |
|||
result []model.OrderPostSaleDetail |
|||
) |
|||
_ = c.ShouldBindQuery(¶ms) |
|||
user := sys.GetUserInfo(c) |
|||
if err, result, total = service.GetOrderPostSaleList(user.RelationID, ¶ms); err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
response.OkWithDetailed(response.PageResult{ |
|||
List: result, |
|||
Total: total, |
|||
Page: params.Page, |
|||
PageSize: params.PageSize, |
|||
}, "获取成功", c) |
|||
} |
|||
|
|||
// @Summary 审核订单退款申请
|
|||
// @Security Bearer
|
|||
// @Description
|
|||
// @Tags order
|
|||
// @Param data body request.ExamineOrderPostSale false "data..."
|
|||
// @Success 200 {string} string "{"code": 0, "data": [...]}"
|
|||
// @Success 201 {string} string "{"code": 1, "message": ""}"
|
|||
// @Router /order/postSale [post]
|
|||
func ExamineOrderPostSale(c *gin.Context) { |
|||
var ( |
|||
err error |
|||
params request.ExamineOrderPostSale |
|||
) |
|||
_ = c.ShouldBindJSON(¶ms) |
|||
user := sys.GetUserInfo(c) |
|||
err = service.ExamineOrderPostSale(user.RelationID, ¶ms) |
|||
if err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
response.OkWithMessage("success", c) |
|||
} |
|||
|
|||
// @Summary 订单退款申请发起退款
|
|||
// @Security Bearer
|
|||
// @Description
|
|||
// @Tags order
|
|||
// @Param data query request.IdReq false "data..."
|
|||
// @Success 200 {string} string "{"code": 0, "data": [...]}"
|
|||
// @Success 201 {string} string "{"code": 1, "message": ""}"
|
|||
// @Router /order/postSale/refund [post]
|
|||
func RefundOrderPostSale(c *gin.Context) { |
|||
var ( |
|||
err error |
|||
params request.IdReq |
|||
) |
|||
user := sys.GetUserInfo(c) |
|||
err = service.RefundOrderPostSale(user.RelationID, ¶ms) |
|||
if err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
response.OkWithMessage("success", c) |
|||
} |
@ -0,0 +1,225 @@ |
|||
package bkb |
|||
|
|||
import ( |
|||
"bkb-seller/global" |
|||
"bkb-seller/initialize/api" |
|||
"bkb-seller/middleware" |
|||
"bkb-seller/model" |
|||
"bkb-seller/model/request" |
|||
"bkb-seller/model/response" |
|||
"bkb-seller/service" |
|||
"bkb-seller/utils" |
|||
"context" |
|||
"fmt" |
|||
"strings" |
|||
"time" |
|||
|
|||
"github.com/dgrijalva/jwt-go" |
|||
"github.com/gin-gonic/gin" |
|||
"github.com/go-redis/redis" |
|||
"go.uber.org/zap" |
|||
) |
|||
|
|||
// Login
|
|||
// @Tags account
|
|||
// @Summary 用户登录【v1.0】
|
|||
// @Produce application/json
|
|||
// @Param data body request.UserLogin true "email,password,phone,phone_code,sms_code"
|
|||
// @Success 200 {string} string "{"success":true,"data":{},"msg":"登陆成功"}"
|
|||
// @Router /base/login [post]
|
|||
func Login(c *gin.Context) { |
|||
var ( |
|||
err error |
|||
l request.UserLogin |
|||
user *model.User |
|||
) |
|||
_ = c.ShouldBindJSON(&l) |
|||
if l.PhoneCode != "" { //短信验证码登录
|
|||
if flag, msg := checkSmsCode(1, l.PhoneCode, l.Phone, l.SmsCode); !flag { |
|||
response.FailWithMessage(msg, c) |
|||
return |
|||
} |
|||
u := &model.User{PhoneCode: l.PhoneCode, Phone: l.Phone, Appid: l.Appid} |
|||
err, user = service.LoginByPhone(u) |
|||
if err != nil { |
|||
global.MG_LOG.Error("登陆失败! 手机号未注册", zap.Any("err", err)) |
|||
response.FailWithMessage("登陆失败! 手机号未注册", c) |
|||
return |
|||
} |
|||
} else { //账号密码登录
|
|||
if store.Verify(l.CaptchaId, l.Captcha, true) { |
|||
u := &model.User{Email: l.Email, Password: l.Password, Appid: l.Appid} |
|||
err, user = service.LoginByEmail(u) |
|||
if err != nil { |
|||
global.MG_LOG.Error("登陆失败! "+err.Error(), zap.Any("err", err)) |
|||
response.FailWithMessage("登陆失败!"+err.Error(), c) |
|||
return |
|||
} |
|||
} else { |
|||
response.FailWithMessage("验证码错误", c) |
|||
return |
|||
} |
|||
} |
|||
tokenNext(c, *user) |
|||
} |
|||
|
|||
// 登录以后签发jwt
|
|||
func tokenNext(c *gin.Context, user model.User) { |
|||
j := &middleware.JWT{SigningKey: []byte(global.MG_CONFIG.JWT.SigningKey)} // 唯一签名
|
|||
claims := request.CustomClaims{ |
|||
UUID: user.UUID.String(), |
|||
ID: user.ID, |
|||
AuthorityId: user.AuthorityID, |
|||
RelationID: user.RelationID, |
|||
Appid: user.Appid, |
|||
Type: user.Type, |
|||
BufferTime: global.MG_CONFIG.JWT.BufferTime, // 缓冲时间1天 缓冲时间内会获得新的token刷新令牌 此时一个用户会存在两个有效令牌 但是前端只留一个 另一个会丢失
|
|||
StandardClaims: jwt.StandardClaims{ |
|||
NotBefore: time.Now().Unix() - 1000, // 签名生效时间
|
|||
ExpiresAt: time.Now().Unix() + global.MG_CONFIG.JWT.ExpiresTime, // 过期时间 7天 配置文件
|
|||
Issuer: "bkbBoss", // 签名的发行者
|
|||
}, |
|||
} |
|||
token, err := j.CreateToken(claims) |
|||
if err != nil { |
|||
global.MG_LOG.Error("获取token失败!", zap.Any("err", err)) |
|||
response.FailWithMessage("获取token失败", c) |
|||
return |
|||
} |
|||
if !global.MG_CONFIG.System.UseMultipoint { |
|||
response.OkWithDetailed(response.LoginResponse{ |
|||
User: user, |
|||
Token: token, |
|||
ExpiresAt: claims.StandardClaims.ExpiresAt * 1000, |
|||
}, "登录成功", c) |
|||
return |
|||
} |
|||
|
|||
if err, jwtStr := service.GetRedisJWT(user.UUID.String()); err == redis.Nil { |
|||
if err := service.SetRedisJWT(token, user.UUID.String()); err != nil { |
|||
global.MG_LOG.Error("设置登录状态失败!", zap.Any("err", err)) |
|||
response.FailWithMessage("设置登录状态失败", c) |
|||
return |
|||
} |
|||
response.OkWithDetailed(response.LoginResponse{ |
|||
User: user, |
|||
Token: token, |
|||
ExpiresAt: claims.StandardClaims.ExpiresAt * 1000, |
|||
}, "登录成功", c) |
|||
} else if err != nil { |
|||
global.MG_LOG.Error("设置登录状态失败!", zap.Any("err", err)) |
|||
response.FailWithMessage("设置登录状态失败", c) |
|||
} else { |
|||
var blackJWT model.JwtBlacklist |
|||
blackJWT.Jwt = jwtStr |
|||
if err := service.JsonInBlacklist(blackJWT); err != nil { |
|||
response.FailWithMessage("jwt作废失败", c) |
|||
return |
|||
} |
|||
if err := service.SetRedisJWT(token, user.UUID.String()); err != nil { |
|||
response.FailWithMessage("设置登录状态失败", c) |
|||
return |
|||
} |
|||
response.OkWithDetailed(response.LoginResponse{ |
|||
User: user, |
|||
Token: token, |
|||
ExpiresAt: claims.StandardClaims.ExpiresAt * 1000, |
|||
}, "登录成功", c) |
|||
} |
|||
} |
|||
|
|||
// Register
|
|||
// @Tags account
|
|||
// @Summary 注册账号【v1.0】
|
|||
// @Produce application/json
|
|||
// @Param data body request.UserRegister true "email,password,phone,phone_code,sms_code"
|
|||
// @Success 200 {string} string "{"success":true,"data":{},"msg":"注册成功"}"
|
|||
// @Router /base/register [post]
|
|||
func Register(c *gin.Context) { |
|||
var r request.UserRegister |
|||
_ = c.ShouldBindJSON(&r) |
|||
if err := utils.Verify(r, utils.RegisterVerify); err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
if flag, msg := checkSmsCode(1, r.PhoneCode, r.Phone, r.SmsCode); !flag { |
|||
response.FailWithMessage(msg, c) |
|||
return |
|||
} |
|||
if r.Appid == "" { |
|||
r.Appid = "appid" |
|||
} |
|||
user := &model.User{PhoneCode: r.PhoneCode, Phone: r.Phone, Password: r.Password, Email: r.Email, Appid: r.Appid} |
|||
err, userReturn := service.Register(*user) |
|||
if err != nil { |
|||
global.MG_LOG.Error("注册失败!", zap.Any("err", err)) |
|||
response.FailWithMessage(err.Error(), c) |
|||
} else { |
|||
response.OkWithDetailed(userReturn, "注册成功", c) |
|||
} |
|||
} |
|||
|
|||
// RecoverPassword
|
|||
// @Tags account
|
|||
// @Summary 找回密码【v1.0】
|
|||
// @Produce application/json
|
|||
// @Param data body request.RecoverPassword true "email,password,phone,phone_code,sms_code"
|
|||
// @Success 200 {string} string "{"success":true,"data":{},"msg":"密码重置成功"}"
|
|||
// @Router /base/recoverPassword [post]
|
|||
func RecoverPassword(c *gin.Context) { |
|||
var r request.RecoverPassword |
|||
_ = c.ShouldBindJSON(&r) |
|||
if err := utils.Verify(r, utils.RegisterVerify); err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
if flag, msg := checkSmsCode(1, r.PhoneCode, r.Phone, r.SmsCode); !flag { |
|||
response.FailWithMessage(msg, c) |
|||
return |
|||
} |
|||
user := &model.User{Phone: r.Phone, Password: r.Password, Email: r.Email} |
|||
err, userReturn := service.RecoverPassword(*user) |
|||
if err != nil { |
|||
global.MG_LOG.Error("修改密码失败!", zap.Any("err", err)) |
|||
response.FailWithMessage(err.Error(), c) |
|||
} else { |
|||
response.OkWithDetailed(userReturn, "修改密码成功", c) |
|||
} |
|||
} |
|||
|
|||
func getUserUuid(c *gin.Context) string { |
|||
if claims, exists := c.Get("claims"); !exists { |
|||
global.MG_LOG.Error("从Gin的Context中获取从jwt解析出来的用户UUID失败, 请检查路由是否使用jwt中间件!") |
|||
return "" |
|||
} else { |
|||
waitUse := claims.(*request.CustomClaims) |
|||
return waitUse.UUID |
|||
} |
|||
} |
|||
|
|||
func checkSmsCode(scene int, phoneCode, phone, smsCode string) (bool, string) { |
|||
var phoneNumber string |
|||
switch scene { |
|||
case 1: |
|||
phoneNumber = phoneCode + phone |
|||
phoneNumber = strings.ReplaceAll(phoneNumber, "+", "") |
|||
phoneNumber = strings.ReplaceAll(phoneNumber, " ", "") |
|||
if global.MG_CONFIG.System.Env != "prod" && smsCode != "888888" { |
|||
//校验短信验证码
|
|||
resp, err := global.SMS_CLIENT.VerifyCode(context.Background(), &api.SmsCodeVerifyRequest{ |
|||
Phone: phone, |
|||
Code: smsCode, |
|||
}) |
|||
if err != nil { |
|||
fmt.Println(err) |
|||
return false, "验证码错误,请重新输入" |
|||
} |
|||
if resp.Code != 0 { |
|||
global.MG_LOG.Error("验证码错误,请重新输入") |
|||
return false, "验证码错误,请重新输入" |
|||
} |
|||
} |
|||
|
|||
} |
|||
return true, "" |
|||
} |
@ -0,0 +1,224 @@ |
|||
package bkb |
|||
|
|||
import ( |
|||
"bkb-seller/api/sys" |
|||
"bkb-seller/model" |
|||
"bkb-seller/model/request" |
|||
"bkb-seller/model/response" |
|||
"bkb-seller/service" |
|||
"bkb-seller/utils" |
|||
|
|||
"github.com/gin-gonic/gin" |
|||
) |
|||
|
|||
// @Tags sourceFile
|
|||
// @Summary 获取文件列表
|
|||
// @Security ApiKeyAuth
|
|||
// @accept application/json
|
|||
// @Produce application/json
|
|||
// @Param data query request.SearchSourceFileParams true "id,page,pageSize..."
|
|||
// @Success 200 {object} response.Response "{"success":true,"data":{},"msg":"修改成功"}"
|
|||
// @Router /file/fileList [get]
|
|||
func GetFileList(c *gin.Context) { |
|||
var ( |
|||
err error |
|||
params request.SearchSourceFileParams |
|||
list interface{} |
|||
total int64 |
|||
UserID string |
|||
) |
|||
_ = c.ShouldBindQuery(¶ms) |
|||
if err = utils.Verify(params.PageInfo, utils.PageInfoVerify); err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
UserID = sys.GetUserUuid(c) |
|||
if err, list, total = service.GetSourceFileList(¶ms, UserID); err != nil { |
|||
////global.MG_LOG.Error("获取失败!", zap.Any("err", err))
|
|||
response.FailWithMessage(err.Error(), c) |
|||
} else { |
|||
response.OkWithDetailed(response.PageResult{ |
|||
List: list, |
|||
Total: total, |
|||
Page: params.Page, |
|||
PageSize: params.PageSize, |
|||
}, "获取成功", c) |
|||
} |
|||
} |
|||
|
|||
// @Tags sourceFile
|
|||
// @Summary 获取文件树
|
|||
// @Security ApiKeyAuth
|
|||
// @accept application/json
|
|||
// @Produce application/json
|
|||
// @Param data query request.FileTreeParams true "id,page,pageSize..."
|
|||
// @Success 200 {object} model.SourceFileTreeList "{"success":true,"data":{},"msg":"修改成功"}"
|
|||
// @Router /file/fileTree [get]
|
|||
func GetFileTree(c *gin.Context) { |
|||
var ( |
|||
err error |
|||
list interface{} |
|||
params request.FileTreeParams |
|||
) |
|||
_ = c.ShouldBindQuery(¶ms) |
|||
if err, list = service.GetSourceFileTreeList(¶ms, sys.GetUserAppid(c), sys.GetUserUuid(c)); err != nil { |
|||
////global.MG_LOG.Error("获取失败!", zap.Any("err", err))
|
|||
response.FailWithMessage(err.Error(), c) |
|||
} else { |
|||
response.OkWithDataMessage(list, "获取成功", c) |
|||
} |
|||
} |
|||
|
|||
// @Tags sourceFile
|
|||
// @Summary 创建文件
|
|||
// @Security ApiKeyAuth
|
|||
// @accept application/json
|
|||
// @Produce application/json
|
|||
// @Param data body model.SourceFile true "文件内容"
|
|||
// @Success 200 {object} response.Response "{"success":true,"data":{},"msg":"创建成功"}"
|
|||
// @Router /file/file [post]
|
|||
func CreateFile(c *gin.Context) { |
|||
var ( |
|||
err error |
|||
UserID string |
|||
channel, outData model.SourceFile |
|||
) |
|||
_ = c.ShouldBindJSON(&channel) |
|||
if err = utils.Verify(channel, utils.FileVerify); err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
UserID = sys.GetUserUuid(c) |
|||
channel.UserID = UserID |
|||
outData, err = service.CreateSourceFile(channel) |
|||
if err != nil { |
|||
//global.MG_LOG.Error("创建失败!", zap.Any("err", err))
|
|||
response.FailWithMessage(err.Error(), c) |
|||
} else { |
|||
response.OkWithDataMessage(outData.ID, "创建成功", c) |
|||
} |
|||
} |
|||
|
|||
// @Tags sourceFile
|
|||
// @Summary 修改文件状态
|
|||
// @Security ApiKeyAuth
|
|||
// @accept application/json
|
|||
// @Produce application/json
|
|||
// @Param data body request.UpdateSourceFileStatusParams true "文件内容"
|
|||
// @Success 200 {object} response.Response "{"success":true,"data":{},"msg":"创建成功"}"
|
|||
// @Router /file/fileStatus [put]
|
|||
func UpdateFile(c *gin.Context) { |
|||
var ( |
|||
err error |
|||
data request.UpdateSourceFileStatusParams |
|||
UserID string |
|||
) |
|||
_ = c.ShouldBindJSON(&data) |
|||
if err = utils.Verify(data, utils.FileVerify); err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
UserID = sys.GetUserUuid(c) |
|||
err = service.UpdateSourceFileStatus(&data, UserID) |
|||
if err != nil { |
|||
//global.MG_LOG.Error("创建失败!", zap.Any("err", err))
|
|||
response.FailWithMessage(err.Error(), c) |
|||
} else { |
|||
response.OkWithMessage("修改成功", c) |
|||
} |
|||
} |
|||
|
|||
// @Tags sourceFile
|
|||
// @Summary 删除文件(批量)
|
|||
// @Security ApiKeyAuth
|
|||
// @accept application/json
|
|||
// @Produce application/json
|
|||
// @Param data body request.IdsReq true "ids"
|
|||
// @Success 200 {object} response.Response "{"success":true,"data":{},"msg":"更新成功"}"
|
|||
// @Router /file/file [delete]
|
|||
func DeleteFile(c *gin.Context) { |
|||
var ( |
|||
err error |
|||
req request.IdsReq |
|||
UserID string |
|||
) |
|||
_ = c.ShouldBindJSON(&req) |
|||
if len(req.Ids) == 0 { |
|||
response.FailWithMessage("请选择要删除的数据", c) |
|||
return |
|||
} |
|||
UserID = sys.GetUserUuid(c) |
|||
if err = service.DeleteSourceFile(&req, UserID); err != nil { |
|||
response.FailWithMessage("删除失败:"+err.Error(), c) |
|||
} else { |
|||
response.OkWithMessage("删除成功", c) |
|||
} |
|||
} |
|||
|
|||
// @Tags sourceFile
|
|||
// @Summary 获取文件类型统计
|
|||
// @Security ApiKeyAuth
|
|||
// @accept application/json
|
|||
// @Produce application/json
|
|||
// @Success 200 {object} response.Response "{"success":true,"data":{},"msg":"修改成功"}"
|
|||
// @Router /file/fileListCount [get]
|
|||
func GetFileListCount(c *gin.Context) { |
|||
var ( |
|||
err error |
|||
data interface{} |
|||
UserID string |
|||
) |
|||
UserID = sys.GetUserUuid(c) |
|||
if err, data = service.GetSourceFileListCount(UserID); err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
} else { |
|||
response.OkWithDataMessage(data, "获取成功", c) |
|||
} |
|||
} |
|||
|
|||
// @Tags sourceFile
|
|||
// @Summary 创建文件
|
|||
// @Security ApiKeyAuth
|
|||
// @accept application/json
|
|||
// @Produce application/json
|
|||
// @Param data body request.CreateSourceFile true "文件内容"
|
|||
// @Success 200 {object} response.Response "{"success":true,"data":{},"msg":"创建成功"}"
|
|||
// @Router /file/dir [post]
|
|||
func CreateDir(c *gin.Context) { |
|||
var ( |
|||
err error |
|||
channel request.CreateSourceFile |
|||
doc model.SourceFile |
|||
) |
|||
_ = c.ShouldBindJSON(&channel) |
|||
if err = utils.Verify(channel, utils.FileVerify); err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
doc, err = service.CreateCreateDir(channel, sys.GetUserAppid(c), sys.GetUserUuid(c)) |
|||
if err != nil { |
|||
//global.MG_LOG.Error("创建失败!", zap.Any("err", err))
|
|||
response.FailWithMessage(err.Error(), c) |
|||
} else { |
|||
response.OkWithDataMessage(doc, "创建成功", c) |
|||
} |
|||
} |
|||
|
|||
func MoveFile(c *gin.Context) { |
|||
var ( |
|||
err error |
|||
channel request.MoveFile |
|||
) |
|||
_ = c.ShouldBindJSON(&channel) |
|||
if err = utils.Verify(channel, utils.FileVerify); err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
err = service.MoveFile(channel, sys.GetUserAppid(c), sys.GetUserUuid(c)) |
|||
if err != nil { |
|||
//global.MG_LOG.Error("创建失败!", zap.Any("err", err))
|
|||
response.FailWithMessage(err.Error(), c) |
|||
} else { |
|||
response.OkWithMessage("移动成功", c) |
|||
} |
|||
} |
@ -0,0 +1,63 @@ |
|||
package bkb |
|||
|
|||
import ( |
|||
"bkb-seller/global" |
|||
"bkb-seller/model/request" |
|||
"bkb-seller/model/response" |
|||
"bkb-seller/service" |
|||
"bkb-seller/utils" |
|||
"github.com/gin-gonic/gin" |
|||
"go.uber.org/zap" |
|||
) |
|||
|
|||
// GetTbAttributeList
|
|||
// @Summary 分页获取规格属性列表
|
|||
// @Description
|
|||
// @Tags attribute
|
|||
// @Security ApiKeyAuth
|
|||
// @Param data query request.TbAttribute false "params"
|
|||
// @Success 200 {object} response.PageResult "{"code": 200, "data": {}}"
|
|||
// @Router /attribute/attribute-list [get]
|
|||
func GetTbAttributeList(c *gin.Context) { |
|||
var info request.TbAttribute |
|||
_ = c.ShouldBindQuery(&info) |
|||
if err := utils.Verify(info.PageInfo, utils.PageInfoVerify); err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
if err, list, total := service.GetTbAttributeList(info); err != nil { |
|||
global.MG_LOG.Error("获取失败!", zap.Any("err", err)) |
|||
response.FailWithMessage("获取失败", c) |
|||
} else { |
|||
response.OkWithDetailed(response.PageResult{ |
|||
List: list, |
|||
Total: total, |
|||
Page: info.Page, |
|||
PageSize: info.PageSize, |
|||
}, "获取成功", c) |
|||
} |
|||
} |
|||
|
|||
func GetTbAttributeValueList(c *gin.Context) { |
|||
var info request.TbAttributeValue |
|||
_ = c.ShouldBindQuery(&info) |
|||
if err := utils.Verify(info.PageInfo, utils.PageInfoVerify); err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
if err := utils.Verify(info, utils.AttributeIdVerity); err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
if err, list, total := service.GetTbAttributeValueList(info); err != nil { |
|||
global.MG_LOG.Error("获取失败!", zap.Any("err", err)) |
|||
response.FailWithMessage("获取失败", c) |
|||
} else { |
|||
response.OkWithDetailed(response.PageResult{ |
|||
List: list, |
|||
Total: total, |
|||
Page: info.Page, |
|||
PageSize: info.PageSize, |
|||
}, "获取成功", c) |
|||
} |
|||
} |
@ -0,0 +1,81 @@ |
|||
package bkb |
|||
|
|||
import ( |
|||
"github.com/gin-gonic/gin" |
|||
|
|||
"bkb-seller/global" |
|||
"bkb-seller/model" |
|||
"bkb-seller/model/request" |
|||
"bkb-seller/model/response" |
|||
"bkb-seller/service" |
|||
"bkb-seller/utils" |
|||
) |
|||
|
|||
// GetTbCategoryList
|
|||
// @Summary 分页获取商品分类列表
|
|||
// @Description
|
|||
// @Tags category
|
|||
// @Security ApiKeyAuth
|
|||
// @Param data query request.TbCategory false "params"
|
|||
// @Success 200 {object} response.SelectListResult "{"code": 200, "data": {}}"
|
|||
// @Router /category/category-list [get]
|
|||
func GetTbCategoryList(c *gin.Context) { |
|||
var info request.TbCategory |
|||
_ = c.ShouldBindQuery(&info) |
|||
if err, list := service.GetTbCategoryList(info); err != nil { |
|||
global.MG_LOG.Error("获取失败! " + err.Error()) |
|||
response.FailWithMessage("获取失败", c) |
|||
} else { |
|||
response.OkWithDetailed(response.SelectListResult{ |
|||
List: list, |
|||
}, "获取成功", c) |
|||
} |
|||
} |
|||
|
|||
// GetTbCategoryTree
|
|||
// @Summary 分页获取商品分类树状列表
|
|||
// @Description
|
|||
// @Tags category
|
|||
// @Security ApiKeyAuth
|
|||
// @Success 200 {array} model.TbCategoryTree "{"code": 200, "data": {}}"
|
|||
// @Router /category/category-tree [get]
|
|||
func GetTbCategoryTree(c *gin.Context) { |
|||
var ( |
|||
err error |
|||
result model.TbCategoryTree |
|||
) |
|||
result.Pid = 0 |
|||
if err = service.GetTbCategoryTree(&result); err != nil { |
|||
global.MG_LOG.Error("获取失败! " + err.Error()) |
|||
response.FailWithMessage("获取失败", c) |
|||
} else { |
|||
response.OkWithDetailed(response.SelectListResult{ |
|||
List: result.Children, |
|||
}, "获取成功", c) |
|||
} |
|||
} |
|||
|
|||
// GetGetTbCategoryBreadcrumb
|
|||
// @Summary 分页获取商品分类面包屑
|
|||
// @Description
|
|||
// @Tags category
|
|||
// @Param data query request.IdReq false "params"
|
|||
// @Success 200 {object} response.SelectListResult "{"code": 200, "data": {}}"
|
|||
// @Router /category/breadcrumb [get]
|
|||
func GetGetTbCategoryBreadcrumb(c *gin.Context) { |
|||
var info request.IdReq |
|||
_ = c.ShouldBindQuery(&info) |
|||
if err := utils.Verify(info, utils.IdVerify); err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
if err, list := service.GetTbCategoryBreadcrumb(info.ID); err != nil { |
|||
global.MG_LOG.Error("获取失败! " + err.Error()) |
|||
response.FailWithMessage("获取失败", c) |
|||
} else { |
|||
response.OkWithDetailed(response.SelectListResult{ |
|||
List: list, |
|||
}, "获取成功", c) |
|||
} |
|||
} |
|||
|
@ -0,0 +1,240 @@ |
|||
package bkb |
|||
|
|||
import ( |
|||
"github.com/gin-gonic/gin" |
|||
"go.uber.org/zap" |
|||
|
|||
"bkb-seller/api/sys" |
|||
"bkb-seller/global" |
|||
"bkb-seller/model/request" |
|||
"bkb-seller/model/response" |
|||
"bkb-seller/service" |
|||
"bkb-seller/utils" |
|||
) |
|||
|
|||
// GetTbGoodsDetail
|
|||
// @Summary 获取商品详情
|
|||
// @Description
|
|||
// @Tags goods
|
|||
// @Security ApiKeyAuth
|
|||
// @Param data query request.IdReq false "params"
|
|||
// @Success 200 {object} response.TbGoodsResponse "{"code": 200, "data": {}}"
|
|||
// @Router /goods/goods [get]
|
|||
func GetTbGoodsDetail(c *gin.Context) { |
|||
var info request.IdReq |
|||
_ = c.ShouldBindQuery(&info) |
|||
if err := utils.Verify(info, utils.IdVerify); err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
if err, data := service.GetTbGoods(getUserUuid(c), info.ID); err != nil { |
|||
global.MG_LOG.Error("获取失败!", zap.Any("err", err)) |
|||
response.FailWithMessage("获取失败", c) |
|||
} else { |
|||
response.OkWithData(response.TbGoodsResponse{Goods: data}, c) |
|||
} |
|||
} |
|||
|
|||
// GetTbGoodsList
|
|||
// @Summary 获取商品列表
|
|||
// @Description
|
|||
// @Tags goods
|
|||
// @Security ApiKeyAuth
|
|||
// @Param data query request.SearchTbGoods false "params"
|
|||
// @Success 200 {object} response.PageResult "{"code": 200, "data": {}}"
|
|||
// @Router /goods/list [get]
|
|||
func GetTbGoodsList(c *gin.Context) { |
|||
var info request.SearchTbGoods |
|||
_ = c.ShouldBindQuery(&info) |
|||
if err := utils.Verify(info.PageInfo, utils.PageInfoVerify); err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
info.CreateBy = getUserUuid(c) |
|||
if err, list, total := service.GetTbGoodsList(info); err != nil { |
|||
global.MG_LOG.Error("获取失败! " + err.Error()) |
|||
response.FailWithMessage("获取失败", c) |
|||
} else { |
|||
response.OkWithDetailed(response.PageResult{ |
|||
List: list, |
|||
Total: total, |
|||
Page: info.Page, |
|||
PageSize: info.PageSize, |
|||
}, "获取成功", c) |
|||
} |
|||
} |
|||
|
|||
// CreateTbGoodsSeries
|
|||
// @Summary 创建商品
|
|||
// @Description
|
|||
// @Tags goods
|
|||
// @Security ApiKeyAuth
|
|||
// @Param data body request.CreateTbGoods false "params"
|
|||
// @Success 200 {object} response.IDResponse "{"code": 200, "data": {}}"
|
|||
// @Router /goods/goods [post]
|
|||
func CreateTbGoodsSeries(c *gin.Context) { |
|||
var info request.CreateTbGoods |
|||
_ = c.ShouldBindJSON(&info) |
|||
if err := utils.Verify(info, utils.CreateTbGoodsVerity); err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
userInfo := sys.GetUserInfo(c) |
|||
id,spuNo,err := service.CreateTbGoodsSeries(userInfo.UUID, userInfo.RelationID, info); |
|||
if err != nil { |
|||
global.MG_LOG.Error("创建失败! " + err.Error()) |
|||
response.FailWithMessage("创建失败", c) |
|||
} else { |
|||
response.OkWithDetailed(gin.H{"id": id,"spu_no":spuNo}, "创建成功", c) |
|||
} |
|||
} |
|||
|
|||
// UpdateTbGoodsSeries
|
|||
// @Summary 编辑商品
|
|||
// @Description
|
|||
// @Tags goods
|
|||
// @Security ApiKeyAuth
|
|||
// @Param data body request.UpdateTbGoods false "params"
|
|||
// @Success 200 {object} response.IDResponse "{"code": 200, "data": {}}"
|
|||
// @Router /goods/goods [put]
|
|||
func UpdateTbGoodsSeries(c *gin.Context) { |
|||
var info request.UpdateTbGoods |
|||
_ = c.ShouldBindJSON(&info) |
|||
if err := utils.Verify(info, utils.IdVerify); err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
if err, id := service.UpdateTbGoodsSeries(getUserUuid(c), info); err != nil { |
|||
global.MG_LOG.Error("更新失败!", zap.Any("err", err)) |
|||
response.FailWithMessage("更新失败", c) |
|||
} else { |
|||
response.OkWithDetailed(gin.H{"id": id}, "更新成功", c) |
|||
} |
|||
} |
|||
|
|||
// UpdateTbGoodsOnline
|
|||
// @Summary 上下架商品
|
|||
// @Description
|
|||
// @Tags goods
|
|||
// @Security ApiKeyAuth
|
|||
// @Param data body request.BatchOnline false "params"
|
|||
// @Success 200 {string} string "{"code": 200, "data": {}}"
|
|||
// @Router /goods/online [put]
|
|||
func UpdateTbGoodsOnline(c *gin.Context) { |
|||
var info request.BatchOnline |
|||
_ = c.ShouldBindJSON(&info) |
|||
if err := utils.Verify(info, utils.IdVerify); err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
if err := service.BatchUpdateTbGoodsOnline(getUserUuid(c), info); err != nil { |
|||
global.MG_LOG.Error("操作失败!", zap.Any("err", err)) |
|||
response.FailWithMessage("操作失败", c) |
|||
} else { |
|||
response.OkWithMessage("操作成功", c) |
|||
} |
|||
} |
|||
|
|||
// DeleteTbGoods
|
|||
// @Summary 删除商品
|
|||
// @Description
|
|||
// @Tags goods
|
|||
// @Security ApiKeyAuth
|
|||
// @Param data body request.IdsReq false "params"
|
|||
// @Success 200 {string} string "{"code": 200, "data": {}}"
|
|||
// @Router /goods/goods [delete]
|
|||
func DeleteTbGoods(c *gin.Context) { |
|||
var info request.IdsReq |
|||
_ = c.ShouldBindJSON(&info) |
|||
if err := utils.Verify(info, utils.IdVerify); err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
if err := service.BatchDeleteTbGoods(getUserUuid(c), info); err != nil { |
|||
global.MG_LOG.Error("操作失败!", zap.Any("err", err)) |
|||
response.FailWithMessage("操作失败", c) |
|||
} else { |
|||
response.OkWithMessage("操作成功", c) |
|||
} |
|||
} |
|||
|
|||
// ListSku
|
|||
// @Summary 获取sku列表
|
|||
// @Description
|
|||
// @Tags goods
|
|||
// @Security ApiKeyAuth
|
|||
// @Param data query request.IdReq false "params"
|
|||
// @Success 200 {object} response.SelectListResult "{"code": 200, "data": {}}"
|
|||
// @Router /goods/skuList [get]
|
|||
func ListSku(c *gin.Context) { |
|||
var info request.IdReq |
|||
_ = c.ShouldBind(&info) |
|||
if err := utils.Verify(info, utils.IdVerify); err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
list, err := service.ListSku(info.ID) |
|||
if err != nil { |
|||
global.MG_LOG.Error("操作失败!", zap.Any("err", err)) |
|||
response.FailWithMessage("操作失败", c) |
|||
return |
|||
} |
|||
response.OkWithDetailed(response.SelectListResult{ |
|||
List: list, |
|||
}, "获取成功", c) |
|||
} |
|||
|
|||
// UpdateSku
|
|||
// @Summary 更新sku列表
|
|||
// @Description
|
|||
// @Tags goods
|
|||
// @Security ApiKeyAuth
|
|||
// @Param data body request.UpdateSku false "params"
|
|||
// @Success 200 {string} string "{"code": 200, "data": {}}"
|
|||
// @Router /goods/skuList [post]
|
|||
func UpdateSku(c *gin.Context) { |
|||
var info request.UpdateSku |
|||
err := c.ShouldBindJSON(&info) |
|||
if err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
err = service.UpdateSkuList(info) |
|||
if err != nil { |
|||
global.MG_LOG.Error("操作失败!", zap.Any("err", err)) |
|||
response.FailWithMessage("操作失败", c) |
|||
return |
|||
} |
|||
response.OkWithMessage("操作成功", c) |
|||
} |
|||
|
|||
// GoodsSale
|
|||
// @Summary 销售管理
|
|||
// @Description
|
|||
// @Tags goods
|
|||
// @Security ApiKeyAuth
|
|||
// @Param data query request.GetSale false "params"
|
|||
// @Success 200 {object} response.PageResult "{"code": 200, "data": {}}"
|
|||
// @Router /goods/sale [get]
|
|||
func GoodsSale(c *gin.Context) { |
|||
var info request.GetSale |
|||
err := c.ShouldBind(&info) |
|||
if err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
uuid := getUserUuid(c) |
|||
list, total, err := service.GetSale(uuid,info.Page, info.PageSize, info.Title) |
|||
if err != nil { |
|||
global.MG_LOG.Error("操作失败!", zap.Any("err", err)) |
|||
response.FailWithMessage("操作失败", c) |
|||
return |
|||
} |
|||
|
|||
response.OkWithDetailed(response.PageResult{ |
|||
List: list, |
|||
Total: total, |
|||
Page: info.Page, |
|||
PageSize: info.PageSize, |
|||
}, "获取成功", c) |
|||
} |
@ -0,0 +1,162 @@ |
|||
package bkb |
|||
|
|||
import ( |
|||
"regexp" |
|||
"time" |
|||
|
|||
"github.com/gin-gonic/gin" |
|||
"github.com/mojocn/base64Captcha" |
|||
"go.uber.org/zap" |
|||
|
|||
"bkb-seller/global" |
|||
"bkb-seller/model/request" |
|||
"bkb-seller/model/response" |
|||
"bkb-seller/service" |
|||
"bkb-seller/utils" |
|||
) |
|||
|
|||
func Test(c *gin.Context) { |
|||
|
|||
//service.FixCover()
|
|||
//service.Test()
|
|||
|
|||
// if err != nil {
|
|||
// response.FailWithMessage(err.Error(), c)
|
|||
// }
|
|||
response.OkWithMessage("ok", c) |
|||
} |
|||
|
|||
// SendMessage
|
|||
// @Tags tools
|
|||
// @Summary 发送短信验证码[v1.0.0]
|
|||
// @Security ApiKeyAuth
|
|||
// @accept application/json
|
|||
// @Produce application/json
|
|||
// @Param data body request.SendMessage true "phone,type"
|
|||
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
|
|||
// @Router /base/sendMessage [post]
|
|||
func SendMessage(c *gin.Context) { |
|||
var ( |
|||
err error |
|||
params request.SendMessage |
|||
) |
|||
_ = c.ShouldBindJSON(¶ms) |
|||
if err = utils.Verify(params, utils.SendMessageVerity); err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
//校验手机号格式
|
|||
if ok, _ := regexp.MatchString(utils.RegPhoneNumber, params.Phone); !ok { |
|||
response.FailWithMessage("手机号码格式不合法", c) |
|||
return |
|||
} |
|||
if err = utils.SendSms(params.Phone, params.PhoneCode, params.Type); err != nil { |
|||
response.FailWithMessage("发送失败,"+err.Error(), c) |
|||
return |
|||
} |
|||
response.OkWithMessage("发送成功", c) |
|||
} |
|||
|
|||
// SendMessage
|
|||
// @Tags tools
|
|||
// @Summary 发送邮件验证码[v1.0.0]
|
|||
// @Security ApiKeyAuth
|
|||
// @accept application/json
|
|||
// @Produce application/json
|
|||
// @Param data body request.SendEmail true "phone,type"
|
|||
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
|
|||
// @Router /base/sendEmail [post]
|
|||
func SendEmail(c *gin.Context) { |
|||
var ( |
|||
err error |
|||
params request.SendEmail |
|||
code string |
|||
) |
|||
_ = c.ShouldBindJSON(¶ms) |
|||
if err = utils.Verify(params, utils.SendEmailVerify); err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
//校验邮箱格式
|
|||
if ok, _ := regexp.MatchString(utils.RegEmailNumber, params.Email); !ok { |
|||
response.FailWithMessage("邮箱格式不合法", c) |
|||
return |
|||
} |
|||
if code, err = utils.SendEmail(params.Email, "1"); err != nil { |
|||
response.FailWithMessage("发送失败,"+err.Error(), c) |
|||
return |
|||
} |
|||
_ = service.RedisSet("email_code:"+params.Email, code, 5*time.Minute) |
|||
response.OkWithMessage("发送成功", c) |
|||
} |
|||
|
|||
// var store = base64Captcha.DefaultMemStore
|
|||
var store = utils.RedisStore{} |
|||
|
|||
// Captcha
|
|||
// @Tags tools
|
|||
// @Summary 生成图形验证码
|
|||
// @Security ApiKeyAuth
|
|||
// @accept application/json
|
|||
// @Produce application/json
|
|||
// @Success 200 {string} string "{"success":true,"data":{},"msg":"验证码获取成功"}"
|
|||
// @Router /base/captcha [post]
|
|||
func Captcha(c *gin.Context) { |
|||
// 字符,公式,验证码配置
|
|||
// 生成默认数字的driver
|
|||
driver := base64Captcha.NewDriverDigit(global.MG_CONFIG.Captcha.ImgHeight, global.MG_CONFIG.Captcha.ImgWidth, global.MG_CONFIG.Captcha.KeyLong, 0.7, 80) |
|||
cp := base64Captcha.NewCaptcha(driver, store) |
|||
if id, b64s, err := cp.Generate(); err != nil { |
|||
// global.MG_LOG.Error("验证码获取失败!", zap.Any("err", err))
|
|||
response.FailWithMessage("验证码获取失败", c) |
|||
} else { |
|||
response.OkWithDetailed(response.SysCaptchaResponse{ |
|||
CaptchaId: id, |
|||
PicPath: b64s, |
|||
}, "验证码获取成功", c) |
|||
} |
|||
} |
|||
|
|||
// GetSysBrochure
|
|||
// @Summary 隐私协议单页
|
|||
// @Tags tools
|
|||
// @Param data query request.SysBrochureType false "params"
|
|||
// @Success 200 {string} string "{"success":true,"data":{},"msg":""}"
|
|||
// @Router /base/brochure [get]
|
|||
func GetSysBrochure(c *gin.Context) { |
|||
var info request.SysBrochureType |
|||
_ = c.ShouldBindQuery(&info) |
|||
if err := utils.Verify(info, utils.TypeVerify); err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
if err, data := service.GetSysBrochure(info.Type); err != nil { |
|||
global.MG_LOG.Error("获取失败!", zap.Any("err", err)) |
|||
response.FailWithMessage("获取失败", c) |
|||
} else { |
|||
response.OkWithDataMessage(data.Content, "获取成功", c) |
|||
} |
|||
} |
|||
|
|||
// ListCourier
|
|||
// @Summary 物流商列表
|
|||
// @Tags common
|
|||
// @Param data query request.PageInfo false "params"
|
|||
// @Success 200 {string} string "{"success":true,"data":{},"msg":""}"
|
|||
// @Router /common/couriers [get]
|
|||
func ListCourier(c *gin.Context) { |
|||
var info request.ListCourier |
|||
_ = c.ShouldBindQuery(&info) |
|||
list, total, err := service.ListCourier(info) |
|||
if err != nil { |
|||
global.MG_LOG.Error("获取失败!" + err.Error()) |
|||
response.FailWithMessage("获取失败", c) |
|||
return |
|||
} |
|||
response.OkWithDetailed(response.PageResult{ |
|||
List: list, |
|||
Total: total, |
|||
Page: info.Page, |
|||
PageSize: info.PageSize, |
|||
}, "获取成功", c) |
|||
} |
@ -0,0 +1,301 @@ |
|||
package bkb |
|||
|
|||
import ( |
|||
"bkb-seller/api/sys" |
|||
"bkb-seller/dto" |
|||
"bkb-seller/model" |
|||
"bkb-seller/model/request" |
|||
"bkb-seller/model/response" |
|||
"bkb-seller/service" |
|||
|
|||
"github.com/gin-gonic/gin" |
|||
) |
|||
|
|||
// @Summary 钱包基本信息
|
|||
// @Security Bearer
|
|||
// @Description
|
|||
// @Tags wallet
|
|||
// @Success 200 {object} model.Wallet "{"code": 0, "data": [...]}"
|
|||
// @Success 201 {string} string "{"code": 1, "message": ""}"
|
|||
// @Router /wallet/detail [get]
|
|||
func GetUserWalletDetail(c *gin.Context) { |
|||
var ( |
|||
err error |
|||
data interface{} |
|||
) |
|||
user := sys.GetUserInfo(c) |
|||
err, data = service.GetUserWalletDetail(user.RelationID) |
|||
if err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
response.OkWithData(data, c) |
|||
} |
|||
|
|||
// @Summary 获取账户列表
|
|||
// @Security Bearer
|
|||
// @Description
|
|||
// @Tags wallet
|
|||
// @Success 200 {object} model.Account "{"code": 0, "data": [...]}"
|
|||
// @Success 201 {string} string "{"code": 1, "message": ""}"
|
|||
// @Router /wallet/accountList [get]
|
|||
func GetUserAccountList(c *gin.Context) { |
|||
var ( |
|||
err error |
|||
data interface{} |
|||
) |
|||
user := sys.GetUserInfo(c) |
|||
err, data = service.GetUserAccountList(user.RelationID) |
|||
if err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
response.OkWithData(data, c) |
|||
} |
|||
|
|||
// @Summary 绑定账户
|
|||
// @Security Bearer
|
|||
// @Description
|
|||
// @Tags wallet
|
|||
// @Param data body request.AddAccount false "data..."
|
|||
// @Success 200 {string} string "{"code": 0, "data": [...]}"
|
|||
// @Success 201 {string} string "{"code": 1, "message": ""}"
|
|||
// @Router /wallet/account [post]
|
|||
func AddUserAccount(c *gin.Context) { |
|||
var ( |
|||
err error |
|||
data request.AddAccount |
|||
) |
|||
_ = c.ShouldBind(&data) |
|||
user := sys.GetUserInfo(c) |
|||
err = service.AddUserAccount(user.RelationID, &data) |
|||
if err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
response.OkWithMessage("绑定成功", c) |
|||
} |
|||
|
|||
// @Summary 解绑账户
|
|||
// @Security Bearer
|
|||
// @Description
|
|||
// @Tags wallet
|
|||
// @Param data body request.DeleteAccount false "data..."
|
|||
// @Success 200 {object} model.Wallet "{"code": 0, "data": [...]}"
|
|||
// @Success 201 {string} string "{"code": 1, "message": ""}"
|
|||
// @Router /wallet/account [delete]
|
|||
func DeleteUserAccount(c *gin.Context) { |
|||
var ( |
|||
err error |
|||
data request.IdReq |
|||
) |
|||
_ = c.ShouldBindJSON(&data) |
|||
user := sys.GetUserInfo(c) |
|||
err = service.DeleteUserAccount(user.RelationID, &data) |
|||
if err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
response.OkWithMessage("解绑成功", c) |
|||
} |
|||
|
|||
// @Summary 获取对账中心列表
|
|||
// @Security Bearer
|
|||
// @Description
|
|||
// @Tags wallet
|
|||
// @Param data query request.SearchCommission false "data..."
|
|||
// @Success 200 {object} []model.BillList "{"code": 0, "data": [...]}"
|
|||
// @Success 201 {string} string "{"code": 1, "message": ""}"
|
|||
// @Router /wallet/commission [get]
|
|||
func GetUserCommissionList(c *gin.Context) { |
|||
var ( |
|||
err error |
|||
list interface{} |
|||
total int64 |
|||
totalB interface{} |
|||
data request.SearchCommission |
|||
) |
|||
_ = c.ShouldBindQuery(&data) |
|||
user := sys.GetUserInfo(c) |
|||
err, list, totalB, total = service.GetUserCommissionList(user.RelationID, &data) |
|||
if err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
response.OkWithDetailed(response.PageTotalResult{ |
|||
List: list, |
|||
TotalScan: totalB, |
|||
Total: total, |
|||
Page: data.Page, |
|||
PageSize: data.PageSize, |
|||
}, "获取成功", c) |
|||
} |
|||
|
|||
func GetUserWithdrawalList(c *gin.Context) { |
|||
var ( |
|||
err error |
|||
list interface{} |
|||
total int64 |
|||
data request.SearchWithdrawal |
|||
) |
|||
_ = c.ShouldBindQuery(&data) |
|||
user := sys.GetUserInfo(c) |
|||
err, list, total = service.GetUserWithdrawalList(user.RelationID, &data) |
|||
if err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
response.OkWithDetailed(response.PageResult{ |
|||
List: list, |
|||
Total: total, |
|||
Page: data.Page, |
|||
PageSize: data.PageSize, |
|||
}, "获取成功", c) |
|||
} |
|||
|
|||
// @Summary 提现
|
|||
// @Security Bearer
|
|||
// @Description
|
|||
// @Tags wallet
|
|||
// @Param data body request.WithdrawalParams false "data..."
|
|||
// @Success 200 {string} string "{"code": 0, "data": [...]}"
|
|||
// @Success 200 {string} string "{"code": 1, "message": ""}"
|
|||
// @Router /wallet/withdrawal [post]
|
|||
func UserWithdrawal(c *gin.Context) { |
|||
var ( |
|||
err error |
|||
data request.WithdrawalParams |
|||
result model.WithdrawalView |
|||
) |
|||
_ = c.ShouldBindJSON(&data) |
|||
user := sys.GetUserInfo(c) |
|||
err, result = service.BalanceWithdrawal(user.RelationID, &data) |
|||
if err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
response.OkWithDataMessage(result, "提现申请成功", c) |
|||
} |
|||
|
|||
// @Summary 营销账户提现
|
|||
// @Security Bearer
|
|||
// @Description
|
|||
// @Tags wallet
|
|||
// @Param data body request.Withdrawal false "data..."
|
|||
// @Success 200 {string} string "{"code": 0, "data": [...]}"
|
|||
// @Success 200 {string} string "{"code": 1, "message": ""}"
|
|||
// @Router /wallet/fund/withdrawal [post]
|
|||
func UserFundWithdrawal(c *gin.Context) { |
|||
var ( |
|||
err error |
|||
data request.WithdrawalParams |
|||
result model.WithdrawalView |
|||
) |
|||
_ = c.ShouldBindJSON(&data) |
|||
user := sys.GetUserInfo(c) |
|||
err, result = service.FundWithdrawal(user.RelationID, &data) |
|||
if err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
response.OkWithDataMessage(result, "提现申请成功", c) |
|||
} |
|||
|
|||
// @Summary 获取提现记录-新
|
|||
// @Security Bearer
|
|||
// @Description
|
|||
// @Tags wallet
|
|||
// @Param data query request.WithdrawalSearch false "data..."
|
|||
// @Success 200 {array} model.Withdrawal "{"code": 0, "data": [...]}"
|
|||
// @Success 201 {string} string "{"code": 1, "message": ""}"
|
|||
// @Router /wallet/withdrawal/list [get]
|
|||
func GetWithdrawalList(c *gin.Context) { |
|||
var ( |
|||
err error |
|||
total int64 |
|||
params request.WithdrawalSearch |
|||
result []model.Withdrawal |
|||
) |
|||
_ = c.ShouldBindQuery(¶ms) |
|||
user := sys.GetUserInfo(c) |
|||
err, result, total = service.GetWithdrawalList(user.RelationID, ¶ms) |
|||
if err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
response.OkWithDetailed(response.PageResult{ |
|||
List: result, |
|||
Total: total, |
|||
Page: params.Page, |
|||
PageSize: params.PageSize, |
|||
}, "获取成功", c) |
|||
} |
|||
|
|||
// @Summary 营销账户充值
|
|||
// @Security Bearer
|
|||
// @Description
|
|||
// @Tags wallet
|
|||
// @Param data body request.FundRecharge false "data..."
|
|||
// @Success 200 {object} response.PayResult "{"code": 0, "data": [...]}"
|
|||
// @Success 200 {string} string "{"code": 1, "message": ""}"
|
|||
// @Router /wallet/fund/recharge [post]
|
|||
func FundRecharge(c *gin.Context) { |
|||
var ( |
|||
err error |
|||
params request.FundRecharge |
|||
result response.PayResult |
|||
) |
|||
_ = c.ShouldBindJSON(¶ms) |
|||
user := sys.GetUserInfo(c) |
|||
err, result = service.FundRecharge(user.RelationID, ¶ms) |
|||
if err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
response.OkWithDataMessage(result, "ok", c) |
|||
} |
|||
|
|||
// @Summary 营销账户账单列表
|
|||
// @Security Bearer
|
|||
// @Description
|
|||
// @Tags wallet
|
|||
// @Param data query request.BillFundSearch false "data..."
|
|||
// @Success 200 {array} model.BillFund "{"code": 0, "data": [...]}"
|
|||
// @Success 200 {string} string "{"code": 1, "message": ""}"
|
|||
// @Router /wallet/fund/list [get]
|
|||
func BillFundList(c *gin.Context) { |
|||
var ( |
|||
err error |
|||
total int64 |
|||
params request.BillFundSearch |
|||
result []model.BillFund |
|||
) |
|||
_ = c.ShouldBindQuery(¶ms) |
|||
user := sys.GetUserInfo(c) |
|||
err, result, total = service.GetBillFundList(user.RelationID, ¶ms) |
|||
if err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
response.OkWithDetailed(response.PageResult{ |
|||
List: result, |
|||
Total: total, |
|||
Page: params.Page, |
|||
PageSize: params.PageSize, |
|||
}, "获取成功", c) |
|||
} |
|||
|
|||
func PaymentPayback(c *gin.Context) { |
|||
var ( |
|||
err error |
|||
params dto.PaybackBody |
|||
) |
|||
_ = c.ShouldBind(¶ms) |
|||
|
|||
err = service.PaypalCallback(¶ms) |
|||
if err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
response.OkWithMessage("回调成功", c) |
|||
} |
@ -0,0 +1,131 @@ |
|||
package sys |
|||
|
|||
import ( |
|||
"bkb-seller/global" |
|||
"bkb-seller/model" |
|||
"bkb-seller/model/request" |
|||
"bkb-seller/model/response" |
|||
"bkb-seller/service" |
|||
|
|||
"github.com/gin-gonic/gin" |
|||
"go.uber.org/zap" |
|||
) |
|||
|
|||
// @Tags Business
|
|||
// @Summary 创建Business
|
|||
// @Security ApiKeyAuth
|
|||
// @accept application/json
|
|||
// @Produce application/json
|
|||
// @Param data body model.SellerStore true "创建Business"
|
|||
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
|
|||
// @Router /business/createBusiness [post]
|
|||
func CreateBusiness(c *gin.Context) { |
|||
var business model.SellerStore |
|||
_ = c.ShouldBindJSON(&business) |
|||
if err := service.CreateBusiness(business); err != nil { |
|||
global.MG_LOG.Error("创建失败!", zap.Any("err", err)) |
|||
response.FailWithMessage("创建失败", c) |
|||
} else { |
|||
response.OkWithMessage("创建成功", c) |
|||
} |
|||
} |
|||
|
|||
// @Tags Business
|
|||
// @Summary 删除Business
|
|||
// @Security ApiKeyAuth
|
|||
// @accept application/json
|
|||
// @Produce application/json
|
|||
// @Param data body model.SellerStore true "删除Business"
|
|||
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
|
|||
// @Router /business/deleteBusiness [delete]
|
|||
func DeleteBusiness(c *gin.Context) { |
|||
var business model.SellerStore |
|||
_ = c.ShouldBindJSON(&business) |
|||
if err := service.DeleteBusiness(business); err != nil { |
|||
global.MG_LOG.Error("删除失败!", zap.Any("err", err)) |
|||
response.FailWithMessage("删除失败", c) |
|||
} else { |
|||
response.OkWithMessage("删除成功", c) |
|||
} |
|||
} |
|||
|
|||
// @Tags Business
|
|||
// @Summary 批量删除Business
|
|||
// @Security ApiKeyAuth
|
|||
// @accept application/json
|
|||
// @Produce application/json
|
|||
// @Param data body request.IdsReq true "批量删除Business"
|
|||
// @Success 200 {string} string "{"success":true,"data":{},"msg":"批量删除成功"}"
|
|||
// @Router /business/deleteBusinessByIds [delete]
|
|||
func DeleteBusinessByIds(c *gin.Context) { |
|||
var IDS request.IdsReq |
|||
_ = c.ShouldBindJSON(&IDS) |
|||
if err := service.DeleteBusinessByIds(IDS); err != nil { |
|||
global.MG_LOG.Error("批量删除失败!", zap.Any("err", err)) |
|||
response.FailWithMessage("批量删除失败", c) |
|||
} else { |
|||
response.OkWithMessage("批量删除成功", c) |
|||
} |
|||
} |
|||
|
|||
// @Tags Business
|
|||
// @Summary 更新Business
|
|||
// @Security ApiKeyAuth
|
|||
// @accept application/json
|
|||
// @Produce application/json
|
|||
// @Param data body model.SellerStore true "更新Business"
|
|||
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
|
|||
// @Router /business/updateBusiness [put]
|
|||
func UpdateBusiness(c *gin.Context) { |
|||
var business model.SellerStore |
|||
_ = c.ShouldBindJSON(&business) |
|||
if err := service.UpdateBusiness(business); err != nil { |
|||
global.MG_LOG.Error("更新失败!", zap.Any("err", err)) |
|||
response.FailWithMessage("更新失败", c) |
|||
} else { |
|||
response.OkWithMessage("更新成功", c) |
|||
} |
|||
} |
|||
|
|||
// @Tags Business
|
|||
// @Summary 用id查询Business
|
|||
// @Security ApiKeyAuth
|
|||
// @accept application/json
|
|||
// @Produce application/json
|
|||
// @Param data body model.SellerStore true "用id查询Business"
|
|||
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
|
|||
// @Router /business/findBusiness [get]
|
|||
func FindBusiness(c *gin.Context) { |
|||
var business model.SellerStore |
|||
_ = c.ShouldBindQuery(&business) |
|||
if err, rebusiness := service.GetBusiness(business.ID); err != nil { |
|||
global.MG_LOG.Error("查询失败!", zap.Any("err", err)) |
|||
response.FailWithMessage("查询失败", c) |
|||
} else { |
|||
response.OkWithData(gin.H{"rebusiness": rebusiness}, c) |
|||
} |
|||
} |
|||
|
|||
// @Tags Business
|
|||
// @Summary 分页获取Business列表
|
|||
// @Security ApiKeyAuth
|
|||
// @accept application/json
|
|||
// @Produce application/json
|
|||
// @Param data body request.BusinessSearch true "分页获取Business列表"
|
|||
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
|
|||
// @Router /business/getBusinessList [get]
|
|||
func GetBusinessList(c *gin.Context) { |
|||
var pageInfo request.BusinessSearch |
|||
_ = c.ShouldBindQuery(&pageInfo) |
|||
if err, list, total := service.GetBusinessInfoList(pageInfo); err != nil { |
|||
global.MG_LOG.Error("获取失败!", zap.Any("err", err)) |
|||
response.FailWithMessage("获取失败", c) |
|||
} else { |
|||
response.OkWithDetailed(response.PageResult{ |
|||
List: list, |
|||
Total: total, |
|||
Page: pageInfo.Page, |
|||
PageSize: pageInfo.PageSize, |
|||
}, "获取成功", c) |
|||
} |
|||
} |
@ -0,0 +1,174 @@ |
|||
package sys |
|||
|
|||
import ( |
|||
"bkb-seller/global" |
|||
"bkb-seller/model" |
|||
"bkb-seller/model/request" |
|||
"bkb-seller/model/response" |
|||
"bkb-seller/service" |
|||
"bkb-seller/utils" |
|||
|
|||
"github.com/gin-gonic/gin" |
|||
"go.uber.org/zap" |
|||
) |
|||
|
|||
// @Tags SysApi
|
|||
// @Summary 创建基础api
|
|||
// @Security ApiKeyAuth
|
|||
// @accept application/json
|
|||
// @Produce application/json
|
|||
// @Param data body model.SysApi true "api路径, api中文描述, api组, 方法"
|
|||
// @Success 200 {string} string "{"success":true,"data":{},"msg":"创建成功"}"
|
|||
// @Router /api/createApi [post]
|
|||
func CreateApi(c *gin.Context) { |
|||
var api model.SysApi |
|||
_ = c.ShouldBindJSON(&api) |
|||
if err := utils.Verify(api, utils.ApiVerify); err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
api.Appid = GetUserAppid(c) |
|||
api.Type = "seller" |
|||
if err := service.CreateApi(api); err != nil { |
|||
global.MG_LOG.Error("创建失败!", zap.Any("err", err)) |
|||
response.FailWithMessage("创建失败,"+err.Error(), c) |
|||
} else { |
|||
response.OkWithMessage("创建成功", c) |
|||
} |
|||
} |
|||
|
|||
// @Tags SysApi
|
|||
// @Summary 删除api
|
|||
// @Security ApiKeyAuth
|
|||
// @accept application/json
|
|||
// @Produce application/json
|
|||
// @Param data body model.SysApi true "ID"
|
|||
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
|
|||
// @Router /api/deleteApi [post]
|
|||
func DeleteApi(c *gin.Context) { |
|||
var api model.SysApi |
|||
_ = c.ShouldBindJSON(&api) |
|||
if err := utils.Verify(api.MG_MODEL, utils.IdVerify); err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
api.Appid = GetUserAppid(c) |
|||
if err := service.DeleteApi(api); err != nil { |
|||
global.MG_LOG.Error("删除失败!", zap.Any("err", err)) |
|||
response.FailWithMessage("删除失败", c) |
|||
} else { |
|||
response.OkWithMessage("删除成功", c) |
|||
} |
|||
} |
|||
|
|||
// @Tags SysApi
|
|||
// @Summary 分页获取API列表
|
|||
// @Security ApiKeyAuth
|
|||
// @accept application/json
|
|||
// @Produce application/json
|
|||
// @Param data body request.SearchApiParams true "分页获取API列表"
|
|||
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
|
|||
// @Router /api/getApiList [post]
|
|||
func GetApiList(c *gin.Context) { |
|||
var pageInfo request.SearchApiParams |
|||
_ = c.ShouldBindJSON(&pageInfo) |
|||
if err := utils.Verify(pageInfo.PageInfo, utils.PageInfoVerify); err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
pageInfo.SysApi.Appid = GetUserAppid(c) |
|||
if err, list, total := service.GetAPIInfoList(pageInfo.SysApi, pageInfo.PageInfo, pageInfo.OrderKey, pageInfo.Desc); err != nil { |
|||
global.MG_LOG.Error("获取失败!", zap.Any("err", err)) |
|||
response.FailWithMessage("获取失败", c) |
|||
} else { |
|||
response.OkWithDetailed(response.PageResult{ |
|||
List: list, |
|||
Total: total, |
|||
Page: pageInfo.Page, |
|||
PageSize: pageInfo.PageSize, |
|||
}, "获取成功", c) |
|||
} |
|||
} |
|||
|
|||
// @Tags SysApi
|
|||
// @Summary 根据id获取api
|
|||
// @Security ApiKeyAuth
|
|||
// @accept application/json
|
|||
// @Produce application/json
|
|||
// @Param data body request.GetById true "根据id获取api"
|
|||
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
|
|||
// @Router /api/getApiById [post]
|
|||
func GetApiById(c *gin.Context) { |
|||
var idInfo request.GetById |
|||
_ = c.ShouldBindJSON(&idInfo) |
|||
if err := utils.Verify(idInfo, utils.IdVerify); err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
err, api := service.GetApiById(idInfo.ID) |
|||
if err != nil { |
|||
global.MG_LOG.Error("获取失败!", zap.Any("err", err)) |
|||
response.FailWithMessage("获取失败", c) |
|||
} else { |
|||
response.OkWithData(response.SysAPIResponse{Api: api}, c) |
|||
} |
|||
} |
|||
|
|||
// @Tags SysApi
|
|||
// @Summary 更新基础api
|
|||
// @Security ApiKeyAuth
|
|||
// @accept application/json
|
|||
// @Produce application/json
|
|||
// @Param data body model.SysApi true "api路径, api中文描述, api组, 方法"
|
|||
// @Success 200 {string} string "{"success":true,"data":{},"msg":"修改成功"}"
|
|||
// @Router /api/updateApi [post]
|
|||
func UpdateApi(c *gin.Context) { |
|||
var api model.SysApi |
|||
_ = c.ShouldBindJSON(&api) |
|||
if err := utils.Verify(api, utils.ApiVerify); err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
api.Appid = GetUserAppid(c) |
|||
if err := service.UpdateApi(api); err != nil { |
|||
global.MG_LOG.Error("修改失败!", zap.Any("err", err)) |
|||
response.FailWithMessage("修改失败"+err.Error(), c) |
|||
} else { |
|||
response.OkWithMessage("修改成功", c) |
|||
} |
|||
} |
|||
|
|||
// @Tags SysApi
|
|||
// @Summary 获取所有的Api 不分页
|
|||
// @Security ApiKeyAuth
|
|||
// @accept application/json
|
|||
// @Produce application/json
|
|||
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
|
|||
// @Router /api/getAllApis [post]
|
|||
func GetAllApis(c *gin.Context) { |
|||
if err, apis := service.GetAllApis(GetUserAppid(c)); err != nil { |
|||
global.MG_LOG.Error("获取失败!", zap.Any("err", err)) |
|||
response.FailWithMessage("获取失败", c) |
|||
} else { |
|||
response.OkWithDetailed(response.SysAPIListResponse{Apis: apis}, "获取成功", c) |
|||
} |
|||
} |
|||
|
|||
// @Tags SysApi
|
|||
// @Summary 删除选中Api
|
|||
// @Security ApiKeyAuth
|
|||
// @accept application/json
|
|||
// @Produce application/json
|
|||
// @Param data body request.IdsReq true "ID"
|
|||
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
|
|||
// @Router /api/deleteApisByIds [delete]
|
|||
func DeleteApisByIds(c *gin.Context) { |
|||
var ids request.IdsReq |
|||
_ = c.ShouldBindJSON(&ids) |
|||
if err := service.DeleteApisByIds(ids, GetUserAppid(c)); err != nil { |
|||
global.MG_LOG.Error("删除失败!", zap.Any("err", err)) |
|||
response.FailWithMessage("删除失败", c) |
|||
} else { |
|||
response.OkWithMessage("删除成功", c) |
|||
} |
|||
} |
@ -0,0 +1,140 @@ |
|||
package sys |
|||
|
|||
import ( |
|||
"bkb-seller/global" |
|||
"bkb-seller/model" |
|||
"bkb-seller/model/request" |
|||
"bkb-seller/model/response" |
|||
"bkb-seller/service" |
|||
"bkb-seller/utils" |
|||
|
|||
"github.com/gin-gonic/gin" |
|||
"go.uber.org/zap" |
|||
) |
|||
|
|||
// @Tags Authority
|
|||
// @Summary 创建角色
|
|||
// @Security ApiKeyAuth
|
|||
// @accept application/json
|
|||
// @Produce application/json
|
|||
// @Param data body model.SysAuthority true "权限id, 权限名, 父角色id"
|
|||
// @Success 200 {string} string "{"success":true,"data":{},"msg":"创建成功"}"
|
|||
// @Router /authority/createAuthority [post]
|
|||
func CreateAuthority(c *gin.Context) { |
|||
var authority model.SysAuthority |
|||
_ = c.ShouldBindJSON(&authority) |
|||
if err := utils.Verify(authority, utils.AuthorityVerify); err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
authority.Appid = GetUserAppid(c) |
|||
authority.Type = "seller" |
|||
if err, authBack := service.CreateAuthority(authority); err != nil { |
|||
global.MG_LOG.Error("创建失败!", zap.Any("err", err)) |
|||
response.FailWithMessage("创建失败"+err.Error(), c) |
|||
} else { |
|||
response.OkWithDetailed(response.SysAuthorityResponse{Authority: authBack}, "创建成功", c) |
|||
} |
|||
} |
|||
|
|||
// @Tags Authority
|
|||
// @Summary 拷贝角色
|
|||
// @Security ApiKeyAuth
|
|||
// @accept application/json
|
|||
// @Produce application/json
|
|||
// @Param data body response.SysAuthorityCopyResponse true "旧角色id, 新权限id, 新权限名, 新父角色id"
|
|||
// @Success 200 {string} string "{"success":true,"data":{},"msg":"拷贝成功"}"
|
|||
// @Router /authority/copyAuthority [post]
|
|||
func CopyAuthority(c *gin.Context) { |
|||
var copyInfo response.SysAuthorityCopyResponse |
|||
_ = c.ShouldBindJSON(©Info) |
|||
if err := utils.Verify(copyInfo, utils.OldAuthorityVerify); err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
if err := utils.Verify(copyInfo.Authority, utils.AuthorityVerify); err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
copyInfo.Authority.Appid = GetUserAppid(c) |
|||
if err, authBack := service.CopyAuthority(copyInfo); err != nil { |
|||
global.MG_LOG.Error("拷贝失败!", zap.Any("err", err)) |
|||
response.FailWithMessage("拷贝失败"+err.Error(), c) |
|||
} else { |
|||
response.OkWithDetailed(response.SysAuthorityResponse{Authority: authBack}, "拷贝成功", c) |
|||
} |
|||
} |
|||
|
|||
// @Tags Authority
|
|||
// @Summary 删除角色
|
|||
// @Security ApiKeyAuth
|
|||
// @accept application/json
|
|||
// @Produce application/json
|
|||
// @Param data body model.SysAuthority true "删除角色"
|
|||
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
|
|||
// @Router /authority/deleteAuthority [post]
|
|||
func DeleteAuthority(c *gin.Context) { |
|||
var authority model.SysAuthority |
|||
_ = c.ShouldBindJSON(&authority) |
|||
if err := utils.Verify(authority, utils.AuthorityIdVerify); err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
if err := service.DeleteAuthority(&authority); err != nil { // 删除角色之前需要判断是否有用户正在使用此角色
|
|||
global.MG_LOG.Error("删除失败!", zap.Any("err", err)) |
|||
response.FailWithMessage("删除失败"+err.Error(), c) |
|||
} else { |
|||
response.OkWithMessage("删除成功", c) |
|||
} |
|||
} |
|||
|
|||
// @Tags Authority
|
|||
// @Summary 更新角色信息
|
|||
// @Security ApiKeyAuth
|
|||
// @accept application/json
|
|||
// @Produce application/json
|
|||
// @Param data body model.SysAuthority true "权限id, 权限名, 父角色id"
|
|||
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
|
|||
// @Router /authority/updateAuthority [put]
|
|||
func UpdateAuthority(c *gin.Context) { |
|||
var auth model.SysAuthority |
|||
_ = c.ShouldBindJSON(&auth) |
|||
if err := utils.Verify(auth, utils.AuthorityVerify); err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
if err, authority := service.UpdateAuthority(auth); err != nil { |
|||
global.MG_LOG.Error("更新失败!", zap.Any("err", err)) |
|||
response.FailWithMessage("更新失败"+err.Error(), c) |
|||
} else { |
|||
response.OkWithDetailed(response.SysAuthorityResponse{Authority: authority}, "更新成功", c) |
|||
} |
|||
} |
|||
|
|||
// @Tags Authority
|
|||
// @Summary 分页获取角色列表
|
|||
// @Security ApiKeyAuth
|
|||
// @accept application/json
|
|||
// @Produce application/json
|
|||
// @Param data body request.PageInfo true "页码, 每页大小"
|
|||
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
|
|||
// @Router /authority/getAuthorityList [post]
|
|||
func GetAuthorityList(c *gin.Context) { |
|||
var pageInfo request.PageInfo |
|||
_ = c.ShouldBindJSON(&pageInfo) |
|||
if err := utils.Verify(pageInfo, utils.PageInfoVerify); err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
if err, list, total := service.GetAuthorityInfoList(pageInfo, GetUserAppid(c)); err != nil { |
|||
global.MG_LOG.Error("获取失败!", zap.Any("err", err)) |
|||
response.FailWithMessage("获取失败"+err.Error(), c) |
|||
} else { |
|||
response.OkWithDetailed(response.PageResult{ |
|||
List: list, |
|||
Total: total, |
|||
Page: pageInfo.Page, |
|||
PageSize: pageInfo.PageSize, |
|||
}, "获取成功", c) |
|||
} |
|||
} |
@ -0,0 +1,54 @@ |
|||
package sys |
|||
|
|||
import ( |
|||
"bkb-seller/global" |
|||
"bkb-seller/model/request" |
|||
"bkb-seller/model/response" |
|||
"bkb-seller/service" |
|||
"bkb-seller/utils" |
|||
|
|||
"github.com/gin-gonic/gin" |
|||
"go.uber.org/zap" |
|||
) |
|||
|
|||
// @Tags Casbin
|
|||
// @Summary 更新角色api权限
|
|||
// @Security ApiKeyAuth
|
|||
// @accept application/json
|
|||
// @Produce application/json
|
|||
// @Param data body request.CasbinInReceive true "权限id, 权限模型列表"
|
|||
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
|
|||
// @Router /casbin/UpdateCasbin [post]
|
|||
func UpdateCasbin(c *gin.Context) { |
|||
var cmr request.CasbinInReceive |
|||
_ = c.ShouldBindJSON(&cmr) |
|||
if err := utils.Verify(cmr, utils.AuthorityIdVerify); err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
if err := service.UpdateCasbin(cmr.AuthorityId, GetUserAppid(c), cmr.CasbinInfos); err != nil { |
|||
global.MG_LOG.Error("更新失败!", zap.Any("err", err)) |
|||
response.FailWithMessage("更新失败", c) |
|||
} else { |
|||
response.OkWithMessage("更新成功", c) |
|||
} |
|||
} |
|||
|
|||
// @Tags Casbin
|
|||
// @Summary 获取权限列表
|
|||
// @Security ApiKeyAuth
|
|||
// @accept application/json
|
|||
// @Produce application/json
|
|||
// @Param data body request.CasbinInReceive true "权限id, 权限模型列表"
|
|||
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
|
|||
// @Router /casbin/getPolicyPathByAuthorityId [post]
|
|||
func GetPolicyPathByAuthorityId(c *gin.Context) { |
|||
var casbin request.CasbinInReceive |
|||
_ = c.ShouldBindJSON(&casbin) |
|||
if err := utils.Verify(casbin, utils.AuthorityIdVerify); err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
paths := service.GetPolicyPathByAuthorityId(casbin.AuthorityId) |
|||
response.OkWithDetailed(response.PolicyPathResponse{Paths: paths}, "获取成功", c) |
|||
} |
@ -0,0 +1,237 @@ |
|||
package sys |
|||
|
|||
import ( |
|||
"bkb-seller/global" |
|||
"bkb-seller/model" |
|||
"bkb-seller/model/request" |
|||
"bkb-seller/model/response" |
|||
"bkb-seller/service" |
|||
"bkb-seller/utils" |
|||
|
|||
"github.com/gin-gonic/gin" |
|||
"go.uber.org/zap" |
|||
) |
|||
|
|||
// @Tags AuthorityMenu
|
|||
// @Summary 获取用户动态路由
|
|||
// @Security ApiKeyAuth
|
|||
// @Produce application/json
|
|||
// @Param data body request.Empty true "空"
|
|||
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
|
|||
// @Router /menu/getMenu [post]
|
|||
func GetMenu(c *gin.Context) { |
|||
if err, menus := service.GetMenuTree(GetUserAuthorityId(c), GetUserAppid(c)); err != nil { |
|||
global.MG_LOG.Error("获取失败!", zap.Any("err", err)) |
|||
response.FailWithMessage("获取失败", c) |
|||
} else { |
|||
response.OkWithDetailed(response.SysMenusResponse{Menus: menus}, "获取成功", c) |
|||
} |
|||
} |
|||
|
|||
// @Tags AuthorityMenu
|
|||
// @Summary 获取用户动态路由List
|
|||
// @Security ApiKeyAuth
|
|||
// @Produce application/json
|
|||
// @Param data body request.Empty true "空"
|
|||
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
|
|||
// @Router /menu/getMenuForList [post]
|
|||
func GetMenuForList(c *gin.Context) { |
|||
if err, menus := service.GetMenuAuthority(GetUserAuthorityId(c), GetUserAppid(c)); err != nil { |
|||
global.MG_LOG.Error("获取失败!", zap.Any("err", err)) |
|||
response.FailWithMessage("获取失败", c) |
|||
} else { |
|||
paths := service.GetPolicyPathByAuthorityId(GetUserAuthorityId(c)) |
|||
response.OkWithDetailed(gin.H{"menus": menus, "apis": paths}, "获取成功", c) |
|||
} |
|||
} |
|||
|
|||
// @Tags AuthorityMenu
|
|||
// @Summary 获取用户动态路由
|
|||
// @Security ApiKeyAuth
|
|||
// @Produce application/json
|
|||
// @Param data body request.Empty true "空"
|
|||
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
|
|||
// @Router /menu/getBaseMenuTree [post]
|
|||
func GetBaseMenuTree(c *gin.Context) { |
|||
if err, menus := service.GetBaseMenuTree(); err != nil { |
|||
global.MG_LOG.Error("获取失败!", zap.Any("err", err)) |
|||
response.FailWithMessage("获取失败", c) |
|||
} else { |
|||
response.OkWithDetailed(response.SysBaseMenusResponse{Menus: menus}, "获取成功", c) |
|||
} |
|||
} |
|||
|
|||
// @Tags AuthorityMenu
|
|||
// @Summary 增加menu和角色关联关系
|
|||
// @Security ApiKeyAuth
|
|||
// @accept application/json
|
|||
// @Produce application/json
|
|||
// @Param data body request.AddMenuAuthorityInfo true "角色ID"
|
|||
// @Success 200 {string} string "{"success":true,"data":{},"msg":"添加成功"}"
|
|||
// @Router /menu/addMenuAuthority [post]
|
|||
func AddMenuAuthority(c *gin.Context) { |
|||
var authorityMenu request.AddMenuAuthorityInfo |
|||
_ = c.ShouldBindJSON(&authorityMenu) |
|||
if err := utils.Verify(authorityMenu, utils.AuthorityIdVerify); err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
if err := service.AddMenuAuthority(authorityMenu.Menus, authorityMenu.AuthorityId, GetUserAppid(c)); err != nil { |
|||
global.MG_LOG.Error("添加失败!", zap.Any("err", err)) |
|||
response.FailWithMessage("添加失败", c) |
|||
} else { |
|||
response.OkWithMessage("添加成功", c) |
|||
} |
|||
} |
|||
|
|||
// @Tags AuthorityMenu
|
|||
// @Summary 获取指定角色menu
|
|||
// @Security ApiKeyAuth
|
|||
// @accept application/json
|
|||
// @Produce application/json
|
|||
// @Param data body request.GetAuthorityId true "角色ID"
|
|||
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
|
|||
// @Router /menu/getMenuAuthority [post]
|
|||
func GetMenuAuthority(c *gin.Context) { |
|||
var param request.GetAuthorityId |
|||
_ = c.ShouldBindJSON(¶m) |
|||
if err := utils.Verify(param, utils.AuthorityIdVerify); err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
if err, menus := service.GetMenuAuthority(param.AuthorityId, GetUserAppid(c)); err != nil { |
|||
global.MG_LOG.Error("获取失败!", zap.Any("err", err)) |
|||
response.FailWithMessage("获取失败", c) |
|||
} else { |
|||
response.OkWithDetailed(gin.H{"menus": menus}, "获取成功", c) |
|||
} |
|||
} |
|||
|
|||
// @Tags Menu
|
|||
// @Summary 新增菜单
|
|||
// @Security ApiKeyAuth
|
|||
// @accept application/json
|
|||
// @Produce application/json
|
|||
// @Param data body model.SysBaseMenu true "路由path, 父菜单ID, 路由name, 对应前端文件路径, 排序标记"
|
|||
// @Success 200 {string} string "{"success":true,"data":{},"msg":"添加成功"}"
|
|||
// @Router /menu/addBaseMenu [post]
|
|||
func AddBaseMenu(c *gin.Context) { |
|||
var menu model.SysBaseMenu |
|||
_ = c.ShouldBindJSON(&menu) |
|||
if err := utils.Verify(menu, utils.MenuVerify); err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
if err := utils.Verify(menu.Meta, utils.MenuMetaVerify); err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
if err := service.AddBaseMenu(menu, GetUserAppid(c)); err != nil { |
|||
global.MG_LOG.Error("添加失败!", zap.Any("err", err)) |
|||
|
|||
response.FailWithMessage("添加失败,"+err.Error(), c) |
|||
} else { |
|||
response.OkWithMessage("添加成功", c) |
|||
} |
|||
} |
|||
|
|||
// @Tags Menu
|
|||
// @Summary 删除菜单
|
|||
// @Security ApiKeyAuth
|
|||
// @accept application/json
|
|||
// @Produce application/json
|
|||
// @Param data body request.GetById true "菜单id"
|
|||
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
|
|||
// @Router /menu/deleteBaseMenu [post]
|
|||
func DeleteBaseMenu(c *gin.Context) { |
|||
var menu request.GetById |
|||
_ = c.ShouldBindJSON(&menu) |
|||
if err := utils.Verify(menu, utils.IdVerify); err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
if err := service.DeleteBaseMenu(menu.ID, GetUserAppid(c)); err != nil { |
|||
global.MG_LOG.Error("删除失败!", zap.Any("err", err)) |
|||
response.FailWithMessage("删除失败", c) |
|||
} else { |
|||
response.OkWithMessage("删除成功", c) |
|||
} |
|||
} |
|||
|
|||
// @Tags Menu
|
|||
// @Summary 更新菜单
|
|||
// @Security ApiKeyAuth
|
|||
// @accept application/json
|
|||
// @Produce application/json
|
|||
// @Param data body model.SysBaseMenu true "路由path, 父菜单ID, 路由name, 对应前端文件路径, 排序标记"
|
|||
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
|
|||
// @Router /menu/updateBaseMenu [post]
|
|||
func UpdateBaseMenu(c *gin.Context) { |
|||
var menu model.SysBaseMenu |
|||
_ = c.ShouldBindJSON(&menu) |
|||
if err := utils.Verify(menu, utils.MenuVerify); err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
if err := utils.Verify(menu.Meta, utils.MenuMetaVerify); err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
if err := service.UpdateBaseMenu(menu); err != nil { |
|||
global.MG_LOG.Error("更新失败!", zap.Any("err", err)) |
|||
response.FailWithMessage("更新失败", c) |
|||
} else { |
|||
response.OkWithMessage("更新成功", c) |
|||
} |
|||
} |
|||
|
|||
// @Tags Menu
|
|||
// @Summary 根据id获取菜单
|
|||
// @Security ApiKeyAuth
|
|||
// @accept application/json
|
|||
// @Produce application/json
|
|||
// @Param data body request.GetById true "菜单id"
|
|||
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
|
|||
// @Router /menu/getBaseMenuById [post]
|
|||
func GetBaseMenuById(c *gin.Context) { |
|||
var idInfo request.GetById |
|||
_ = c.ShouldBindJSON(&idInfo) |
|||
if err := utils.Verify(idInfo, utils.IdVerify); err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
if err, menu := service.GetBaseMenuById(idInfo.ID); err != nil { |
|||
global.MG_LOG.Error("获取失败!", zap.Any("err", err)) |
|||
response.FailWithMessage("获取失败", c) |
|||
} else { |
|||
response.OkWithDetailed(response.SysBaseMenuResponse{Menu: menu}, "获取成功", c) |
|||
} |
|||
} |
|||
|
|||
// @Tags Menu
|
|||
// @Summary 分页获取基础menu列表
|
|||
// @Security ApiKeyAuth
|
|||
// @accept application/json
|
|||
// @Produce application/json
|
|||
// @Param data body request.PageInfo true "页码, 每页大小"
|
|||
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
|
|||
// @Router /menu/getMenuList [post]
|
|||
func GetMenuList(c *gin.Context) { |
|||
var pageInfo request.PageInfo |
|||
_ = c.ShouldBindJSON(&pageInfo) |
|||
if err := utils.Verify(pageInfo, utils.PageInfoVerify); err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
if err, menuList, total := service.GetInfoList(); err != nil { |
|||
global.MG_LOG.Error("获取失败!", zap.Any("err", err)) |
|||
response.FailWithMessage("获取失败", c) |
|||
} else { |
|||
response.OkWithDetailed(response.PageResult{ |
|||
List: menuList, |
|||
Total: total, |
|||
Page: pageInfo.Page, |
|||
PageSize: pageInfo.PageSize, |
|||
}, "获取成功", c) |
|||
} |
|||
} |
@ -0,0 +1,160 @@ |
|||
package sys |
|||
|
|||
import ( |
|||
"bkb-seller/global" |
|||
"bkb-seller/model" |
|||
"bkb-seller/model/request" |
|||
"bkb-seller/model/response" |
|||
"bkb-seller/service" |
|||
"bkb-seller/utils" |
|||
"fmt" |
|||
|
|||
"github.com/gin-gonic/gin" |
|||
"go.uber.org/zap" |
|||
) |
|||
|
|||
// @Tags sysSeller
|
|||
// @Summary 获取菜单接口树
|
|||
// @Security ApiKeyAuth
|
|||
// @accept application/json
|
|||
// @Produce application/json
|
|||
// @Success 200 {object} []model.SysMenuApi "{"success":true,"data":{},"msg":"删除成功"}"
|
|||
// @Router /sub/menuApiTree [get]
|
|||
func GetMenuApiTree(c *gin.Context) { |
|||
if err, menus := service.GetMenuApiTree(GetUserAppid(c), GetUserType(c)); err != nil { |
|||
response.FailWithMessage(fmt.Sprintf("获取失败,%v", err), c) |
|||
} else { |
|||
response.OkWithData(menus, c) |
|||
} |
|||
} |
|||
|
|||
// @Tags sysSeller
|
|||
// @Summary 获取角色api权限列表
|
|||
// @Security ApiKeyAuth
|
|||
// @accept application/json
|
|||
// @Produce application/json
|
|||
// @Success 200 {object} []model.SysMenuApi "{"success":true,"data":{},"msg":"删除成功"}"
|
|||
// @Router /sub/authority [get]
|
|||
func GetAuthority(c *gin.Context) { |
|||
if err, menus := service.GetAuthority(GetUserAppid(c), GetUserType(c)); err != nil { |
|||
response.FailWithMessage(fmt.Sprintf("获取失败,%v", err), c) |
|||
} else { |
|||
response.OkWithData(menus, c) |
|||
} |
|||
} |
|||
|
|||
// @Tags sysSeller
|
|||
// @Summary 获取子账号列表
|
|||
// @Security ApiKeyAuth
|
|||
// @accept application/json
|
|||
// @Produce application/json
|
|||
// @Success 200 {object} []model.SysMenuApi "{"success":true,"data":{},"msg":"删除成功"}"
|
|||
// @Router /sub/accountList [get]
|
|||
func GetSubAccountList(c *gin.Context) { |
|||
if err, menus := service.GetSubAccountList(GetUserAppid(c), GetUserType(c)); err != nil { |
|||
response.FailWithMessage(fmt.Sprintf("获取失败,%v", err), c) |
|||
} else { |
|||
response.OkWithData(menus, c) |
|||
} |
|||
} |
|||
|
|||
// @Tags sysSeller
|
|||
// @Summary 分页获取角色列表
|
|||
// @Security ApiKeyAuth
|
|||
// @accept application/json
|
|||
// @Produce application/json
|
|||
// @Param data body request.PageInfo true "页码, 每页大小"
|
|||
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
|
|||
// @Router /sub/authorityList [post]
|
|||
func GetSubAuthorityList(c *gin.Context) { |
|||
var pageInfo request.PageInfo |
|||
_ = c.ShouldBindJSON(&pageInfo) |
|||
if err := utils.Verify(pageInfo, utils.PageInfoVerify); err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
if err, list, total := service.GetAuthorityInfoList(pageInfo, GetUserAppid(c)); err != nil { |
|||
global.MG_LOG.Error("获取失败!", zap.Any("err", err)) |
|||
response.FailWithMessage("获取失败"+err.Error(), c) |
|||
} else { |
|||
response.OkWithDetailed(response.PageResult{ |
|||
List: list, |
|||
Total: total, |
|||
Page: pageInfo.Page, |
|||
PageSize: pageInfo.PageSize, |
|||
}, "获取成功", c) |
|||
} |
|||
} |
|||
|
|||
// @Tags sysSeller
|
|||
// @Summary 修改角色菜单api权限
|
|||
// @Security ApiKeyAuth
|
|||
// @accept application/json
|
|||
// @Produce application/json
|
|||
// @Param data body request.UpdateAuthorityRole true "页码, 每页大小"
|
|||
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
|
|||
// @Router /sub/authority [put]
|
|||
func UpdateAuthorityRole(c *gin.Context) { |
|||
var role request.UpdateAuthorityRole |
|||
_ = c.ShouldBindJSON(&role) |
|||
if err := service.UpdateAuthorityRole(&role, GetUserAppid(c), "seller"); err != nil { |
|||
response.FailWithMessage(fmt.Sprintf("更新失败,%v", err), c) |
|||
return |
|||
} |
|||
response.OkWithMessage("更新成功", c) |
|||
} |
|||
|
|||
// @Tags sysSeller
|
|||
// @Summary 创建角色菜单api权限
|
|||
// @Security ApiKeyAuth
|
|||
// @accept application/json
|
|||
// @Produce application/json
|
|||
// @Param data body request.AddAuthorityRole true "页码, 每页大小"
|
|||
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
|
|||
// @Router /sub/authority [post]
|
|||
func AddAuthorityRole(c *gin.Context) { |
|||
var role request.AddAuthorityRole |
|||
_ = c.ShouldBindJSON(&role) |
|||
if err := service.AddAuthorityRole(&role, GetUserAppid(c), "seller"); err != nil { |
|||
response.FailWithMessage(fmt.Sprintf("添加失败,%v", err), c) |
|||
return |
|||
} |
|||
response.OkWithMessage("添加成功", c) |
|||
} |
|||
|
|||
// @Tags sysSeller
|
|||
// @Summary 删除角色
|
|||
// @Security ApiKeyAuth
|
|||
// @accept application/json
|
|||
// @Produce application/json
|
|||
// @Param data body model.SysAuthority true "删除角色"
|
|||
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
|
|||
// @Router /sub/authority [post]
|
|||
func DeleteAuthorityRole(c *gin.Context) { |
|||
var authority model.SysAuthority |
|||
_ = c.ShouldBindJSON(&authority) |
|||
if err := utils.Verify(authority, utils.AuthorityIdVerify); err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
if err := service.DeleteAuthority(&authority); err != nil { // 删除角色之前需要判断是否有用户正在使用此角色
|
|||
global.MG_LOG.Error("删除失败!", zap.Any("err", err)) |
|||
response.FailWithMessage("删除失败"+err.Error(), c) |
|||
} else { |
|||
response.OkWithMessage("删除成功", c) |
|||
} |
|||
} |
|||
|
|||
func AddSubAccount(c *gin.Context) { |
|||
var subAccount request.AddSubAccount |
|||
_ = c.ShouldBindJSON(&subAccount) |
|||
// if err := utils.Verify(subAccount, utils.SubAccountVerify); err != nil {
|
|||
// response.FailWithMessage(err.Error(), c)
|
|||
// return
|
|||
// }
|
|||
if err := service.AddSubAccount(&subAccount, GetUserAppid(c), "seller"); err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
response.OkWithMessage("添加成功", c) |
|||
} |
@ -0,0 +1,73 @@ |
|||
package sys |
|||
|
|||
import ( |
|||
"bkb-seller/global" |
|||
"bkb-seller/model/request" |
|||
|
|||
"github.com/gin-gonic/gin" |
|||
) |
|||
|
|||
// 从Gin的Context中获取从jwt解析出来的用户UUID
|
|||
func GetUserUuid(c *gin.Context) string { |
|||
if claims, exists := c.Get("claims"); !exists { |
|||
global.MG_LOG.Error("从Gin的Context中获取从jwt解析出来的用户UUID失败, 请检查路由是否使用jwt中间件!") |
|||
return "" |
|||
} else { |
|||
waitUse := claims.(*request.CustomClaims) |
|||
return waitUse.UUID |
|||
} |
|||
} |
|||
|
|||
// 从Gin的Context中获取从jwt解析出来的用户账号
|
|||
func GetUserName(c *gin.Context) string { |
|||
if claims, exists := c.Get("claims"); !exists { |
|||
global.MG_LOG.Error("从Gin的Context中获取从jwt解析出来的用户UUID失败, 请检查路由是否使用jwt中间件!") |
|||
return "" |
|||
} else { |
|||
waitUse := claims.(*request.CustomClaims) |
|||
return waitUse.Username |
|||
} |
|||
} |
|||
|
|||
func GetUserInfo(c *gin.Context) *request.CustomClaims { |
|||
if claims, exists := c.Get("claims"); !exists { |
|||
global.MG_LOG.Error("从Gin的Context中获取从jwt解析出来的用户UUID失败, 请检查路由是否使用jwt中间件!") |
|||
return nil |
|||
} else { |
|||
waitUse := claims.(*request.CustomClaims) |
|||
return waitUse |
|||
} |
|||
} |
|||
|
|||
// 从Gin的Context中获取从jwt解析出来的用户Appid
|
|||
func GetUserAppid(c *gin.Context) string { |
|||
if claims, exists := c.Get("claims"); !exists { |
|||
global.MG_LOG.Error("从Gin的Context中获取从jwt解析出来的用户UUID失败, 请检查路由是否使用jwt中间件!") |
|||
return "" |
|||
} else { |
|||
waitUse := claims.(*request.CustomClaims) |
|||
return waitUse.Appid |
|||
} |
|||
} |
|||
|
|||
// 从Gin的Context中获取从jwt解析出来的用户Type
|
|||
func GetUserType(c *gin.Context) string { |
|||
if claims, exists := c.Get("claims"); !exists { |
|||
global.MG_LOG.Error("从Gin的Context中获取从jwt解析出来的用户UUID失败, 请检查路由是否使用jwt中间件!") |
|||
return "" |
|||
} else { |
|||
waitUse := claims.(*request.CustomClaims) |
|||
return waitUse.Type |
|||
} |
|||
} |
|||
|
|||
// 从Gin的Context中获取从jwt解析出来的用户角色id
|
|||
func GetUserAuthorityId(c *gin.Context) uint { |
|||
if claims, exists := c.Get("claims"); !exists { |
|||
global.MG_LOG.Error("从Gin的Context中获取从jwt解析出来的用户UUID失败, 请检查路由是否使用jwt中间件!") |
|||
return 0 |
|||
} else { |
|||
waitUse := claims.(*request.CustomClaims) |
|||
return waitUse.AuthorityId |
|||
} |
|||
} |
@ -0,0 +1,131 @@ |
|||
package sys |
|||
|
|||
import ( |
|||
"bkb-seller/global" |
|||
"bkb-seller/model" |
|||
"bkb-seller/model/request" |
|||
"bkb-seller/model/response" |
|||
"bkb-seller/service" |
|||
|
|||
"github.com/gin-gonic/gin" |
|||
"go.uber.org/zap" |
|||
) |
|||
|
|||
// @Tags User
|
|||
// @Summary 创建User
|
|||
// @Security ApiKeyAuth
|
|||
// @accept application/json
|
|||
// @Produce application/json
|
|||
// @Param data body model.User true "创建User"
|
|||
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
|
|||
// @Router /user/createUser [post]
|
|||
func CreateUser(c *gin.Context) { |
|||
var user model.User |
|||
_ = c.ShouldBindJSON(&user) |
|||
if err := service.CreateUser(user); err != nil { |
|||
global.MG_LOG.Error("创建失败!", zap.Any("err", err)) |
|||
response.FailWithMessage("创建失败", c) |
|||
} else { |
|||
response.OkWithMessage("创建成功", c) |
|||
} |
|||
} |
|||
|
|||
// @Tags User
|
|||
// @Summary 删除User
|
|||
// @Security ApiKeyAuth
|
|||
// @accept application/json
|
|||
// @Produce application/json
|
|||
// @Param data body model.User true "删除User"
|
|||
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
|
|||
// @Router /user/deleteUser [delete]
|
|||
func DeleteUser(c *gin.Context) { |
|||
var user model.User |
|||
_ = c.ShouldBindJSON(&user) |
|||
if err := service.DeleteUser(user); err != nil { |
|||
global.MG_LOG.Error("删除失败!", zap.Any("err", err)) |
|||
response.FailWithMessage("删除失败", c) |
|||
} else { |
|||
response.OkWithMessage("删除成功", c) |
|||
} |
|||
} |
|||
|
|||
// @Tags User
|
|||
// @Summary 批量删除User
|
|||
// @Security ApiKeyAuth
|
|||
// @accept application/json
|
|||
// @Produce application/json
|
|||
// @Param data body request.IdsReq true "批量删除User"
|
|||
// @Success 200 {string} string "{"success":true,"data":{},"msg":"批量删除成功"}"
|
|||
// @Router /user/deleteUserByIds [delete]
|
|||
func DeleteUserByIds(c *gin.Context) { |
|||
var IDS request.IdsReq |
|||
_ = c.ShouldBindJSON(&IDS) |
|||
if err := service.DeleteUserByIds(IDS); err != nil { |
|||
global.MG_LOG.Error("批量删除失败!", zap.Any("err", err)) |
|||
response.FailWithMessage("批量删除失败", c) |
|||
} else { |
|||
response.OkWithMessage("批量删除成功", c) |
|||
} |
|||
} |
|||
|
|||
// @Tags User
|
|||
// @Summary 更新User
|
|||
// @Security ApiKeyAuth
|
|||
// @accept application/json
|
|||
// @Produce application/json
|
|||
// @Param data body model.User true "更新User"
|
|||
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
|
|||
// @Router /user/updateUser [put]
|
|||
func UpdateUser(c *gin.Context) { |
|||
var user model.User |
|||
_ = c.ShouldBindJSON(&user) |
|||
if err := service.UpdateUser(user); err != nil { |
|||
global.MG_LOG.Error("更新失败!", zap.Any("err", err)) |
|||
response.FailWithMessage("更新失败", c) |
|||
} else { |
|||
response.OkWithMessage("更新成功", c) |
|||
} |
|||
} |
|||
|
|||
// @Tags User
|
|||
// @Summary 用userid查询User[v1.0.0]
|
|||
// @Security ApiKeyAuth
|
|||
// @accept application/json
|
|||
// @Produce application/json
|
|||
// @Param data body request.UserSearchByUuid true "用id查询User"
|
|||
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
|
|||
// @Router /user/findUser [get]
|
|||
func FindUser(c *gin.Context) { |
|||
var user request.UserSearchByUuid |
|||
_ = c.ShouldBindQuery(&user) |
|||
if err, reuser := service.GetUser(user.UserID); err != nil { |
|||
global.MG_LOG.Error("查询失败!", zap.Any("err", err)) |
|||
response.FailWithMessage("查询失败", c) |
|||
} else { |
|||
response.OkWithData(gin.H{"reuser": reuser}, c) |
|||
} |
|||
} |
|||
|
|||
// @Tags User
|
|||
// @Summary 分页获取User列表
|
|||
// @Security ApiKeyAuth
|
|||
// @accept application/json
|
|||
// @Produce application/json
|
|||
// @Param data body request.UserSearch true "分页获取User列表"
|
|||
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
|
|||
// @Router /user/getUserList [get]
|
|||
func GetUserList(c *gin.Context) { |
|||
var pageInfo request.UserSearch |
|||
_ = c.ShouldBindQuery(&pageInfo) |
|||
if err, list, total := service.GetUserInfoList(pageInfo); err != nil { |
|||
global.MG_LOG.Error("获取失败!", zap.Any("err", err)) |
|||
response.FailWithMessage("获取失败", c) |
|||
} else { |
|||
response.OkWithDetailed(response.PageResult{ |
|||
List: list, |
|||
Total: total, |
|||
Page: pageInfo.Page, |
|||
PageSize: pageInfo.PageSize, |
|||
}, "获取成功", c) |
|||
} |
|||
} |
@ -0,0 +1,110 @@ |
|||
aliyun-oss: |
|||
endpoint: yourEndpoint |
|||
access-key-id: yourAccessKeyId |
|||
access-key-secret: yourAccessKeySecret |
|||
bucket-name: yourBucketName |
|||
bucket-url: yourBucketUrl |
|||
autocode: |
|||
transfer-restart: true |
|||
root: /Users/holi/Downloads/go-workspace/nft-admin |
|||
server: /server |
|||
server-api: /api/sys |
|||
server-initialize: /initialize |
|||
server-model: /model |
|||
server-request: /model/request/ |
|||
server-router: /router |
|||
server-service: /service |
|||
web: /web/src |
|||
web-api: /api |
|||
web-form: /view |
|||
web-table: /view |
|||
web-flow: /view |
|||
captcha: |
|||
key-long: 6 |
|||
img-width: 240 |
|||
img-height: 80 |
|||
casbin: |
|||
model-path: ./resource/rbac_model.conf |
|||
email: |
|||
to: xxx@qq.com |
|||
port: 465 |
|||
from: xxx@163.com |
|||
host: smtp.163.com |
|||
is-ssl: true |
|||
secret: xxx |
|||
nickname: test |
|||
excel: |
|||
dir: ./resource/excel/ |
|||
jwt: |
|||
signing-key: PYi0VRTTwuXO6jaqHVtdpVS5ciOzUe |
|||
expires-time: 604800 |
|||
buffer-time: 86400 |
|||
local: |
|||
path: uploads/file |
|||
mysql: |
|||
path: 120.55.164.69:30306 |
|||
config: charset=utf8mb4&parseTime=True&loc=Local |
|||
db-name: bkb-uat |
|||
username: root |
|||
password: vBwU7vwAGQ |
|||
max-idle-conns: 10 |
|||
max-open-conns: 100 |
|||
log-mode: info |
|||
log-zap: "" |
|||
minio: |
|||
endpoint: file.mangguonews.com |
|||
access-key-id: minio |
|||
secret-access-key: minio123 |
|||
use-ssl: false |
|||
redis: |
|||
db: 7 |
|||
addr: 120.55.164.69:32339 |
|||
password: vBwU7vwAGQ |
|||
|
|||
system: |
|||
env: uat |
|||
addr: 8001 |
|||
db-type: mysql |
|||
oss-type: local |
|||
use-multipoint: false |
|||
|
|||
timer: |
|||
start: true |
|||
spec: '@daily' |
|||
detail: |
|||
- tableName: sys_operation_records |
|||
compareField: created_at |
|||
interval: 2160h |
|||
zap: |
|||
level: warn |
|||
format: console |
|||
prefix: '[NFT-ADMIN]' |
|||
director: log |
|||
link-name: nft.log |
|||
showLine: true |
|||
encode-level: LowercaseColorLevelEncoder |
|||
stacktrace-key: stacktrace |
|||
log-in-console: true |
|||
|
|||
jpush: |
|||
appkey: d7e557b47f34c5214e70b02f |
|||
secret: 036c179ba0f7c43c1e199c91 |
|||
all-user-sign: fm_all_users |
|||
android-intent: intent:#Intent;component=com.mg.news.dev/com.mango.hnxwlb.ui930.Main930Activity;S.extras=%v;end |
|||
|
|||
# qiniu configuration (请自行七牛申请对应的 公钥 私钥 bucket 和 域名地址) |
|||
qiniu: |
|||
zone: 'ZoneHuabei' |
|||
bucket: ff-file-test |
|||
img-path: http://qny-ff-file-test.mangguonews.com |
|||
use-https: false |
|||
access-key: Maeg1k1PuMo2wJSidAJ-6sSPZquxEbGQuRJvl_Vr |
|||
secret-key: gEwHt01k5Pnsk75ad8w4OFZr2kYC6YmoWNITIB1_ |
|||
use-cdn-domains: true |
|||
|
|||
paypal: |
|||
env: live |
|||
client-id: AZO8VCUnYus68yreirLV0T7jOC0ICMSZwygsEpByotwBDuf7NhxBlbeHRWVgdvfE1YVUoa_cvSOkjSJt |
|||
secret: EEU2piz65giSqtuCfjopbAssfC3K5w7cyIEsDxQIMuc27zIW9HVi37sKrGH2jobbaIg7VSYHzdY36VRy |
|||
return-url: http://120.55.164.69:30304/Complete |
|||
cancel-url: http://120.55.164.69:30304/CommodityDetails |
@ -0,0 +1,7 @@ |
|||
package config |
|||
|
|||
type Captcha struct { |
|||
KeyLong int `mapstructure:"key-long" json:"keyLong" yaml:"key-long"` // 验证码长度
|
|||
ImgWidth int `mapstructure:"img-width" json:"imgWidth" yaml:"img-width"` // 验证码宽度
|
|||
ImgHeight int `mapstructure:"img-height" json:"imgHeight" yaml:"img-height"` // 验证码高度
|
|||
} |
@ -0,0 +1,5 @@ |
|||
package config |
|||
|
|||
type Casbin struct { |
|||
ModelPath string `mapstructure:"model-path" json:"modelPath" yaml:"model-path"` // 存放casbin模型的相对路径
|
|||
} |
@ -0,0 +1,18 @@ |
|||
package config |
|||
|
|||
type Server struct { |
|||
JWT JWT `mapstructure:"jwt" json:"jwt" yaml:"jwt"` |
|||
Zap Zap `mapstructure:"zap" json:"zap" yaml:"zap"` |
|||
Redis Redis `mapstructure:"redis" json:"redis" yaml:"redis"` |
|||
Casbin Casbin `mapstructure:"casbin" json:"casbin" yaml:"casbin"` |
|||
System System `mapstructure:"system" json:"system" yaml:"system"` |
|||
Captcha Captcha `mapstructure:"captcha" json:"captcha" yaml:"captcha"` |
|||
// gorm
|
|||
Mysql Mysql `mapstructure:"mysql" json:"mysql" yaml:"mysql"` |
|||
GormSettings GormSettings `mapstructure:"gorm-settings" json:"gormSettings" yaml:"gorm-settings"` |
|||
// oss
|
|||
Local Local `mapstructure:"local" json:"local" yaml:"local"` |
|||
|
|||
Timer Timer `mapstructure:"timer" json:"timer" yaml:"timer"` |
|||
Paypal Paypal `mapstructure:"paypal" json:"paypal" yaml:"paypal"` |
|||
} |
@ -0,0 +1,2 @@ |
|||
package config |
|||
|
@ -0,0 +1,2 @@ |
|||
package config |
|||
|
@ -0,0 +1,17 @@ |
|||
package config |
|||
|
|||
type Mysql struct { |
|||
Path string `mapstructure:"path" json:"path" yaml:"path"` // 服务器地址:端口
|
|||
Config string `mapstructure:"config" json:"config" yaml:"config"` // 高级配置
|
|||
Dbname string `mapstructure:"db-name" json:"dbname" yaml:"db-name"` // 数据库名
|
|||
Username string `mapstructure:"username" json:"username" yaml:"username"` // 数据库用户名
|
|||
Password string `mapstructure:"password" json:"password" yaml:"password"` // 数据库密码
|
|||
MaxIdleConns int `mapstructure:"max-idle-conns" json:"maxIdleConns" yaml:"max-idle-conns"` // 空闲中的最大连接数
|
|||
MaxOpenConns int `mapstructure:"max-open-conns" json:"maxOpenConns" yaml:"max-open-conns"` // 打开到数据库的最大连接数
|
|||
LogMode string `mapstructure:"log-mode" json:"logMode" yaml:"log-mode"` // 是否开启Gorm全局日志
|
|||
LogZap bool `mapstructure:"log-zap" json:"logZap" yaml:"log-zap"` // 是否通过zap写入日志文件
|
|||
} |
|||
|
|||
func (m *Mysql) Dsn() string { |
|||
return m.Username + ":" + m.Password + "@tcp(" + m.Path + ")/" + m.Dbname + "?" + m.Config |
|||
} |
@ -0,0 +1,10 @@ |
|||
package config |
|||
|
|||
type GormSettings struct { |
|||
Settings []Settings `mapstructure:"settings" json:"settings" yaml:"settings"` |
|||
} |
|||
|
|||
type Settings struct { |
|||
DsnName string `mapstructure:"dsn-name" json:"dsnName" yaml:"dsn-name"` |
|||
BindTables []interface{} `mapstructure:"bind-tables" json:"bindTables" yaml:"bind-tables"` |
|||
} |
@ -0,0 +1,2 @@ |
|||
package config |
|||
|
@ -0,0 +1,7 @@ |
|||
package config |
|||
|
|||
type JWT struct { |
|||
SigningKey string `mapstructure:"signing-key" json:"signingKey" yaml:"signing-key"` // jwt签名
|
|||
ExpiresTime int64 `mapstructure:"expires-time" json:"expiresTime" yaml:"expires-time"` // 过期时间
|
|||
BufferTime int64 `mapstructure:"buffer-time" json:"bufferTime" yaml:"buffer-time"` // 缓冲时间
|
|||
} |
@ -0,0 +1,3 @@ |
|||
package config |
|||
|
|||
|
@ -0,0 +1,6 @@ |
|||
package config |
|||
|
|||
type Local struct { |
|||
Path string `mapstructure:"path" json:"path" yaml:"path"` // 本地文件路径
|
|||
} |
|||
|
@ -0,0 +1,10 @@ |
|||
package config |
|||
|
|||
type Paypal struct { |
|||
Env string `mapstructure:"env" json:"env" yaml:"env"` //端点
|
|||
ClientID string `mapstructure:"client-id" json:"client-id" yaml:"client-id"` //用户ID
|
|||
Secret string `mapstructure:"secret" json:"secret" yaml:"secret"` //密钥
|
|||
ReturnUrl string `mapstructure:"return-url" json:"return-url" yaml:"return-url"` //支付完成跳转
|
|||
CancelUrl string `mapstructure:"cancel-url" json:"cancel-url" yaml:"cancel-url"` //取消支付跳转
|
|||
NotifyUrl string `mapstructure:"notify-url" json:"notify-url" yaml:"notify-url"` // 支付结果通知
|
|||
} |
@ -0,0 +1,7 @@ |
|||
package config |
|||
|
|||
type Redis struct { |
|||
DB int `mapstructure:"db" json:"db" yaml:"db"` // redis的哪个数据库
|
|||
Addr string `mapstructure:"addr" json:"addr" yaml:"addr"` // 服务器地址:端口
|
|||
Password string `mapstructure:"password" json:"password" yaml:"password"` // 密码
|
|||
} |
@ -0,0 +1,9 @@ |
|||
package config |
|||
|
|||
type System struct { |
|||
Env string `mapstructure:"env" json:"env" yaml:"env"` // 环境值
|
|||
Addr int `mapstructure:"addr" json:"addr" yaml:"addr"` // 端口值
|
|||
DbType string `mapstructure:"db-type" json:"dbType" yaml:"db-type"` // 数据库类型:mysql(默认)|sqlite|sqlserver|postgresql
|
|||
OssType string `mapstructure:"oss-type" json:"ossType" yaml:"oss-type"` // Oss类型
|
|||
UseMultipoint bool `mapstructure:"use-multipoint" json:"useMultipoint" yaml:"use-multipoint"` // 多点登录拦截
|
|||
} |
@ -0,0 +1,13 @@ |
|||
package config |
|||
|
|||
type Timer struct { |
|||
Start bool `mapstructure:"start" json:"start" yaml:"start"` // 是否启用
|
|||
Spec string `mapstructure:"spec" json:"spec" yaml:"spec"` // CRON表达式
|
|||
Detail []Detail `mapstructure:"detail" json:"detail" yaml:"detail"` |
|||
} |
|||
|
|||
type Detail struct { |
|||
TableName string `mapstructure:"tableName" json:"tableName" yaml:"tableName"` // 需要清理的表名
|
|||
CompareField string `mapstructure:"compareField" json:"compareField" yaml:"compareField"` // 需要比较时间的字段
|
|||
Interval string `mapstructure:"interval" json:"interval" yaml:"interval"` // 时间间隔
|
|||
} |
@ -0,0 +1,13 @@ |
|||
package config |
|||
|
|||
type Zap struct { |
|||
Level string `mapstructure:"level" json:"level" yaml:"level"` // 级别
|
|||
Format string `mapstructure:"format" json:"format" yaml:"format"` // 输出
|
|||
Prefix string `mapstructure:"prefix" json:"prefix" yaml:"prefix"` // 日志前缀
|
|||
Director string `mapstructure:"director" json:"director" yaml:"director"` // 日志文件夹
|
|||
LinkName string `mapstructure:"link-name" json:"linkName" yaml:"link-name"` // 软链接名称
|
|||
ShowLine bool `mapstructure:"show-line" json:"showLine" yaml:"showLine"` // 显示行
|
|||
EncodeLevel string `mapstructure:"encode-level" json:"encodeLevel" yaml:"encode-level"` // 编码级
|
|||
StacktraceKey string `mapstructure:"stacktrace-key" json:"stacktraceKey" yaml:"stacktrace-key"` // 栈名
|
|||
LogInConsole bool `mapstructure:"log-in-console" json:"logInConsole" yaml:"log-in-console"` // 输出控制台
|
|||
} |
@ -0,0 +1,38 @@ |
|||
package core |
|||
|
|||
import ( |
|||
"bkb-seller/global" |
|||
"bkb-seller/initialize" |
|||
"fmt" |
|||
"time" |
|||
|
|||
"go.uber.org/zap" |
|||
) |
|||
|
|||
type server interface { |
|||
ListenAndServe() error |
|||
} |
|||
|
|||
func RunWindowsServer() { |
|||
// 初始化redis服务
|
|||
initialize.Redis() |
|||
RedisEventSinkStep(global.MG_CONFIG.Redis.DB, "expired") |
|||
|
|||
Router := initialize.Routers() |
|||
Router.Static("/form-generator", "./resource/page") |
|||
|
|||
address := fmt.Sprintf(":%d", global.MG_CONFIG.System.Addr) |
|||
s := initServer(address, Router) |
|||
// 保证文本顺序输出
|
|||
// In order to ensure that the text order output can be deleted
|
|||
time.Sleep(10 * time.Microsecond) |
|||
global.MG_LOG.Info("server run success on ", zap.String("address", address)) |
|||
|
|||
fmt.Printf(` |
|||
欢迎使用 BKB-Seller-Admin |
|||
当前版本:V0.0.1 |
|||
默认自动化文档地址:http://127.0.0.1%s/swagger/index.html
|
|||
默认前端文件运行地址:http://127.0.0.1%s
|
|||
`, address, address) |
|||
global.MG_LOG.Error(s.ListenAndServe().Error()) |
|||
} |
@ -0,0 +1,18 @@ |
|||
//go:build !windows
|
|||
// +build !windows
|
|||
|
|||
package core |
|||
|
|||
import ( |
|||
"github.com/fvbock/endless" |
|||
"github.com/gin-gonic/gin" |
|||
"time" |
|||
) |
|||
|
|||
func initServer(address string, router *gin.Engine) server { |
|||
s := endless.NewServer(address, router) |
|||
s.ReadHeaderTimeout = 10 * time.Millisecond |
|||
s.WriteTimeout = 10 * time.Second |
|||
s.MaxHeaderBytes = 1 << 20 |
|||
return s |
|||
} |
@ -0,0 +1,20 @@ |
|||
//go:build windows
|
|||
// +build windows
|
|||
|
|||
package core |
|||
|
|||
import ( |
|||
"github.com/gin-gonic/gin" |
|||
"net/http" |
|||
"time" |
|||
) |
|||
|
|||
func initServer(address string, router *gin.Engine) server { |
|||
return &http.Server{ |
|||
Addr: address, |
|||
Handler: router, |
|||
ReadTimeout: 10 * time.Second, |
|||
WriteTimeout: 10 * time.Second, |
|||
MaxHeaderBytes: 1 << 20, |
|||
} |
|||
} |
@ -0,0 +1,73 @@ |
|||
package core |
|||
|
|||
import ( |
|||
"bkb-seller/global" |
|||
"bkb-seller/service" |
|||
"fmt" |
|||
"github.com/go-redis/redis" |
|||
"strconv" |
|||
"strings" |
|||
"time" |
|||
) |
|||
|
|||
var constKeyspaceFormat = "__keyevent@%d__" |
|||
var constKeyspacePatternFormat = "%s:%s" |
|||
|
|||
type RedisEventSink struct { |
|||
redisClient *redis.Client |
|||
keyspacePattern string |
|||
subscriber *redis.PubSub |
|||
} |
|||
|
|||
func RedisEventSinkStep(database int, pattern string) *RedisEventSink { |
|||
var sink *RedisEventSink |
|||
if global.MG_REDIS == nil { |
|||
panic("redis no initialization") |
|||
} |
|||
var keyspace = fmt.Sprintf(constKeyspaceFormat, database) |
|||
self := &RedisEventSink{ |
|||
redisClient: global.MG_REDIS, |
|||
keyspacePattern: fmt.Sprintf(constKeyspacePatternFormat, keyspace, pattern), |
|||
} |
|||
self.init() |
|||
//log.Println("redis expired start...")
|
|||
return sink |
|||
} |
|||
|
|||
func (sink *RedisEventSink) init() { |
|||
sink.subscriber = sink.redisClient.PSubscribe(sink.keyspacePattern) |
|||
|
|||
// Start observing for events...
|
|||
go sink.listenForEvents() |
|||
} |
|||
|
|||
func (sink *RedisEventSink) listenForEvents() { |
|||
for { |
|||
if sink.subscriber != nil { |
|||
msg, err := sink.subscriber.ReceiveMessage() |
|||
if msg != nil && err == nil { |
|||
key := msg.Payload |
|||
if key != "" { |
|||
keys := strings.Split(key, "_") |
|||
if len(keys) == 3 { |
|||
if keys[0] == "mission" { //任务状态
|
|||
result, err := global.MG_REDIS.SetNX("nx:_"+key, "used", 2*time.Minute).Result() |
|||
if result && err == nil { |
|||
id, _ := strconv.Atoi(keys[2]) |
|||
if id == 0 { |
|||
return |
|||
} |
|||
if keys[1] == "start" { |
|||
_ = service.StartMissionTiming(uint(id)) |
|||
} else if keys[1] == "end" { |
|||
_ = service.EndMissionTiming(uint(id)) |
|||
} |
|||
} |
|||
_, _ = global.MG_REDIS.Del("nx:_" + key).Result() |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,56 @@ |
|||
package core |
|||
|
|||
import ( |
|||
"flag" |
|||
"fmt" |
|||
"os" |
|||
|
|||
"github.com/fsnotify/fsnotify" |
|||
"github.com/spf13/viper" |
|||
|
|||
"bkb-seller/global" |
|||
_ "bkb-seller/packfile" |
|||
"bkb-seller/utils" |
|||
) |
|||
|
|||
func Viper(path ...string) *viper.Viper { |
|||
var config string |
|||
if len(path) == 0 { |
|||
flag.StringVar(&config, "c", "", "choose config file.") |
|||
flag.Parse() |
|||
if config == "" { // 优先级: 命令行 > 环境变量 > 默认值
|
|||
if configEnv := os.Getenv(utils.ConfigEnv); configEnv == "" { |
|||
config = utils.ConfigFile |
|||
fmt.Printf("您正在使用config的默认值,config的路径为%v\n", utils.ConfigFile) |
|||
} else { |
|||
config = configEnv |
|||
fmt.Printf("您正在使用MG_CONFIG环境变量,config的路径为%v\n", config) |
|||
} |
|||
} else { |
|||
fmt.Printf("您正在使用命令行的-c参数传递的值,config的路径为%v\n", config) |
|||
} |
|||
} else { |
|||
config = path[0] |
|||
fmt.Printf("您正在使用func Viper()传递的值,config的路径为%v\n", config) |
|||
} |
|||
|
|||
v := viper.New() |
|||
v.SetConfigFile(config) |
|||
v.SetConfigType("yaml") |
|||
err := v.ReadInConfig() |
|||
if err != nil { |
|||
panic(fmt.Errorf("Fatal error config file: %s \n", err)) |
|||
} |
|||
v.WatchConfig() |
|||
|
|||
v.OnConfigChange(func(e fsnotify.Event) { |
|||
fmt.Println("config file changed:", e.Name) |
|||
if err := v.Unmarshal(&global.MG_CONFIG); err != nil { |
|||
fmt.Println(err) |
|||
} |
|||
}) |
|||
if err := v.Unmarshal(&global.MG_CONFIG); err != nil { |
|||
fmt.Println(err) |
|||
} |
|||
return v |
|||
} |
@ -0,0 +1,103 @@ |
|||
package core |
|||
|
|||
import ( |
|||
"bkb-seller/global" |
|||
"bkb-seller/utils" |
|||
"fmt" |
|||
"os" |
|||
"time" |
|||
|
|||
"go.uber.org/zap" |
|||
"go.uber.org/zap/zapcore" |
|||
) |
|||
|
|||
var level zapcore.Level |
|||
|
|||
func Zap() (logger *zap.Logger) { |
|||
if ok, _ := utils.PathExists(global.MG_CONFIG.Zap.Director); !ok { // 判断是否有Director文件夹
|
|||
fmt.Printf("create %v directory\n", global.MG_CONFIG.Zap.Director) |
|||
_ = os.Mkdir(global.MG_CONFIG.Zap.Director, os.ModePerm) |
|||
} |
|||
|
|||
switch global.MG_CONFIG.Zap.Level { // 初始化配置文件的Level
|
|||
case "debug": |
|||
level = zap.DebugLevel |
|||
case "info": |
|||
level = zap.InfoLevel |
|||
case "warn": |
|||
level = zap.WarnLevel |
|||
case "error": |
|||
level = zap.ErrorLevel |
|||
case "dpanic": |
|||
level = zap.DPanicLevel |
|||
case "panic": |
|||
level = zap.PanicLevel |
|||
case "fatal": |
|||
level = zap.FatalLevel |
|||
default: |
|||
level = zap.InfoLevel |
|||
} |
|||
|
|||
if level == zap.DebugLevel || level == zap.ErrorLevel { |
|||
logger = zap.New(getEncoderCore(), zap.AddStacktrace(level)) |
|||
} else { |
|||
logger = zap.New(getEncoderCore()) |
|||
} |
|||
if global.MG_CONFIG.Zap.ShowLine { |
|||
logger = logger.WithOptions(zap.AddCaller()) |
|||
} |
|||
return logger |
|||
} |
|||
|
|||
// getEncoderConfig 获取zapcore.EncoderConfig
|
|||
func getEncoderConfig() (config zapcore.EncoderConfig) { |
|||
config = zapcore.EncoderConfig{ |
|||
MessageKey: "message", |
|||
LevelKey: "level", |
|||
TimeKey: "time", |
|||
NameKey: "logger", |
|||
CallerKey: "caller", |
|||
StacktraceKey: global.MG_CONFIG.Zap.StacktraceKey, |
|||
LineEnding: zapcore.DefaultLineEnding, |
|||
EncodeLevel: zapcore.LowercaseLevelEncoder, |
|||
EncodeTime: CustomTimeEncoder, |
|||
EncodeDuration: zapcore.SecondsDurationEncoder, |
|||
EncodeCaller: zapcore.FullCallerEncoder, |
|||
} |
|||
switch { |
|||
case global.MG_CONFIG.Zap.EncodeLevel == "LowercaseLevelEncoder": // 小写编码器(默认)
|
|||
config.EncodeLevel = zapcore.LowercaseLevelEncoder |
|||
case global.MG_CONFIG.Zap.EncodeLevel == "LowercaseColorLevelEncoder": // 小写编码器带颜色
|
|||
config.EncodeLevel = zapcore.LowercaseColorLevelEncoder |
|||
case global.MG_CONFIG.Zap.EncodeLevel == "CapitalLevelEncoder": // 大写编码器
|
|||
config.EncodeLevel = zapcore.CapitalLevelEncoder |
|||
case global.MG_CONFIG.Zap.EncodeLevel == "CapitalColorLevelEncoder": // 大写编码器带颜色
|
|||
config.EncodeLevel = zapcore.CapitalColorLevelEncoder |
|||
default: |
|||
config.EncodeLevel = zapcore.LowercaseLevelEncoder |
|||
} |
|||
return config |
|||
} |
|||
|
|||
// getEncoder 获取zapcore.Encoder
|
|||
func getEncoder() zapcore.Encoder { |
|||
if global.MG_CONFIG.Zap.Format == "json" { |
|||
return zapcore.NewJSONEncoder(getEncoderConfig()) |
|||
} |
|||
return zapcore.NewConsoleEncoder(getEncoderConfig()) |
|||
} |
|||
|
|||
// getEncoderCore 获取Encoder的zapcore.Core
|
|||
func getEncoderCore() (core zapcore.Core) { |
|||
writer, err := utils.GetWriteSyncer() // 使用file-rotatelogs进行日志分割
|
|||
if err != nil { |
|||
fmt.Printf("Get Write Syncer Failed err:%v", err.Error()) |
|||
return |
|||
} |
|||
return zapcore.NewCore(getEncoder(), writer, level) |
|||
} |
|||
|
|||
// 自定义日志输出时间格式
|
|||
func CustomTimeEncoder(t time.Time, enc zapcore.PrimitiveArrayEncoder) { |
|||
enc.AppendString(t.Format(global.MG_CONFIG.Zap.Prefix + "2006/01/02 - 15:04:05.000")) |
|||
} |
@ -0,0 +1,38 @@ |
|||
apiVersion: apps/v1 |
|||
kind: Deployment |
|||
metadata: |
|||
name: {{project}} |
|||
namespace: {{nameSpace}} |
|||
spec: |
|||
replicas: 1 |
|||
selector: |
|||
matchLabels: |
|||
app: {{project}} |
|||
template: |
|||
metadata: |
|||
labels: |
|||
app: {{project}} |
|||
spec: |
|||
containers: |
|||
- name: {{project}} |
|||
image: {{dockerServer}}/{{dockerOrg}}/{{project}}:{{version}} |
|||
imagePullPolicy: Always |
|||
ports: |
|||
- containerPort: 8001 |
|||
imagePullSecrets: |
|||
- name: bkb-images-secret |
|||
|
|||
--- |
|||
apiVersion: v1 |
|||
kind: Service |
|||
metadata: |
|||
name: {{project}} |
|||
namespace: {{nameSpace}} |
|||
spec: |
|||
ports: |
|||
- port: 80 |
|||
targetPort: 8001 |
|||
name: {{project}} |
|||
selector: |
|||
app: {{project}} |
|||
type: ClusterIP |
@ -0,0 +1,46 @@ |
|||
kind: Service |
|||
apiVersion: v1 |
|||
metadata: |
|||
name: bkb-seller-api-dev |
|||
namespace: nft |
|||
spec: |
|||
selector: |
|||
app: bkb-seller-api-dev |
|||
type: NodePort |
|||
ports: |
|||
- protocol: TCP |
|||
port: 8001 |
|||
targetPort: 8001 |
|||
nodePort: 30822 |
|||
--- |
|||
apiVersion: apps/v1 |
|||
kind: Deployment |
|||
metadata: |
|||
name: bkb-seller-api-dev |
|||
namespace: nft |
|||
labels: |
|||
app: bkb-seller-api-dev |
|||
spec: |
|||
selector: |
|||
matchLabels: |
|||
app: bkb-seller-api-dev |
|||
template: |
|||
metadata: |
|||
labels: |
|||
app: bkb-seller-api-dev |
|||
version: v1 |
|||
spec: |
|||
imagePullSecrets: |
|||
- name: nftkey |
|||
containers: |
|||
- name: bkb-seller-api-dev |
|||
image: registry.cn-shenzhen.aliyuncs.com/ax-stor/ax-bkb-seller |
|||
ports: |
|||
- containerPort: 8001 |
|||
volumeMounts: |
|||
- name: vol1 |
|||
mountPath: /go/src/nft/log |
|||
volumes: |
|||
- name: vol1 |
|||
hostPath: |
|||
path: /log/nft |
@ -0,0 +1,46 @@ |
|||
kind: Service |
|||
apiVersion: v1 |
|||
metadata: |
|||
name: bkb-seller-api-uat |
|||
namespace: nft |
|||
spec: |
|||
selector: |
|||
app: bkb-seller-api-uat |
|||
type: NodePort |
|||
ports: |
|||
- protocol: TCP |
|||
port: 8001 |
|||
targetPort: 8001 |
|||
nodePort: 30722 |
|||
--- |
|||
apiVersion: apps/v1 |
|||
kind: Deployment |
|||
metadata: |
|||
name: bkb-seller-api-uat |
|||
namespace: nft |
|||
labels: |
|||
app: bkb-seller-api-uat |
|||
spec: |
|||
selector: |
|||
matchLabels: |
|||
app: bkb-seller-api-uat |
|||
template: |
|||
metadata: |
|||
labels: |
|||
app: bkb-seller-api-uat |
|||
version: v1 |
|||
spec: |
|||
imagePullSecrets: |
|||
- name: nftkey |
|||
containers: |
|||
- name: bkb-seller-api-uat |
|||
image: registry.cn-shenzhen.aliyuncs.com/ax-stor/ax-bkb-seller |
|||
ports: |
|||
- containerPort: 8001 |
|||
volumeMounts: |
|||
- name: vol1 |
|||
mountPath: /go/src/nft/log |
|||
volumes: |
|||
- name: vol1 |
|||
hostPath: |
|||
path: /log/nft |
@ -0,0 +1,67 @@ |
|||
|
|||
|
|||
captcha: |
|||
key-long: 6 |
|||
img-width: 240 |
|||
img-height: 80 |
|||
casbin: |
|||
model-path: ./resource/rbac_model.conf |
|||
|
|||
jwt: |
|||
signing-key: PYi0VRTTwuXO6jaqHVtdpVS5ciOzUe |
|||
expires-time: 604800 |
|||
buffer-time: 86400 |
|||
local: |
|||
path: uploads/file |
|||
mysql: |
|||
path: 1.92.109.79:30306 |
|||
config: charset=utf8mb4&parseTime=True&loc=Local |
|||
db-name: bkb |
|||
username: root |
|||
password: vBwU7vwAGQ |
|||
max-idle-conns: 10 |
|||
max-open-conns: 100 |
|||
log-mode: info |
|||
log-zap: "" |
|||
|
|||
redis: |
|||
db: 1 |
|||
# addr: 172.16.0.239:6379 |
|||
# password: bkbrd:!Fgcye*HGs*Z&q0p |
|||
addr: 1.92.109.79:30379 |
|||
password: rMof*kkr!mfO7MHW |
|||
|
|||
system: |
|||
env: develop |
|||
addr: 8001 |
|||
db-type: mysql |
|||
oss-type: local |
|||
use-multipoint: false |
|||
|
|||
timer: |
|||
start: true |
|||
spec: '@daily' |
|||
detail: |
|||
- tableName: sys_operation_records |
|||
compareField: created_at |
|||
interval: 2160h |
|||
zap: |
|||
level: warn |
|||
format: console |
|||
prefix: '[NFT-ADMIN]' |
|||
director: log |
|||
link-name: nft.log |
|||
showLine: true |
|||
encode-level: LowercaseColorLevelEncoder |
|||
stacktrace-key: stacktrace |
|||
log-in-console: true |
|||
|
|||
|
|||
|
|||
paypal: |
|||
env: SandBox |
|||
client-id: Af7cbDvcc0qBEZDWgGU3ATZFJePJnFl-UH6foaGzmOu6w_8l1ewZRv88CO39HA0X_ATSR-TP_ZvM_t55 |
|||
secret: EFsM94NOvKscr6J-U18rtVp0AIZXlrqWwjXP-vqnNXQ8s2c9TpLQo2hFuf0gYUJg4pjPonqCD4T7nrdW |
|||
return-url: https://seller-dev.bkbackground.com |
|||
cancel-url: https://seller-dev.bkbackground.com |
|||
notify-url: https://seller-api-dev.bkbackground.com |
File diff suppressed because it is too large
File diff suppressed because it is too large
File diff suppressed because it is too large
File diff suppressed because it is too large
@ -0,0 +1,73 @@ |
|||
syntax = "proto3"; |
|||
|
|||
package api; |
|||
|
|||
option go_package = "shop-api/dto"; |
|||
|
|||
message LoginRequest{ |
|||
string phone = 1; |
|||
string code = 2; |
|||
} |
|||
|
|||
message SmsRequest { |
|||
string phone = 1; |
|||
} |
|||
message WithdrawRequest { |
|||
string phone = 1;//账户绑定手机号 |
|||
string code = 2; //验证码 |
|||
double amount = 3;//提现金额 |
|||
int32 accountID = 4;//账户id |
|||
} |
|||
|
|||
message CreateAddressRequest{ |
|||
string firstName = 1; |
|||
string lastName = 2; |
|||
string street = 3; |
|||
string phone = 4; |
|||
string bldg = 5; |
|||
string city = 6; |
|||
string state = 7; |
|||
string zipCode = 8; |
|||
int32 default = 9; |
|||
} |
|||
message UpdateAddressRequest{ |
|||
int64 id = 1; |
|||
string firstName = 2; |
|||
string lastName = 3; |
|||
string street = 4; |
|||
string phone = 5; |
|||
string bldg = 6; |
|||
string city = 7; |
|||
string state = 8; |
|||
string zipCode = 9; |
|||
int32 default = 10; |
|||
} |
|||
message IdRequest{ |
|||
int64 id = 1; |
|||
} |
|||
message CreateOrderRequest { |
|||
string code = 1;// 网红领取任务码 |
|||
int32 skuID = 2;// skuId |
|||
int32 number = 3;// 购买数量 |
|||
int32 addressID = 4;// 地址id |
|||
int32 payMode = 5;// 支付方式 1:paypal |
|||
string platform = 6; |
|||
} |
|||
message PaybackBody{ |
|||
string attach = 1; |
|||
string out_trade_no = 2; |
|||
string transaction_id = 3; |
|||
string pay_id = 4; |
|||
string capture_id = 5; |
|||
string status = 6; |
|||
string message = 7; |
|||
string resource_type = 8; |
|||
} |
|||
message OrderData{ |
|||
int64 all = 1;// 全部 |
|||
int64 unpaid = 2;// 未付款 |
|||
int64 unship = 3;// 待发货 |
|||
int64 shipped = 4;// 已发货 |
|||
int64 finished = 5;// 已完成 |
|||
int64 cancel = 6;// 已取消 |
|||
} |
@ -0,0 +1,28 @@ |
|||
package global |
|||
|
|||
import ( |
|||
"bkb-seller/config" |
|||
"bkb-seller/initialize/api" |
|||
"bkb-seller/utils/timer" |
|||
"google.golang.org/grpc" |
|||
|
|||
"github.com/go-redis/redis" |
|||
"github.com/minio/minio-go/v7" |
|||
"github.com/spf13/viper" |
|||
"go.uber.org/zap" |
|||
"gorm.io/gorm" |
|||
) |
|||
|
|||
var ( |
|||
MG_DB *gorm.DB |
|||
MG_REDIS *redis.Client |
|||
MG_CONFIG config.Server |
|||
MG_VP *viper.Viper |
|||
MG_LOG *zap.Logger |
|||
//PAY_CLIENT api.GreeterClient
|
|||
PAY_CONN *grpc.ClientConn |
|||
MG_MINIO *minio.Client |
|||
SMS_CLIENT api.SmsClient |
|||
EMAIL_CLIENT api.EmailClient |
|||
MG_Timer timer.Timer = timer.NewTimerTask() |
|||
) |
@ -0,0 +1,72 @@ |
|||
package global |
|||
|
|||
import ( |
|||
"time" |
|||
|
|||
"gorm.io/gorm" |
|||
) |
|||
|
|||
type MG_MODEL struct { |
|||
ID uint `gorm:"AUTO_INCREMENT;PRIMARY_KEY;" json:"id"` // 主键ID
|
|||
Appid string `gorm:"size:50;comment:应用ID" json:"appid" ` // 应用ID
|
|||
CreatedAt time.Time `json:"createdAt"` // 创建时间
|
|||
UpdatedAt time.Time `json:"updatedAt"` // 更新时间
|
|||
DeletedAt gorm.DeletedAt `json:"-"` // 删除时间
|
|||
} |
|||
type Pure_MODEL struct { |
|||
ID uint `gorm:"AUTO_INCREMENT;PRIMARY_KEY;" json:"id"` // 主键ID
|
|||
CreatedAt time.Time `json:"created_at"` // 创建时间
|
|||
UpdatedAt time.Time `json:"updated_at"` // 更新时间
|
|||
} |
|||
type Base_MODEL struct { |
|||
ID uint `gorm:"AUTO_INCREMENT;PRIMARY_KEY;" json:"id"` // 主键ID
|
|||
CreatedAt time.Time `json:"createdAt"` // 创建时间
|
|||
UpdatedAt time.Time `json:"updatedAt"` // 更新时间
|
|||
DeletedAt gorm.DeletedAt `json:"-"` // 删除时间
|
|||
} |
|||
type TIME_MODEL struct { |
|||
CreatedAt time.Time `json:"-"` |
|||
UpdatedAt time.Time `json:"-"` |
|||
DeletedAt gorm.DeletedAt `json:"-"` |
|||
} |
|||
|
|||
type TIME_MODEL_VIEW struct { |
|||
CreatedAtUnix int64 `gorm:"-" json:"createdAt"` //创建时间
|
|||
UpdatedAtUnix int64 `gorm:"-" json:"updatedAt"` //更新时间
|
|||
} |
|||
|
|||
type TIME_MODEL_STR struct { |
|||
CreatedAtStr string `gorm:"-" json:"createdAt"` //创建时间
|
|||
UpdatedAtStr string `gorm:"-" json:"updatedAt"` //更新时间
|
|||
} |
|||
|
|||
type BASE_ID_STR struct { |
|||
ID string `gorm:"primary_key;size:50" json:"id" form:"id"` //主键
|
|||
} |
|||
|
|||
type ID_BACKUP_STR struct { |
|||
ID string `gorm:"primary_key;size:50" json:"id" form:"id"` //主键
|
|||
// Kid int `json:"kid" form:"kid"`
|
|||
Backup int `json:"backup" form:"backup"` |
|||
Check int `json:"check" form:"check"` |
|||
CurrentCheck string `json:"currentCheck" form:"currentCheck"` |
|||
} |
|||
|
|||
type BASE_ID struct { |
|||
ID uint `gorm:"AUTO_INCREMENT;primary_key;" json:"id" form:"id"` //主键
|
|||
} |
|||
|
|||
type ID_SORT struct { |
|||
ID string `json:"id"` |
|||
Sort int `json:"sort"` |
|||
} |
|||
|
|||
type ID_COUNT struct { |
|||
ID string `json:"id"` |
|||
Count int `json:"count"` |
|||
} |
|||
|
|||
type MG_Video struct { |
|||
Resolution string `gorm:"size:100" json:"resolution" ignore:"true"` //分辨率 逗号隔开
|
|||
ProcessStatus int `gorm:"type:int(1);default:0" json:"processStatus" ignore:"true"` //转码状态 0-未转码 1-已转码 2-转码失败
|
|||
} |
@ -0,0 +1,140 @@ |
|||
module bkb-seller |
|||
|
|||
go 1.20 |
|||
|
|||
require ( |
|||
github.com/360EntSecGroup-Skylar/excelize/v2 v2.3.2 |
|||
github.com/aliyun/aliyun-oss-go-sdk v2.2.9+incompatible |
|||
github.com/carlmjohnson/requests v0.23.5 |
|||
github.com/casbin/casbin/v2 v2.77.2 |
|||
github.com/casbin/gorm-adapter/v3 v3.20.0 |
|||
github.com/dgrijalva/jwt-go v3.2.0+incompatible |
|||
github.com/fsnotify/fsnotify v1.6.0 |
|||
github.com/fvbock/endless v0.0.0-20170109170031-447134032cb6 |
|||
github.com/gin-gonic/gin v1.6.3 |
|||
github.com/go-kratos/kratos/contrib/registry/nacos/v2 v2.0.0-20231023125239-6cdd81811e10 |
|||
github.com/go-kratos/kratos/v2 v2.7.1 |
|||
github.com/go-redis/redis v6.15.9+incompatible |
|||
github.com/go-sql-driver/mysql v1.7.0 |
|||
github.com/lestrrat-go/file-rotatelogs v2.4.0+incompatible |
|||
github.com/minio/minio-go/v7 v7.0.63 |
|||
github.com/mojocn/base64Captcha v1.3.5 |
|||
github.com/nacos-group/nacos-sdk-go v1.1.4 |
|||
github.com/pili-engineering/pili-sdk-go.v2 v0.0.0-20200608105005-bb506e708987 |
|||
github.com/plutov/paypal v2.0.5+incompatible |
|||
github.com/robfig/cron/v3 v3.0.1 |
|||
github.com/satori/go.uuid v1.2.0 |
|||
github.com/spf13/cast v1.5.1 |
|||
github.com/spf13/viper v1.16.0 |
|||
github.com/swaggo/gin-swagger v1.3.0 |
|||
github.com/swaggo/swag v1.8.1 |
|||
github.com/taskcluster/slugid-go v1.1.0 |
|||
github.com/unrolled/secure v1.13.0 |
|||
github.com/w3liu/go-common v0.0.0-20210108072342-826b2f3582be |
|||
github.com/xuri/excelize/v2 v2.8.1 |
|||
go.uber.org/zap v1.25.0 |
|||
google.golang.org/genproto/googleapis/api v0.0.0-20230629202037-9506855d4529 |
|||
google.golang.org/grpc v1.56.1 |
|||
google.golang.org/protobuf v1.31.0 |
|||
gorm.io/driver/mysql v1.5.2 |
|||
gorm.io/gorm v1.25.5 |
|||
) |
|||
|
|||
require ( |
|||
github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible // indirect |
|||
github.com/KyleBanks/depth v1.2.1 // indirect |
|||
github.com/PuerkitoBio/purell v1.1.1 // indirect |
|||
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect |
|||
github.com/aliyun/alibaba-cloud-sdk-go v1.61.18 // indirect |
|||
github.com/buger/jsonparser v1.1.1 // indirect |
|||
github.com/dustin/go-humanize v1.0.1 // indirect |
|||
github.com/gin-contrib/sse v0.1.0 // indirect |
|||
github.com/glebarez/go-sqlite v1.20.3 // indirect |
|||
github.com/glebarez/sqlite v1.7.0 // indirect |
|||
github.com/go-errors/errors v1.0.1 // indirect |
|||
github.com/go-kratos/aegis v0.2.0 // indirect |
|||
github.com/go-openapi/jsonpointer v0.19.5 // indirect |
|||
github.com/go-openapi/jsonreference v0.19.6 // indirect |
|||
github.com/go-openapi/spec v0.20.4 // indirect |
|||
github.com/go-openapi/swag v0.19.15 // indirect |
|||
github.com/go-playground/form/v4 v4.2.0 // indirect |
|||
github.com/go-playground/locales v0.13.0 // indirect |
|||
github.com/go-playground/universal-translator v0.17.0 // indirect |
|||
github.com/go-playground/validator/v10 v10.2.0 // indirect |
|||
github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9 // indirect |
|||
github.com/golang-sql/sqlexp v0.1.0 // indirect |
|||
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 // indirect |
|||
github.com/golang/protobuf v1.5.3 // indirect |
|||
github.com/google/uuid v1.3.0 // indirect |
|||
github.com/gorilla/mux v1.8.0 // indirect |
|||
github.com/hashicorp/hcl v1.0.0 // indirect |
|||
github.com/jackc/chunkreader/v2 v2.0.1 // indirect |
|||
github.com/jackc/pgconn v1.13.0 // indirect |
|||
github.com/jackc/pgio v1.0.0 // indirect |
|||
github.com/jackc/pgpassfile v1.0.0 // indirect |
|||
github.com/jackc/pgproto3/v2 v2.3.1 // indirect |
|||
github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b // indirect |
|||
github.com/jackc/pgtype v1.12.0 // indirect |
|||
github.com/jackc/pgx/v4 v4.17.2 // indirect |
|||
github.com/jinzhu/inflection v1.0.0 // indirect |
|||
github.com/jinzhu/now v1.1.5 // indirect |
|||
github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af // indirect |
|||
github.com/jonboulle/clockwork v0.4.0 // indirect |
|||
github.com/josharian/intern v1.0.0 // indirect |
|||
github.com/json-iterator/go v1.1.12 // indirect |
|||
github.com/klauspost/compress v1.16.7 // indirect |
|||
github.com/klauspost/cpuid/v2 v2.2.5 // indirect |
|||
github.com/leodido/go-urn v1.2.0 // indirect |
|||
github.com/lestrrat-go/strftime v1.0.6 // indirect |
|||
github.com/magiconair/properties v1.8.7 // indirect |
|||
github.com/mailru/easyjson v0.7.6 // indirect |
|||
github.com/mattn/go-isatty v0.0.17 // indirect |
|||
github.com/microsoft/go-mssqldb v0.17.0 // indirect |
|||
github.com/minio/md5-simd v1.1.2 // indirect |
|||
github.com/minio/sha256-simd v1.0.1 // indirect |
|||
github.com/mitchellh/mapstructure v1.5.0 // indirect |
|||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect |
|||
github.com/modern-go/reflect2 v1.0.2 // indirect |
|||
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect |
|||
github.com/pborman/uuid v1.2.0 // indirect |
|||
github.com/pelletier/go-toml/v2 v2.0.8 // indirect |
|||
github.com/pkg/errors v0.9.1 // indirect |
|||
github.com/qiniu/x v1.10.5 // indirect |
|||
github.com/remyoudompheng/bigfft v0.0.0-20230126093431-47fa9a501578 // indirect |
|||
github.com/richardlehane/mscfb v1.0.4 // indirect |
|||
github.com/richardlehane/msoleps v1.0.3 // indirect |
|||
github.com/rs/xid v1.5.0 // indirect |
|||
github.com/sirupsen/logrus v1.9.3 // indirect |
|||
github.com/spf13/afero v1.9.5 // indirect |
|||
github.com/spf13/jwalterweatherman v1.1.0 // indirect |
|||
github.com/spf13/pflag v1.0.5 // indirect |
|||
github.com/subosito/gotenv v1.4.2 // indirect |
|||
github.com/tidwall/gjson v1.14.4 // indirect |
|||
github.com/tidwall/match v1.1.1 // indirect |
|||
github.com/tidwall/pretty v1.2.0 // indirect |
|||
github.com/ugorji/go/codec v1.1.13 // indirect |
|||
github.com/xuri/efp v0.0.0-20231025114914-d1ff6096ae53 // indirect |
|||
github.com/xuri/nfp v0.0.0-20230919160717-d98342af3f05 // indirect |
|||
go.uber.org/multierr v1.10.0 // indirect |
|||
golang.org/x/crypto v0.19.0 // indirect |
|||
golang.org/x/image v0.14.0 // indirect |
|||
golang.org/x/net v0.21.0 // indirect |
|||
golang.org/x/sync v0.3.0 // indirect |
|||
golang.org/x/sys v0.17.0 // indirect |
|||
golang.org/x/text v0.14.0 // indirect |
|||
golang.org/x/time v0.1.0 // indirect |
|||
golang.org/x/tools v0.6.0 // indirect |
|||
google.golang.org/genproto v0.0.0-20230629202037-9506855d4529 // indirect |
|||
google.golang.org/genproto/googleapis/rpc v0.0.0-20230629202037-9506855d4529 // indirect |
|||
gopkg.in/ini.v1 v1.67.0 // indirect |
|||
gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect |
|||
gopkg.in/yaml.v2 v2.4.0 // indirect |
|||
gopkg.in/yaml.v3 v3.0.1 // indirect |
|||
gorm.io/driver/postgres v1.4.4 // indirect |
|||
gorm.io/driver/sqlserver v1.4.1 // indirect |
|||
gorm.io/plugin/dbresolver v1.3.0 // indirect |
|||
modernc.org/libc v1.22.2 // indirect |
|||
modernc.org/mathutil v1.5.0 // indirect |
|||
modernc.org/memory v1.5.0 // indirect |
|||
modernc.org/sqlite v1.20.3 // indirect |
|||
) |
@ -0,0 +1,980 @@ |
|||
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= |
|||
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= |
|||
cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= |
|||
cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= |
|||
cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= |
|||
cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= |
|||
cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= |
|||
cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= |
|||
cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= |
|||
cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= |
|||
cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= |
|||
cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= |
|||
cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= |
|||
cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= |
|||
cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= |
|||
cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= |
|||
cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= |
|||
cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= |
|||
cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= |
|||
cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= |
|||
cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= |
|||
cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= |
|||
cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= |
|||
cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= |
|||
cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= |
|||
cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= |
|||
cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= |
|||
cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= |
|||
cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= |
|||
cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= |
|||
cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= |
|||
cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= |
|||
cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= |
|||
cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= |
|||
cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= |
|||
cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= |
|||
cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= |
|||
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= |
|||
gitea.com/xorm/sqlfiddle v0.0.0-20180821085327-62ce714f951a/go.mod h1:EXuID2Zs0pAQhH8yz+DNjUbjppKQzKFAn28TMYPB6IU= |
|||
github.com/360EntSecGroup-Skylar/excelize/v2 v2.3.2 h1:MHu5KWWt28FzRGQgc4Ryj/lZT/W/by4NvsnstbWwkkY= |
|||
github.com/360EntSecGroup-Skylar/excelize/v2 v2.3.2/go.mod h1:xc0ybJZXcn084ZaIvQv+LfCDQjMWfxkBa2K9nLXYJtI= |
|||
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.0.0/go.mod h1:uGG2W01BaETf0Ozp+QxxKJdMBNRWPdstHG0Fmdwn1/U= |
|||
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.0.0/go.mod h1:+6sju8gk8FRmSajX3Oz4G5Gm7P+mbqE9FVaXXFYTkCM= |
|||
github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.0/go.mod h1:eWRD7oawr1Mu1sLCawqVc0CUiF43ia3qQMxLscsKQ9w= |
|||
github.com/AzureAD/microsoft-authentication-library-for-go v0.4.0/go.mod h1:Vt9sXTKwMyGcOxSmLDMnGPgqsUg7m8pe215qMLrDXw4= |
|||
github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= |
|||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= |
|||
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= |
|||
github.com/DataDog/zstd v1.4.5/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= |
|||
github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible h1:1G1pk05UrOh0NlF1oeaaix1x8XzrfjIDK47TY0Zehcw= |
|||
github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= |
|||
github.com/KyleBanks/depth v1.2.1 h1:5h8fQADFrWtarTdtDudMmGsC7GPbOAu6RVB3ffsVFHc= |
|||
github.com/KyleBanks/depth v1.2.1/go.mod h1:jzSb9d0L43HxTQfT+oSA1EEp2q+ne2uh6XgeJcm8brE= |
|||
github.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030IGemrRc= |
|||
github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= |
|||
github.com/PuerkitoBio/goquery v1.5.1/go.mod h1:GsLWisAFVj4WgDibEWF4pvYnkVQBpKBKeU+7zCJoLcc= |
|||
github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= |
|||
github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI= |
|||
github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= |
|||
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= |
|||
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= |
|||
github.com/agiledragon/gomonkey/v2 v2.3.1 h1:k+UnUY0EMNYUFUAQVETGY9uUTxjMdnUkP0ARyJS1zzs= |
|||
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 h1:JYp7IbQjafoB+tBA3gMyHYHrpOtNuDiK/uB5uXxq5wM= |
|||
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= |
|||
github.com/aliyun/alibaba-cloud-sdk-go v1.61.18 h1:zOVTBdCKFd9JbCKz9/nt+FovbjPFmb7mUnp8nH9fQBA= |
|||
github.com/aliyun/alibaba-cloud-sdk-go v1.61.18/go.mod h1:v8ESoHo4SyHmuB4b1tJqDHxfTGEciD+yhvOU/5s1Rfk= |
|||
github.com/aliyun/aliyun-oss-go-sdk v2.2.9+incompatible h1:Sg/2xHwDrioHpxTN6WMiwbXTpUEinBpHsN7mG21Rc2k= |
|||
github.com/aliyun/aliyun-oss-go-sdk v2.2.9+incompatible/go.mod h1:T/Aws4fEfogEE9v+HPhhw+CntffsBHJ8nXQCwKr0/g8= |
|||
github.com/andybalholm/cascadia v1.1.0/go.mod h1:GsXiBklL0woXo1j/WYWtSYYC4ouU9PqHO0sqidkEA4Y= |
|||
github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= |
|||
github.com/buger/jsonparser v1.1.1 h1:2PnMjfWD7wBILjqQbt530v576A/cAbQvEW9gGIpYMUs= |
|||
github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= |
|||
github.com/carlmjohnson/requests v0.23.5 h1:NPANcAofwwSuC6SIMwlgmHry2V3pLrSqRiSBKYbNHHA= |
|||
github.com/carlmjohnson/requests v0.23.5/go.mod h1:zG9P28thdRnN61aD7iECFhH5iGGKX2jIjKQD9kqYH+o= |
|||
github.com/casbin/casbin/v2 v2.77.2 h1:yQinn/w9x8AswiwqwtrXz93VU48R1aYTXdHEx4RI3jM= |
|||
github.com/casbin/casbin/v2 v2.77.2/go.mod h1:mzGx0hYW9/ksOSpw3wNjk3NRAroq5VMFYUQ6G43iGPk= |
|||
github.com/casbin/gorm-adapter/v3 v3.20.0 h1:VpGKTlL56xIkhNUOC07bnzwjA/xqfVOAbkt6sniVxMo= |
|||
github.com/casbin/gorm-adapter/v3 v3.20.0/go.mod h1:pvTTuyP2Es8VPHLyUssGtvOb3ETYD2tG7TfT5K8X2Sg= |
|||
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= |
|||
github.com/census-instrumentation/opencensus-proto v0.4.1 h1:iKLQ0xPNFxR/2hzXZMrBo8f1j86j5WHzznCCQxV/b8g= |
|||
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= |
|||
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= |
|||
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= |
|||
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= |
|||
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= |
|||
github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= |
|||
github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= |
|||
github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 h1:/inchEIKaYC1Akx+H+gqO04wryn5h75LSazbRlnya1k= |
|||
github.com/cockroachdb/apd v1.1.0 h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I= |
|||
github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= |
|||
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= |
|||
github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= |
|||
github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= |
|||
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/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/dnaeon/go-vcr v1.1.0/go.mod h1:M7tiix8f0r6mKKJ3Yq/kqU1OYf3MnfmBWVbPx/yU9ko= |
|||
github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= |
|||
github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= |
|||
github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= |
|||
github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= |
|||
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= |
|||
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= |
|||
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= |
|||
github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= |
|||
github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= |
|||
github.com/envoyproxy/go-control-plane v0.11.2-0.20230627204322-7d0032219fcb h1:kxNVXsNro/lpR5WD+P1FI/yUHn2G03Glber3k8cQL2Y= |
|||
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= |
|||
github.com/envoyproxy/protoc-gen-validate v0.10.1 h1:c0g45+xCJhdgFGw7a5QAfdS4byAbud7miNWJ1WwEVf8= |
|||
github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= |
|||
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= |
|||
github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= |
|||
github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= |
|||
github.com/fvbock/endless v0.0.0-20170109170031-447134032cb6 h1:6VSn3hB5U5GeA6kQw4TwWIWbOhtvR2hmbBJnTOtqTWc= |
|||
github.com/fvbock/endless v0.0.0-20170109170031-447134032cb6/go.mod h1:YxOVT5+yHzKvwhsiSIWmbAYM3Dr9AEEbER2dVayfBkg= |
|||
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= |
|||
github.com/gin-contrib/gzip v0.0.1 h1:ezvKOL6jH+jlzdHNE4h9h8q8uMpDQjyl0NN0Jd7jozc= |
|||
github.com/gin-contrib/gzip v0.0.1/go.mod h1:fGBJBCdt6qCZuCAOwWuFhBB4OOq9EFqlo5dEaFhhu5w= |
|||
github.com/gin-contrib/sse v0.0.0-20170109093832-22d885f9ecc7/go.mod h1:VJ0WA2NBN22VlZ2dKZQPAPnyWw5XTlK1KymzLKsr59s= |
|||
github.com/gin-contrib/sse v0.0.0-20190301062529-5545eab6dad3/go.mod h1:VJ0WA2NBN22VlZ2dKZQPAPnyWw5XTlK1KymzLKsr59s= |
|||
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.3.0/go.mod h1:7cKuhb5qV2ggCFctp2fJQ+ErvciLZrIeoOSOm6mUr7Y= |
|||
github.com/gin-gonic/gin v1.4.0/go.mod h1:OW2EZn3DO8Ln9oIKOvM++LBO+5UPHJJDH72/q/3rZdM= |
|||
github.com/gin-gonic/gin v1.6.3 h1:ahKqKTFpO5KTPHxWZjEdPScmYaGtLo8Y4DMHoEsnp14= |
|||
github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= |
|||
github.com/glebarez/go-sqlite v1.20.3 h1:89BkqGOXR9oRmG58ZrzgoY/Fhy5x0M+/WV48U5zVrZ4= |
|||
github.com/glebarez/go-sqlite v1.20.3/go.mod h1:u3N6D/wftiAzIOJtZl6BmedqxmmkDfH3q+ihjqxC9u0= |
|||
github.com/glebarez/sqlite v1.7.0 h1:A7Xj/KN2Lvie4Z4rrgQHY8MsbebX3NyWsL3n2i82MVI= |
|||
github.com/glebarez/sqlite v1.7.0/go.mod h1:PkeevrRlF/1BhQBCnzcMWzgrIk7IOop+qS2jUYLfHhk= |
|||
github.com/go-errors/errors v1.0.1 h1:LUHzmkK3GUKUrL/1gfBUxAHzcev3apQlezX/+O7ma6w= |
|||
github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= |
|||
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= |
|||
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= |
|||
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= |
|||
github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= |
|||
github.com/go-kratos/aegis v0.2.0 h1:dObzCDWn3XVjUkgxyBp6ZeWtx/do0DPZ7LY3yNSJLUQ= |
|||
github.com/go-kratos/aegis v0.2.0/go.mod h1:v0R2m73WgEEYB3XYu6aE2WcMwsZkJ/Rzuf5eVccm7bI= |
|||
github.com/go-kratos/kratos/contrib/registry/nacos/v2 v2.0.0-20231023125239-6cdd81811e10 h1:0hCdRzxOC93wBXV3gKYVf8LJ79r+cHatXY1fuhs+hsw= |
|||
github.com/go-kratos/kratos/contrib/registry/nacos/v2 v2.0.0-20231023125239-6cdd81811e10/go.mod h1:Kf3zWQMJaS/9CMVXUh2HRzd7TJYdyRKCHQliigy6kcg= |
|||
github.com/go-kratos/kratos/v2 v2.7.1 h1:PNMUaWxS5ZGDp1EyID5ZosJb1OA/YiHnBxB0yUmocnc= |
|||
github.com/go-kratos/kratos/v2 v2.7.1/go.mod h1:CPn82O93OLHjtnbuyOKhAG5TkSvw+mFnL32c4lZFDwU= |
|||
github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= |
|||
github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= |
|||
github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= |
|||
github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= |
|||
github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= |
|||
github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= |
|||
github.com/go-openapi/jsonreference v0.19.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= |
|||
github.com/go-openapi/jsonreference v0.19.6 h1:UBIxjkht+AWIgYzCDSv2GN+E/togfwXUJFRTWhl2Jjs= |
|||
github.com/go-openapi/jsonreference v0.19.6/go.mod h1:diGHMEHg2IqXZGKxqyvWdfWU/aim5Dprw5bqpKkTvns= |
|||
github.com/go-openapi/spec v0.19.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= |
|||
github.com/go-openapi/spec v0.20.4 h1:O8hJrt0UMnhHcluhIdUgCLRWyM2x7QkBXRvOs7m+O1M= |
|||
github.com/go-openapi/spec v0.20.4/go.mod h1:faYFR1CvsJZ0mNsmsphTMSoRrNV3TEDoAM7FOEWeq8I= |
|||
github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= |
|||
github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= |
|||
github.com/go-openapi/swag v0.19.15 h1:D2NRCBzS9/pEY3gP9Nl8aDqGUcPFrwG2p+CNFrLyrCM= |
|||
github.com/go-openapi/swag v0.19.15/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= |
|||
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/form/v4 v4.2.0 h1:N1wh+Goz61e6w66vo8vJkQt+uwZSoLz50kZPJWR8eic= |
|||
github.com/go-playground/form/v4 v4.2.0/go.mod h1:q1a2BY+AQUUzhl6xA/6hBetay6dEIhMHjgvJiGo6K7U= |
|||
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.2.0 h1:KgJ0snyC2R9VXYN2rneOtQcw5aHQB1Vv0sFl1UcHBOY= |
|||
github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= |
|||
github.com/go-redis/redis v6.15.9+incompatible h1:K0pv1D7EQUjfyoMql+r/jZqCLizCGKFlFgcHWWmHQjg= |
|||
github.com/go-redis/redis v6.15.9+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA= |
|||
github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= |
|||
github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= |
|||
github.com/go-sql-driver/mysql v1.7.0 h1:ueSltNNllEqE3qcWBTD0iQd3IpL/6U+mJxLkazJ7YPc= |
|||
github.com/go-sql-driver/mysql v1.7.0/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI= |
|||
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= |
|||
github.com/gofrs/uuid v4.0.0+incompatible h1:1SD/1F5pU8p29ybwgQSwpQk+mwdRrXCYuPhW6m+TnJw= |
|||
github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= |
|||
github.com/goji/httpauth v0.0.0-20160601135302-2da839ab0f4d/go.mod h1:nnjvkQ9ptGaCkuDUx6wNykzzlUixGxvkme+H/lnzb+A= |
|||
github.com/golang-jwt/jwt v3.2.1+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= |
|||
github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= |
|||
github.com/golang-jwt/jwt/v4 v4.2.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= |
|||
github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= |
|||
github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9 h1:au07oEsX2xN0ktxqI+Sida1w446QrXBRJ0nee3SNZlA= |
|||
github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= |
|||
github.com/golang-sql/sqlexp v0.1.0 h1:ZCD6MBpcuOVfGVqsEmY5/4FtYiKz6tSyUv9LPEDei6A= |
|||
github.com/golang-sql/sqlexp v0.1.0/go.mod h1:J4ad9Vo8ZCWQ2GMrC4UCQy1JpCbwU9m3EOqtpKwwwHI= |
|||
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/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= |
|||
github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= |
|||
github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= |
|||
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= |
|||
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= |
|||
github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= |
|||
github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= |
|||
github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= |
|||
github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= |
|||
github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= |
|||
github.com/golang/mock v1.4.4 h1:l75CXGRSwbaYNpl/Z2X1XIIAMSCquvXgpVZDhwEIJsc= |
|||
github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= |
|||
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= |
|||
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= |
|||
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= |
|||
github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= |
|||
github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= |
|||
github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= |
|||
github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= |
|||
github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= |
|||
github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= |
|||
github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= |
|||
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= |
|||
github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= |
|||
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= |
|||
github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= |
|||
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= |
|||
github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= |
|||
github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= |
|||
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= |
|||
github.com/golang/snappy v0.0.2/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= |
|||
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= |
|||
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= |
|||
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= |
|||
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= |
|||
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= |
|||
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= |
|||
github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= |
|||
github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= |
|||
github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= |
|||
github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= |
|||
github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= |
|||
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= |
|||
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= |
|||
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= |
|||
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= |
|||
github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= |
|||
github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= |
|||
github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= |
|||
github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= |
|||
github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= |
|||
github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= |
|||
github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= |
|||
github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= |
|||
github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= |
|||
github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= |
|||
github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= |
|||
github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= |
|||
github.com/google/pprof v0.0.0-20221118152302-e6195bd50e26 h1:Xim43kblpZXfIBQsbuBVKCudVG457BR2GZFIz3uw3hQ= |
|||
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= |
|||
github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= |
|||
github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= |
|||
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= |
|||
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= |
|||
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= |
|||
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= |
|||
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= |
|||
github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= |
|||
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= |
|||
github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= |
|||
github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= |
|||
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= |
|||
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= |
|||
github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= |
|||
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= |
|||
github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= |
|||
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= |
|||
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= |
|||
github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= |
|||
github.com/jackc/chunkreader v1.0.0/go.mod h1:RT6O25fNZIuasFJRyZ4R/Y2BbhasbmZXF9QQ7T3kePo= |
|||
github.com/jackc/chunkreader/v2 v2.0.0/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk= |
|||
github.com/jackc/chunkreader/v2 v2.0.1 h1:i+RDz65UE+mmpjTfyz0MoVTnzeYxroil2G82ki7MGG8= |
|||
github.com/jackc/chunkreader/v2 v2.0.1/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk= |
|||
github.com/jackc/pgconn v0.0.0-20190420214824-7e0022ef6ba3/go.mod h1:jkELnwuX+w9qN5YIfX0fl88Ehu4XC3keFuOJJk9pcnA= |
|||
github.com/jackc/pgconn v0.0.0-20190824142844-760dd75542eb/go.mod h1:lLjNuW/+OfW9/pnVKPazfWOgNfH2aPem8YQ7ilXGvJE= |
|||
github.com/jackc/pgconn v0.0.0-20190831204454-2fabfa3c18b7/go.mod h1:ZJKsE/KZfsUgOEh9hBm+xYTstcNHg7UPMVJqRfQxq4s= |
|||
github.com/jackc/pgconn v1.8.0/go.mod h1:1C2Pb36bGIP9QHGBYCjnyhqu7Rv3sGshaQUvmfGIB/o= |
|||
github.com/jackc/pgconn v1.9.0/go.mod h1:YctiPyvzfU11JFxoXokUOOKQXQmDMoJL9vJzHH8/2JY= |
|||
github.com/jackc/pgconn v1.9.1-0.20210724152538-d89c8390a530/go.mod h1:4z2w8XhRbP1hYxkpTuBjTS3ne3J48K83+u0zoyvg2pI= |
|||
github.com/jackc/pgconn v1.13.0 h1:3L1XMNV2Zvca/8BYhzcRFS70Lr0WlDg16Di6SFGAbys= |
|||
github.com/jackc/pgconn v1.13.0/go.mod h1:AnowpAqO4CMIIJNZl2VJp+KrkAZciAkhEl0W0JIobpI= |
|||
github.com/jackc/pgio v1.0.0 h1:g12B9UwVnzGhueNavwioyEEpAmqMe1E/BN9ES+8ovkE= |
|||
github.com/jackc/pgio v1.0.0/go.mod h1:oP+2QK2wFfUWgr+gxjoBH9KGBb31Eio69xUb0w5bYf8= |
|||
github.com/jackc/pgmock v0.0.0-20190831213851-13a1b77aafa2/go.mod h1:fGZlG77KXmcq05nJLRkk0+p82V8B8Dw8KN2/V9c/OAE= |
|||
github.com/jackc/pgmock v0.0.0-20201204152224-4fe30f7445fd/go.mod h1:hrBW0Enj2AZTNpt/7Y5rr2xe/9Mn757Wtb2xeBzPv2c= |
|||
github.com/jackc/pgmock v0.0.0-20210724152146-4ad1a8207f65 h1:DadwsjnMwFjfWc9y5Wi/+Zz7xoE5ALHsRQlOctkOiHc= |
|||
github.com/jackc/pgmock v0.0.0-20210724152146-4ad1a8207f65/go.mod h1:5R2h2EEX+qri8jOWMbJCtaPWkrrNc7OHwsp2TCqp7ak= |
|||
github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM= |
|||
github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg= |
|||
github.com/jackc/pgproto3 v1.1.0/go.mod h1:eR5FA3leWg7p9aeAqi37XOTgTIbkABlvcPB3E5rlc78= |
|||
github.com/jackc/pgproto3/v2 v2.0.0-alpha1.0.20190420180111-c116219b62db/go.mod h1:bhq50y+xrl9n5mRYyCBFKkpRVTLYJVWeCc+mEAI3yXA= |
|||
github.com/jackc/pgproto3/v2 v2.0.0-alpha1.0.20190609003834-432c2951c711/go.mod h1:uH0AWtUmuShn0bcesswc4aBTWGvw0cAxIJp+6OB//Wg= |
|||
github.com/jackc/pgproto3/v2 v2.0.0-rc3/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM= |
|||
github.com/jackc/pgproto3/v2 v2.0.0-rc3.0.20190831210041-4c03ce451f29/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM= |
|||
github.com/jackc/pgproto3/v2 v2.0.6/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= |
|||
github.com/jackc/pgproto3/v2 v2.1.1/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= |
|||
github.com/jackc/pgproto3/v2 v2.3.1 h1:nwj7qwf0S+Q7ISFfBndqeLwSwxs+4DPsbRFjECT1Y4Y= |
|||
github.com/jackc/pgproto3/v2 v2.3.1/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= |
|||
github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b h1:C8S2+VttkHFdOOCXJe+YGfa4vHYwlt4Zx+IVXQ97jYg= |
|||
github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b/go.mod h1:vsD4gTJCa9TptPL8sPkXrLZ+hDuNrZCnj29CQpr4X1E= |
|||
github.com/jackc/pgtype v0.0.0-20190421001408-4ed0de4755e0/go.mod h1:hdSHsc1V01CGwFsrv11mJRHWJ6aifDLfdV3aVjFF0zg= |
|||
github.com/jackc/pgtype v0.0.0-20190824184912-ab885b375b90/go.mod h1:KcahbBH1nCMSo2DXpzsoWOAfFkdEtEJpPbVLq8eE+mc= |
|||
github.com/jackc/pgtype v0.0.0-20190828014616-a8802b16cc59/go.mod h1:MWlu30kVJrUS8lot6TQqcg7mtthZ9T0EoIBFiJcmcyw= |
|||
github.com/jackc/pgtype v1.8.1-0.20210724151600-32e20a603178/go.mod h1:C516IlIV9NKqfsMCXTdChteoXmwgUceqaLfjg2e3NlM= |
|||
github.com/jackc/pgtype v1.12.0 h1:Dlq8Qvcch7kiehm8wPGIW0W3KsCCHJnRacKW0UM8n5w= |
|||
github.com/jackc/pgtype v1.12.0/go.mod h1:LUMuVrfsFfdKGLw+AFFVv6KtHOFMwRgDDzBt76IqCA4= |
|||
github.com/jackc/pgx/v4 v4.0.0-20190420224344-cc3461e65d96/go.mod h1:mdxmSJJuR08CZQyj1PVQBHy9XOp5p8/SHH6a0psbY9Y= |
|||
github.com/jackc/pgx/v4 v4.0.0-20190421002000-1b8f0016e912/go.mod h1:no/Y67Jkk/9WuGR0JG/JseM9irFbnEPbuWV2EELPNuM= |
|||
github.com/jackc/pgx/v4 v4.0.0-pre1.0.20190824185557-6972a5742186/go.mod h1:X+GQnOEnf1dqHGpw7JmHqHc1NxDoalibchSk9/RWuDc= |
|||
github.com/jackc/pgx/v4 v4.12.1-0.20210724153913-640aa07df17c/go.mod h1:1QD0+tgSXP7iUjYm9C1NxKhny7lq6ee99u/z+IHFcgs= |
|||
github.com/jackc/pgx/v4 v4.17.2 h1:0Ut0rpeKwvIVbMQ1KbMBU4h6wxehBI535LK6Flheh8E= |
|||
github.com/jackc/pgx/v4 v4.17.2/go.mod h1:lcxIZN44yMIrWI78a5CpucdD14hX0SBDbNRvjDBItsw= |
|||
github.com/jackc/puddle v0.0.0-20190413234325-e4ced69a3a2b/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= |
|||
github.com/jackc/puddle v0.0.0-20190608224051-11cab39313c9/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= |
|||
github.com/jackc/puddle v1.1.3/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= |
|||
github.com/jackc/puddle v1.3.0/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= |
|||
github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E= |
|||
github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= |
|||
github.com/jinzhu/now v1.1.4/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= |
|||
github.com/jinzhu/now v1.1.5 h1:/o9tlHleP7gOFmsnYNz3RGnqzefHA47wQpKrrdTIwXQ= |
|||
github.com/jinzhu/now v1.1.5/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= |
|||
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/jonboulle/clockwork v0.4.0 h1:p4Cf1aMWXnXAUh8lVfewRBx1zaTSYKrKMF2g3ST4RZ4= |
|||
github.com/jonboulle/clockwork v0.4.0/go.mod h1:xgRqUGwRcjKCO1vbZUEtSLrqKoPSsUpK7fnezOII0kc= |
|||
github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= |
|||
github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= |
|||
github.com/json-iterator/go v1.1.5/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= |
|||
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= |
|||
github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= |
|||
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= |
|||
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= |
|||
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= |
|||
github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= |
|||
github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= |
|||
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= |
|||
github.com/klauspost/compress v1.16.7 h1:2mk3MPGNzKyxErAw8YaohYh69+pa4sIQSC0fPGCFR9I= |
|||
github.com/klauspost/compress v1.16.7/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= |
|||
github.com/klauspost/cpuid/v2 v2.0.1/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= |
|||
github.com/klauspost/cpuid/v2 v2.2.5 h1:0E5MSMDEoAulmXNFquVs//DdoomxaoTY1kUhbc/qbZg= |
|||
github.com/klauspost/cpuid/v2 v2.2.5/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= |
|||
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/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= |
|||
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= |
|||
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= |
|||
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= |
|||
github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw= |
|||
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= |
|||
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= |
|||
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= |
|||
github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= |
|||
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/lestrrat-go/envload v0.0.0-20180220234015-a3eb8ddeffcc h1:RKf14vYWi2ttpEmkA4aQ3j4u9dStX2t4M8UM6qqNsG8= |
|||
github.com/lestrrat-go/envload v0.0.0-20180220234015-a3eb8ddeffcc/go.mod h1:kopuH9ugFRkIXf3YoqHKyrJ9YfUFsckUU9S7B+XP+is= |
|||
github.com/lestrrat-go/file-rotatelogs v2.4.0+incompatible h1:Y6sqxHMyB1D2YSzWkLibYKgg+SwmyFU9dF2hn6MdTj4= |
|||
github.com/lestrrat-go/file-rotatelogs v2.4.0+incompatible/go.mod h1:ZQnN8lSECaebrkQytbHj4xNgtg8CR7RYXnPok8e0EHA= |
|||
github.com/lestrrat-go/strftime v1.0.6 h1:CFGsDEt1pOpFNU+TJB0nhz9jl+K0hZSLE205AhTIGQQ= |
|||
github.com/lestrrat-go/strftime v1.0.6/go.mod h1:f7jQKgV5nnJpYgdEasS+/y7EsTb8ykN2z68n3TtcTaw= |
|||
github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= |
|||
github.com/lib/pq v1.1.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= |
|||
github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= |
|||
github.com/lib/pq v1.7.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= |
|||
github.com/lib/pq v1.10.2 h1:AqzbZs4ZoCBp+GtejcpCpcxM3zlSMx29dXbUSeVtJb8= |
|||
github.com/lib/pq v1.10.2/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= |
|||
github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= |
|||
github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= |
|||
github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= |
|||
github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= |
|||
github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= |
|||
github.com/mailru/easyjson v0.7.6 h1:8yTIVnZgCoiM1TgqoeTl+LfU5Jg6/xL3QhGQnimLYnA= |
|||
github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= |
|||
github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= |
|||
github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= |
|||
github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= |
|||
github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= |
|||
github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= |
|||
github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= |
|||
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= |
|||
github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng= |
|||
github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= |
|||
github.com/mattn/go-sqlite3 v1.14.0/go.mod h1:JIl7NbARA7phWnGvh0LKTyg7S9BA+6gx71ShQilpsus= |
|||
github.com/microsoft/go-mssqldb v0.17.0 h1:Fto83dMZPnYv1Zwx5vHHxpNraeEaUlQ/hhHLgZiaenE= |
|||
github.com/microsoft/go-mssqldb v0.17.0/go.mod h1:OkoNGhGEs8EZqchVTtochlXruEhEOaO4S0d2sB5aeGQ= |
|||
github.com/minio/md5-simd v1.1.2 h1:Gdi1DZK69+ZVMoNHRXJyNcxrMA4dSxoYHZSQbirFg34= |
|||
github.com/minio/md5-simd v1.1.2/go.mod h1:MzdKDxYpY2BT9XQFocsiZf/NKVtR7nkE4RoEpN+20RM= |
|||
github.com/minio/minio-go/v7 v7.0.63 h1:GbZ2oCvaUdgT5640WJOpyDhhDxvknAJU2/T3yurwcbQ= |
|||
github.com/minio/minio-go/v7 v7.0.63/go.mod h1:Q6X7Qjb7WMhvG65qKf4gUgA5XaiSox74kR1uAEjxRS4= |
|||
github.com/minio/sha256-simd v1.0.1 h1:6kaan5IFmwTNynnKKpDHe6FWHohJOHhCPchzK49dzMM= |
|||
github.com/minio/sha256-simd v1.0.1/go.mod h1:Pz6AKMiUdngCLpeTL/RJY1M9rUuPMYujV5xJjtbRSN8= |
|||
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= |
|||
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= |
|||
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= |
|||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= |
|||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= |
|||
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= |
|||
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= |
|||
github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= |
|||
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= |
|||
github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= |
|||
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 h1:RWengNIwukTxcDr9M+97sNutRR1RKhG96O6jWumTTnw= |
|||
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8= |
|||
github.com/mojocn/base64Captcha v1.3.5 h1:Qeilr7Ta6eDtG4S+tQuZ5+hO+QHbiGAJdi4PfoagaA0= |
|||
github.com/mojocn/base64Captcha v1.3.5/go.mod h1:/tTTXn4WTpX9CfrmipqRytCpJ27Uw3G6I7NcP2WwcmY= |
|||
github.com/montanaflynn/stats v0.6.6/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow= |
|||
github.com/nacos-group/nacos-sdk-go v1.1.4 h1:qyrZ7HTWM4aeymFfqnbgNRERh7TWuER10pCB7ddRcTY= |
|||
github.com/nacos-group/nacos-sdk-go v1.1.4/go.mod h1:cBv9wy5iObs7khOqov1ERFQrCuTR4ILpgaiaVMxEmGI= |
|||
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= |
|||
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/otiai10/copy v1.7.0 h1:hVoPiN+t+7d2nzzwMiDHPSOogsWAStewq3TwU05+clE= |
|||
github.com/pborman/uuid v1.2.0 h1:J7Q5mO4ysT1dv8hyrUGHb9+ooztCXu1D8MY8DZYsu3g= |
|||
github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= |
|||
github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ= |
|||
github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= |
|||
github.com/pili-engineering/pili-sdk-go.v2 v0.0.0-20200608105005-bb506e708987 h1:PIPYQRZ0S1yjLPO05uNtYz5fcsiJ5Xo/vdQCrwde0fM= |
|||
github.com/pili-engineering/pili-sdk-go.v2 v0.0.0-20200608105005-bb506e708987/go.mod h1:nd8f4Fi29T7yRtBjAZwPOvsRurUzq7Jja5vWUB+aprk= |
|||
github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4/go.mod h1:N6UoU20jOqggOuDwUaBQpluzLNDqif3kq9z2wpdYEfQ= |
|||
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= |
|||
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/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= |
|||
github.com/plutov/paypal v2.0.5+incompatible h1:i5ma4HiHO0MUvJGHaKkL2aqOj0B19q8WoJm1jgzQjlM= |
|||
github.com/plutov/paypal v2.0.5+incompatible/go.mod h1:jOStyiXeDrJ9dHA/yVUB2ahyYPjd5rMXUZ4N7XM37nQ= |
|||
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/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= |
|||
github.com/qiniu/x v1.10.5 h1:7V/CYWEmo9axJULvrJN6sMYh2FdY+esN5h8jwDkA4b0= |
|||
github.com/qiniu/x v1.10.5/go.mod h1:03Ni9tj+N2h2aKnAz+6N0Xfl8FwMEDRC2PAlxekASDs= |
|||
github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= |
|||
github.com/remyoudompheng/bigfft v0.0.0-20230126093431-47fa9a501578 h1:VstopitMQi3hZP0fzvnsLmzXZdQGc4bEcgu24cp+d4M= |
|||
github.com/remyoudompheng/bigfft v0.0.0-20230126093431-47fa9a501578/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= |
|||
github.com/richardlehane/mscfb v1.0.3/go.mod h1:YzVpcZg9czvAuhk9T+a3avCpcFPMUWm7gK3DypaEsUk= |
|||
github.com/richardlehane/mscfb v1.0.4 h1:WULscsljNPConisD5hR0+OyZjwK46Pfyr6mPu5ZawpM= |
|||
github.com/richardlehane/mscfb v1.0.4/go.mod h1:YzVpcZg9czvAuhk9T+a3avCpcFPMUWm7gK3DypaEsUk= |
|||
github.com/richardlehane/msoleps v1.0.1/go.mod h1:BWev5JBpU9Ko2WAgmZEuiz4/u3ZYTKbjLycmwiWUfWg= |
|||
github.com/richardlehane/msoleps v1.0.3 h1:aznSZzrwYRl3rLKRT3gUk9am7T/mLNSnJINvN0AQoVM= |
|||
github.com/richardlehane/msoleps v1.0.3/go.mod h1:BWev5JBpU9Ko2WAgmZEuiz4/u3ZYTKbjLycmwiWUfWg= |
|||
github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs= |
|||
github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro= |
|||
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= |
|||
github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= |
|||
github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= |
|||
github.com/rs/xid v1.5.0 h1:mKX4bl4iPYJtEIxp6CYiUuLQ/8DYMoz0PUdtGgMFRVc= |
|||
github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= |
|||
github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU= |
|||
github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc= |
|||
github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww= |
|||
github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= |
|||
github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4= |
|||
github.com/shopspring/decimal v1.2.0 h1:abSATXmQEYyShuxI4/vyW3tV1MrKAJzCZ/0zLUXYbsQ= |
|||
github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= |
|||
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.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= |
|||
github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= |
|||
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= |
|||
github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= |
|||
github.com/spf13/afero v1.9.5 h1:stMpOSZFs//0Lv29HduCmli3GUfpFoF3Y1Q/aXj/wVM= |
|||
github.com/spf13/afero v1.9.5/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= |
|||
github.com/spf13/cast v1.5.1 h1:R+kOtfhWQE6TVQzY+4D7wJLBgkdVasCEFxSUBYBYIlA= |
|||
github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN48= |
|||
github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= |
|||
github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= |
|||
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= |
|||
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= |
|||
github.com/spf13/viper v1.16.0 h1:rGGH0XDZhdUOryiDWjmIvUSWpbNqisK8Wk0Vyefw8hc= |
|||
github.com/spf13/viper v1.16.0/go.mod h1:yg78JgCJcbrQOvV9YLXgkLaZqUidkY9K+Dd1FofRzQg= |
|||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= |
|||
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= |
|||
github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= |
|||
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= |
|||
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= |
|||
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/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= |
|||
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= |
|||
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= |
|||
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= |
|||
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= |
|||
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= |
|||
github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= |
|||
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= |
|||
github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= |
|||
github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= |
|||
github.com/swaggo/files v0.0.0-20190704085106-630677cd5c14/go.mod h1:gxQT6pBGRuIGunNf/+tSOB5OHvguWi8Tbt82WOkf35E= |
|||
github.com/swaggo/gin-swagger v1.3.0 h1:eOmp7r57oUgZPw2dJOjcGNMse9cvXcI4tTqBcnZtPsI= |
|||
github.com/swaggo/gin-swagger v1.3.0/go.mod h1:oy1BRA6WvgtCp848lhxce7BnWH4C8Bxa0m5SkWx+cS0= |
|||
github.com/swaggo/swag v1.5.1/go.mod h1:1Bl9F/ZBpVWh22nY0zmYyASPO1lI/zIwRDrpZU+tv8Y= |
|||
github.com/swaggo/swag v1.8.1 h1:JuARzFX1Z1njbCGz+ZytBR15TFJwF2Q7fu8puJHhQYI= |
|||
github.com/swaggo/swag v1.8.1/go.mod h1:ugemnJsPZm/kRwFUnzBlbHRd0JY9zE1M4F+uy2pAaPQ= |
|||
github.com/syndtr/goleveldb v1.0.0/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpPAyBWyWuQ= |
|||
github.com/taskcluster/slugid-go v1.1.0 h1:SWsUplliyamdYzOKVM4+lDohZKuL63fKreGkvIKJ9aI= |
|||
github.com/taskcluster/slugid-go v1.1.0/go.mod h1:5sOAcPHjqso1UkKxSl77CkKgOwha0D9X0msBKBj0AOg= |
|||
github.com/tidwall/gjson v1.14.4 h1:uo0p8EbA09J7RQaflQ1aBRffTR7xedD2bcIVSYxLnkM= |
|||
github.com/tidwall/gjson v1.14.4/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= |
|||
github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= |
|||
github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= |
|||
github.com/tidwall/pretty v1.0.2/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= |
|||
github.com/tidwall/pretty v1.2.0 h1:RWIZEg2iJ8/g6fDDYzMpobmaoGh5OLl4AXtGUGPcqCs= |
|||
github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= |
|||
github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= |
|||
github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= |
|||
github.com/ugorji/go v1.1.13/go.mod h1:jxau1n+/wyTGLQoCkjok9r5zFa/FxT6eI5HiHKQszjc= |
|||
github.com/ugorji/go/codec v0.0.0-20181022190402-e5e69e061d4f/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= |
|||
github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= |
|||
github.com/ugorji/go/codec v1.1.13 h1:013LbFhocBoIqgHeIHKlV4JWYhqogATYWZhIcH0WHn4= |
|||
github.com/ugorji/go/codec v1.1.13/go.mod h1:oNVt3Dq+FO91WNQ/9JnHKQP2QJxTzoN7wCBFCq1OeuU= |
|||
github.com/unrolled/secure v1.13.0 h1:sdr3Phw2+f8Px8HE5sd1EHdj1aV3yUwed/uZXChLFsk= |
|||
github.com/unrolled/secure v1.13.0/go.mod h1:BmF5hyM6tXczk3MpQkFf1hpKSRqCyhqcbiQtiAF7+40= |
|||
github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= |
|||
github.com/w3liu/go-common v0.0.0-20210108072342-826b2f3582be h1:NW489IqqgOz/+fV4oDC2NJqQFH+gYYQt8WRLj4v94Ok= |
|||
github.com/w3liu/go-common v0.0.0-20210108072342-826b2f3582be/go.mod h1:yHAS/DWXivtrBrO4K45DpIFjQ6LgOi4bUBz7A1iClsE= |
|||
github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I= |
|||
github.com/xdg/stringprep v1.0.0/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y= |
|||
github.com/xuri/efp v0.0.0-20201016154823-031c29024257/go.mod h1:uBiSUepVYMhGTfDeBKKasV4GpgBlzJ46gXUBAqV8qLk= |
|||
github.com/xuri/efp v0.0.0-20231025114914-d1ff6096ae53 h1:Chd9DkqERQQuHpXjR/HSV1jLZA6uaoiwwH3vSuF3IW0= |
|||
github.com/xuri/efp v0.0.0-20231025114914-d1ff6096ae53/go.mod h1:ybY/Jr0T0GTCnYjKqmdwxyxn2BQf2RcQIIvex5QldPI= |
|||
github.com/xuri/excelize/v2 v2.8.1 h1:pZLMEwK8ep+CLIUWpWmvW8IWE/yxqG0I1xcN6cVMGuQ= |
|||
github.com/xuri/excelize/v2 v2.8.1/go.mod h1:oli1E4C3Pa5RXg1TBXn4ENCXDV5JUMlBluUhG7c+CEE= |
|||
github.com/xuri/nfp v0.0.0-20230919160717-d98342af3f05 h1:qhbILQo1K3mphbwKh1vNm4oGezE1eF9fQWmNiIpSfI4= |
|||
github.com/xuri/nfp v0.0.0-20230919160717-d98342af3f05/go.mod h1:WwHg+CVyzlv/TX9xqBFXEZAuxOPxn2k1GNHwG41IIUQ= |
|||
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= |
|||
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= |
|||
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= |
|||
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= |
|||
github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q= |
|||
github.com/ziutek/mymysql v1.5.4/go.mod h1:LMSpPZ6DbqWFxNCHW77HeMg9I646SAhApZ/wKdgO/C0= |
|||
go.mongodb.org/mongo-driver v1.2.0/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= |
|||
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= |
|||
go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= |
|||
go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= |
|||
go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= |
|||
go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= |
|||
go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= |
|||
go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= |
|||
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= |
|||
go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= |
|||
go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= |
|||
go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= |
|||
go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= |
|||
go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= |
|||
go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= |
|||
go.uber.org/multierr v1.10.0 h1:S0h4aNzvfcFsC3dRF1jLoaov7oRaKqRGC/pUEJ2yvPQ= |
|||
go.uber.org/multierr v1.10.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= |
|||
go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= |
|||
go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= |
|||
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= |
|||
go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= |
|||
go.uber.org/zap v1.15.0/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc= |
|||
go.uber.org/zap v1.16.0/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ= |
|||
go.uber.org/zap v1.25.0 h1:4Hvk6GtkucQ790dqmj7l1eEnRdKm3k3ZUrUMS2d5+5c= |
|||
go.uber.org/zap v1.25.0/go.mod h1:JIAUzQIH94IC4fOJQm7gMmBJP5k7wQfdcnYdPoEXJYk= |
|||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= |
|||
golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= |
|||
golang.org/x/crypto v0.0.0-20190411191339-88737f569e3a/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= |
|||
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= |
|||
golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= |
|||
golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= |
|||
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= |
|||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= |
|||
golang.org/x/crypto v0.0.0-20201012173705-84dcc777aaee/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= |
|||
golang.org/x/crypto v0.0.0-20201203163018-be400aefbc4c/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= |
|||
golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= |
|||
golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= |
|||
golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= |
|||
golang.org/x/crypto v0.0.0-20220511200225-c6db032c6c88/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= |
|||
golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= |
|||
golang.org/x/crypto v0.0.0-20221005025214-4161e89ecf1b/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= |
|||
golang.org/x/crypto v0.19.0 h1:ENy+Az/9Y1vSrlrvBSyna3PITt4tiZLf7sgCjZBX7Wo= |
|||
golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= |
|||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= |
|||
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= |
|||
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= |
|||
golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= |
|||
golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= |
|||
golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= |
|||
golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= |
|||
golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= |
|||
golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= |
|||
golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= |
|||
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= |
|||
golang.org/x/image v0.0.0-20190501045829-6d32002ffd75/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= |
|||
golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= |
|||
golang.org/x/image v0.0.0-20201208152932-35266b937fa6/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= |
|||
golang.org/x/image v0.14.0 h1:tNgSxAFe3jC4uYqvZdTr84SZoM1KfwdC9SKIFrLjFn4= |
|||
golang.org/x/image v0.14.0/go.mod h1:HUYqC05R2ZcZ3ejNQsIHQDQiwWM4JBqmm6MKANTp4LE= |
|||
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= |
|||
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= |
|||
golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= |
|||
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= |
|||
golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= |
|||
golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= |
|||
golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= |
|||
golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= |
|||
golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= |
|||
golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= |
|||
golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= |
|||
golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= |
|||
golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= |
|||
golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= |
|||
golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= |
|||
golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= |
|||
golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= |
|||
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= |
|||
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= |
|||
golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= |
|||
golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= |
|||
golang.org/x/mod v0.8.0 h1:LUYupSeNrTNCGzR/hVBk2NHZO4hXcVaW1k4Qx7rjPx8= |
|||
golang.org/x/net v0.0.0-20180218175443-cbe0f9307d01/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= |
|||
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= |
|||
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/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-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= |
|||
golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= |
|||
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= |
|||
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/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-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= |
|||
golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= |
|||
golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= |
|||
golang.org/x/net v0.0.0-20190611141213-3f473d35a33a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= |
|||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= |
|||
golang.org/x/net v0.0.0-20190628185345-da137c7871d7/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-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= |
|||
golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= |
|||
golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/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-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= |
|||
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= |
|||
golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= |
|||
golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= |
|||
golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= |
|||
golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= |
|||
golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= |
|||
golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= |
|||
golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= |
|||
golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= |
|||
golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= |
|||
golang.org/x/net v0.0.0-20201010224723-4f7140c49acb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= |
|||
golang.org/x/net v0.0.0-20201016165138-7b1cca2348c0/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= |
|||
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= |
|||
golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= |
|||
golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= |
|||
golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= |
|||
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= |
|||
golang.org/x/net v0.0.0-20210421230115-4e50805a0758/go.mod h1:72T/g9IO56b78aLF+1Kcs5dz7/ng1VjMUvfKvpfy+jM= |
|||
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= |
|||
golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= |
|||
golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= |
|||
golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= |
|||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= |
|||
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= |
|||
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= |
|||
golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= |
|||
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= |
|||
golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= |
|||
golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= |
|||
golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= |
|||
golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= |
|||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= |
|||
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/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-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= |
|||
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= |
|||
golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= |
|||
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= |
|||
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= |
|||
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= |
|||
golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= |
|||
golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= |
|||
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= |
|||
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-20181228144115-9a3f9b0469bb/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-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= |
|||
golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= |
|||
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-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= |
|||
golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= |
|||
golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= |
|||
golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= |
|||
golang.org/x/sys v0.0.0-20190610200419-93c9922d18ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= |
|||
golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= |
|||
golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= |
|||
golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= |
|||
golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= |
|||
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= |
|||
golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= |
|||
golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= |
|||
golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= |
|||
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= |
|||
golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= |
|||
golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= |
|||
golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= |
|||
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= |
|||
golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= |
|||
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= |
|||
golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= |
|||
golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= |
|||
golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= |
|||
golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= |
|||
golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= |
|||
golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= |
|||
golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= |
|||
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= |
|||
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= |
|||
golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= |
|||
golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= |
|||
golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= |
|||
golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= |
|||
golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= |
|||
golang.org/x/sys v0.0.0-20210420072515-93ed5bcd2bfe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= |
|||
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= |
|||
golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/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-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= |
|||
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= |
|||
golang.org/x/sys v0.0.0-20220224120231-95c6836cb0e7/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= |
|||
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= |
|||
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= |
|||
golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= |
|||
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= |
|||
golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= |
|||
golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= |
|||
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= |
|||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= |
|||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= |
|||
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= |
|||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= |
|||
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/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/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= |
|||
golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= |
|||
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= |
|||
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= |
|||
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= |
|||
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= |
|||
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= |
|||
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= |
|||
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= |
|||
golang.org/x/time v0.1.0 h1:xYY+Bajn2a7VBmTM5GikTmnK8ZuX8YgnQCqZpbBNtmA= |
|||
golang.org/x/time v0.1.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= |
|||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= |
|||
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= |
|||
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= |
|||
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= |
|||
golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= |
|||
golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= |
|||
golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= |
|||
golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= |
|||
golang.org/x/tools v0.0.0-20190425163242-31fd60d6bfdc/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= |
|||
golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= |
|||
golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= |
|||
golang.org/x/tools v0.0.0-20190606050223-4d9ae51c2468/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= |
|||
golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= |
|||
golang.org/x/tools v0.0.0-20190611222205-d73e1c7e250b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= |
|||
golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= |
|||
golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= |
|||
golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= |
|||
golang.org/x/tools v0.0.0-20190823170909-c4a336ef6a2f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= |
|||
golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= |
|||
golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= |
|||
golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= |
|||
golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= |
|||
golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= |
|||
golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= |
|||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= |
|||
golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= |
|||
golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= |
|||
golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= |
|||
golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= |
|||
golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= |
|||
golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= |
|||
golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= |
|||
golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= |
|||
golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= |
|||
golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= |
|||
golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= |
|||
golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= |
|||
golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= |
|||
golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= |
|||
golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= |
|||
golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= |
|||
golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= |
|||
golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= |
|||
golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= |
|||
golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= |
|||
golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= |
|||
golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= |
|||
golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= |
|||
golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= |
|||
golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= |
|||
golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= |
|||
golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= |
|||
golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= |
|||
golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= |
|||
golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= |
|||
golang.org/x/tools v0.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM= |
|||
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= |
|||
golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= |
|||
golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= |
|||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= |
|||
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= |
|||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= |
|||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= |
|||
google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= |
|||
google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= |
|||
google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= |
|||
google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= |
|||
google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= |
|||
google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= |
|||
google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= |
|||
google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= |
|||
google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= |
|||
google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= |
|||
google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= |
|||
google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= |
|||
google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= |
|||
google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= |
|||
google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= |
|||
google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= |
|||
google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= |
|||
google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= |
|||
google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= |
|||
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= |
|||
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= |
|||
google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= |
|||
google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= |
|||
google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= |
|||
google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= |
|||
google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= |
|||
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= |
|||
google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= |
|||
google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= |
|||
google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= |
|||
google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= |
|||
google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= |
|||
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= |
|||
google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= |
|||
google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= |
|||
google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= |
|||
google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= |
|||
google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= |
|||
google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= |
|||
google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= |
|||
google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= |
|||
google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= |
|||
google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= |
|||
google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= |
|||
google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= |
|||
google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= |
|||
google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= |
|||
google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= |
|||
google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= |
|||
google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= |
|||
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= |
|||
google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= |
|||
google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= |
|||
google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= |
|||
google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= |
|||
google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= |
|||
google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= |
|||
google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= |
|||
google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= |
|||
google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= |
|||
google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= |
|||
google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= |
|||
google.golang.org/genproto v0.0.0-20230629202037-9506855d4529 h1:9JucMWR7sPvCxUFd6UsOUNmA5kCcWOfORaT3tpAsKQs= |
|||
google.golang.org/genproto v0.0.0-20230629202037-9506855d4529/go.mod h1:xZnkP7mREFX5MORlOPEzLMr+90PPZQ2QWzrVTWfAq64= |
|||
google.golang.org/genproto/googleapis/api v0.0.0-20230629202037-9506855d4529 h1:s5YSX+ZH5b5vS9rnpGymvIyMpLRJizowqDlOuyjXnTk= |
|||
google.golang.org/genproto/googleapis/api v0.0.0-20230629202037-9506855d4529/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= |
|||
google.golang.org/genproto/googleapis/rpc v0.0.0-20230629202037-9506855d4529 h1:DEH99RbiLZhMxrpEJCZ0A+wdTe0EOgou/poSLx9vWf4= |
|||
google.golang.org/genproto/googleapis/rpc v0.0.0-20230629202037-9506855d4529/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= |
|||
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= |
|||
google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= |
|||
google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= |
|||
google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= |
|||
google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= |
|||
google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= |
|||
google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= |
|||
google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= |
|||
google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= |
|||
google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= |
|||
google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= |
|||
google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= |
|||
google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= |
|||
google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= |
|||
google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= |
|||
google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= |
|||
google.golang.org/grpc v1.56.1 h1:z0dNfjIl0VpaZ9iSVjA6daGatAYwPGstTjt5vkRMFkQ= |
|||
google.golang.org/grpc v1.56.1/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= |
|||
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= |
|||
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= |
|||
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= |
|||
google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= |
|||
google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= |
|||
google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= |
|||
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= |
|||
google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= |
|||
google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= |
|||
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= |
|||
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= |
|||
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= |
|||
google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= |
|||
google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= |
|||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= |
|||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= |
|||
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= |
|||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= |
|||
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/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE= |
|||
gopkg.in/go-playground/validator.v8 v8.18.2/go.mod h1:RX2a/7Ha8BgOhfk7j780h4/u/RRjR0eouCJSH80/M2Y= |
|||
gopkg.in/inconshreveable/log15.v2 v2.0.0-20180818164646-67afb5ed74ec/go.mod h1:aPpfJ7XW+gOuirDoZ8gHhLh3kZ1B08FtV2bbmy7Jv3s= |
|||
gopkg.in/ini.v1 v1.42.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= |
|||
gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= |
|||
gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= |
|||
gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8= |
|||
gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= |
|||
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/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= |
|||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= |
|||
gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= |
|||
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= |
|||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= |
|||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= |
|||
gorm.io/driver/mysql v1.3.2/go.mod h1:ChK6AHbHgDCFZyJp0F+BmVGb06PSIoh9uVYKAlRbb2U= |
|||
gorm.io/driver/mysql v1.5.2 h1:QC2HRskSE75wBuOxe0+iCkyJZ+RqpudsQtqkp+IMuXs= |
|||
gorm.io/driver/mysql v1.5.2/go.mod h1:pQLhh1Ut/WUAySdTHwBpBv6+JKcj+ua4ZFx1QQTBzb8= |
|||
gorm.io/driver/postgres v1.4.4 h1:zt1fxJ+C+ajparn0SteEnkoPg0BQ6wOWXEQ99bteAmw= |
|||
gorm.io/driver/postgres v1.4.4/go.mod h1:whNfh5WhhHs96honoLjBAMwJGYEuA3m1hvgUbNXhPCw= |
|||
gorm.io/driver/sqlserver v1.4.1 h1:t4r4r6Jam5E6ejqP7N82qAJIJAht27EGT41HyPfXRw0= |
|||
gorm.io/driver/sqlserver v1.4.1/go.mod h1:DJ4P+MeZbc5rvY58PnmN1Lnyvb5gw5NPzGshHDnJLig= |
|||
gorm.io/gorm v1.23.1/go.mod h1:l2lP/RyAtc1ynaTjFksBde/O8v9oOGIApu2/xRitmZk= |
|||
gorm.io/gorm v1.23.7/go.mod h1:l2lP/RyAtc1ynaTjFksBde/O8v9oOGIApu2/xRitmZk= |
|||
gorm.io/gorm v1.24.0/go.mod h1:DVrVomtaYTbqs7gB/x2uVvqnXzv0nqjB396B8cG4dBA= |
|||
gorm.io/gorm v1.25.2-0.20230530020048-26663ab9bf55/go.mod h1:L4uxeKpfBml98NYqVqwAdmV1a2nBtAec/cf3fpucW/k= |
|||
gorm.io/gorm v1.25.5 h1:zR9lOiiYf09VNh5Q1gphfyia1JpiClIWG9hQaxB/mls= |
|||
gorm.io/gorm v1.25.5/go.mod h1:hbnx/Oo0ChWMn1BIhpy1oYozzpM15i4YPuHDmfYtwg8= |
|||
gorm.io/plugin/dbresolver v1.3.0 h1:uFDX3bIuH9Lhj5LY2oyqR/bU6pqWuDgas35NAPF4X3M= |
|||
gorm.io/plugin/dbresolver v1.3.0/go.mod h1:Pr7p5+JFlgDaiM6sOrli5olekJD16YRunMyA2S7ZfKk= |
|||
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= |
|||
honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= |
|||
honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= |
|||
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= |
|||
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= |
|||
honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= |
|||
honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= |
|||
modernc.org/libc v1.22.2 h1:4U7v51GyhlWqQmwCHj28Rdq2Yzwk55ovjFrdPjs8Hb0= |
|||
modernc.org/libc v1.22.2/go.mod h1:uvQavJ1pZ0hIoC/jfqNoMLURIMhKzINIWypNM17puug= |
|||
modernc.org/mathutil v1.5.0 h1:rV0Ko/6SfM+8G+yKiyI830l3Wuz1zRutdslNoQ0kfiQ= |
|||
modernc.org/mathutil v1.5.0/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= |
|||
modernc.org/memory v1.5.0 h1:N+/8c5rE6EqugZwHii4IFsaJ7MUhoWX07J5tC/iI5Ds= |
|||
modernc.org/memory v1.5.0/go.mod h1:PkUhL0Mugw21sHPeskwZW4D6VscE/GQJOnIpCnW6pSU= |
|||
modernc.org/sqlite v1.20.3 h1:SqGJMMxjj1PHusLxdYxeQSodg7Jxn9WWkaAQjKrntZs= |
|||
modernc.org/sqlite v1.20.3/go.mod h1:zKcGyrICaxNTMEHSr1HQ2GUraP0j+845GYw37+EyT6A= |
|||
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= |
|||
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= |
|||
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= |
|||
xorm.io/builder v0.3.7/go.mod h1:aUW0S9eb9VCaPohFCH3j7czOx1PMW3i1HrSzbLYGBSE= |
|||
xorm.io/xorm v1.0.6/go.mod h1:uF9EtbhODq5kNWxMbnBEj8hRRZnlcNSz2t2N7HW/+A4= |
@ -0,0 +1,242 @@ |
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|||
// versions:
|
|||
// protoc-gen-go v1.28.0
|
|||
// protoc v4.23.4
|
|||
// source: email.proto
|
|||
|
|||
package api |
|||
|
|||
import ( |
|||
protoreflect "google.golang.org/protobuf/reflect/protoreflect" |
|||
protoimpl "google.golang.org/protobuf/runtime/protoimpl" |
|||
reflect "reflect" |
|||
sync "sync" |
|||
) |
|||
|
|||
const ( |
|||
// Verify that this generated code is sufficiently up-to-date.
|
|||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) |
|||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
|||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) |
|||
) |
|||
|
|||
type SendRequest struct { |
|||
state protoimpl.MessageState |
|||
sizeCache protoimpl.SizeCache |
|||
unknownFields protoimpl.UnknownFields |
|||
|
|||
//收件人 必填参数
|
|||
To []string `protobuf:"bytes,1,rep,name=to,proto3" json:"to,omitempty"` |
|||
//邮件主题,必填参数
|
|||
Subject string `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"` |
|||
//消息体,支持富文本
|
|||
Body string `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"` |
|||
} |
|||
|
|||
func (x *SendRequest) Reset() { |
|||
*x = SendRequest{} |
|||
if protoimpl.UnsafeEnabled { |
|||
mi := &file_email_proto_msgTypes[0] |
|||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
|||
ms.StoreMessageInfo(mi) |
|||
} |
|||
} |
|||
|
|||
func (x *SendRequest) String() string { |
|||
return protoimpl.X.MessageStringOf(x) |
|||
} |
|||
|
|||
func (*SendRequest) ProtoMessage() {} |
|||
|
|||
func (x *SendRequest) ProtoReflect() protoreflect.Message { |
|||
mi := &file_email_proto_msgTypes[0] |
|||
if protoimpl.UnsafeEnabled && x != nil { |
|||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
|||
if ms.LoadMessageInfo() == nil { |
|||
ms.StoreMessageInfo(mi) |
|||
} |
|||
return ms |
|||
} |
|||
return mi.MessageOf(x) |
|||
} |
|||
|
|||
// Deprecated: Use SendRequest.ProtoReflect.Descriptor instead.
|
|||
func (*SendRequest) Descriptor() ([]byte, []int) { |
|||
return file_email_proto_rawDescGZIP(), []int{0} |
|||
} |
|||
|
|||
func (x *SendRequest) GetTo() []string { |
|||
if x != nil { |
|||
return x.To |
|||
} |
|||
return nil |
|||
} |
|||
|
|||
func (x *SendRequest) GetSubject() string { |
|||
if x != nil { |
|||
return x.Subject |
|||
} |
|||
return "" |
|||
} |
|||
|
|||
func (x *SendRequest) GetBody() string { |
|||
if x != nil { |
|||
return x.Body |
|||
} |
|||
return "" |
|||
} |
|||
|
|||
// The response message containing the greetings
|
|||
type SendEmailReply struct { |
|||
state protoimpl.MessageState |
|||
sizeCache protoimpl.SizeCache |
|||
unknownFields protoimpl.UnknownFields |
|||
|
|||
Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` |
|||
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` |
|||
} |
|||
|
|||
func (x *SendEmailReply) Reset() { |
|||
*x = SendEmailReply{} |
|||
if protoimpl.UnsafeEnabled { |
|||
mi := &file_email_proto_msgTypes[1] |
|||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
|||
ms.StoreMessageInfo(mi) |
|||
} |
|||
} |
|||
|
|||
func (x *SendEmailReply) String() string { |
|||
return protoimpl.X.MessageStringOf(x) |
|||
} |
|||
|
|||
func (*SendEmailReply) ProtoMessage() {} |
|||
|
|||
func (x *SendEmailReply) ProtoReflect() protoreflect.Message { |
|||
mi := &file_email_proto_msgTypes[1] |
|||
if protoimpl.UnsafeEnabled && x != nil { |
|||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
|||
if ms.LoadMessageInfo() == nil { |
|||
ms.StoreMessageInfo(mi) |
|||
} |
|||
return ms |
|||
} |
|||
return mi.MessageOf(x) |
|||
} |
|||
|
|||
// Deprecated: Use SendEmailReply.ProtoReflect.Descriptor instead.
|
|||
func (*SendEmailReply) Descriptor() ([]byte, []int) { |
|||
return file_email_proto_rawDescGZIP(), []int{1} |
|||
} |
|||
|
|||
func (x *SendEmailReply) GetCode() int32 { |
|||
if x != nil { |
|||
return x.Code |
|||
} |
|||
return 0 |
|||
} |
|||
|
|||
func (x *SendEmailReply) GetMessage() string { |
|||
if x != nil { |
|||
return x.Message |
|||
} |
|||
return "" |
|||
} |
|||
|
|||
var File_email_proto protoreflect.FileDescriptor |
|||
|
|||
var file_email_proto_rawDesc = []byte{ |
|||
0x0a, 0x0b, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x03, 0x61, |
|||
0x70, 0x69, 0x22, 0x4b, 0x0a, 0x0b, 0x53, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, |
|||
0x74, 0x12, 0x0e, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x02, 0x74, |
|||
0x6f, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, |
|||
0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x62, |
|||
0x6f, 0x64, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x22, |
|||
0x3e, 0x0a, 0x0e, 0x53, 0x65, 0x6e, 0x64, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x70, 0x6c, |
|||
0x79, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, |
|||
0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, |
|||
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x32, |
|||
0x3d, 0x0a, 0x05, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x34, 0x0a, 0x09, 0x53, 0x65, 0x6e, 0x64, |
|||
0x45, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x10, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x6e, 0x64, |
|||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x65, |
|||
0x6e, 0x64, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x42, 0x10, |
|||
0x5a, 0x0e, 0x62, 0x6b, 0x62, 0x2d, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x2f, 0x61, 0x70, 0x69, |
|||
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, |
|||
} |
|||
|
|||
var ( |
|||
file_email_proto_rawDescOnce sync.Once |
|||
file_email_proto_rawDescData = file_email_proto_rawDesc |
|||
) |
|||
|
|||
func file_email_proto_rawDescGZIP() []byte { |
|||
file_email_proto_rawDescOnce.Do(func() { |
|||
file_email_proto_rawDescData = protoimpl.X.CompressGZIP(file_email_proto_rawDescData) |
|||
}) |
|||
return file_email_proto_rawDescData |
|||
} |
|||
|
|||
var file_email_proto_msgTypes = make([]protoimpl.MessageInfo, 2) |
|||
var file_email_proto_goTypes = []interface{}{ |
|||
(*SendRequest)(nil), // 0: api.SendRequest
|
|||
(*SendEmailReply)(nil), // 1: api.SendEmailReply
|
|||
} |
|||
var file_email_proto_depIdxs = []int32{ |
|||
0, // 0: api.Email.SendEmail:input_type -> api.SendRequest
|
|||
1, // 1: api.Email.SendEmail:output_type -> api.SendEmailReply
|
|||
1, // [1:2] is the sub-list for method output_type
|
|||
0, // [0:1] is the sub-list for method input_type
|
|||
0, // [0:0] is the sub-list for extension type_name
|
|||
0, // [0:0] is the sub-list for extension extendee
|
|||
0, // [0:0] is the sub-list for field type_name
|
|||
} |
|||
|
|||
func init() { file_email_proto_init() } |
|||
func file_email_proto_init() { |
|||
if File_email_proto != nil { |
|||
return |
|||
} |
|||
if !protoimpl.UnsafeEnabled { |
|||
file_email_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { |
|||
switch v := v.(*SendRequest); i { |
|||
case 0: |
|||
return &v.state |
|||
case 1: |
|||
return &v.sizeCache |
|||
case 2: |
|||
return &v.unknownFields |
|||
default: |
|||
return nil |
|||
} |
|||
} |
|||
file_email_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { |
|||
switch v := v.(*SendEmailReply); i { |
|||
case 0: |
|||
return &v.state |
|||
case 1: |
|||
return &v.sizeCache |
|||
case 2: |
|||
return &v.unknownFields |
|||
default: |
|||
return nil |
|||
} |
|||
} |
|||
} |
|||
type x struct{} |
|||
out := protoimpl.TypeBuilder{ |
|||
File: protoimpl.DescBuilder{ |
|||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), |
|||
RawDescriptor: file_email_proto_rawDesc, |
|||
NumEnums: 0, |
|||
NumMessages: 2, |
|||
NumExtensions: 0, |
|||
NumServices: 1, |
|||
}, |
|||
GoTypes: file_email_proto_goTypes, |
|||
DependencyIndexes: file_email_proto_depIdxs, |
|||
MessageInfos: file_email_proto_msgTypes, |
|||
}.Build() |
|||
File_email_proto = out.File |
|||
file_email_proto_rawDesc = nil |
|||
file_email_proto_goTypes = nil |
|||
file_email_proto_depIdxs = nil |
|||
} |
@ -0,0 +1,30 @@ |
|||
syntax = "proto3"; |
|||
|
|||
package api; |
|||
|
|||
|
|||
option go_package = "bkb-notify/api"; |
|||
|
|||
|
|||
// The Email service definition. |
|||
service Email { |
|||
// 发送一个邮件 |
|||
rpc SendEmail (SendRequest) returns (SendEmailReply) { |
|||
|
|||
} |
|||
} |
|||
|
|||
message SendRequest { |
|||
//收件人 必填参数 |
|||
repeated string to=1; |
|||
//邮件主题,必填参数 |
|||
string subject=2; |
|||
//消息体,支持富文本 |
|||
string body=3; |
|||
} |
|||
|
|||
// The response message containing the greetings |
|||
message SendEmailReply { |
|||
int32 code = 1; |
|||
string message = 2; |
|||
} |
@ -0,0 +1,107 @@ |
|||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|||
// versions:
|
|||
// - protoc-gen-go-grpc v1.2.0
|
|||
// - protoc v4.23.4
|
|||
// source: email.proto
|
|||
|
|||
package api |
|||
|
|||
import ( |
|||
context "context" |
|||
grpc "google.golang.org/grpc" |
|||
codes "google.golang.org/grpc/codes" |
|||
status "google.golang.org/grpc/status" |
|||
) |
|||
|
|||
// This is a compile-time assertion to ensure that this generated file
|
|||
// is compatible with the grpc package it is being compiled against.
|
|||
// Requires gRPC-Go v1.32.0 or later.
|
|||
const _ = grpc.SupportPackageIsVersion7 |
|||
|
|||
// EmailClient is the client API for Email service.
|
|||
//
|
|||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
|||
type EmailClient interface { |
|||
// 发送一个邮件
|
|||
SendEmail(ctx context.Context, in *SendRequest, opts ...grpc.CallOption) (*SendEmailReply, error) |
|||
} |
|||
|
|||
type emailClient struct { |
|||
cc grpc.ClientConnInterface |
|||
} |
|||
|
|||
func NewEmailClient(cc grpc.ClientConnInterface) EmailClient { |
|||
return &emailClient{cc} |
|||
} |
|||
|
|||
func (c *emailClient) SendEmail(ctx context.Context, in *SendRequest, opts ...grpc.CallOption) (*SendEmailReply, error) { |
|||
out := new(SendEmailReply) |
|||
err := c.cc.Invoke(ctx, "/api.Email/SendEmail", in, out, opts...) |
|||
if err != nil { |
|||
return nil, err |
|||
} |
|||
return out, nil |
|||
} |
|||
|
|||
// EmailServer is the server API for Email service.
|
|||
// All implementations must embed UnimplementedEmailServer
|
|||
// for forward compatibility
|
|||
type EmailServer interface { |
|||
// 发送一个邮件
|
|||
SendEmail(context.Context, *SendRequest) (*SendEmailReply, error) |
|||
mustEmbedUnimplementedEmailServer() |
|||
} |
|||
|
|||
// UnimplementedEmailServer must be embedded to have forward compatible implementations.
|
|||
type UnimplementedEmailServer struct { |
|||
} |
|||
|
|||
func (UnimplementedEmailServer) SendEmail(context.Context, *SendRequest) (*SendEmailReply, error) { |
|||
return nil, status.Errorf(codes.Unimplemented, "method SendEmail not implemented") |
|||
} |
|||
func (UnimplementedEmailServer) mustEmbedUnimplementedEmailServer() {} |
|||
|
|||
// UnsafeEmailServer may be embedded to opt out of forward compatibility for this service.
|
|||
// Use of this interface is not recommended, as added methods to EmailServer will
|
|||
// result in compilation errors.
|
|||
type UnsafeEmailServer interface { |
|||
mustEmbedUnimplementedEmailServer() |
|||
} |
|||
|
|||
func RegisterEmailServer(s grpc.ServiceRegistrar, srv EmailServer) { |
|||
s.RegisterService(&Email_ServiceDesc, srv) |
|||
} |
|||
|
|||
func _Email_SendEmail_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
|||
in := new(SendRequest) |
|||
if err := dec(in); err != nil { |
|||
return nil, err |
|||
} |
|||
if interceptor == nil { |
|||
return srv.(EmailServer).SendEmail(ctx, in) |
|||
} |
|||
info := &grpc.UnaryServerInfo{ |
|||
Server: srv, |
|||
FullMethod: "/api.Email/SendEmail", |
|||
} |
|||
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
|||
return srv.(EmailServer).SendEmail(ctx, req.(*SendRequest)) |
|||
} |
|||
return interceptor(ctx, in, info, handler) |
|||
} |
|||
|
|||
// Email_ServiceDesc is the grpc.ServiceDesc for Email service.
|
|||
// It's only intended for direct use with grpc.RegisterService,
|
|||
// and not to be introspected or modified (even as a copy)
|
|||
var Email_ServiceDesc = grpc.ServiceDesc{ |
|||
ServiceName: "api.Email", |
|||
HandlerType: (*EmailServer)(nil), |
|||
Methods: []grpc.MethodDesc{ |
|||
{ |
|||
MethodName: "SendEmail", |
|||
Handler: _Email_SendEmail_Handler, |
|||
}, |
|||
}, |
|||
Streams: []grpc.StreamDesc{}, |
|||
Metadata: "email.proto", |
|||
} |
File diff suppressed because it is too large
@ -0,0 +1,257 @@ |
|||
syntax = "proto3"; |
|||
|
|||
package api; |
|||
|
|||
import "google/api/annotations.proto"; |
|||
import "google/protobuf/empty.proto"; |
|||
|
|||
option go_package = "bkb-payment/api"; |
|||
|
|||
|
|||
// The greeting service definition. |
|||
service Greeter { |
|||
// Sends a greeting |
|||
rpc Ping (google.protobuf.Empty) returns (PingReply) { |
|||
option (google.api.http) = { |
|||
get: "/ping" |
|||
}; |
|||
} |
|||
rpc CountryList (google.protobuf.Empty) returns (CountryReply) { |
|||
option (google.api.http) = { |
|||
get: "/country/list" |
|||
}; |
|||
} |
|||
rpc DistrictCascade (DistrictRequest) returns (DistrictReply) { |
|||
option (google.api.http) = { |
|||
get: "/district/cascade" |
|||
}; |
|||
} |
|||
rpc PayConsult (PayConsultRequest) returns (PayConsultReply) {} |
|||
rpc PayTransactionWebUrl (PayTransRequest) returns (WebPayResponse) {} |
|||
rpc PaypalPayback (PaypalWebhook) returns (PaypalPaybackResp) { |
|||
option (google.api.http) = { |
|||
post: "/paypal/callback" |
|||
body: "*" |
|||
}; |
|||
} |
|||
rpc AlipayGPayback (AlipayGWebhook) returns (AlipayGPaybackResp) { |
|||
option (google.api.http) = { |
|||
post: "/alipay-g/callback" |
|||
body: "*" |
|||
}; |
|||
} |
|||
rpc AlipayGCapture (AlipayGWebhook) returns (AlipayGPaybackResp) { |
|||
option (google.api.http) = { |
|||
post: "/alipay-g/capture" |
|||
body: "*" |
|||
}; |
|||
} |
|||
rpc PayoutsWebUrl (PayoutRequest) returns (WebPayResponse) { |
|||
option (google.api.http) = { |
|||
post: "/pay/payouts" |
|||
body: "*" |
|||
}; |
|||
} |
|||
rpc GetPayTransaction (google.protobuf.Empty) returns (GetPayTransactionResp) { |
|||
option (google.api.http) = { |
|||
get: "/pay/transaction/outTradeNo" |
|||
}; |
|||
} |
|||
rpc CancelBill (CancelBillRequest) returns (PingReply) {} |
|||
rpc RefundBill (RefundRequest) returns (RefundResponse) {} |
|||
} |
|||
|
|||
// The response message containing the greetings |
|||
message PingReply { |
|||
string message = 1; |
|||
} |
|||
message Country { |
|||
int32 id = 1; |
|||
string name = 2; |
|||
} |
|||
message CountryReply { |
|||
repeated Country list = 1; |
|||
} |
|||
message DistrictRequest { |
|||
int32 country = 1; |
|||
} |
|||
message District { |
|||
string label = 1; |
|||
string adcode = 2; |
|||
int32 parent_id = 3; |
|||
repeated District children = 4; |
|||
} |
|||
message DistrictReply { |
|||
repeated District list = 1; |
|||
} |
|||
message PayConsultRequest { |
|||
string appid = 1; |
|||
double amount = 2; |
|||
string currency = 3; |
|||
string pay_channel = 4; |
|||
string user_region = 5; |
|||
string os_type = 6; |
|||
string terminal_type = 7; |
|||
} |
|||
message PaymentMethod { |
|||
string logo_name = 1; |
|||
string logo_url = 2; |
|||
string type_value = 3; |
|||
string category = 4; |
|||
bool enabled = 5; |
|||
} |
|||
message PayConsultReply { |
|||
repeated PaymentMethod list = 1; |
|||
} |
|||
message PayTransRequest { |
|||
string appid = 1; |
|||
string mchid = 2; |
|||
string out_trade_no = 3; |
|||
string attach = 4; |
|||
string notify_url = 5; |
|||
double amount = 6; |
|||
string currency = 7; |
|||
string pay_channel = 8; |
|||
string return_url = 9; |
|||
string cancel_url = 10; |
|||
string description = 11; |
|||
string os_type = 12; |
|||
string terminal_type = 13; |
|||
string payment_method = 14; |
|||
} |
|||
message WebPayResponse { |
|||
string pay_channel = 1; |
|||
string pay_id = 2; |
|||
string pay_return = 3; |
|||
string pay_status = 4; |
|||
} |
|||
message PaybackRequest { |
|||
string mchid = 1; |
|||
string pay_channel = 2; |
|||
string pay_id = 3; |
|||
string event_type = 4; |
|||
} |
|||
message PaypalPaybackResp { |
|||
string out_trade_no = 1; |
|||
string trade_state = 2; |
|||
string message = 3; |
|||
} |
|||
message PayoutRequest { |
|||
string appid = 1; |
|||
string mchid = 2; |
|||
string out_trade_no = 3; |
|||
string attach = 4; |
|||
string notify_url = 5; |
|||
double amount = 6; |
|||
string currency = 7; |
|||
string pay_channel = 8; |
|||
string paypal_name = 9; |
|||
} |
|||
message GetPayTransOutTradeNoRequest { |
|||
string appid = 1; |
|||
string mchid = 2; |
|||
string out_trade_no = 3; |
|||
} |
|||
message GetPayTransactionResp { |
|||
GetPayTransaction data = 1; |
|||
} |
|||
message GetPayTransaction { |
|||
string appid = 1; |
|||
string mchid = 2; |
|||
} |
|||
message CancelBillRequest { |
|||
string appid = 1; |
|||
string mchid = 2; |
|||
string transaction_id = 3; |
|||
} |
|||
message RefundRequest { |
|||
string appid = 1; |
|||
string mchid = 2; |
|||
string out_trade_no = 3; |
|||
string pay_id = 4; |
|||
string attach = 5; |
|||
string notify_url = 6; |
|||
double amount = 7; |
|||
string description = 8; |
|||
} |
|||
message RefundResponse { |
|||
string refund_status = 1; |
|||
string refund_id = 2; |
|||
} |
|||
message PaypalWebhook { |
|||
string id = 1; |
|||
string create_time = 2; |
|||
string resource_type = 3; |
|||
string event_type = 4; |
|||
string summary = 5; |
|||
PaybackResource resource = 6; |
|||
} |
|||
message PaybackResource { |
|||
string id = 1; |
|||
string create_time = 2; |
|||
string update_time = 3; |
|||
string state = 4; |
|||
string status = 5; |
|||
repeated PurchaseUnit purchase_units = 6; |
|||
BatchHeader batch_header = 7; |
|||
} |
|||
message PurchaseUnit { |
|||
Payment payments = 1; |
|||
} |
|||
message Payment { |
|||
repeated Capture captures = 1; |
|||
} |
|||
message BatchHeader { |
|||
string batch_status = 1; |
|||
string payout_batch_id = 2; |
|||
SenderBatchHeader sender_batch_header = 3; |
|||
} |
|||
message SenderBatchHeader { |
|||
string sender_batch_id = 1; |
|||
} |
|||
message Capture { |
|||
string id = 1; |
|||
string status = 2; |
|||
string create_time = 3; |
|||
string update_time = 4; |
|||
} |
|||
message AlipayGResult { |
|||
string result_code = 1; |
|||
string result_status = 2; |
|||
string result_message = 3; |
|||
} |
|||
message AlipayGAmount { |
|||
string value = 1; |
|||
string currency = 2; |
|||
} |
|||
message AlipayQuote { |
|||
bool guaranteed = 1; |
|||
string quote_currency_pair = 2; |
|||
string quote_expiry_time = 3; |
|||
string quote_id = 4; |
|||
double quote_price = 5; |
|||
string quote_start_time = 6; |
|||
} |
|||
message AlipayGWebhook { |
|||
string notify_type = 1; |
|||
AlipayGResult result = 2; |
|||
string payment_request_id = 3; |
|||
string payment_id = 4; |
|||
AlipayGAmount payment_amount = 5; |
|||
string payment_create_time = 6; |
|||
string payment_time = 7; |
|||
string capture_request_id = 8; |
|||
string capture_id = 9; |
|||
AlipayGAmount capture_amount = 10; |
|||
string capture_time = 11; |
|||
string refund_status = 12; |
|||
string refund_request_id = 13; |
|||
string refund_id = 14; |
|||
AlipayGAmount refund_amount = 15; |
|||
string refund_time = 16; |
|||
AlipayGAmount gross_settlement_amount = 17; |
|||
AlipayQuote settlement_quote = 18; |
|||
} |
|||
message AlipayGPaybackResp { |
|||
AlipayGResult result = 1; |
|||
} |
@ -0,0 +1,519 @@ |
|||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|||
// versions:
|
|||
// - protoc-gen-go-grpc v1.3.0
|
|||
// - protoc v3.21.12
|
|||
// source: greeter.proto
|
|||
|
|||
package api |
|||
|
|||
import ( |
|||
context "context" |
|||
grpc "google.golang.org/grpc" |
|||
codes "google.golang.org/grpc/codes" |
|||
status "google.golang.org/grpc/status" |
|||
emptypb "google.golang.org/protobuf/types/known/emptypb" |
|||
) |
|||
|
|||
// This is a compile-time assertion to ensure that this generated file
|
|||
// is compatible with the grpc package it is being compiled against.
|
|||
// Requires gRPC-Go v1.32.0 or later.
|
|||
const _ = grpc.SupportPackageIsVersion7 |
|||
|
|||
const ( |
|||
Greeter_Ping_FullMethodName = "/api.Greeter/Ping" |
|||
Greeter_CountryList_FullMethodName = "/api.Greeter/CountryList" |
|||
Greeter_DistrictCascade_FullMethodName = "/api.Greeter/DistrictCascade" |
|||
Greeter_PayConsult_FullMethodName = "/api.Greeter/PayConsult" |
|||
Greeter_PayTransactionWebUrl_FullMethodName = "/api.Greeter/PayTransactionWebUrl" |
|||
Greeter_PaypalPayback_FullMethodName = "/api.Greeter/PaypalPayback" |
|||
Greeter_AlipayGPayback_FullMethodName = "/api.Greeter/AlipayGPayback" |
|||
Greeter_AlipayGCapture_FullMethodName = "/api.Greeter/AlipayGCapture" |
|||
Greeter_PayoutsWebUrl_FullMethodName = "/api.Greeter/PayoutsWebUrl" |
|||
Greeter_GetPayTransaction_FullMethodName = "/api.Greeter/GetPayTransaction" |
|||
Greeter_CancelBill_FullMethodName = "/api.Greeter/CancelBill" |
|||
Greeter_RefundBill_FullMethodName = "/api.Greeter/RefundBill" |
|||
) |
|||
|
|||
// GreeterClient is the client API for Greeter service.
|
|||
//
|
|||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
|||
type GreeterClient interface { |
|||
// Sends a greeting
|
|||
Ping(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*PingReply, error) |
|||
CountryList(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*CountryReply, error) |
|||
DistrictCascade(ctx context.Context, in *DistrictRequest, opts ...grpc.CallOption) (*DistrictReply, error) |
|||
PayConsult(ctx context.Context, in *PayConsultRequest, opts ...grpc.CallOption) (*PayConsultReply, error) |
|||
PayTransactionWebUrl(ctx context.Context, in *PayTransRequest, opts ...grpc.CallOption) (*WebPayResponse, error) |
|||
PaypalPayback(ctx context.Context, in *PaypalWebhook, opts ...grpc.CallOption) (*PaypalPaybackResp, error) |
|||
AlipayGPayback(ctx context.Context, in *AlipayGWebhook, opts ...grpc.CallOption) (*AlipayGPaybackResp, error) |
|||
AlipayGCapture(ctx context.Context, in *AlipayGWebhook, opts ...grpc.CallOption) (*AlipayGPaybackResp, error) |
|||
PayoutsWebUrl(ctx context.Context, in *PayoutRequest, opts ...grpc.CallOption) (*WebPayResponse, error) |
|||
GetPayTransaction(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetPayTransactionResp, error) |
|||
CancelBill(ctx context.Context, in *CancelBillRequest, opts ...grpc.CallOption) (*PingReply, error) |
|||
RefundBill(ctx context.Context, in *RefundRequest, opts ...grpc.CallOption) (*RefundResponse, error) |
|||
} |
|||
|
|||
type greeterClient struct { |
|||
cc grpc.ClientConnInterface |
|||
} |
|||
|
|||
func NewGreeterClient(cc grpc.ClientConnInterface) GreeterClient { |
|||
return &greeterClient{cc} |
|||
} |
|||
|
|||
func (c *greeterClient) Ping(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*PingReply, error) { |
|||
out := new(PingReply) |
|||
err := c.cc.Invoke(ctx, Greeter_Ping_FullMethodName, in, out, opts...) |
|||
if err != nil { |
|||
return nil, err |
|||
} |
|||
return out, nil |
|||
} |
|||
|
|||
func (c *greeterClient) CountryList(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*CountryReply, error) { |
|||
out := new(CountryReply) |
|||
err := c.cc.Invoke(ctx, Greeter_CountryList_FullMethodName, in, out, opts...) |
|||
if err != nil { |
|||
return nil, err |
|||
} |
|||
return out, nil |
|||
} |
|||
|
|||
func (c *greeterClient) DistrictCascade(ctx context.Context, in *DistrictRequest, opts ...grpc.CallOption) (*DistrictReply, error) { |
|||
out := new(DistrictReply) |
|||
err := c.cc.Invoke(ctx, Greeter_DistrictCascade_FullMethodName, in, out, opts...) |
|||
if err != nil { |
|||
return nil, err |
|||
} |
|||
return out, nil |
|||
} |
|||
|
|||
func (c *greeterClient) PayConsult(ctx context.Context, in *PayConsultRequest, opts ...grpc.CallOption) (*PayConsultReply, error) { |
|||
out := new(PayConsultReply) |
|||
err := c.cc.Invoke(ctx, Greeter_PayConsult_FullMethodName, in, out, opts...) |
|||
if err != nil { |
|||
return nil, err |
|||
} |
|||
return out, nil |
|||
} |
|||
|
|||
func (c *greeterClient) PayTransactionWebUrl(ctx context.Context, in *PayTransRequest, opts ...grpc.CallOption) (*WebPayResponse, error) { |
|||
out := new(WebPayResponse) |
|||
err := c.cc.Invoke(ctx, Greeter_PayTransactionWebUrl_FullMethodName, in, out, opts...) |
|||
if err != nil { |
|||
return nil, err |
|||
} |
|||
return out, nil |
|||
} |
|||
|
|||
func (c *greeterClient) PaypalPayback(ctx context.Context, in *PaypalWebhook, opts ...grpc.CallOption) (*PaypalPaybackResp, error) { |
|||
out := new(PaypalPaybackResp) |
|||
err := c.cc.Invoke(ctx, Greeter_PaypalPayback_FullMethodName, in, out, opts...) |
|||
if err != nil { |
|||
return nil, err |
|||
} |
|||
return out, nil |
|||
} |
|||
|
|||
func (c *greeterClient) AlipayGPayback(ctx context.Context, in *AlipayGWebhook, opts ...grpc.CallOption) (*AlipayGPaybackResp, error) { |
|||
out := new(AlipayGPaybackResp) |
|||
err := c.cc.Invoke(ctx, Greeter_AlipayGPayback_FullMethodName, in, out, opts...) |
|||
if err != nil { |
|||
return nil, err |
|||
} |
|||
return out, nil |
|||
} |
|||
|
|||
func (c *greeterClient) AlipayGCapture(ctx context.Context, in *AlipayGWebhook, opts ...grpc.CallOption) (*AlipayGPaybackResp, error) { |
|||
out := new(AlipayGPaybackResp) |
|||
err := c.cc.Invoke(ctx, Greeter_AlipayGCapture_FullMethodName, in, out, opts...) |
|||
if err != nil { |
|||
return nil, err |
|||
} |
|||
return out, nil |
|||
} |
|||
|
|||
func (c *greeterClient) PayoutsWebUrl(ctx context.Context, in *PayoutRequest, opts ...grpc.CallOption) (*WebPayResponse, error) { |
|||
out := new(WebPayResponse) |
|||
err := c.cc.Invoke(ctx, Greeter_PayoutsWebUrl_FullMethodName, in, out, opts...) |
|||
if err != nil { |
|||
return nil, err |
|||
} |
|||
return out, nil |
|||
} |
|||
|
|||
func (c *greeterClient) GetPayTransaction(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetPayTransactionResp, error) { |
|||
out := new(GetPayTransactionResp) |
|||
err := c.cc.Invoke(ctx, Greeter_GetPayTransaction_FullMethodName, in, out, opts...) |
|||
if err != nil { |
|||
return nil, err |
|||
} |
|||
return out, nil |
|||
} |
|||
|
|||
func (c *greeterClient) CancelBill(ctx context.Context, in *CancelBillRequest, opts ...grpc.CallOption) (*PingReply, error) { |
|||
out := new(PingReply) |
|||
err := c.cc.Invoke(ctx, Greeter_CancelBill_FullMethodName, in, out, opts...) |
|||
if err != nil { |
|||
return nil, err |
|||
} |
|||
return out, nil |
|||
} |
|||
|
|||
func (c *greeterClient) RefundBill(ctx context.Context, in *RefundRequest, opts ...grpc.CallOption) (*RefundResponse, error) { |
|||
out := new(RefundResponse) |
|||
err := c.cc.Invoke(ctx, Greeter_RefundBill_FullMethodName, in, out, opts...) |
|||
if err != nil { |
|||
return nil, err |
|||
} |
|||
return out, nil |
|||
} |
|||
|
|||
// GreeterServer is the server API for Greeter service.
|
|||
// All implementations must embed UnimplementedGreeterServer
|
|||
// for forward compatibility
|
|||
type GreeterServer interface { |
|||
// Sends a greeting
|
|||
Ping(context.Context, *emptypb.Empty) (*PingReply, error) |
|||
CountryList(context.Context, *emptypb.Empty) (*CountryReply, error) |
|||
DistrictCascade(context.Context, *DistrictRequest) (*DistrictReply, error) |
|||
PayConsult(context.Context, *PayConsultRequest) (*PayConsultReply, error) |
|||
PayTransactionWebUrl(context.Context, *PayTransRequest) (*WebPayResponse, error) |
|||
PaypalPayback(context.Context, *PaypalWebhook) (*PaypalPaybackResp, error) |
|||
AlipayGPayback(context.Context, *AlipayGWebhook) (*AlipayGPaybackResp, error) |
|||
AlipayGCapture(context.Context, *AlipayGWebhook) (*AlipayGPaybackResp, error) |
|||
PayoutsWebUrl(context.Context, *PayoutRequest) (*WebPayResponse, error) |
|||
GetPayTransaction(context.Context, *emptypb.Empty) (*GetPayTransactionResp, error) |
|||
CancelBill(context.Context, *CancelBillRequest) (*PingReply, error) |
|||
RefundBill(context.Context, *RefundRequest) (*RefundResponse, error) |
|||
mustEmbedUnimplementedGreeterServer() |
|||
} |
|||
|
|||
// UnimplementedGreeterServer must be embedded to have forward compatible implementations.
|
|||
type UnimplementedGreeterServer struct { |
|||
} |
|||
|
|||
func (UnimplementedGreeterServer) Ping(context.Context, *emptypb.Empty) (*PingReply, error) { |
|||
return nil, status.Errorf(codes.Unimplemented, "method Ping not implemented") |
|||
} |
|||
func (UnimplementedGreeterServer) CountryList(context.Context, *emptypb.Empty) (*CountryReply, error) { |
|||
return nil, status.Errorf(codes.Unimplemented, "method CountryList not implemented") |
|||
} |
|||
func (UnimplementedGreeterServer) DistrictCascade(context.Context, *DistrictRequest) (*DistrictReply, error) { |
|||
return nil, status.Errorf(codes.Unimplemented, "method DistrictCascade not implemented") |
|||
} |
|||
func (UnimplementedGreeterServer) PayConsult(context.Context, *PayConsultRequest) (*PayConsultReply, error) { |
|||
return nil, status.Errorf(codes.Unimplemented, "method PayConsult not implemented") |
|||
} |
|||
func (UnimplementedGreeterServer) PayTransactionWebUrl(context.Context, *PayTransRequest) (*WebPayResponse, error) { |
|||
return nil, status.Errorf(codes.Unimplemented, "method PayTransactionWebUrl not implemented") |
|||
} |
|||
func (UnimplementedGreeterServer) PaypalPayback(context.Context, *PaypalWebhook) (*PaypalPaybackResp, error) { |
|||
return nil, status.Errorf(codes.Unimplemented, "method PaypalPayback not implemented") |
|||
} |
|||
func (UnimplementedGreeterServer) AlipayGPayback(context.Context, *AlipayGWebhook) (*AlipayGPaybackResp, error) { |
|||
return nil, status.Errorf(codes.Unimplemented, "method AlipayGPayback not implemented") |
|||
} |
|||
func (UnimplementedGreeterServer) AlipayGCapture(context.Context, *AlipayGWebhook) (*AlipayGPaybackResp, error) { |
|||
return nil, status.Errorf(codes.Unimplemented, "method AlipayGCapture not implemented") |
|||
} |
|||
func (UnimplementedGreeterServer) PayoutsWebUrl(context.Context, *PayoutRequest) (*WebPayResponse, error) { |
|||
return nil, status.Errorf(codes.Unimplemented, "method PayoutsWebUrl not implemented") |
|||
} |
|||
func (UnimplementedGreeterServer) GetPayTransaction(context.Context, *emptypb.Empty) (*GetPayTransactionResp, error) { |
|||
return nil, status.Errorf(codes.Unimplemented, "method GetPayTransaction not implemented") |
|||
} |
|||
func (UnimplementedGreeterServer) CancelBill(context.Context, *CancelBillRequest) (*PingReply, error) { |
|||
return nil, status.Errorf(codes.Unimplemented, "method CancelBill not implemented") |
|||
} |
|||
func (UnimplementedGreeterServer) RefundBill(context.Context, *RefundRequest) (*RefundResponse, error) { |
|||
return nil, status.Errorf(codes.Unimplemented, "method RefundBill not implemented") |
|||
} |
|||
func (UnimplementedGreeterServer) mustEmbedUnimplementedGreeterServer() {} |
|||
|
|||
// UnsafeGreeterServer may be embedded to opt out of forward compatibility for this service.
|
|||
// Use of this interface is not recommended, as added methods to GreeterServer will
|
|||
// result in compilation errors.
|
|||
type UnsafeGreeterServer interface { |
|||
mustEmbedUnimplementedGreeterServer() |
|||
} |
|||
|
|||
func RegisterGreeterServer(s grpc.ServiceRegistrar, srv GreeterServer) { |
|||
s.RegisterService(&Greeter_ServiceDesc, srv) |
|||
} |
|||
|
|||
func _Greeter_Ping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
|||
in := new(emptypb.Empty) |
|||
if err := dec(in); err != nil { |
|||
return nil, err |
|||
} |
|||
if interceptor == nil { |
|||
return srv.(GreeterServer).Ping(ctx, in) |
|||
} |
|||
info := &grpc.UnaryServerInfo{ |
|||
Server: srv, |
|||
FullMethod: Greeter_Ping_FullMethodName, |
|||
} |
|||
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
|||
return srv.(GreeterServer).Ping(ctx, req.(*emptypb.Empty)) |
|||
} |
|||
return interceptor(ctx, in, info, handler) |
|||
} |
|||
|
|||
func _Greeter_CountryList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
|||
in := new(emptypb.Empty) |
|||
if err := dec(in); err != nil { |
|||
return nil, err |
|||
} |
|||
if interceptor == nil { |
|||
return srv.(GreeterServer).CountryList(ctx, in) |
|||
} |
|||
info := &grpc.UnaryServerInfo{ |
|||
Server: srv, |
|||
FullMethod: Greeter_CountryList_FullMethodName, |
|||
} |
|||
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
|||
return srv.(GreeterServer).CountryList(ctx, req.(*emptypb.Empty)) |
|||
} |
|||
return interceptor(ctx, in, info, handler) |
|||
} |
|||
|
|||
func _Greeter_DistrictCascade_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
|||
in := new(DistrictRequest) |
|||
if err := dec(in); err != nil { |
|||
return nil, err |
|||
} |
|||
if interceptor == nil { |
|||
return srv.(GreeterServer).DistrictCascade(ctx, in) |
|||
} |
|||
info := &grpc.UnaryServerInfo{ |
|||
Server: srv, |
|||
FullMethod: Greeter_DistrictCascade_FullMethodName, |
|||
} |
|||
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
|||
return srv.(GreeterServer).DistrictCascade(ctx, req.(*DistrictRequest)) |
|||
} |
|||
return interceptor(ctx, in, info, handler) |
|||
} |
|||
|
|||
func _Greeter_PayConsult_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
|||
in := new(PayConsultRequest) |
|||
if err := dec(in); err != nil { |
|||
return nil, err |
|||
} |
|||
if interceptor == nil { |
|||
return srv.(GreeterServer).PayConsult(ctx, in) |
|||
} |
|||
info := &grpc.UnaryServerInfo{ |
|||
Server: srv, |
|||
FullMethod: Greeter_PayConsult_FullMethodName, |
|||
} |
|||
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
|||
return srv.(GreeterServer).PayConsult(ctx, req.(*PayConsultRequest)) |
|||
} |
|||
return interceptor(ctx, in, info, handler) |
|||
} |
|||
|
|||
func _Greeter_PayTransactionWebUrl_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
|||
in := new(PayTransRequest) |
|||
if err := dec(in); err != nil { |
|||
return nil, err |
|||
} |
|||
if interceptor == nil { |
|||
return srv.(GreeterServer).PayTransactionWebUrl(ctx, in) |
|||
} |
|||
info := &grpc.UnaryServerInfo{ |
|||
Server: srv, |
|||
FullMethod: Greeter_PayTransactionWebUrl_FullMethodName, |
|||
} |
|||
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
|||
return srv.(GreeterServer).PayTransactionWebUrl(ctx, req.(*PayTransRequest)) |
|||
} |
|||
return interceptor(ctx, in, info, handler) |
|||
} |
|||
|
|||
func _Greeter_PaypalPayback_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
|||
in := new(PaypalWebhook) |
|||
if err := dec(in); err != nil { |
|||
return nil, err |
|||
} |
|||
if interceptor == nil { |
|||
return srv.(GreeterServer).PaypalPayback(ctx, in) |
|||
} |
|||
info := &grpc.UnaryServerInfo{ |
|||
Server: srv, |
|||
FullMethod: Greeter_PaypalPayback_FullMethodName, |
|||
} |
|||
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
|||
return srv.(GreeterServer).PaypalPayback(ctx, req.(*PaypalWebhook)) |
|||
} |
|||
return interceptor(ctx, in, info, handler) |
|||
} |
|||
|
|||
func _Greeter_AlipayGPayback_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
|||
in := new(AlipayGWebhook) |
|||
if err := dec(in); err != nil { |
|||
return nil, err |
|||
} |
|||
if interceptor == nil { |
|||
return srv.(GreeterServer).AlipayGPayback(ctx, in) |
|||
} |
|||
info := &grpc.UnaryServerInfo{ |
|||
Server: srv, |
|||
FullMethod: Greeter_AlipayGPayback_FullMethodName, |
|||
} |
|||
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
|||
return srv.(GreeterServer).AlipayGPayback(ctx, req.(*AlipayGWebhook)) |
|||
} |
|||
return interceptor(ctx, in, info, handler) |
|||
} |
|||
|
|||
func _Greeter_AlipayGCapture_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
|||
in := new(AlipayGWebhook) |
|||
if err := dec(in); err != nil { |
|||
return nil, err |
|||
} |
|||
if interceptor == nil { |
|||
return srv.(GreeterServer).AlipayGCapture(ctx, in) |
|||
} |
|||
info := &grpc.UnaryServerInfo{ |
|||
Server: srv, |
|||
FullMethod: Greeter_AlipayGCapture_FullMethodName, |
|||
} |
|||
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
|||
return srv.(GreeterServer).AlipayGCapture(ctx, req.(*AlipayGWebhook)) |
|||
} |
|||
return interceptor(ctx, in, info, handler) |
|||
} |
|||
|
|||
func _Greeter_PayoutsWebUrl_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
|||
in := new(PayoutRequest) |
|||
if err := dec(in); err != nil { |
|||
return nil, err |
|||
} |
|||
if interceptor == nil { |
|||
return srv.(GreeterServer).PayoutsWebUrl(ctx, in) |
|||
} |
|||
info := &grpc.UnaryServerInfo{ |
|||
Server: srv, |
|||
FullMethod: Greeter_PayoutsWebUrl_FullMethodName, |
|||
} |
|||
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
|||
return srv.(GreeterServer).PayoutsWebUrl(ctx, req.(*PayoutRequest)) |
|||
} |
|||
return interceptor(ctx, in, info, handler) |
|||
} |
|||
|
|||
func _Greeter_GetPayTransaction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
|||
in := new(emptypb.Empty) |
|||
if err := dec(in); err != nil { |
|||
return nil, err |
|||
} |
|||
if interceptor == nil { |
|||
return srv.(GreeterServer).GetPayTransaction(ctx, in) |
|||
} |
|||
info := &grpc.UnaryServerInfo{ |
|||
Server: srv, |
|||
FullMethod: Greeter_GetPayTransaction_FullMethodName, |
|||
} |
|||
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
|||
return srv.(GreeterServer).GetPayTransaction(ctx, req.(*emptypb.Empty)) |
|||
} |
|||
return interceptor(ctx, in, info, handler) |
|||
} |
|||
|
|||
func _Greeter_CancelBill_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
|||
in := new(CancelBillRequest) |
|||
if err := dec(in); err != nil { |
|||
return nil, err |
|||
} |
|||
if interceptor == nil { |
|||
return srv.(GreeterServer).CancelBill(ctx, in) |
|||
} |
|||
info := &grpc.UnaryServerInfo{ |
|||
Server: srv, |
|||
FullMethod: Greeter_CancelBill_FullMethodName, |
|||
} |
|||
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
|||
return srv.(GreeterServer).CancelBill(ctx, req.(*CancelBillRequest)) |
|||
} |
|||
return interceptor(ctx, in, info, handler) |
|||
} |
|||
|
|||
func _Greeter_RefundBill_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
|||
in := new(RefundRequest) |
|||
if err := dec(in); err != nil { |
|||
return nil, err |
|||
} |
|||
if interceptor == nil { |
|||
return srv.(GreeterServer).RefundBill(ctx, in) |
|||
} |
|||
info := &grpc.UnaryServerInfo{ |
|||
Server: srv, |
|||
FullMethod: Greeter_RefundBill_FullMethodName, |
|||
} |
|||
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
|||
return srv.(GreeterServer).RefundBill(ctx, req.(*RefundRequest)) |
|||
} |
|||
return interceptor(ctx, in, info, handler) |
|||
} |
|||
|
|||
// Greeter_ServiceDesc is the grpc.ServiceDesc for Greeter service.
|
|||
// It's only intended for direct use with grpc.RegisterService,
|
|||
// and not to be introspected or modified (even as a copy)
|
|||
var Greeter_ServiceDesc = grpc.ServiceDesc{ |
|||
ServiceName: "api.Greeter", |
|||
HandlerType: (*GreeterServer)(nil), |
|||
Methods: []grpc.MethodDesc{ |
|||
{ |
|||
MethodName: "Ping", |
|||
Handler: _Greeter_Ping_Handler, |
|||
}, |
|||
{ |
|||
MethodName: "CountryList", |
|||
Handler: _Greeter_CountryList_Handler, |
|||
}, |
|||
{ |
|||
MethodName: "DistrictCascade", |
|||
Handler: _Greeter_DistrictCascade_Handler, |
|||
}, |
|||
{ |
|||
MethodName: "PayConsult", |
|||
Handler: _Greeter_PayConsult_Handler, |
|||
}, |
|||
{ |
|||
MethodName: "PayTransactionWebUrl", |
|||
Handler: _Greeter_PayTransactionWebUrl_Handler, |
|||
}, |
|||
{ |
|||
MethodName: "PaypalPayback", |
|||
Handler: _Greeter_PaypalPayback_Handler, |
|||
}, |
|||
{ |
|||
MethodName: "AlipayGPayback", |
|||
Handler: _Greeter_AlipayGPayback_Handler, |
|||
}, |
|||
{ |
|||
MethodName: "AlipayGCapture", |
|||
Handler: _Greeter_AlipayGCapture_Handler, |
|||
}, |
|||
{ |
|||
MethodName: "PayoutsWebUrl", |
|||
Handler: _Greeter_PayoutsWebUrl_Handler, |
|||
}, |
|||
{ |
|||
MethodName: "GetPayTransaction", |
|||
Handler: _Greeter_GetPayTransaction_Handler, |
|||
}, |
|||
{ |
|||
MethodName: "CancelBill", |
|||
Handler: _Greeter_CancelBill_Handler, |
|||
}, |
|||
{ |
|||
MethodName: "RefundBill", |
|||
Handler: _Greeter_RefundBill_Handler, |
|||
}, |
|||
}, |
|||
Streams: []grpc.StreamDesc{}, |
|||
Metadata: "greeter.proto", |
|||
} |
@ -0,0 +1,329 @@ |
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|||
// versions:
|
|||
// protoc-gen-go v1.31.0
|
|||
// protoc v3.21.12
|
|||
// source: sms.proto
|
|||
|
|||
package api |
|||
|
|||
import ( |
|||
_ "google.golang.org/genproto/googleapis/api/annotations" |
|||
protoreflect "google.golang.org/protobuf/reflect/protoreflect" |
|||
protoimpl "google.golang.org/protobuf/runtime/protoimpl" |
|||
reflect "reflect" |
|||
sync "sync" |
|||
) |
|||
|
|||
const ( |
|||
// Verify that this generated code is sufficiently up-to-date.
|
|||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) |
|||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
|||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) |
|||
) |
|||
|
|||
type SendSmsRequest struct { |
|||
state protoimpl.MessageState |
|||
sizeCache protoimpl.SizeCache |
|||
unknownFields protoimpl.UnknownFields |
|||
|
|||
// 手机号码,必填
|
|||
Phone string `protobuf:"bytes,1,opt,name=phone,proto3" json:"phone,omitempty"` |
|||
// 短信场景值 1,2,3,4
|
|||
SmsType int32 `protobuf:"varint,2,opt,name=smsType,proto3" json:"smsType,omitempty"` |
|||
// 国际区号 86 中国 1美国
|
|||
AreaCode string `protobuf:"bytes,3,opt,name=areaCode,proto3" json:"areaCode,omitempty"` |
|||
} |
|||
|
|||
func (x *SendSmsRequest) Reset() { |
|||
*x = SendSmsRequest{} |
|||
if protoimpl.UnsafeEnabled { |
|||
mi := &file_sms_proto_msgTypes[0] |
|||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
|||
ms.StoreMessageInfo(mi) |
|||
} |
|||
} |
|||
|
|||
func (x *SendSmsRequest) String() string { |
|||
return protoimpl.X.MessageStringOf(x) |
|||
} |
|||
|
|||
func (*SendSmsRequest) ProtoMessage() {} |
|||
|
|||
func (x *SendSmsRequest) ProtoReflect() protoreflect.Message { |
|||
mi := &file_sms_proto_msgTypes[0] |
|||
if protoimpl.UnsafeEnabled && x != nil { |
|||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
|||
if ms.LoadMessageInfo() == nil { |
|||
ms.StoreMessageInfo(mi) |
|||
} |
|||
return ms |
|||
} |
|||
return mi.MessageOf(x) |
|||
} |
|||
|
|||
// Deprecated: Use SendSmsRequest.ProtoReflect.Descriptor instead.
|
|||
func (*SendSmsRequest) Descriptor() ([]byte, []int) { |
|||
return file_sms_proto_rawDescGZIP(), []int{0} |
|||
} |
|||
|
|||
func (x *SendSmsRequest) GetPhone() string { |
|||
if x != nil { |
|||
return x.Phone |
|||
} |
|||
return "" |
|||
} |
|||
|
|||
func (x *SendSmsRequest) GetSmsType() int32 { |
|||
if x != nil { |
|||
return x.SmsType |
|||
} |
|||
return 0 |
|||
} |
|||
|
|||
func (x *SendSmsRequest) GetAreaCode() string { |
|||
if x != nil { |
|||
return x.AreaCode |
|||
} |
|||
return "" |
|||
} |
|||
|
|||
// 短信发送回复
|
|||
type SendSmsReply struct { |
|||
state protoimpl.MessageState |
|||
sizeCache protoimpl.SizeCache |
|||
unknownFields protoimpl.UnknownFields |
|||
|
|||
Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` |
|||
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` |
|||
} |
|||
|
|||
func (x *SendSmsReply) Reset() { |
|||
*x = SendSmsReply{} |
|||
if protoimpl.UnsafeEnabled { |
|||
mi := &file_sms_proto_msgTypes[1] |
|||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
|||
ms.StoreMessageInfo(mi) |
|||
} |
|||
} |
|||
|
|||
func (x *SendSmsReply) String() string { |
|||
return protoimpl.X.MessageStringOf(x) |
|||
} |
|||
|
|||
func (*SendSmsReply) ProtoMessage() {} |
|||
|
|||
func (x *SendSmsReply) ProtoReflect() protoreflect.Message { |
|||
mi := &file_sms_proto_msgTypes[1] |
|||
if protoimpl.UnsafeEnabled && x != nil { |
|||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
|||
if ms.LoadMessageInfo() == nil { |
|||
ms.StoreMessageInfo(mi) |
|||
} |
|||
return ms |
|||
} |
|||
return mi.MessageOf(x) |
|||
} |
|||
|
|||
// Deprecated: Use SendSmsReply.ProtoReflect.Descriptor instead.
|
|||
func (*SendSmsReply) Descriptor() ([]byte, []int) { |
|||
return file_sms_proto_rawDescGZIP(), []int{1} |
|||
} |
|||
|
|||
func (x *SendSmsReply) GetCode() int32 { |
|||
if x != nil { |
|||
return x.Code |
|||
} |
|||
return 0 |
|||
} |
|||
|
|||
func (x *SendSmsReply) GetMessage() string { |
|||
if x != nil { |
|||
return x.Message |
|||
} |
|||
return "" |
|||
} |
|||
|
|||
type SmsCodeVerifyRequest struct { |
|||
state protoimpl.MessageState |
|||
sizeCache protoimpl.SizeCache |
|||
unknownFields protoimpl.UnknownFields |
|||
|
|||
// 手机号码,必填
|
|||
Phone string `protobuf:"bytes,1,opt,name=phone,proto3" json:"phone,omitempty"` |
|||
// 短信验证码
|
|||
Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"` |
|||
} |
|||
|
|||
func (x *SmsCodeVerifyRequest) Reset() { |
|||
*x = SmsCodeVerifyRequest{} |
|||
if protoimpl.UnsafeEnabled { |
|||
mi := &file_sms_proto_msgTypes[2] |
|||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
|||
ms.StoreMessageInfo(mi) |
|||
} |
|||
} |
|||
|
|||
func (x *SmsCodeVerifyRequest) String() string { |
|||
return protoimpl.X.MessageStringOf(x) |
|||
} |
|||
|
|||
func (*SmsCodeVerifyRequest) ProtoMessage() {} |
|||
|
|||
func (x *SmsCodeVerifyRequest) ProtoReflect() protoreflect.Message { |
|||
mi := &file_sms_proto_msgTypes[2] |
|||
if protoimpl.UnsafeEnabled && x != nil { |
|||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
|||
if ms.LoadMessageInfo() == nil { |
|||
ms.StoreMessageInfo(mi) |
|||
} |
|||
return ms |
|||
} |
|||
return mi.MessageOf(x) |
|||
} |
|||
|
|||
// Deprecated: Use SmsCodeVerifyRequest.ProtoReflect.Descriptor instead.
|
|||
func (*SmsCodeVerifyRequest) Descriptor() ([]byte, []int) { |
|||
return file_sms_proto_rawDescGZIP(), []int{2} |
|||
} |
|||
|
|||
func (x *SmsCodeVerifyRequest) GetPhone() string { |
|||
if x != nil { |
|||
return x.Phone |
|||
} |
|||
return "" |
|||
} |
|||
|
|||
func (x *SmsCodeVerifyRequest) GetCode() string { |
|||
if x != nil { |
|||
return x.Code |
|||
} |
|||
return "" |
|||
} |
|||
|
|||
var File_sms_proto protoreflect.FileDescriptor |
|||
|
|||
var file_sms_proto_rawDesc = []byte{ |
|||
0x0a, 0x09, 0x73, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x03, 0x61, 0x70, 0x69, |
|||
0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, |
|||
0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5c, |
|||
0x0a, 0x0e, 0x53, 0x65, 0x6e, 0x64, 0x53, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, |
|||
0x12, 0x14, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, |
|||
0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x6d, 0x73, 0x54, 0x79, 0x70, |
|||
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x73, 0x6d, 0x73, 0x54, 0x79, 0x70, 0x65, |
|||
0x12, 0x1a, 0x0a, 0x08, 0x61, 0x72, 0x65, 0x61, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, |
|||
0x28, 0x09, 0x52, 0x08, 0x61, 0x72, 0x65, 0x61, 0x43, 0x6f, 0x64, 0x65, 0x22, 0x3c, 0x0a, 0x0c, |
|||
0x53, 0x65, 0x6e, 0x64, 0x53, 0x6d, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x12, 0x0a, 0x04, |
|||
0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, |
|||
0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, |
|||
0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x40, 0x0a, 0x14, 0x53, 0x6d, |
|||
0x73, 0x43, 0x6f, 0x64, 0x65, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, |
|||
0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, |
|||
0x09, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, |
|||
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x32, 0xa9, 0x01, 0x0a, |
|||
0x03, 0x53, 0x6d, 0x73, 0x12, 0x4a, 0x0a, 0x0b, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, |
|||
0x61, 0x67, 0x65, 0x12, 0x13, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x53, 0x6d, |
|||
0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, |
|||
0x65, 0x6e, 0x64, 0x53, 0x6d, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x13, 0x82, 0xd3, 0xe4, |
|||
0x93, 0x02, 0x0d, 0x3a, 0x01, 0x2a, 0x22, 0x08, 0x73, 0x6d, 0x73, 0x2f, 0x73, 0x65, 0x6e, 0x64, |
|||
0x12, 0x56, 0x0a, 0x0a, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x19, |
|||
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x6d, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x56, 0x65, 0x72, 0x69, |
|||
0x66, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, |
|||
0x53, 0x65, 0x6e, 0x64, 0x53, 0x6d, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x1a, 0x82, 0xd3, |
|||
0xe4, 0x93, 0x02, 0x14, 0x3a, 0x01, 0x2a, 0x22, 0x0f, 0x73, 0x6d, 0x73, 0x2f, 0x63, 0x6f, 0x64, |
|||
0x65, 0x2d, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x42, 0x10, 0x5a, 0x0e, 0x62, 0x6b, 0x62, 0x2d, |
|||
0x6e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, |
|||
0x6f, 0x33, |
|||
} |
|||
|
|||
var ( |
|||
file_sms_proto_rawDescOnce sync.Once |
|||
file_sms_proto_rawDescData = file_sms_proto_rawDesc |
|||
) |
|||
|
|||
func file_sms_proto_rawDescGZIP() []byte { |
|||
file_sms_proto_rawDescOnce.Do(func() { |
|||
file_sms_proto_rawDescData = protoimpl.X.CompressGZIP(file_sms_proto_rawDescData) |
|||
}) |
|||
return file_sms_proto_rawDescData |
|||
} |
|||
|
|||
var file_sms_proto_msgTypes = make([]protoimpl.MessageInfo, 3) |
|||
var file_sms_proto_goTypes = []interface{}{ |
|||
(*SendSmsRequest)(nil), // 0: api.SendSmsRequest
|
|||
(*SendSmsReply)(nil), // 1: api.SendSmsReply
|
|||
(*SmsCodeVerifyRequest)(nil), // 2: api.SmsCodeVerifyRequest
|
|||
} |
|||
var file_sms_proto_depIdxs = []int32{ |
|||
0, // 0: api.Sms.SendMessage:input_type -> api.SendSmsRequest
|
|||
2, // 1: api.Sms.VerifyCode:input_type -> api.SmsCodeVerifyRequest
|
|||
1, // 2: api.Sms.SendMessage:output_type -> api.SendSmsReply
|
|||
1, // 3: api.Sms.VerifyCode:output_type -> api.SendSmsReply
|
|||
2, // [2:4] is the sub-list for method output_type
|
|||
0, // [0:2] is the sub-list for method input_type
|
|||
0, // [0:0] is the sub-list for extension type_name
|
|||
0, // [0:0] is the sub-list for extension extendee
|
|||
0, // [0:0] is the sub-list for field type_name
|
|||
} |
|||
|
|||
func init() { file_sms_proto_init() } |
|||
func file_sms_proto_init() { |
|||
if File_sms_proto != nil { |
|||
return |
|||
} |
|||
if !protoimpl.UnsafeEnabled { |
|||
file_sms_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { |
|||
switch v := v.(*SendSmsRequest); i { |
|||
case 0: |
|||
return &v.state |
|||
case 1: |
|||
return &v.sizeCache |
|||
case 2: |
|||
return &v.unknownFields |
|||
default: |
|||
return nil |
|||
} |
|||
} |
|||
file_sms_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { |
|||
switch v := v.(*SendSmsReply); i { |
|||
case 0: |
|||
return &v.state |
|||
case 1: |
|||
return &v.sizeCache |
|||
case 2: |
|||
return &v.unknownFields |
|||
default: |
|||
return nil |
|||
} |
|||
} |
|||
file_sms_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { |
|||
switch v := v.(*SmsCodeVerifyRequest); i { |
|||
case 0: |
|||
return &v.state |
|||
case 1: |
|||
return &v.sizeCache |
|||
case 2: |
|||
return &v.unknownFields |
|||
default: |
|||
return nil |
|||
} |
|||
} |
|||
} |
|||
type x struct{} |
|||
out := protoimpl.TypeBuilder{ |
|||
File: protoimpl.DescBuilder{ |
|||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), |
|||
RawDescriptor: file_sms_proto_rawDesc, |
|||
NumEnums: 0, |
|||
NumMessages: 3, |
|||
NumExtensions: 0, |
|||
NumServices: 1, |
|||
}, |
|||
GoTypes: file_sms_proto_goTypes, |
|||
DependencyIndexes: file_sms_proto_depIdxs, |
|||
MessageInfos: file_sms_proto_msgTypes, |
|||
}.Build() |
|||
File_sms_proto = out.File |
|||
file_sms_proto_rawDesc = nil |
|||
file_sms_proto_goTypes = nil |
|||
file_sms_proto_depIdxs = nil |
|||
} |
@ -0,0 +1,47 @@ |
|||
syntax = "proto3"; |
|||
|
|||
package api; |
|||
|
|||
import "google/api/annotations.proto"; |
|||
option go_package = "bkb-notify/api"; |
|||
|
|||
|
|||
// The Email service definition. |
|||
service Sms { |
|||
// 发送一条短信 |
|||
rpc SendMessage (SendSmsRequest) returns (SendSmsReply) { |
|||
option (google.api.http) = { |
|||
post: "sms/send" |
|||
body: "*" |
|||
}; |
|||
} |
|||
// 校验短信code |
|||
rpc VerifyCode (SmsCodeVerifyRequest) returns (SendSmsReply) { |
|||
option (google.api.http) = { |
|||
post: "sms/code-verify" |
|||
body: "*" |
|||
}; |
|||
} |
|||
} |
|||
|
|||
message SendSmsRequest { |
|||
//手机号码,必填 |
|||
string phone=1; |
|||
//短信场景值 1,2,3,4 |
|||
int32 smsType=2; |
|||
//国际区号 86 中国 1美国 |
|||
string areaCode = 3; |
|||
} |
|||
|
|||
// 短信发送回复 |
|||
message SendSmsReply { |
|||
int32 code = 1; |
|||
string message = 2; |
|||
} |
|||
|
|||
message SmsCodeVerifyRequest { |
|||
//手机号码,必填 |
|||
string phone=1; |
|||
//短信验证码 |
|||
string code=2; |
|||
} |
@ -0,0 +1,150 @@ |
|||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|||
// versions:
|
|||
// - protoc-gen-go-grpc v1.3.0
|
|||
// - protoc v3.21.12
|
|||
// source: sms.proto
|
|||
|
|||
package api |
|||
|
|||
import ( |
|||
context "context" |
|||
grpc "google.golang.org/grpc" |
|||
codes "google.golang.org/grpc/codes" |
|||
status "google.golang.org/grpc/status" |
|||
) |
|||
|
|||
// This is a compile-time assertion to ensure that this generated file
|
|||
// is compatible with the grpc package it is being compiled against.
|
|||
// Requires gRPC-Go v1.32.0 or later.
|
|||
const _ = grpc.SupportPackageIsVersion7 |
|||
|
|||
const ( |
|||
Sms_SendMessage_FullMethodName = "/api.Sms/SendMessage" |
|||
Sms_VerifyCode_FullMethodName = "/api.Sms/VerifyCode" |
|||
) |
|||
|
|||
// SmsClient is the client API for Sms service.
|
|||
//
|
|||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
|||
type SmsClient interface { |
|||
// 发送一条短信
|
|||
SendMessage(ctx context.Context, in *SendSmsRequest, opts ...grpc.CallOption) (*SendSmsReply, error) |
|||
// 校验短信code
|
|||
VerifyCode(ctx context.Context, in *SmsCodeVerifyRequest, opts ...grpc.CallOption) (*SendSmsReply, error) |
|||
} |
|||
|
|||
type smsClient struct { |
|||
cc grpc.ClientConnInterface |
|||
} |
|||
|
|||
func NewSmsClient(cc grpc.ClientConnInterface) SmsClient { |
|||
return &smsClient{cc} |
|||
} |
|||
|
|||
func (c *smsClient) SendMessage(ctx context.Context, in *SendSmsRequest, opts ...grpc.CallOption) (*SendSmsReply, error) { |
|||
out := new(SendSmsReply) |
|||
err := c.cc.Invoke(ctx, Sms_SendMessage_FullMethodName, in, out, opts...) |
|||
if err != nil { |
|||
return nil, err |
|||
} |
|||
return out, nil |
|||
} |
|||
|
|||
func (c *smsClient) VerifyCode(ctx context.Context, in *SmsCodeVerifyRequest, opts ...grpc.CallOption) (*SendSmsReply, error) { |
|||
out := new(SendSmsReply) |
|||
err := c.cc.Invoke(ctx, Sms_VerifyCode_FullMethodName, in, out, opts...) |
|||
if err != nil { |
|||
return nil, err |
|||
} |
|||
return out, nil |
|||
} |
|||
|
|||
// SmsServer is the server API for Sms service.
|
|||
// All implementations must embed UnimplementedSmsServer
|
|||
// for forward compatibility
|
|||
type SmsServer interface { |
|||
// 发送一条短信
|
|||
SendMessage(context.Context, *SendSmsRequest) (*SendSmsReply, error) |
|||
// 校验短信code
|
|||
VerifyCode(context.Context, *SmsCodeVerifyRequest) (*SendSmsReply, error) |
|||
mustEmbedUnimplementedSmsServer() |
|||
} |
|||
|
|||
// UnimplementedSmsServer must be embedded to have forward compatible implementations.
|
|||
type UnimplementedSmsServer struct { |
|||
} |
|||
|
|||
func (UnimplementedSmsServer) SendMessage(context.Context, *SendSmsRequest) (*SendSmsReply, error) { |
|||
return nil, status.Errorf(codes.Unimplemented, "method SendMessage not implemented") |
|||
} |
|||
func (UnimplementedSmsServer) VerifyCode(context.Context, *SmsCodeVerifyRequest) (*SendSmsReply, error) { |
|||
return nil, status.Errorf(codes.Unimplemented, "method VerifyCode not implemented") |
|||
} |
|||
func (UnimplementedSmsServer) mustEmbedUnimplementedSmsServer() {} |
|||
|
|||
// UnsafeSmsServer may be embedded to opt out of forward compatibility for this service.
|
|||
// Use of this interface is not recommended, as added methods to SmsServer will
|
|||
// result in compilation errors.
|
|||
type UnsafeSmsServer interface { |
|||
mustEmbedUnimplementedSmsServer() |
|||
} |
|||
|
|||
func RegisterSmsServer(s grpc.ServiceRegistrar, srv SmsServer) { |
|||
s.RegisterService(&Sms_ServiceDesc, srv) |
|||
} |
|||
|
|||
func _Sms_SendMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
|||
in := new(SendSmsRequest) |
|||
if err := dec(in); err != nil { |
|||
return nil, err |
|||
} |
|||
if interceptor == nil { |
|||
return srv.(SmsServer).SendMessage(ctx, in) |
|||
} |
|||
info := &grpc.UnaryServerInfo{ |
|||
Server: srv, |
|||
FullMethod: Sms_SendMessage_FullMethodName, |
|||
} |
|||
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
|||
return srv.(SmsServer).SendMessage(ctx, req.(*SendSmsRequest)) |
|||
} |
|||
return interceptor(ctx, in, info, handler) |
|||
} |
|||
|
|||
func _Sms_VerifyCode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
|||
in := new(SmsCodeVerifyRequest) |
|||
if err := dec(in); err != nil { |
|||
return nil, err |
|||
} |
|||
if interceptor == nil { |
|||
return srv.(SmsServer).VerifyCode(ctx, in) |
|||
} |
|||
info := &grpc.UnaryServerInfo{ |
|||
Server: srv, |
|||
FullMethod: Sms_VerifyCode_FullMethodName, |
|||
} |
|||
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
|||
return srv.(SmsServer).VerifyCode(ctx, req.(*SmsCodeVerifyRequest)) |
|||
} |
|||
return interceptor(ctx, in, info, handler) |
|||
} |
|||
|
|||
// Sms_ServiceDesc is the grpc.ServiceDesc for Sms service.
|
|||
// It's only intended for direct use with grpc.RegisterService,
|
|||
// and not to be introspected or modified (even as a copy)
|
|||
var Sms_ServiceDesc = grpc.ServiceDesc{ |
|||
ServiceName: "api.Sms", |
|||
HandlerType: (*SmsServer)(nil), |
|||
Methods: []grpc.MethodDesc{ |
|||
{ |
|||
MethodName: "SendMessage", |
|||
Handler: _Sms_SendMessage_Handler, |
|||
}, |
|||
{ |
|||
MethodName: "VerifyCode", |
|||
Handler: _Sms_VerifyCode_Handler, |
|||
}, |
|||
}, |
|||
Streams: []grpc.StreamDesc{}, |
|||
Metadata: "sms.proto", |
|||
} |
@ -0,0 +1,136 @@ |
|||
package initialize |
|||
|
|||
import ( |
|||
"bkb-seller/global" |
|||
"bkb-seller/initialize/internal" |
|||
"bkb-seller/model" |
|||
"os" |
|||
|
|||
"go.uber.org/zap" |
|||
"gorm.io/driver/mysql" |
|||
"gorm.io/gorm" |
|||
"gorm.io/gorm/logger" |
|||
) |
|||
|
|||
//@function: Gorm
|
|||
//@description: 初始化数据库并产生数据库全局变量
|
|||
//@return: *gorm.DB
|
|||
|
|||
func Gorm() *gorm.DB { |
|||
switch global.MG_CONFIG.System.DbType { |
|||
case "mysql": |
|||
return GormMysql() |
|||
default: |
|||
return GormMysql() |
|||
} |
|||
} |
|||
|
|||
// MysqlTables
|
|||
//@function: MysqlTables
|
|||
//@description: 注册数据库表专用
|
|||
//@param: db *gorm.DB
|
|||
|
|||
func MysqlTables(db *gorm.DB) { |
|||
err := db.AutoMigrate( |
|||
//model.SysUser{},
|
|||
model.JwtBlacklist{}, |
|||
model.SysOperationRecord{}, |
|||
|
|||
// Code generated by bkb-seller Begin; DO NOT EDIT.
|
|||
model.SellerStore{}, |
|||
model.TbAttribute{}, |
|||
model.TbCategory{}, |
|||
model.TbGoods{}, |
|||
model.TbGoodsSpecs{}, |
|||
model.Mission{}, |
|||
model.MissionClaim{}, |
|||
model.MissionClaimVideo{}, |
|||
model.SysBrochure{}, |
|||
model.BatchDeliver{}, |
|||
model.OrderDeliver{}, |
|||
model.Account{}, |
|||
model.Wallet{}, |
|||
model.MissionClaimAddress{}, |
|||
model.MissionClaimWorks{}, |
|||
model.MissionClaimOrder{}, |
|||
model.MissionClaimOrderGoods{}, |
|||
model.User{}, |
|||
model.SysDictType{}, |
|||
model.SysDictData{}, |
|||
model.MissionStop{}, |
|||
model.Bill{}, |
|||
model.BillFund{}, |
|||
model.Order{}, |
|||
model.OrderAddress{}, |
|||
model.OrderDeliver{}, |
|||
model.OrderGoods{}, |
|||
model.OrderGoodsSpecs{}, |
|||
model.OrderPostSale{}, |
|||
model.SourceFile{}, |
|||
model.Withdrawal{}, |
|||
) |
|||
if err != nil { |
|||
global.MG_LOG.Error("register table failed", zap.Any("err", err)) |
|||
os.Exit(0) |
|||
} |
|||
|
|||
global.MG_LOG.Info("register table success") |
|||
} |
|||
|
|||
// @function: GormMysql
|
|||
// @description: 初始化Mysql数据库
|
|||
// @return: *gorm.DB
|
|||
func GormMysql() *gorm.DB { |
|||
m := global.MG_CONFIG.Mysql |
|||
if m.Dbname == "" { |
|||
return nil |
|||
} |
|||
dsn := m.Username + ":" + m.Password + "@tcp(" + m.Path + ")/" + m.Dbname + "?" + m.Config |
|||
mysqlConfig := mysql.Config{ |
|||
DSN: dsn, // DSN data source name
|
|||
DefaultStringSize: 191, // string 类型字段的默认长度
|
|||
DisableDatetimePrecision: true, // 禁用 datetime 精度,MySQL 5.6 之前的数据库不支持
|
|||
DontSupportRenameIndex: true, // 重命名索引时采用删除并新建的方式,MySQL 5.7 之前的数据库和 MariaDB 不支持重命名索引
|
|||
DontSupportRenameColumn: true, // 用 `change` 重命名列,MySQL 8 之前的数据库和 MariaDB 不支持重命名列
|
|||
SkipInitializeWithVersion: false, // 根据版本自动配置
|
|||
} |
|||
if db, err := gorm.Open(mysql.New(mysqlConfig), &gorm.Config{Logger: logger.Default.LogMode(logger.Info)}); err != nil { |
|||
//global.GVA_LOG.Error("MySQL启动异常", zap.Any("err", err))
|
|||
//os.Exit(0)
|
|||
//return nil
|
|||
return nil |
|||
} else { |
|||
sqlDB, _ := db.DB() |
|||
sqlDB.SetMaxIdleConns(m.MaxIdleConns) |
|||
sqlDB.SetMaxOpenConns(m.MaxOpenConns) |
|||
return db |
|||
} |
|||
} |
|||
|
|||
//@function: gormConfig
|
|||
//@description: 根据配置决定是否开启日志
|
|||
//@param: mod bool
|
|||
//@return: *gorm.Config
|
|||
|
|||
func gormConfig(mod bool) *gorm.Config { |
|||
var config = &gorm.Config{DisableForeignKeyConstraintWhenMigrating: true} |
|||
switch global.MG_CONFIG.Mysql.LogMode { |
|||
case "silent", "Silent": |
|||
config.Logger = internal.Default.LogMode(logger.Silent) |
|||
case "error", "Error": |
|||
config.Logger = internal.Default.LogMode(logger.Error) |
|||
case "warn", "Warn": |
|||
config.Logger = internal.Default.LogMode(logger.Warn) |
|||
case "info", "Info": |
|||
config.Logger = internal.Default.LogMode(logger.Info) |
|||
case "zap", "Zap": |
|||
config.Logger = internal.Default.LogMode(logger.Info) |
|||
default: |
|||
if mod { |
|||
config.Logger = internal.Default.LogMode(logger.Info) |
|||
break |
|||
} |
|||
config.Logger = internal.Default.LogMode(logger.Silent) |
|||
} |
|||
return config |
|||
} |
@ -0,0 +1,64 @@ |
|||
package initialize |
|||
|
|||
import ( |
|||
"bkb-seller/global" |
|||
"bkb-seller/initialize/api" |
|||
"context" |
|||
"fmt" |
|||
"time" |
|||
|
|||
"github.com/go-kratos/kratos/contrib/registry/nacos/v2" |
|||
"github.com/go-kratos/kratos/v2/middleware/recovery" |
|||
"github.com/go-kratos/kratos/v2/transport/grpc" |
|||
"github.com/nacos-group/nacos-sdk-go/clients" |
|||
"github.com/nacos-group/nacos-sdk-go/common/constant" |
|||
"github.com/nacos-group/nacos-sdk-go/vo" |
|||
) |
|||
|
|||
func InitNacosClient() { |
|||
sc := []constant.ServerConfig{ |
|||
*constant.NewServerConfig("1.92.109.79", 30848), |
|||
} |
|||
cc := constant.ClientConfig{ |
|||
NamespaceId: "dev", |
|||
TimeoutMs: 5000, |
|||
} |
|||
func() { |
|||
client, err := clients.NewNamingClient( |
|||
vo.NacosClientParam{ |
|||
ServerConfigs: sc, |
|||
ClientConfig: &cc, |
|||
}, |
|||
) |
|||
if err != nil { |
|||
fmt.Println(err) |
|||
panic(err) |
|||
} |
|||
r := nacos.New(client) |
|||
conn, err := grpc.DialInsecure( |
|||
context.Background(), |
|||
grpc.WithEndpoint("discovery:///bkb.notify.grpc"), |
|||
grpc.WithDiscovery(r), |
|||
grpc.WithMiddleware( |
|||
recovery.Recovery()), |
|||
grpc.WithTimeout(10*time.Second)) |
|||
if err != nil { |
|||
panic(err) |
|||
} |
|||
global.EMAIL_CLIENT = api.NewEmailClient(conn) |
|||
global.SMS_CLIENT = api.NewSmsClient(conn) |
|||
|
|||
conn, err = grpc.DialInsecure( |
|||
context.Background(), |
|||
grpc.WithEndpoint("discovery:///bkb.payment.grpc"), |
|||
grpc.WithDiscovery(r), |
|||
grpc.WithMiddleware(recovery.Recovery()), |
|||
grpc.WithTimeout(10*time.Second), |
|||
) |
|||
if err != nil { |
|||
panic(err) |
|||
} |
|||
|
|||
global.PAY_CONN = conn |
|||
}() |
|||
} |
@ -0,0 +1,183 @@ |
|||
package internal |
|||
|
|||
import ( |
|||
"bkb-seller/global" |
|||
"context" |
|||
"fmt" |
|||
"io/ioutil" |
|||
"log" |
|||
"os" |
|||
"time" |
|||
|
|||
"go.uber.org/zap" |
|||
"gorm.io/gorm/logger" |
|||
"gorm.io/gorm/utils" |
|||
) |
|||
|
|||
// writer log writer interface
|
|||
type writer interface { |
|||
Printf(string, ...interface{}) |
|||
} |
|||
|
|||
type config struct { |
|||
SlowThreshold time.Duration |
|||
Colorful bool |
|||
LogLevel logger.LogLevel |
|||
} |
|||
|
|||
var ( |
|||
Discard = New(log.New(ioutil.Discard, "", log.LstdFlags), config{}) |
|||
Default = New(log.New(os.Stdout, "\r\n", log.LstdFlags), config{ |
|||
SlowThreshold: 200 * time.Millisecond, |
|||
LogLevel: logger.Warn, |
|||
Colorful: true, |
|||
}) |
|||
Recorder = traceRecorder{Interface: Default, BeginAt: time.Now()} |
|||
) |
|||
|
|||
func New(writer writer, config config) logger.Interface { |
|||
var ( |
|||
infoStr = "%s\n[info] " |
|||
warnStr = "%s\n[warn] " |
|||
errStr = "%s\n[error] " |
|||
traceStr = "%s\n[%.3fms] [rows:%v] %s" |
|||
traceWarnStr = "%s %s\n[%.3fms] [rows:%v] %s" |
|||
traceErrStr = "%s %s\n[%.3fms] [rows:%v] %s" |
|||
) |
|||
|
|||
if config.Colorful { |
|||
infoStr = logger.Green + "%s\n" + logger.Reset + logger.Green + "[info] " + logger.Reset |
|||
warnStr = logger.BlueBold + "%s\n" + logger.Reset + logger.Magenta + "[warn] " + logger.Reset |
|||
errStr = logger.Magenta + "%s\n" + logger.Reset + logger.Red + "[error] " + logger.Reset |
|||
traceStr = logger.Green + "%s\n" + logger.Reset + logger.Yellow + "[%.3fms] " + logger.BlueBold + "[rows:%v]" + logger.Reset + " %s" |
|||
traceWarnStr = logger.Green + "%s " + logger.Yellow + "%s\n" + logger.Reset + logger.RedBold + "[%.3fms] " + logger.Yellow + "[rows:%v]" + logger.Magenta + " %s" + logger.Reset |
|||
traceErrStr = logger.RedBold + "%s " + logger.MagentaBold + "%s\n" + logger.Reset + logger.Yellow + "[%.3fms] " + logger.BlueBold + "[rows:%v]" + logger.Reset + " %s" |
|||
} |
|||
|
|||
return &customLogger{ |
|||
writer: writer, |
|||
config: config, |
|||
infoStr: infoStr, |
|||
warnStr: warnStr, |
|||
errStr: errStr, |
|||
traceStr: traceStr, |
|||
traceWarnStr: traceWarnStr, |
|||
traceErrStr: traceErrStr, |
|||
} |
|||
} |
|||
|
|||
type customLogger struct { |
|||
writer |
|||
config |
|||
infoStr, warnStr, errStr string |
|||
traceStr, traceErrStr, traceWarnStr string |
|||
} |
|||
|
|||
// LogMode log mode
|
|||
func (c *customLogger) LogMode(level logger.LogLevel) logger.Interface { |
|||
newLogger := *c |
|||
newLogger.LogLevel = level |
|||
return &newLogger |
|||
} |
|||
|
|||
// Info print info
|
|||
func (c *customLogger) Info(ctx context.Context, message string, data ...interface{}) { |
|||
if c.LogLevel >= logger.Info { |
|||
c.Printf(c.infoStr+message, append([]interface{}{utils.FileWithLineNum()}, data...)...) |
|||
} |
|||
} |
|||
|
|||
// Warn print warn messages
|
|||
func (c *customLogger) Warn(ctx context.Context, message string, data ...interface{}) { |
|||
if c.LogLevel >= logger.Warn { |
|||
c.Printf(c.warnStr+message, append([]interface{}{utils.FileWithLineNum()}, data...)...) |
|||
} |
|||
} |
|||
|
|||
// Error print error messages
|
|||
func (c *customLogger) Error(ctx context.Context, message string, data ...interface{}) { |
|||
if c.LogLevel >= logger.Error { |
|||
c.Printf(c.errStr+message, append([]interface{}{utils.FileWithLineNum()}, data...)...) |
|||
} |
|||
} |
|||
|
|||
// Trace print sql message
|
|||
func (c *customLogger) Trace(ctx context.Context, begin time.Time, fc func() (string, int64), err error) { |
|||
if c.LogLevel > 0 { |
|||
elapsed := time.Since(begin) |
|||
switch { |
|||
case err != nil && c.LogLevel >= logger.Error: |
|||
sql, rows := fc() |
|||
if rows == -1 { |
|||
c.Printf(c.traceErrStr, utils.FileWithLineNum(), err, float64(elapsed.Nanoseconds())/1e6, "-", sql) |
|||
} else { |
|||
c.Printf(c.traceErrStr, utils.FileWithLineNum(), err, float64(elapsed.Nanoseconds())/1e6, rows, sql) |
|||
} |
|||
case elapsed > c.SlowThreshold && c.SlowThreshold != 0 && c.LogLevel >= logger.Warn: |
|||
sql, rows := fc() |
|||
slowLog := fmt.Sprintf("SLOW SQL >= %v", c.SlowThreshold) |
|||
if rows == -1 { |
|||
c.Printf(c.traceWarnStr, utils.FileWithLineNum(), slowLog, float64(elapsed.Nanoseconds())/1e6, "-", sql) |
|||
} else { |
|||
c.Printf(c.traceWarnStr, utils.FileWithLineNum(), slowLog, float64(elapsed.Nanoseconds())/1e6, rows, sql) |
|||
} |
|||
case c.LogLevel >= logger.Info: |
|||
sql, rows := fc() |
|||
if rows == -1 { |
|||
c.Printf(c.traceStr, utils.FileWithLineNum(), float64(elapsed.Nanoseconds())/1e6, "-", sql) |
|||
} else { |
|||
c.Printf(c.traceStr, utils.FileWithLineNum(), float64(elapsed.Nanoseconds())/1e6, rows, sql) |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
func (c *customLogger) Printf(message string, data ...interface{}) { |
|||
if global.MG_CONFIG.Mysql.LogMode != "" { |
|||
switch len(data) { |
|||
case 0: |
|||
global.MG_LOG.Info(message) |
|||
case 1: |
|||
global.MG_LOG.Info("gorm", zap.Any("src", data[0])) |
|||
case 2: |
|||
global.MG_LOG.Info("gorm", zap.Any("src", data[0]), zap.Any("duration", data[1])) |
|||
case 3: |
|||
global.MG_LOG.Info("gorm", zap.Any("src", data[0]), zap.Any("duration", data[1]), zap.Any("rows", data[2])) |
|||
case 4: |
|||
global.MG_LOG.Info("gorm", zap.Any("src", data[0]), zap.Any("duration", data[1]), zap.Any("rows", data[2]), zap.Any("sql", data[3])) |
|||
} |
|||
return |
|||
} |
|||
switch len(data) { |
|||
case 0: |
|||
c.writer.Printf(message, "") |
|||
case 1: |
|||
c.writer.Printf(message, data[0]) |
|||
case 2: |
|||
c.writer.Printf(message, data[0], data[1]) |
|||
case 3: |
|||
c.writer.Printf(message, data[0], data[1], data[2]) |
|||
case 4: |
|||
c.writer.Printf(message, data[0], data[1], data[2], data[3]) |
|||
case 5: |
|||
c.writer.Printf(message, data[0], data[1], data[2], data[3], data[4]) |
|||
} |
|||
} |
|||
|
|||
type traceRecorder struct { |
|||
logger.Interface |
|||
BeginAt time.Time |
|||
SQL string |
|||
RowsAffected int64 |
|||
Err error |
|||
} |
|||
|
|||
func (t traceRecorder) New() *traceRecorder { |
|||
return &traceRecorder{Interface: t.Interface, BeginAt: time.Now()} |
|||
} |
|||
|
|||
func (t *traceRecorder) Trace(ctx context.Context, begin time.Time, fc func() (string, int64), err error) { |
|||
t.BeginAt = begin |
|||
t.SQL, t.RowsAffected = fc() |
|||
t.Err = err |
|||
} |
@ -0,0 +1 @@ |
|||
package initialize |
@ -0,0 +1,24 @@ |
|||
package initialize |
|||
|
|||
import ( |
|||
"bkb-seller/global" |
|||
|
|||
"github.com/go-redis/redis" |
|||
"go.uber.org/zap" |
|||
) |
|||
|
|||
func Redis() { |
|||
redisCfg := global.MG_CONFIG.Redis |
|||
client := redis.NewClient(&redis.Options{ |
|||
Addr: redisCfg.Addr, |
|||
Password: redisCfg.Password, // no password set
|
|||
DB: redisCfg.DB, // use default DB
|
|||
}) |
|||
pong, err := client.Ping().Result() |
|||
if err != nil { |
|||
global.MG_LOG.Error("redis connect ping failed, err:", zap.Any("err", err)) |
|||
} else { |
|||
global.MG_LOG.Info("redis connect ping response:", zap.String("pong", pong)) |
|||
global.MG_REDIS = client |
|||
} |
|||
} |
@ -0,0 +1,72 @@ |
|||
package initialize |
|||
|
|||
import ( |
|||
"net/http" |
|||
|
|||
"github.com/gin-gonic/gin" |
|||
ginSwagger "github.com/swaggo/gin-swagger" |
|||
"github.com/swaggo/gin-swagger/swaggerFiles" |
|||
|
|||
"bkb-seller/global" |
|||
"bkb-seller/middleware" |
|||
"bkb-seller/router" |
|||
) |
|||
|
|||
// 初始化总路由
|
|||
|
|||
func Routers() *gin.Engine { |
|||
var Router = gin.Default() |
|||
Router.StaticFS(global.MG_CONFIG.Local.Path, http.Dir(global.MG_CONFIG.Local.Path)) // 为用户头像和文件提供静态地址
|
|||
|
|||
// 跨域
|
|||
Router.Use(middleware.Cors()) // 如需跨域可以打开
|
|||
|
|||
Router.GET("/swagger/*any", ginSwagger.WrapHandler(swaggerFiles.Handler)) |
|||
|
|||
Router.Any("/ueditor/controller", nil) // 百度富文本编辑器
|
|||
// 方便统一添加路由组前缀 多服务器上线使用
|
|||
PublicGroup := Router.Group("") |
|||
{ |
|||
router.InitBaseRouter(PublicGroup) // 注册基础功能路由 不做鉴权
|
|||
router.InitCommonRouter(PublicGroup) |
|||
} |
|||
PrivateGroup := Router.Group("") |
|||
// PrivateGroup.Use(middleware.JWTAuth()).Use(middleware.CasbinHandler())
|
|||
PrivateGroup.Use(middleware.JWTAuth()) |
|||
{ |
|||
// router.InitApiRouter(PrivateGroup) // 注册功能api路由
|
|||
// router.InitUserRouter(PrivateGroup) // 注册用户路由
|
|||
// router.InitMenuRouter(PrivateGroup) // 注册menu路由
|
|||
// router.InitCasbinRouter(PrivateGroup) // 权限相关路由
|
|||
// router.InitAuthorityRouter(PrivateGroup) // 注册角色路由
|
|||
// router.InitSysOperationRecordRouter(PrivateGroup) // 操作记录
|
|||
// router.InitJwtRouter(PrivateGroup) // jwt相关路由
|
|||
// router.InitCustomerRouter(PrivateGroup) // 客户路由
|
|||
// router.InitAutoCodeRouter(PrivateGroup) // 创建自动化代码
|
|||
// router.InitSystemRouter(PrivateGroup) // system相关路由
|
|||
// router.InitSimpleUploaderRouter(PrivateGroup) // 断点续传(插件版)
|
|||
// router.InitEmailRouter(PrivateGroup) // 邮件相关路由
|
|||
// router.InitSysDictionaryRouter(PrivateGroup) // 字典管理
|
|||
// router.InitSysDictionaryDetailRouter(PrivateGroup) // 字典详情管理
|
|||
// router.InitFileUploadAndDownloadRouter(PrivateGroup) // 文件上传下载功能路由
|
|||
// router.InitExcelRouter(PrivateGroup) // 表格导入导出
|
|||
|
|||
// Code generated by bkb-seller Begin; DO NOT EDIT.
|
|||
// Code generated by bkb-seller End; DO NOT EDIT.
|
|||
router.InitTbAttributeRouter(PrivateGroup) |
|||
router.InitTbCategoryRouter(PrivateGroup) |
|||
router.InitTbGoodsRouter(PrivateGroup) |
|||
router.InitMissionRouter(PrivateGroup) |
|||
router.InitInfluencerWalletRouter(PrivateGroup) // 账户相关接口
|
|||
router.InitInfluencerOrderRouter(PrivateGroup) // 订单相关
|
|||
router.InitConsoleRouter(PrivateGroup) // 统计相关
|
|||
router.InitInfluencerUserRouter(PrivateGroup) // 网红相关
|
|||
router.InitBusinessRouter(PrivateGroup) // 商家相关
|
|||
router.InitDictRouter(PrivateGroup) // 字典相关
|
|||
router.InitSourceFileRouter(PrivateGroup) // 素材相关
|
|||
router.InitSysSellerRouter(PrivateGroup) // 商家端子账号权限模块
|
|||
} |
|||
global.MG_LOG.Info("router register success") |
|||
// router.InitApiEngineRouter(Router)
|
|||
return Router |
|||
} |
@ -0,0 +1,26 @@ |
|||
package initialize |
|||
|
|||
import ( |
|||
"bkb-seller/config" |
|||
"bkb-seller/global" |
|||
"bkb-seller/service" |
|||
"bkb-seller/utils" |
|||
"fmt" |
|||
) |
|||
|
|||
func Timer() { |
|||
if global.MG_CONFIG.Timer.Start { |
|||
for _, detail := range global.MG_CONFIG.Timer.Detail { |
|||
go func(detail config.Detail) { |
|||
global.MG_Timer.AddTaskByFunc("ClearDB", global.MG_CONFIG.Timer.Spec, func() { |
|||
err := utils.ClearTable(global.MG_DB, detail.TableName, detail.CompareField, detail.Interval) |
|||
if err != nil { |
|||
fmt.Println("timer error:", err) |
|||
} |
|||
}) |
|||
}(detail) |
|||
} |
|||
} |
|||
|
|||
service.TimingTask() |
|||
} |
@ -0,0 +1,22 @@ |
|||
package initialize |
|||
|
|||
import "bkb-seller/utils" |
|||
|
|||
func init() { |
|||
_ = utils.RegisterRule("PageVerify", |
|||
utils.Rules{ |
|||
"Page": {utils.NotEmpty()}, |
|||
"PageSize": {utils.NotEmpty()}, |
|||
}, |
|||
) |
|||
_ = utils.RegisterRule("IdVerify", |
|||
utils.Rules{ |
|||
"Id": {utils.NotEmpty()}, |
|||
}, |
|||
) |
|||
_ = utils.RegisterRule("AuthorityIdVerify", |
|||
utils.Rules{ |
|||
"AuthorityId": {utils.NotEmpty()}, |
|||
}, |
|||
) |
|||
} |
@ -0,0 +1,34 @@ |
|||
package main |
|||
|
|||
import ( |
|||
"bkb-seller/core" |
|||
_ "bkb-seller/docs" |
|||
"bkb-seller/global" |
|||
"bkb-seller/initialize" |
|||
) |
|||
|
|||
//go:generate go env -w GO111MODULE=on
|
|||
//go:generate go env -w GOPROXY=https://goproxy.cn,direct
|
|||
//go:generate go mod tidy
|
|||
//go:generate go mod download
|
|||
|
|||
// @title seller
|
|||
// @version 0.0.1
|
|||
// @securityDefinitions.apikey ApiKeyAuth
|
|||
// @in header
|
|||
// @name x-token
|
|||
// @BasePath /
|
|||
func main() { |
|||
global.MG_VP = core.Viper() // 初始化Viper
|
|||
global.MG_LOG = core.Zap() // 初始化zap日志库
|
|||
global.MG_DB = initialize.Gorm() // gorm连接数据库
|
|||
initialize.Timer() |
|||
initialize.InitNacosClient() //初始化微服务连接
|
|||
if global.MG_DB != nil { |
|||
initialize.MysqlTables(global.MG_DB) //初始化表
|
|||
// 程序结束前关闭数据库链接
|
|||
db, _ := global.MG_DB.DB() |
|||
defer db.Close() |
|||
} |
|||
core.RunWindowsServer() |
|||
} |
@ -0,0 +1,26 @@ |
|||
package middleware |
|||
|
|||
import ( |
|||
"github.com/gin-gonic/gin" |
|||
"net/http" |
|||
) |
|||
|
|||
// 处理跨域请求,支持options访问
|
|||
func Cors() gin.HandlerFunc { |
|||
return func(c *gin.Context) { |
|||
method := c.Request.Method |
|||
origin := c.Request.Header.Get("Origin") |
|||
c.Header("Access-Control-Allow-Origin", origin) |
|||
c.Header("Access-Control-Allow-Headers", "Content-Type,AccessToken,X-CSRF-Token, Authorization, Token,X-Token,X-User-Id,X-Requested-With,X_Requested_With") |
|||
c.Header("Access-Control-Allow-Methods", "POST, GET, OPTIONS,DELETE,PUT") |
|||
c.Header("Access-Control-Expose-Headers", "Content-Length, Access-Control-Allow-Origin, Access-Control-Allow-Headers, Content-Type") |
|||
c.Header("Access-Control-Allow-Credentials", "true") |
|||
|
|||
// 放行所有OPTIONS方法
|
|||
if method == "OPTIONS" { |
|||
c.AbortWithStatus(http.StatusNoContent) |
|||
} |
|||
// 处理请求
|
|||
c.Next() |
|||
} |
|||
} |
@ -0,0 +1,61 @@ |
|||
package middleware |
|||
|
|||
import ( |
|||
"bkb-seller/global" |
|||
"net" |
|||
"net/http" |
|||
"net/http/httputil" |
|||
"os" |
|||
"runtime/debug" |
|||
"strings" |
|||
|
|||
"github.com/gin-gonic/gin" |
|||
"go.uber.org/zap" |
|||
) |
|||
|
|||
// GinRecovery recover掉项目可能出现的panic,并使用zap记录相关日志
|
|||
func GinRecovery(stack bool) gin.HandlerFunc { |
|||
return func(c *gin.Context) { |
|||
defer func() { |
|||
if err := recover(); err != nil { |
|||
// Check for a broken connection, as it is not really a
|
|||
// condition that warrants a panic stack trace.
|
|||
var brokenPipe bool |
|||
if ne, ok := err.(*net.OpError); ok { |
|||
if se, ok := ne.Err.(*os.SyscallError); ok { |
|||
if strings.Contains(strings.ToLower(se.Error()), "broken pipe") || strings.Contains(strings.ToLower(se.Error()), "connection reset by peer") { |
|||
brokenPipe = true |
|||
} |
|||
} |
|||
} |
|||
|
|||
httpRequest, _ := httputil.DumpRequest(c.Request, false) |
|||
if brokenPipe { |
|||
global.MG_LOG.Error(c.Request.URL.Path, |
|||
zap.Any("error", err), |
|||
zap.String("request", string(httpRequest)), |
|||
) |
|||
// If the connection is dead, we can't write a status to it.
|
|||
_ = c.Error(err.(error)) // nolint: errcheck
|
|||
c.Abort() |
|||
return |
|||
} |
|||
|
|||
if stack { |
|||
global.MG_LOG.Error("[Recovery from panic]", |
|||
zap.Any("error", err), |
|||
zap.String("request", string(httpRequest)), |
|||
zap.String("stack", string(debug.Stack())), |
|||
) |
|||
} else { |
|||
global.MG_LOG.Error("[Recovery from panic]", |
|||
zap.Any("error", err), |
|||
zap.String("request", string(httpRequest)), |
|||
) |
|||
} |
|||
c.AbortWithStatus(http.StatusInternalServerError) |
|||
} |
|||
}() |
|||
c.Next() |
|||
} |
|||
} |
@ -0,0 +1,139 @@ |
|||
package middleware |
|||
|
|||
import ( |
|||
"bkb-seller/global" |
|||
"bkb-seller/model" |
|||
"bkb-seller/model/request" |
|||
"bkb-seller/model/response" |
|||
"bkb-seller/service" |
|||
"errors" |
|||
"strconv" |
|||
"time" |
|||
|
|||
"github.com/dgrijalva/jwt-go" |
|||
"github.com/gin-gonic/gin" |
|||
"go.uber.org/zap" |
|||
) |
|||
|
|||
func JWTAuth() gin.HandlerFunc { |
|||
return func(c *gin.Context) { |
|||
// 我们这里jwt鉴权取头部信息 x-token 登录时回返回token信息 这里前端需要把token存储到cookie或者本地localStorage中 不过需要跟后端协商过期时间 可以约定刷新令牌或者重新登录
|
|||
token := c.Request.Header.Get("x-token") |
|||
if token == "" { |
|||
response.FailWithDetailed(gin.H{"reload": true}, "未登录或非法访问", c) |
|||
c.Abort() |
|||
return |
|||
} |
|||
if service.IsBlacklist(token) { |
|||
response.FailWithDetailed(gin.H{"reload": true}, "您的帐户异地登陆或令牌失效", c) |
|||
c.Abort() |
|||
return |
|||
} |
|||
j := NewJWT() |
|||
// parseToken 解析token包含的信息
|
|||
claims, err := j.ParseToken(token) |
|||
if err != nil { |
|||
if err == TokenExpired { |
|||
response.FailWithDetailed(gin.H{"reload": true}, "授权已过期", c) |
|||
c.Abort() |
|||
return |
|||
} |
|||
response.FailWithDetailed(gin.H{"reload": true}, err.Error(), c) |
|||
c.Abort() |
|||
return |
|||
} |
|||
if claims.ExpiresAt-time.Now().Unix() < claims.BufferTime { |
|||
claims.ExpiresAt = time.Now().Unix() + global.MG_CONFIG.JWT.ExpiresTime |
|||
newToken, _ := j.CreateToken(*claims) |
|||
newClaims, _ := j.ParseToken(newToken) |
|||
c.Header("new-token", newToken) |
|||
c.Header("new-expires-at", strconv.FormatInt(newClaims.ExpiresAt, 10)) |
|||
if global.MG_CONFIG.System.UseMultipoint { |
|||
err, RedisJwtToken := service.GetRedisJWT(newClaims.Username) |
|||
if err != nil { |
|||
global.MG_LOG.Error("get redis jwt failed", zap.Any("err", err)) |
|||
} else { // 当之前的取成功时才进行拉黑操作
|
|||
_ = service.JsonInBlacklist(model.JwtBlacklist{Jwt: RedisJwtToken}) |
|||
} |
|||
// 无论如何都要记录当前的活跃状态
|
|||
_ = service.SetRedisJWT(newToken, newClaims.Username) |
|||
} |
|||
} |
|||
c.Set("claims", claims) |
|||
c.Next() |
|||
} |
|||
} |
|||
|
|||
type JWT struct { |
|||
SigningKey []byte |
|||
} |
|||
|
|||
var ( |
|||
TokenExpired = errors.New("Token is expired") |
|||
TokenNotValidYet = errors.New("Token not active yet") |
|||
TokenMalformed = errors.New("That's not even a token") |
|||
TokenInvalid = errors.New("Couldn't handle this token:") |
|||
) |
|||
|
|||
func NewJWT() *JWT { |
|||
return &JWT{ |
|||
[]byte(global.MG_CONFIG.JWT.SigningKey), |
|||
} |
|||
} |
|||
|
|||
// 创建一个token
|
|||
func (j *JWT) CreateToken(claims request.CustomClaims) (string, error) { |
|||
token := jwt.NewWithClaims(jwt.SigningMethodHS256, claims) |
|||
return token.SignedString(j.SigningKey) |
|||
} |
|||
|
|||
// 解析 token
|
|||
func (j *JWT) ParseToken(tokenString string) (*request.CustomClaims, error) { |
|||
token, err := jwt.ParseWithClaims(tokenString, &request.CustomClaims{}, func(token *jwt.Token) (i interface{}, e error) { |
|||
return j.SigningKey, nil |
|||
}) |
|||
if err != nil { |
|||
if ve, ok := err.(*jwt.ValidationError); ok { |
|||
if ve.Errors&jwt.ValidationErrorMalformed != 0 { |
|||
return nil, TokenMalformed |
|||
} else if ve.Errors&jwt.ValidationErrorExpired != 0 { |
|||
// Token is expired
|
|||
return nil, TokenExpired |
|||
} else if ve.Errors&jwt.ValidationErrorNotValidYet != 0 { |
|||
return nil, TokenNotValidYet |
|||
} else { |
|||
return nil, TokenInvalid |
|||
} |
|||
} |
|||
} |
|||
if token != nil { |
|||
if claims, ok := token.Claims.(*request.CustomClaims); ok && token.Valid { |
|||
return claims, nil |
|||
} |
|||
return nil, TokenInvalid |
|||
|
|||
} else { |
|||
return nil, TokenInvalid |
|||
|
|||
} |
|||
|
|||
} |
|||
|
|||
// 更新token
|
|||
//func (j *JWT) RefreshToken(tokenString string) (string, error) {
|
|||
// jwt.TimeFunc = func() time.Time {
|
|||
// return time.Unix(0, 0)
|
|||
// }
|
|||
// token, err := jwt.ParseWithClaims(tokenString, &request.CustomClaims{}, func(token *jwt.Token) (interface{}, error) {
|
|||
// return j.SigningKey, nil
|
|||
// })
|
|||
// if err != nil {
|
|||
// return "", err
|
|||
// }
|
|||
// if claims, ok := token.Claims.(*request.CustomClaims); ok && token.Valid {
|
|||
// jwt.TimeFunc = time.Now
|
|||
// claims.StandardClaims.ExpiresAt = time.Now().Unix() + 60*60*24*7
|
|||
// return j.CreateToken(*claims)
|
|||
// }
|
|||
// return "", TokenInvalid
|
|||
//}
|
@ -0,0 +1,26 @@ |
|||
package middleware |
|||
|
|||
import ( |
|||
"fmt" |
|||
"github.com/gin-gonic/gin" |
|||
"github.com/unrolled/secure" |
|||
) |
|||
|
|||
// 用https把这个中间件在router里面use一下就好
|
|||
|
|||
func LoadTls() gin.HandlerFunc { |
|||
return func(c *gin.Context) { |
|||
middleware := secure.New(secure.Options{ |
|||
SSLRedirect: true, |
|||
SSLHost: "localhost:443", |
|||
}) |
|||
err := middleware.Process(c.Writer, c.Request) |
|||
if err != nil { |
|||
// 如果出现错误,请不要继续
|
|||
fmt.Println(err) |
|||
return |
|||
} |
|||
// 继续往下处理
|
|||
c.Next() |
|||
} |
|||
} |
@ -0,0 +1,23 @@ |
|||
package middleware |
|||
|
|||
import ( |
|||
"bkb-seller/global" |
|||
"bkb-seller/model/response" |
|||
|
|||
"github.com/gin-gonic/gin" |
|||
) |
|||
|
|||
// 处理跨域请求,支持options访问
|
|||
func NeedInit() gin.HandlerFunc { |
|||
return func(c *gin.Context) { |
|||
if global.MG_DB == nil { |
|||
response.OkWithDetailed(gin.H{ |
|||
"needInit": true, |
|||
}, "前往初始化数据库", c) |
|||
c.Abort() |
|||
} else { |
|||
c.Next() |
|||
} |
|||
// 处理请求
|
|||
} |
|||
} |
@ -0,0 +1,87 @@ |
|||
package middleware |
|||
|
|||
import ( |
|||
"bkb-seller/global" |
|||
"bkb-seller/model" |
|||
"bkb-seller/model/request" |
|||
"bkb-seller/service" |
|||
"bytes" |
|||
"io/ioutil" |
|||
"net/http" |
|||
"strconv" |
|||
"time" |
|||
|
|||
"github.com/gin-gonic/gin" |
|||
"go.uber.org/zap" |
|||
) |
|||
|
|||
func OperationRecord() gin.HandlerFunc { |
|||
return func(c *gin.Context) { |
|||
var ( |
|||
body []byte |
|||
userId int |
|||
appid string |
|||
) |
|||
if c.Request.Method != http.MethodGet { |
|||
var err error |
|||
body, err = ioutil.ReadAll(c.Request.Body) |
|||
if err != nil { |
|||
global.MG_LOG.Error("read body from request error:", zap.Any("err", err)) |
|||
} else { |
|||
c.Request.Body = ioutil.NopCloser(bytes.NewBuffer(body)) |
|||
} |
|||
} |
|||
if claims, ok := c.Get("claims"); ok { |
|||
waitUse := claims.(*request.CustomClaims) |
|||
userId = int(waitUse.ID) |
|||
appid = waitUse.Appid |
|||
} else { |
|||
id, err := strconv.Atoi(c.Request.Header.Get("x-user-id")) |
|||
if err != nil { |
|||
userId = 0 |
|||
} |
|||
userId = id |
|||
} |
|||
record := model.SysOperationRecord{ |
|||
Ip: c.ClientIP(), |
|||
Method: c.Request.Method, |
|||
Path: c.Request.URL.Path, |
|||
Agent: c.Request.UserAgent(), |
|||
Body: string(body), |
|||
UserID: userId, |
|||
MG_MODEL: global.MG_MODEL{Appid: appid}, |
|||
} |
|||
// 存在某些未知错误 TODO
|
|||
//values := c.Request.Header.Values("content-type")
|
|||
//if len(values) >0 && strings.Contains(values[0], "boundary") {
|
|||
// record.Body = "file"
|
|||
//}
|
|||
writer := responseBodyWriter{ |
|||
ResponseWriter: c.Writer, |
|||
body: &bytes.Buffer{}, |
|||
} |
|||
c.Writer = writer |
|||
now := time.Now() |
|||
|
|||
c.Next() |
|||
|
|||
latency := time.Now().Sub(now) |
|||
record.ErrorMessage = c.Errors.ByType(gin.ErrorTypePrivate).String() |
|||
record.Status = c.Writer.Status() |
|||
record.Latency = latency |
|||
record.Resp = writer.body.String() |
|||
if err := service.CreateSysOperationRecord(record); err != nil { |
|||
global.MG_LOG.Error("create operation record error:", zap.Any("err", err)) |
|||
} |
|||
} |
|||
} |
|||
|
|||
type responseBodyWriter struct { |
|||
gin.ResponseWriter |
|||
body *bytes.Buffer |
|||
} |
|||
|
|||
func (r responseBodyWriter) Write(b []byte) (int, error) { |
|||
r.body.Write(b) |
|||
return r.ResponseWriter.Write(b) |
|||
} |
@ -0,0 +1,29 @@ |
|||
package middleware |
|||
|
|||
import "github.com/gin-gonic/gin" |
|||
|
|||
type params struct { |
|||
TimeZone string `header:"Time-Zone"` |
|||
} |
|||
|
|||
func Params() gin.HandlerFunc { |
|||
return func(c *gin.Context) { |
|||
var ( |
|||
err error |
|||
p params |
|||
) |
|||
defer func() { |
|||
if err != nil { |
|||
c.Abort() |
|||
return |
|||
} else { |
|||
c.Next() |
|||
} |
|||
}() |
|||
err = c.ShouldBindHeader(&p) |
|||
if err != nil { |
|||
return |
|||
} |
|||
c.Set("time-zone", p.TimeZone) |
|||
} |
|||
} |
@ -0,0 +1,29 @@ |
|||
package model |
|||
|
|||
import "bkb-seller/global" |
|||
|
|||
type BankCard struct { |
|||
AccountName string `gorm:"size:50" json:"account_name"` // 户名
|
|||
BankCode string `gorm:"size:50" json:"bank_code"` // 收款行
|
|||
SwiftCode string `gorm:"size:20" json:"swift_code"` // 银行国际代码
|
|||
CardNumber string `gorm:"size:50" json:"card_number"` // 银行卡号
|
|||
Address string `gorm:"size:255" json:"address"` // 收款人地址
|
|||
Country string `gorm:"size:255" json:"country"` // 国家/地区
|
|||
Currency string `gorm:"size:10" json:"currency"` // 币种 USD:美元
|
|||
} |
|||
|
|||
type Account struct { |
|||
global.MG_MODEL |
|||
Platform string `gorm:"size:50" json:"platform"` //平台 saller(买家端) / customer(客户端) / influencer(网红端)
|
|||
UserID string `gorm:"size:50;index" json:"userID"` //用户id
|
|||
Type int `gorm:"type:int(1)" json:"type"` // 类型 1:paypal 2:银行卡
|
|||
BankCard |
|||
IDCard string `gorm:"size:30" json:"idCard"` //
|
|||
Phone string `gorm:"size:20" json:"phone"` //
|
|||
Sort int `gorm:"type:int" json:"sort"` // 排序值
|
|||
IsDefault bool `gorm:"type:tinyint" json:"is_default"` // 是否为默认 0:非默认 1:默认
|
|||
} |
|||
|
|||
func (Account) TableName() string { |
|||
return "account" |
|||
} |
@ -0,0 +1,22 @@ |
|||
package model |
|||
|
|||
import "bkb-seller/global" |
|||
|
|||
type Address struct { |
|||
global.MG_MODEL |
|||
UserID string `gorm:"size:50" json:"userId"` |
|||
FirstName string `gorm:"size:50" json:"firstName"` //first name
|
|||
LastName string `gorm:"size:50" json:"lastName"` //last name
|
|||
Phone string `gorm:"size:20" json:"phone"` //手机号
|
|||
Street string `gorm:"size:50" json:"street"` //street
|
|||
Bldg string `gorm:"size:100" json:"bldg"` //apt,ste,bldg
|
|||
City string `gorm:"size:50" json:"city"` //city
|
|||
State string `gorm:"size:50" json:"state"` //state
|
|||
ZipCode string `gorm:"size:50" json:"zipCode"` //zip code
|
|||
Default int `gorm:"tinyint(1)" json:"default"` //是否默认地址 1-是 2-否
|
|||
Platform string `gorm:"size:50" json:"platform"` //平台 saller(买家端) / customer(客户端) / influencer(网红端)
|
|||
} |
|||
|
|||
func (Address) TableName() string { |
|||
return "address" |
|||
} |
@ -0,0 +1,53 @@ |
|||
package model |
|||
|
|||
type Breadcrumb struct { //面包屑
|
|||
ID uint `json:"id"` |
|||
Name string `json:"name"` |
|||
Pid uint `json:"pid"` //父id
|
|||
IsLeaf bool `json:"is_leaf"` //是否叶子分类
|
|||
Parent *Breadcrumb `gorm:"-" json:"-"` //上级/下级
|
|||
} |
|||
|
|||
type Coordinate struct { |
|||
Format string `json:"x"` |
|||
Value float64 `json:"y"` |
|||
} |
|||
|
|||
type CoordinateFormat struct { |
|||
Label string `json:"label"` //显示名称
|
|||
Key string `json:"key"` //唯一键
|
|||
} |
|||
|
|||
type CoordinateObj struct { |
|||
Format CoordinateFormat `json:"x"` //x坐标
|
|||
Value float64 `json:"y"` //值
|
|||
} |
|||
|
|||
type CoordinateData struct { |
|||
X []string `json:"x"` //x坐标取值数组
|
|||
Y []float64 `json:"y"` //y坐标取值数组 组件自动
|
|||
Values []Coordinate `json:"values"` //坐标中的点
|
|||
} |
|||
|
|||
type CoordinateObjData struct { |
|||
X []string `json:"x"` //x坐标取值数组
|
|||
Y []float64 `json:"y"` //y坐标取值数组 组件自动
|
|||
Values []CoordinateObj `json:"values"` //坐标中的点
|
|||
} |
|||
|
|||
type RankData struct { |
|||
Rank int64 `json:"rank"` //名次
|
|||
Format string `json:"format"` //
|
|||
Value float64 `json:"value"` |
|||
} |
|||
|
|||
type RankDataObj struct { |
|||
Rank int64 `json:"rank"` //名次
|
|||
Format CoordinateFormat `json:"format"` //排名内容
|
|||
Value float64 `json:"value"` //值
|
|||
} |
|||
|
|||
type CountMap struct { |
|||
ID uint `json:"id"` |
|||
Count int64 `json:"count"` |
|||
} |
@ -0,0 +1,28 @@ |
|||
package model |
|||
|
|||
import "bkb-seller/global" |
|||
|
|||
type BatchDeliver struct { |
|||
global.MG_MODEL |
|||
UserID string `gorm:"size:50;index" json:"userID"` //用户id
|
|||
OrderID string `gorm:"size:50" json:"orderID"` //订单号
|
|||
CourierNumber string `gorm:"size:50" json:"courierNumber"` //快递单号
|
|||
Courier string `gorm:"size:50" json:"courier"` //快递公司
|
|||
CourierLink string `gorm:"size:255" json:"courierLink"` //快递链接
|
|||
Status int `gorm:"type:tinyint(1)" json:"status"` //状态 1-发货成功 2-发货失败
|
|||
Remark string `gorm:"size:50" json:"remark"` //备注
|
|||
} |
|||
|
|||
type BatchDeliverList struct { |
|||
BatchDeliver |
|||
} |
|||
|
|||
type BatchDeliverTotal struct { |
|||
Total int `json:"total"` |
|||
Status1 int `json:"status1"` //发货成功数量
|
|||
Status2 int `json:"status2"` //发货失败数量
|
|||
} |
|||
|
|||
func (BatchDeliver) TableName() string { |
|||
return "batch_deliver" |
|||
} |
@ -0,0 +1,46 @@ |
|||
package model |
|||
|
|||
import ( |
|||
"bkb-seller/global" |
|||
|
|||
"gorm.io/gorm" |
|||
) |
|||
|
|||
type Bill struct { |
|||
global.MG_MODEL |
|||
UserID string `gorm:"size:50;index" json:"userID"` //用户id
|
|||
Type string `gorm:"size:1;default:1" json:"type"` //类型 1-佣金 2-订单 3-提现
|
|||
Title string `gorm:"size:255" json:"title"` // 账单标题
|
|||
Account string `gorm:"size:50" json:"account"` //收款账户(提现)
|
|||
OrderID string `gorm:"size:50" json:"order_id"` //关联订单id
|
|||
WithdID string `gorm:"size:50" json:"withd_id"` //提现id
|
|||
Price float64 `gorm:"type:decimal(10,2)" json:"price"` //价格
|
|||
Balance float64 `gorm:"type:decimal(10,2)" json:"balance"` //余额
|
|||
Amount int `gorm:"type:int(2);default:1" json:"amount"` //数量
|
|||
Status int `gorm:"type:int(1);default:0" json:"status"` //类型 1-支出 2-收入
|
|||
Receipt int `gorm:"type:tinyint(1)" json:"receipt"` //是否已到账 1-是 2-否 3-已取消付款
|
|||
WithdrawalStatus int `gorm:"type:tinyint(1)" json:"withdrawalStatus"` //提现状态 0-提现中 1-提现完成 2-提现失败
|
|||
CheckStatus string `gorm:"size:1" json:"check_status"` // 审核状态 0:待审核 1:审核通过 2:审核未通过
|
|||
Remark string `gorm:"size:50" json:"remark"` //备注
|
|||
Platform string `gorm:"size:50" json:"platform"` //平台 saller / customer / influencer
|
|||
TransactionId string `gorm:"size:50" json:"transaction_id"` // 交易编号
|
|||
} |
|||
|
|||
type BillList struct { |
|||
Bill |
|||
} |
|||
|
|||
type BillTotal struct { |
|||
Income float64 `json:"income"` //收入
|
|||
IncomeNum float64 `json:"incomeNum"` //收入笔数
|
|||
Payout float64 `json:"payout"` //支出
|
|||
PayoutNum float64 `json:"payoutNum"` //支出笔数
|
|||
} |
|||
|
|||
func (q *Bill) New(tx *gorm.DB) error { |
|||
return tx.Model(&Bill{}).Create(&q).Error |
|||
} |
|||
|
|||
func (Bill) TableName() string { |
|||
return "bill" |
|||
} |
@ -0,0 +1,22 @@ |
|||
package model |
|||
|
|||
import "bkb-seller/global" |
|||
|
|||
type BillFund struct { // 营销账户账单
|
|||
global.MG_MODEL |
|||
UserID string `gorm:"size:50;index" json:"userID"` // 用户id
|
|||
TransactionType int `gorm:"type:int(1);default:1" json:"transaction_type"` // 类型 1-支出 2-收入
|
|||
TransactionId string `gorm:"size:50;unique" json:"transaction_id"` // 交易编号
|
|||
Title string `gorm:"size:255" json:"title"` // 账单标题
|
|||
Price float64 `gorm:"type:decimal(10,2)" json:"price"` // 价格
|
|||
Balance float64 `gorm:"type:decimal(10,2)" json:"balance"` // 余额
|
|||
Platform string `gorm:"size:20" json:"platform"` // 平台 seller
|
|||
Remark string `gorm:"size:50" json:"remark"` // 备注
|
|||
RelatedId string `gorm:"size:50" json:"related_id"` // 关联id 任务id
|
|||
PayId string `gorm:"size:50" json:"pay_id"` // 支付id
|
|||
Status int `gorm:"size:1" json:"status"` // 状态 1:进行中 2:已完成 3:已失败
|
|||
} |
|||
|
|||
func (BillFund) TableName() string { |
|||
return "bill_fund" |
|||
} |
@ -0,0 +1,16 @@ |
|||
// 自动生成模板Business
|
|||
package model |
|||
|
|||
import "bkb-seller/global" |
|||
|
|||
// 如果含有time.Time 请自行import time包
|
|||
type Business struct { |
|||
global.MG_MODEL |
|||
Name string `json:"name" form:"" gorm:"size:20"` |
|||
Email string `json:"email" form:"" gorm:"size:100"` |
|||
Phone string `json:"phone" form:"" gorm:"size:20"` |
|||
} |
|||
|
|||
func (Business) TableName() string { |
|||
return "business" |
|||
} |
@ -0,0 +1,18 @@ |
|||
package model |
|||
|
|||
import "bkb-seller/global" |
|||
|
|||
type Courier struct { |
|||
global.MG_MODEL |
|||
Name string `gorm:"column:name;default:;NOT NULL"` |
|||
Code string `gorm:"column:code;default:;NOT NULL"` |
|||
CountryIso2 string `gorm:"column:country_iso2;default:;NOT NULL"` |
|||
Phone string `gorm:"column:phone;default:;NOT NULL"` |
|||
Url string `gorm:"column:url;default:;NOT NULL"` |
|||
Type string `gorm:"column:type;default:;NOT NULL"` |
|||
Logo string `gorm:"column:logo;default:;NOT NULL"` |
|||
} |
|||
|
|||
func (Courier) TableName() string { |
|||
return "courier" |
|||
} |
@ -0,0 +1,49 @@ |
|||
package model |
|||
|
|||
import "bkb-seller/global" |
|||
|
|||
const ( |
|||
ReleaseCountryCode = "release_country" |
|||
ReleaseChannelCode = "release_channel" |
|||
) |
|||
|
|||
type SysDictType struct { //数据字典分类
|
|||
global.BASE_ID |
|||
PID int `gorm:"" json:"pid"` //父ID
|
|||
Code string `gorm:"UNIQUE;size:20" json:"code"` //编码
|
|||
Name string `gorm:"size:20" json:"name"` //名称
|
|||
Type string `gorm:"size:10" json:"type"` //类型
|
|||
Status string `gorm:"size:1" json:"status"` //可用状态 1正常 0删除
|
|||
Desc string `gorm:"size:30" json:"desc"` //描述
|
|||
IsFixed int `gorm:"type:tinyint(1)" json:"isFixed"` //0默认为不固定 1固定
|
|||
//DynamicField string `gorm:"type:varchar(255)" json:"dynamic_field"` //动态字段编码
|
|||
|
|||
global.TIME_MODEL |
|||
} |
|||
|
|||
type SysDictData struct { //数据字典取值
|
|||
global.BASE_ID |
|||
TypeCode string `gorm:"size:20" json:"typeCode"` //编码
|
|||
Sort int `gorm:"" json:"sort"` //排序
|
|||
Label string `gorm:"size:30" json:"label"` //标签
|
|||
Value string `gorm:"size:10" json:"value"` //值
|
|||
IsDefault int `gorm:"type:tinyint(1)" json:"isDefault"` //是否为默认值 1是 0否
|
|||
Desc string `gorm:"size:50" json:"desc"` //描述
|
|||
Status string `gorm:"size:1" json:"status"` //可用状态 1正常 0删除
|
|||
|
|||
global.TIME_MODEL |
|||
} |
|||
|
|||
type SysDictDataView struct { |
|||
Label string `json:"label"` //标签
|
|||
Value string `json:"value"` //值
|
|||
IsDefault int `json:"isDefault"` //是否为默认值 1是 0否
|
|||
} |
|||
|
|||
func (SysDictType) TableName() string { |
|||
return "sys_dict_type" |
|||
} |
|||
|
|||
func (SysDictData) TableName() string { |
|||
return "sys_dict_data" |
|||
} |
@ -0,0 +1,41 @@ |
|||
package model |
|||
|
|||
import "bkb-seller/global" |
|||
|
|||
type DtStatisticOrder struct { // 数据统计-订单
|
|||
global.MG_MODEL |
|||
Value string `gorm:"size:20" json:"value"` // 统计对象 eg:20231020(按天统计)
|
|||
Unit string `gorm:"size:10" json:"unit"` // 单位 hour/day/month/all
|
|||
Type int `gorm:"type:tinyint(1)" json:"type"` // 关联类型 0:无 1:用户 2:任务领取id 3:店铺id 4:spu_no
|
|||
RelationId string `gorm:"size:60" json:"relation_id"` // 关联id 用户id/任务领取id/店铺id
|
|||
NewOrderNum int64 `gorm:"type:int" json:"new_order_num"` // 创建订单数
|
|||
NewOrderMoney float64 `gorm:"type:decimal(10,2)" json:"new_order_money"` // 创建订单金额
|
|||
OrderNum int64 `gorm:"type:int" json:"order_num"` // 订单数
|
|||
OrderMoney float64 `gorm:"type:decimal(10,2)" json:"order_money"` // 订单金额
|
|||
OrderDoneNum int64 `gorm:"type:int" json:"order_done_num"` // 订单完成数
|
|||
SaleVolume int64 `gorm:"type:int" json:"sale_volume"` // 销售量
|
|||
SettleReward float64 `gorm:"type:decimal(10,2)" json:"settle_reward"` // 结算佣金
|
|||
TransitReward float64 `gorm:"type:decimal(10,2)" json:"transit_reward"` // 在途佣金
|
|||
OrderCancelNum int64 `gorm:"type:int" json:"order_cancel_num"` // 订单取消数
|
|||
OrderCancelMoney float64 `gorm:"type:decimal(10,2)" json:"order_cancel_money"` // 订单取消金额
|
|||
//Income float64 `gorm:"type:decimal(10,2)" json:"income"` // 收入
|
|||
} |
|||
|
|||
type Statistic struct { |
|||
Value string `json:"value"` //
|
|||
RelationId string `json:"relation_id"` //
|
|||
NewOrderNum int64 `json:"new_order_num"` //
|
|||
NewOrderMoney float64 `json:"new_order_money"` //
|
|||
OrderNum int64 `json:"order_num"` //
|
|||
OrderMoney float64 `json:"order_money"` //
|
|||
OrderDoneNum int64 `json:"order_done_num"` //
|
|||
SaleVolume int64 `json:"sale_volume"` //
|
|||
SettleReward float64 `json:"settle_reward"` //
|
|||
TransitReward float64 `json:"transit_reward"` //
|
|||
OrderCancelNum int64 `json:"order_cancel_num"` //
|
|||
OrderCancelMoney float64 `json:"order_cancel_money"` //
|
|||
} |
|||
|
|||
func (DtStatisticOrder) TableName() string { |
|||
return "dt_statistic_order" |
|||
} |
@ -0,0 +1,43 @@ |
|||
package model |
|||
|
|||
import ( |
|||
"bkb-seller/global" |
|||
"time" |
|||
) |
|||
|
|||
type InfluencerUserDesc struct { |
|||
global.MG_MODEL |
|||
UUID string `gorm:"unique;size:64" json:"uuid"` //用户uuid编码
|
|||
NickName string `gorm:"size:20" json:"nickName"` //昵称
|
|||
Phone string `gorm:"size:20" json:"phone"` //电话
|
|||
Email string `json:"email" form:"email" gorm:"size:255"` //用户邮箱
|
|||
Avatar string `gorm:"size:255" json:"avatar"` //头像
|
|||
Platform string `gorm:"size:500" json:"-"` //平台及地址逗号隔开 eg:(ins:https://baidu.com/user/1,qq:12345678)
|
|||
PlatformStr interface{} `gorm:"-" json:"platform"` //平台及地址
|
|||
Tags string `gorm:"size:500" json:"tags"` //个人标签
|
|||
IDForbidden bool `gorm:"-" json:"id_forbidden"` //是否禁用
|
|||
ForbiddenTime *time.Time `json:"forbidden_time"` //禁用时间
|
|||
ForbiddenReason string `json:"forbidden_reason"` //禁用原因
|
|||
ForbiddenOperation string `json:"forbidden_operation"` //禁用操作人
|
|||
} |
|||
|
|||
type InfluencerUserView struct { |
|||
UUID string `json:"uuid"` //用户uuid
|
|||
NickName string `json:"nick_name"` //昵称
|
|||
Phone string `json:"phone"` //电话
|
|||
} |
|||
|
|||
type InfluencerUserClaimView struct { |
|||
UUID string `json:"uuid"` //用户uuid
|
|||
NickName string `json:"nick_name"` //昵称
|
|||
Phone string `json:"phone"` //电话
|
|||
ClaimNo string `json:"claim_no"` |
|||
} |
|||
|
|||
func (InfluencerUserView) TableName() string { |
|||
return "user" |
|||
} |
|||
|
|||
func (InfluencerUserDesc) TableName() string { |
|||
return "user" |
|||
} |
@ -0,0 +1,79 @@ |
|||
package model |
|||
|
|||
import ( |
|||
"bkb-seller/global" |
|||
"time" |
|||
) |
|||
|
|||
type Mission struct { //任务
|
|||
Title string `gorm:"type:varchar(255);" json:"title"` //标题
|
|||
StoreNo string `gorm:"type:varchar(60);" json:"store_no"` // 店铺编号
|
|||
GoodsId uint `gorm:"type:int(11)" json:"goods_id"` //关联商品
|
|||
GoodsStatus int `gorm:"type:tinyint(1);" json:"goods_status"` //关联商品状态 1:正常 2:已下架
|
|||
Num int64 `gorm:"type:int(11)" json:"num"` //商品数量
|
|||
HireType int `gorm:"type:tinyint(1)" json:"hire_type"` //佣金类型 1:固定佣金 2:比例抽成
|
|||
HireMoney float64 `gorm:"type:decimal(10,2);" json:"hire_money"` //hire_type==1 佣金金额
|
|||
HireRatio float64 `gorm:"type:decimal(10,2);" json:"hire_ratio"` //hire_type==2 抽成比例
|
|||
StartTime *time.Time `gorm:"column:start_time" json:"start_time"` //任务起始时间
|
|||
EndTime *time.Time `gorm:"column:end_time" json:"end_time"` //任务结束时间
|
|||
ClaimNum int64 `gorm:"type:int(11);" json:"claim_num"` //接任务人数
|
|||
CollectionNum int64 `gorm:"type:int(11)" json:"collection_num"` //收藏人数
|
|||
ClaimDays int `gorm:"type:tinyint(11)" json:"claim_days"` //任务完成天数
|
|||
ClaimDemands string `gorm:"type:varchar(500);" json:"claim_demands"` //任务拍摄要求
|
|||
CreateBy string `gorm:"size:64" json:"create_by"` //创建人
|
|||
Status int `gorm:"type:tinyint(1);" json:"status"` //状态 1:未开始 2:进行中 3:已结束
|
|||
ClaimStock int64 `json:"claim_stock"` //可接任务库存
|
|||
FundLock float64 `gorm:"type:decimal(10,2)" json:"fund_lock"` // 任务锁定营销账户金额
|
|||
Sample //样品
|
|||
VideoMaterial //视频素材
|
|||
Description string `gorm:"type:varchar(2000);" json:"description"` //描述/卖点
|
|||
|
|||
global.MG_MODEL |
|||
} |
|||
|
|||
type MissionDetail struct { |
|||
Title string `json:"title"` //标题
|
|||
GoodsId uint `json:"-"` //
|
|||
GoodsStatus int `json:"goods_status"` //关联商品状态 1:正常 2:已下架
|
|||
Goods TbGoods4List `gorm:"ForeignKey:GoodsId" json:"goods"` //商品信息
|
|||
Num int64 `json:"num"` //商品数量
|
|||
HireType int `json:"hire_type"` //佣金类型 1:固定佣金 2:比例抽成
|
|||
HireMoney float64 `json:"hire_money"` //hire_type==1 佣金金额
|
|||
HireRatio float64 `json:"hire_ratio"` //hire_type==2 抽成比例
|
|||
HireMoneyExpect string `gorm:"-" json:"hire_money_expect"` //预计佣金描述
|
|||
StartTime *time.Time `json:"start_time"` //任务起始时间
|
|||
EndTime *time.Time `json:"end_time"` //任务结束时间
|
|||
Status int `json:"status"` //状态 1:未开始 2:进行中 3:已结束
|
|||
ClaimNum int64 `json:"claim_num"` //接任务人数
|
|||
ClaimStock int64 `json:"claim_stock"` //可接任务库存
|
|||
OrderNum int64 `gorm:"-" json:"order_num"` //订单数
|
|||
ClaimDays int `gorm:"type:tinyint(11)" json:"claim_days"` //任务完成天数
|
|||
ClaimDemands string `gorm:"type:varchar(500);" json:"claim_demands"` //任务拍摄要求
|
|||
Description string `gorm:"type:varchar(2000);" json:"description"` //描述/卖点
|
|||
Sample |
|||
VideoMaterial |
|||
ReleaseCountry string `gorm:"-" json:"release_country"` //发布国家
|
|||
ReleaseChannels string `gorm:"-" json:"release_channels"` //发布渠道
|
|||
StoreNo string `gorm:"type:varchar(60);" json:"store_no"` // 店铺编号
|
|||
global.MG_MODEL |
|||
} |
|||
|
|||
type Sample struct { |
|||
HasSample int `gorm:"type:tinyint(1);default:0" json:"has_sample"` //是否有样品 0:没有 1:有
|
|||
SampleNum int `gorm:"type:tinyint(11);" json:"sample_num"` //样品数量
|
|||
} |
|||
|
|||
type VideoMaterial struct { |
|||
HasVideo int `gorm:"type:tinyint(1);default:0" json:"has_video"` //是否有视频素材 0:没有 1:有
|
|||
VideoUrl string `json:"video_url"` |
|||
VideoChannelIds string `json:"video_channel_ids"` //视频发布渠道,多个渠道英文逗号连接
|
|||
VideoCountryId string `json:"video_country_id"` //视频发布国家
|
|||
} |
|||
|
|||
func (Mission) TableName() string { |
|||
return "mission" |
|||
} |
|||
|
|||
func (MissionDetail) TableName() string { |
|||
return "mission" |
|||
} |
@ -0,0 +1,60 @@ |
|||
package model |
|||
|
|||
import ( |
|||
"bkb-seller/global" |
|||
"time" |
|||
) |
|||
|
|||
type MissionClaim struct { //领取任务记录
|
|||
MissionId uint `gorm:"type:int(11)" json:"mission_id"` //任务id
|
|||
ClaimNo string `gorm:"unique;type:varchar(60);" json:"claim_no"` //领取任务编号
|
|||
AchieveNum int64 `gorm:"type:int(11)" json:"achieve_num"` //已完成商品数量
|
|||
CreateBy string `gorm:"size:64" json:"create_by"` //创建人
|
|||
Status int `gorm:"type:tinyint(1)" json:"status"` //状态 1:已领取待发货 2:已发货 3:已收货推广中
|
|||
ExpireAt time.Time `json:"expire_at"` //任务推广过期时间
|
|||
Finished int `gorm:"type:tinyint(1);" json:"finished"` // 任务完成状态 0:未完成 1:已完成
|
|||
global.MG_MODEL |
|||
} |
|||
|
|||
type MissionClaimDetail struct { |
|||
global.MG_MODEL |
|||
MissionId uint `json:"mission_id"` //任务id
|
|||
ClaimNo string `json:"claim_no"` //领取任务编号
|
|||
AchieveNum int64 `json:"achieve_num"` //完成数
|
|||
Status int `json:"status"` //状态 1:已领取待发货 2:已发货 3:已收货推广中
|
|||
HireMoney float64 `gorm:"-" json:"hire_money"` //佣金
|
|||
CreateBy string `json:"-"` |
|||
Influencer InfluencerUserView `gorm:"ForeignKey:UUID;References:CreateBy" json:"influencer"` //网红信息
|
|||
Works []MissionClaimWorks `gorm:"ForeignKey:MissionClaimId;References:ID" json:"works"` //发布作品
|
|||
Mission MissionDetail `gorm:"ForeignKey:MissionId;AssociationForeignKey:ID" json:"mission"` //关联任务
|
|||
Order MissionClaimOrderInfo `gorm:"ForeignKey:MissionClaimId;AssociationForeignKey:ID" json:"order"` //任务订单
|
|||
} |
|||
|
|||
type MissionClaimInfluencer struct { |
|||
global.MG_MODEL |
|||
MissionId uint `json:"mission_id"` //任务id
|
|||
ClaimNo string `json:"claim_no"` //领取任务编号
|
|||
AchieveNum int64 `json:"achieve_num"` //完成数
|
|||
Status int `json:"status"` //状态 1:已领取待发货 2:已发货 3:已收货推广中
|
|||
HireMoney float64 `gorm:"-" json:"hire_money"` //佣金
|
|||
CreateBy string `json:"-"` |
|||
Influencer InfluencerUserDesc `gorm:"ForeignKey:UUID;References:CreateBy" json:"influencer"` //网红信息
|
|||
Works []MissionClaimWorks `gorm:"ForeignKey:MissionClaimId;References:ID" json:"works"` //发布作品
|
|||
Video MissionClaimVideo `gorm:"ForeignKey:MissionClaimId;References:ID" json:"video"` //上传视频
|
|||
} |
|||
|
|||
type MissionClaimInfo struct { |
|||
MissionId uint `json:"mission_id"` //任务id
|
|||
ClaimNo string `json:"claim_no"` //领取任务编号
|
|||
HireType int `gorm:"type:tinyint(1)" json:"hire_type"` //佣金类型 1:固定佣金 2:比例抽成
|
|||
HireMoney float64 `gorm:"type:decimal(10,2);" json:"hire_money"` //hire_type==1 佣金金额
|
|||
HireRatio float64 `gorm:"type:decimal(10,2);" json:"hire_ratio"` //hire_type==2 抽成比例
|
|||
} |
|||
|
|||
func (MissionClaim) TableName() string { |
|||
return "mission_claim" |
|||
} |
|||
|
|||
func (MissionClaimDetail) TableName() string { |
|||
return "mission_claim" |
|||
} |
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue