Browse Source

init

develop
文武 9 months ago
parent
commit
812db10a6a
  1. 18
      .gitignore
  2. 8
      Dockerfile
  3. 67
      Makefile
  4. 3
      README.md
  5. 40
      api/global/dict.go
  6. 151
      api/global/global.go
  7. 33
      api/influencer/banner.go
  8. 36
      api/influencer/chain.go
  9. 354
      api/influencer/mission.go
  10. 162
      api/influencer/order.go
  11. 29
      api/influencer/tb_goods.go
  12. 76
      api/influencer/tools.go
  13. 356
      api/influencer/user.go
  14. 347
      api/influencer/wallet.go
  15. 42
      api/sys/sys_brochure.go
  16. 50
      api/sys/sys_user.go
  17. 30
      api/sys/version.go
  18. 122
      config-prod.yaml
  19. 122
      config.yaml
  20. 1
      config/auto_code.go
  21. 7
      config/captcha.go
  22. 5
      config/casbin.go
  23. 23
      config/config.go
  24. 11
      config/dysmsapi.go
  25. 11
      config/email.go
  26. 2
      config/excel.go
  27. 21
      config/gorm.go
  28. 10
      config/gorm_settings.go
  29. 8
      config/jpush.go
  30. 7
      config/jwt.go
  31. 2
      config/minio.go
  32. 31
      config/oss.go
  33. 11
      config/paypal.go
  34. 7
      config/redis.go
  35. 9
      config/system.go
  36. 13
      config/timer.go
  37. 5
      config/tools.go
  38. 13
      config/zap.go
  39. 38
      core/server.go
  40. 17
      core/server_other.go
  41. 19
      core/server_win.go
  42. 56
      core/viper.go
  43. 103
      core/zap.go
  44. 4378
      docs/docs.go
  45. 4354
      docs/swagger.json
  46. 2897
      docs/swagger.yaml
  47. 820
      dto/customer.pb.go
  48. 60
      dto/customer.proto
  49. 25
      global/global.go
  50. 56
      global/model.go
  51. 118
      go.mod
  52. 781
      go.sum
  53. 253
      initialize/api/email.pb.go
  54. 32
      initialize/api/email.proto
  55. 111
      initialize/api/email_grpc.pb.go
  56. 1429
      initialize/api/greeter.pb.go
  57. 126
      initialize/api/greeter.proto
  58. 432
      initialize/api/greeter_grpc.pb.go
  59. 329
      initialize/api/sms.pb.go
  60. 47
      initialize/api/sms.proto
  61. 150
      initialize/api/sms_grpc.pb.go
  62. 110
      initialize/gorm.go
  63. 89
      initialize/grpc.go
  64. 52
      initialize/internal/gorm.go
  65. 33
      initialize/internal/logger.go
  66. 24
      initialize/international.go
  67. 44
      initialize/redis.go
  68. 53
      initialize/router.go
  69. 23
      initialize/timer.go
  70. 22
      initialize/validator.go
  71. 36
      main.go
  72. 132
      middleware/Ijwt.go
  73. 26
      middleware/cors.go
  74. 61
      middleware/error.go
  75. 203
      middleware/jwt.go
  76. 26
      middleware/loadtls.go
  77. 23
      middleware/need_init.go
  78. 50
      middleware/params.go
  79. 29
      model/account.go
  80. 22
      model/address.go
  81. 21
      model/application.go
  82. 22
      model/banner.go
  83. 9
      model/base.go
  84. 51
      model/bill.go
  85. 22
      model/bill_fund.go
  86. 13
      model/collectiom_goods.go
  87. 13
      model/collection_mission.go
  88. 49
      model/dict.go
  89. 26
      model/dt_statistic_order.go
  90. 14
      model/goods_visit.go
  91. 13
      model/internationalization.go
  92. 98
      model/mission.go
  93. 49
      model/mission_claim.go
  94. 12
      model/mission_claim_address.go
  95. 43
      model/mission_claim_order.go
  96. 17
      model/mission_claim_order_goods.go
  97. 37
      model/mission_claim_video.go
  98. 17
      model/mission_claim_works.go
  99. 27
      model/mission_recommend.go
  100. 16
      model/notify.go

18
.gitignore

@ -0,0 +1,18 @@
# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.log
# Test binary, build with `go test -c`
*.test
# Output of the go coverage tool, specifically when used with LiteIDE
*.out
.idea/
*.history
*_debug*
*.vscode
cache/

8
Dockerfile

@ -0,0 +1,8 @@
FROM registry.cn-shanghai.aliyuncs.com/lj-go/alpine
LABEL MAINTAINER="NFT"
WORKDIR /go/src/nft
COPY . /go/src/nft
RUN ls
EXPOSE 8001
ENTRYPOINT ./server.app

67
Makefile

@ -0,0 +1,67 @@
GOHOSTOS:=$(shell go env GOHOSTOS)
GOPATH:=$(shell go env GOPATH)
VERSION=$(shell git describe --tags --always)
ifeq ($(GOHOSTOS), windows)
#the `find.exe` is different from `find` in bash/shell.
#to see https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/find.
#changed to use git-bash.exe to run find cli or other cli friendly, caused of every developer has a Git.
#Git_Bash= $(subst cmd\,bin\bash.exe,$(dir $(shell where git)))
Git_Bash=$(subst \,/,$(subst cmd\,bin\bash.exe,$(dir $(shell where git))))
INTERNAL_PROTO_FILES=$(shell $(Git_Bash) -c "find internal -name *.proto")
API_PROTO_FILES=$(shell $(Git_Bash) -c "find dto -name *.proto")
else
INTERNAL_PROTO_FILES=$(shell find internal -name *.proto)
API_PROTO_FILES=$(shell find dto -name *.proto)
SD_PROTO_FILES=$(shell find pkg/stable_diffusion -name *.proto)
endif
.PHONY: init
# init env
init:
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
go install github.com/go-kratos/kratos/cmd/kratos/v2@latest
go install github.com/go-kratos/kratos/cmd/protoc-gen-go-http/v2@latest
go install github.com/google/gnostic/cmd/protoc-gen-openapi@latest
go install github.com/google/wire/cmd/wire@latest
.PHONY: config
# generate internal proto
config:
protoc --proto_path=./internal \
--proto_path=./third_party \
--go_out=paths=source_relative:./internal \
$(INTERNAL_PROTO_FILES)
.PHONY: api
# generate api proto
api:
protoc --proto_path=./dto \
--go_out=paths=source_relative:./dto \
--go-http_out=paths=source_relative:./dto \
--go-grpc_out=paths=source_relative:./dto \
--openapi_out=fq_schema_naming=true,default_response=false:. \
$(API_PROTO_FILES)
ls ./dto/*.pb.go | xargs -n1 -IX bash -c 'sed s/,omitempty// X > X.tmp && mv X{.tmp,}'
# show help
help:
@echo ''
@echo 'Usage:'
@echo ' make [target]'
@echo ''
@echo 'Targets:'
@awk '/^[a-zA-Z\-\_0-9]+:/ { \
helpMessage = match(lastLine, /^# (.*)/); \
if (helpMessage) { \
helpCommand = substr($$1, 0, index($$1, ":")); \
helpMessage = substr(lastLine, RSTART + 2, RLENGTH); \
printf "\033[36m%-22s\033[0m %s\n", helpCommand,helpMessage; \
} \
} \
{ lastLine = $$0 }' $(MAKEFILE_LIST)
.DEFAULT_GOAL := help

3
README.md

@ -1,2 +1 @@
# app-api
# app-api

40
api/global/dict.go

@ -0,0 +1,40 @@
package global
import (
"pure/model/request"
"pure/model/response"
"pure/service"
"pure/utils"
"github.com/gin-gonic/gin"
)
// 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 interface{}
params request.SearchDictDataParams
)
_ = c.ShouldBindQuery(&params)
if err = utils.Verify(params, utils.DictDataVerity); err != nil {
response.FailWithMessage(err.Error(), c)
return
}
if err, list = service.GetSysDictDataList(params.TypeCode); err != nil {
////global.MG_LOG.Error("获取失败!", zap.Any("err", err))
response.FailWithMessage("获取失败", c)
} else {
response.OkWithDetailed(response.SelectListResult{
List: list,
}, "获取成功", c)
}
}

151
api/global/global.go

@ -0,0 +1,151 @@
package global
import (
"github.com/gin-gonic/gin"
"pure/api/sys"
"pure/global"
"pure/model"
"pure/model/request"
"pure/model/response"
"pure/service"
"pure/utils"
)
// @Summary 获取用户收货地址列表【v1.0】
// @Security Bearer
// @Description
// @Tags 公用-收货地址
// @Success 200 {object} []model.Address "{"code": 0, "data": [...]}"
// @Success 200 {string} string "{"code": 1, "message": ""}"
// @Router /global/address [get]
func GetAddressList(c *gin.Context) {
var (
err error
userID string
req request.ReqAddress
data any
)
c.ShouldBind(&req)
userID = sys.GetUserUuid(c)
err, data = service.GetUserAddressList(userID, &req)
if err != nil {
response.FailWithMessage(err.Error(), c)
return
}
response.OkWithData(data, c)
}
// @Summary 添加收货地址【v1.0】
// @Security Bearer
// @Description
// @Tags 公用-收货地址
// @Param data body model.Address false "data..."
// @Success 200 {string} string "{"code": 0, "data": [...]}"
// @Success 200 {string} string "{"code": 1, "message": ""}"
// @Router /global/address [post]
func AddAddress(c *gin.Context) {
var (
err error
userID string
data model.Address
)
c.ShouldBindJSON(&data)
userID = sys.GetUserUuid(c)
err = service.AddUserAddressList(userID, &data)
if err != nil {
response.FailWithMessage(err.Error(), c)
return
}
response.OkWithMessage("添加成功", c)
}
// @Summary 修改收货地址【v1.0】
// @Security Bearer
// @Description
// @Tags 公用-收货地址
// @Param data body model.Address false "data..."
// @Success 200 {string} string "{"code": 0, "data": [...]}"
// @Success 200 {string} string "{"code": 1, "message": ""}"
// @Router /global/address [put]
func UpdateAddress(c *gin.Context) {
var (
err error
userID string
data model.Address
)
c.ShouldBindJSON(&data)
userID = sys.GetUserUuid(c)
err = service.UpdateAddress(userID, &data)
if err != nil {
response.FailWithMessage(err.Error(), c)
return
}
response.OkWithMessage("修改成功", c)
}
// @Summary 删除收货地址【v1.0】
// @Security Bearer
// @Description
// @Tags 公用-收货地址
// @Param data body global.BASE_ID false "data..."
// @Success 200 {string} string "{"code": 0, "data": [...]}"
// @Success 200 {string} string "{"code": 1, "message": ""}"
// @Router /global/address [delete]
func DeleteAddress(c *gin.Context) {
var (
err error
userID string
data global.BASE_ID
)
c.ShouldBindJSON(&data)
userID = sys.GetUserUuid(c)
err = service.DeleteAddress(userID, &data)
if err != nil {
response.FailWithMessage(err.Error(), c)
return
}
response.OkWithMessage("删除成功", c)
}
// @Summary 美国地区选择器【v1.0】
// @Security Bearer
// @Description
// @Tags 公用-收货地址
// @Success 200 {object} []model.UsSelect "{"code": 0, "data": [...]}"
// @Success 200 {string} string "{"code": 1, "message": ""}"
// @Router /global/usSelect [get]
func GetUsSelect(c *gin.Context) {
var (
err error
data any
)
err, data = service.GetUsSelect()
if err != nil {
response.FailWithMessage(err.Error(), c)
return
}
response.OkWithData(data, c)
}
// @Summary 查询物流信息
// @Security Bearer
// @Description
// @Tags track
// @Param data query request.IdReq false "params"
// @Success 200 {string} string "{"code": 1, "message": ""}"
// @Router /global/track [get]
func GetTrack(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
}
data, err := service.GetTrack(int64(info.ID))
if err != nil {
response.FailWithMessage(err.Error(), c)
return
}
response.OkWithData(data, c)
}

33
api/influencer/banner.go

@ -0,0 +1,33 @@
package influencer
import (
"github.com/gin-gonic/gin"
"pure/model/response"
"pure/service"
)
// GetBannerList
// @Tags banner
// @Summary 分页获取banner列表【v1.1.0新增】
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Success 200 {array} response.BannerListResponse "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /influencer/banner/list [get]
func GetBannerList(c *gin.Context) {
var (
err error
list interface{}
total int64
)
if err, list, total = service.GetBannerList(); err != nil {
////global.MG_LOG.Error("获取失败!", zap.Any("err", err))
response.FailWithMessage("获取失败", c)
} else {
response.OkWithDetailed(response.PageResult{
List: list,
Total: total,
}, "获取成功", c)
}
}

36
api/influencer/chain.go

@ -0,0 +1,36 @@
package influencer
import (
"github.com/gin-gonic/gin"
"pure/model/request"
"pure/model/response"
"pure/service"
"pure/utils"
)
// 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 /influencer/base/chain [get]
func GetChainInfo(c *gin.Context) {
var (
err error
params request.ChainParams
result []response.ChainResp
)
_ = c.ShouldBindQuery(&params)
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)
}

354
api/influencer/mission.go

@ -0,0 +1,354 @@
package influencer
import (
"pure/api/sys"
"pure/global"
"pure/model/request"
"pure/model/response"
"pure/service"
"pure/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} model.MissionDetail "{"code": 200, "data": {}}"
// @Router /influencer/mission/detail [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(sys.GetUserUuid(c), info.ID); err != nil {
global.MG_LOG.Error("获取失败!", zap.Any("err", err))
response.FailWithMessage("获取失败", c)
} else {
response.OkWithData(data, c)
}
}
// GetMissionList
// @Summary 获取任务列表【v1.0】
// @Description
// @Tags mission
// @Security ApiKeyAuth
// @Param data query request.SearchMission false "params"
// @Success 200 {array} model.MissionDetail "{"code": 200, "data": {}}"
// @Router /influencer/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 err, list, total := service.GetMissionList(sys.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)
}
}
// GetMissionClaim
// @Summary 获取我的任务详情【v1.0】
// @Description
// @Tags mission
// @Security ApiKeyAuth
// @Param data query request.IdReq false "params"
// @Success 200 {object} model.MissionClaimDetail "{"code": 200, "data": {}}"
// @Router /influencer/mission/claim [get]
func GetMissionClaim(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.GetMissionClaim(sys.GetUserUuid(c), info.ID); err != nil {
global.MG_LOG.Error("获取失败!", zap.Any("err", err))
response.FailWithMessage("获取失败", c)
} else {
response.OkWithData(data, 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 /influencer/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, list, total := service.MergeMissionClaimList(sys.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)
}
}
// ClaimMission
// @Summary 领取任务【v1.0】
// @Description
// @Tags mission
// @Security ApiKeyAuth
// @Param data body request.ClaimMission false "params"
// @Success 200 {string} string "{"code": 200, "data": {}}"
// @Router /influencer/mission/claim [post]
func ClaimMission(c *gin.Context) {
var info request.ClaimMission
_ = c.ShouldBindJSON(&info)
if err := utils.Verify(info, utils.MissionClaimVerify); err != nil {
response.FailWithMessage(err.Error(), c)
return
}
if err, id := service.ClaimMission(sys.GetUserUuid(c), info); err != nil {
global.MG_LOG.Error("领取失败!"+err.Error(), zap.Any("err", err))
response.FailWithMessage("领取失败!"+err.Error(), c)
} else {
response.OkWithDetailed(id, "领取成功", c)
}
}
// CollectMission
// @Summary 收藏/取消收藏任务【v1.0】
// @Description
// @Tags mission
// @Security ApiKeyAuth
// @Param data body request.MissionId false "params"
// @Success 200 {string} string "{"code": 200, "data": {}}"
// @Router /influencer/mission/collect [post]
func CollectMission(c *gin.Context) {
var info request.MissionId
_ = c.ShouldBindJSON(&info)
if err := utils.Verify(info, utils.MissionIdVerify); err != nil {
response.FailWithMessage(err.Error(), c)
return
}
if err, id := service.ChangeCollectionMission(sys.GetUserUuid(c), info); err != nil {
global.MG_LOG.Error("操作失败!"+err.Error(), zap.Any("err", err))
response.FailWithMessage("操作失败!"+err.Error(), c)
} else {
response.OkWithDetailed(id, "操作成功", c)
}
}
// GetCollectionMissionList
// @Summary 获取收藏任务列表【v1.0】
// @Description
// @Tags mission
// @Security ApiKeyAuth
// @Param data query request.SearchCollectionMission false "params"
// @Success 200 {array} model.MissionDetail "{"code": 200, "data": {}}"
// @Router /influencer/mission/collect-list [get]
func GetCollectionMissionList(c *gin.Context) {
var info request.SearchCollectionMission
_ = c.ShouldBindQuery(&info)
if err := utils.Verify(info.PageInfo, utils.PageInfoVerify); err != nil {
response.FailWithMessage(err.Error(), c)
return
}
if err, list, total := service.GetCollectionMissionList(sys.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)
}
}
// SubmitClaimMissionWorks
// @Summary 领取任务的提交作品【v1.0】
// @Description
// @Tags mission
// @Security ApiKeyAuth
// @Param data body request.ClaimMissionWorksList false "params"
// @Success 200 {string} string "{"code": 200, "data": {}}"
// @Router /influencer/mission/submit-works [post]
func SubmitClaimMissionWorks(c *gin.Context) {
var info request.ClaimMissionWorksList
_ = c.ShouldBindJSON(&info)
if err := utils.Verify(info, utils.MissionClaimIdVerify); err != nil {
response.FailWithMessage(err.Error(), c)
return
}
if err := service.SubmitClaimMissionWorks(sys.GetUserUuid(c), info); err != nil {
global.MG_LOG.Error("提交失败!"+err.Error(), zap.Any("err", err))
response.FailWithMessage("提交失败!"+err.Error(), c)
} else {
response.OkWithMessage("提交成功", c)
}
}
// GetMissionDetail
// @Summary 获取任务累计奖金
// @Description
// @Tags mission
// @Security ApiKeyAuth
// @Param data query request.MissionCode false "params"
// @Success 200 {object} model.MissionBonus "{"code": 200, "data": {}}"
// @Router /influencer/mission/bonus [get]
func GetMissionBonus(c *gin.Context) {
var info request.MissionCode
_ = c.ShouldBindQuery(&info)
if err := utils.Verify(info, utils.MissionCodeVerify); err != nil {
response.FailWithMessage(err.Error(), c)
return
}
data := service.GetMissionBonus(info.Code)
response.OkWithData(data, c)
}
// SubmitClaimMissionVideo
// @Summary 固定费用任务上传视频【v1.0】
// @Description
// @Tags mission
// @Security ApiKeyAuth
// @Param data body request.ClaimMissionVideo false "params"
// @Success 200 {string} string "{"code": 200, "data": {}}"
// @Router /influencer/mission/submit-video [post]
func SubmitClaimMissionVideo(c *gin.Context) {
var info request.ClaimMissionVideo
_ = c.ShouldBindJSON(&info)
if err := utils.Verify(info, utils.MissionClaimIdVerify); err != nil {
response.FailWithMessage(err.Error(), c)
return
}
if err := service.SubmitClaimMissionVideo(sys.GetUserUuid(c), info); err != nil {
global.MG_LOG.Error("提交失败!"+err.Error(), zap.Any("err", err))
response.FailWithMessage("提交失败!"+err.Error(), c)
} else {
response.OkWithMessage("提交成功", c)
}
}
// GetRecommendMissionList
// @Summary 获取首页任务列表【v1.0】
// @Description
// @Tags mission
// @Security ApiKeyAuth
// @Param data query request.SearchRecommendMission false "params"
// @Success 200 {array} response.MissionRecommendResponse "{"code": 200, "data": {}}"
// @Router /influencer/mission/recommend-list [get]
func GetRecommendMissionList(c *gin.Context) {
var info request.SearchRecommendMission
_ = c.ShouldBindQuery(&info)
if err := utils.Verify(info.PageInfo, utils.PageInfoVerify); err != nil {
response.FailWithMessage(err.Error(), c)
return
}
if err, list, total := service.GetRecommendMissionList(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)
}
}
// GetRecommendMissionDetail
// @Summary 获取首页任务详情【v1.0】
// @Description
// @Tags mission
// @Security ApiKeyAuth
// @Param data query request.IdReq false "params"
// @Success 200 {object} response.MissionRecommendResponse "{"code": 200, "data": {}}"
// @Router /influencer/mission/recommend-detail [get]
func GetRecommendMissionDetail(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.GetRecommendMissionDetail(info); err != nil {
global.MG_LOG.Error("获取失败!", zap.Any("err", err))
response.FailWithMessage("获取失败", c)
} else {
response.OkWithDetailed(data, "获取成功", c)
}
}
// GetSysRewardList
// @Summary 获取平台奖励列表【v1.0】
// @Description
// @Tags mission
// @Security ApiKeyAuth
// @Param data query request.SearchSysReward false "params"
// @Success 200 {array} model.SysMissionReward "{"code": 200, "data": {}}"
// @Router /influencer/mission/sys-reward-list [get]
func GetSysRewardList(c *gin.Context) {
var info request.SearchSysReward
_ = c.ShouldBindQuery(&info)
if err := utils.Verify(info.PageInfo, utils.PageInfoVerify); err != nil {
response.FailWithMessage(err.Error(), c)
return
}
uuid := sys.GetUserUuid(c)
if err, list, total := service.GetSysMissionRewardList(info, uuid); 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)
}
}
// GetSysRewardSummary
// @Summary 获取平台奖励汇总【v1.0】
// @Description
// @Tags mission
// @Security ApiKeyAuth
// @Param data query request.SearchSysRewardSummary false "params"
// @Success 200 {object} response.SysMissionBonus "{"code": 200, "data": {}}"
// @Router /influencer/mission/sys-reward-summary [get]
func GetSysRewardSummary(c *gin.Context) {
var info request.SearchSysRewardSummary
_ = c.ShouldBindQuery(&info)
uuid := sys.GetUserUuid(c)
if err, data := service.GetSysRewardSummary(uuid, info); err != nil {
global.MG_LOG.Error("获取失败!", zap.Any("err", err))
response.FailWithMessage("获取失败", c)
} else {
response.OkWithDetailed(data, "获取成功", c)
}
}

162
api/influencer/order.go

@ -0,0 +1,162 @@
package influencer
import (
"pure/api/sys"
"pure/dto"
"pure/model"
"pure/model/request"
"pure/model/response"
"pure/service"
"pure/utils"
"github.com/gin-gonic/gin"
)
// @Summary 获取订单数据
// @Security Bearer
// @Description
// @Tags order
// @Param data query request.SceneParams false "data..."
// @Success 200 {object} dto.OrderData "{"code": 0, "data": [...]}"
// @Success 201 {string} string "{"code": 1, "message": ""}"
// @Router /influencer/order/data [get]
func GetOrderData(c *gin.Context) {
var (
err error
params request.SceneParams
result dto.OrderData
)
_ = c.ShouldBindQuery(&params)
userId := sys.GetUserUuid(c)
result, err = service.GetOrderData(userId, &params)
if err != nil {
response.FailWithMessage(err.Error(), c)
return
}
response.OkWithDataMessage(result, "获取成功", c)
}
// @Summary 获取订单详情
// @Security Bearer
// @Description
// @Tags order
// @Param data query request.GetOrderParams false "data..."
// @Success 200 {object} model.OrderDetail "{"code": 0, "data": [...]}"
// @Success 201 {string} string "{"code": 1, "message": ""}"
// @Router /influencer/order/detail [get]
func GetOrderDetail(c *gin.Context) {
var (
err error
params request.GetOrderParams
result model.OrderDetail
)
_ = c.ShouldBindQuery(&params)
if err = utils.Verify(params, utils.OrderIdVerity); err != nil {
response.FailWithMessage(err.Error(), c)
return
}
userId := sys.GetUserUuid(c)
err, result = service.GetOrderDetail(userId, &params)
if err != nil {
response.FailWithMessage(err.Error(), c)
return
} else {
response.OkWithDataMessage(result, "获取成功", c)
return
}
}
// @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 /influencer/order/list [get]
func GetUserOrderList(c *gin.Context) {
var (
err error
params request.SearchOrderList
list interface{}
total int64
)
_ = c.ShouldBindQuery(&params)
userID := sys.GetUserUuid(c)
if err, list, total = service.GetOrderList(userID, &params); err != nil {
response.FailWithMessage(err.Error(), c)
return
} else {
response.OkWithDetailed(response.PageResult{
List: list,
Total: total,
Page: params.Page,
PageSize: params.PageSize,
}, "获取成功", c)
}
}
func GetOrderTotalList(c *gin.Context) {
var (
err error
list interface{}
data request.SearchOrderList
)
_ = c.ShouldBindQuery(&data)
err, list = service.GetOrderTotalList(&data)
if err != nil {
response.FailWithMessage(err.Error(), c)
return
}
response.OkWithDetailed(list, "获取成功", c)
}
// @Summary 获取订单商品快照
// @Security Bearer
// @Description
// @Tags order
// @Param data query request.GetOrderParams false "data..."
// @Success 200 {object} model.OrderGoodsDetail "{"code": 0, "data": [...]}"
// @Success 201 {string} string "{"code": 1, "message": ""}"
// @Router /influencer/order/goods/snapshot [get]
func GetOrderGoodsInfo(c *gin.Context) {
var (
err error
params request.GetOrderParams
result model.OrderGoodsDetail
)
_ = c.ShouldBindQuery(&params)
userId := sys.GetUserUuid(c)
err, result = service.GetOrderGoods(userId, &params)
if err != nil {
response.FailWithMessage(err.Error(), c)
return
} else {
response.OkWithDataMessage(result, "获取成功", c)
return
}
}
// @Summary 获取任务下订单统计数据
// @Security Bearer
// @Description
// @Tags mission
// @Param data query request.MissionCode false "data..."
// @Success 200 {object} dto.MissionOrderStatistic "{"code": 0, "data": [...]}"
// @Success 201 {string} string "{"code": 1, "message": ""}"
// @Router /influencer/mission/order-data [get]
func GetMissionOrderStatistic(c *gin.Context) {
var (
err error
params request.MissionCode
result dto.MissionOrderStatistic
)
_ = c.ShouldBindQuery(&params)
userId := sys.GetUserUuid(c)
result, err = service.GetMissionOrderStatistic(userId, params.Code)
if err != nil {
response.FailWithMessage(err.Error(), c)
return
}
response.OkWithDataMessage(result, "获取成功", c)
}

29
api/influencer/tb_goods.go

@ -0,0 +1,29 @@
package influencer
import (
"github.com/gin-gonic/gin"
"go.uber.org/zap"
"pure/global"
"pure/model/request"
"pure/model/response"
"pure/service"
)
// GetTbGoodsDetail
// @Summary 获取商品详情
// @Description
// @Tags goods
// @Security ApiKeyAuth
// @Param data query request.Goods false "params"
// @Success 200 {object} model.TbGoodsDetail "{"code": 200, "data": {}}"
//@Router /influencer/goods/detail [get]
func GetTbGoodsDetail(c *gin.Context) {
var info request.Goods
_ = c.ShouldBindQuery(&info)
if err, data := service.GetTbGoods(info); err != nil {
global.MG_LOG.Error("获取失败!", zap.Any("err", err))
response.FailWithMessage("获取失败", c)
} else {
response.OkWithData(data, c)
}
}

76
api/influencer/tools.go

@ -0,0 +1,76 @@
package influencer
import (
"pure/model/request"
"pure/model/response"
"pure/service"
"pure/utils"
"regexp"
"time"
"github.com/gin-gonic/gin"
)
// 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(&params)
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.CountryCode, 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(&params)
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)
}

356
api/influencer/user.go

@ -0,0 +1,356 @@
package influencer
import (
"fmt"
"regexp"
"time"
"pure/api/sys"
"pure/global"
"pure/middleware"
"pure/model"
"pure/model/request"
"pure/model/response"
"pure/service"
"pure/utils"
"github.com/dgrijalva/jwt-go"
"github.com/gin-gonic/gin"
"github.com/go-redis/redis"
"go.uber.org/zap"
)
// Login
// @Summary 登录[v1.0.0]
// @Security Bearer
// @Description
// @Tags auth
// @Param data body request.UserLogin true "email,password..."
// @Success 200 {string} string "{"code": 0, "data": [...]}"
// @Success 200 {string} string "{"code": 1, "message": ""}"
// @Router /influencer/base/login [post]
func LoginInfluencer(c *gin.Context) {
var (
err error
l request.UserLogin
user *model.User
)
_ = c.ShouldBindJSON(&l)
if err := utils.Verify(l, utils.LoginVerify); err != nil {
response.FailWithMessage(err.Error(), c)
return
}
if l.Type == "1" {
if err := utils.Verify(l, utils.LoginPhoneVerify); err != nil {
response.FailWithMessage(err.Error(), c)
return
}
//校验手机号格式
if ok, _ := regexp.MatchString(utils.RegPhoneNumber, l.Phone); !ok {
response.FailWithMessage("手机号码格式不合法", c)
return
}
if l.CountryCode == "" {
l.CountryCode = "86"
}
} else if l.Type == "2" {
if err := utils.Verify(l, utils.LoginEmailVerify); err != nil {
response.FailWithMessage(err.Error(), c)
return
}
//校验邮箱格式
if ok, _ := regexp.MatchString(utils.RegEmailNumber, l.Email); !ok {
response.FailWithMessage("邮箱格式不合法", c)
return
}
} else {
response.FailWithMessage("登录类型不合法", c)
return
}
if err, user = service.UserLogin(&l); err != nil {
global.MG_LOG.Error("Login failed! The user name does not exist or the password is wrong!", zap.Any("err", err))
fmt.Println(err)
response.FailWithMessage("The user name does not exist or the password is wrong", c)
return
}
// if user.IDForbidden {
// response.OkWithDetailed(map[string]interface{}{"id_forbidden": user.IDForbidden, "forbidden_time": user.ForbiddenTime.Unix(), "forbidden_reason": user.ForbiddenReason}, "The user forbidden", c)
// return
// }
tokenNext(c, *user)
}
// Register
// @Summary 注册[v1.0.0]
// @Security Bearer
// @Description
// @Tags auth
// @Param data body request.UserRegister true "email,password..."
// @Success 200 {string} string "{"code": 0, "data": "注册成功"}"
// @Success 200 {string} string "{"code": 1, "message": ""}"
// @Router /influencer/base/register [post]
func Register(c *gin.Context) {
var (
err error
l request.UserRegister
user *model.User
)
_ = c.ShouldBindJSON(&l)
if err := utils.Verify(l, utils.RegisterVerify); err != nil {
response.FailWithMessage(err.Error(), c)
return
}
//校验邮箱格式
if ok, _ := regexp.MatchString(utils.RegEmailNumber, l.Email); !ok {
response.FailWithMessage("邮箱格式不合法", c)
return
}
if l.CountryCode == "" {
l.CountryCode = "86"
}
if err, user = service.UserRegister(&l); err != nil {
global.MG_LOG.Error("Register failed!", zap.Any("err", err))
response.FailWithMessage(err.Error(), 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.UserClaims{
UUID: user.UUID.String(),
NickName: user.NickName,
Email: user.Email,
Appid: user.Appid,
Type: user.Type,
IDForbidden: user.IDForbidden,
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: "qmPlus", // 签名的发行者
},
}
token, err := j.CreateToken(claims)
if err != nil {
global.MG_LOG.Error("get token field!", zap.Any("err", err))
response.FailWithMessage("get token field", c)
return
}
if global.MG_CONFIG.System.UseMultipoint {
err, jwtStr := service.GetRedisJWT(user.Username)
if err == redis.Nil {
if err := service.SetRedisJWT(token, user.Username); err != nil {
global.MG_LOG.Error("set token failed!", zap.Any("err", err))
response.FailWithMessage("set token failed", c)
return
}
} else if err != nil {
global.MG_LOG.Error("get token failed!", zap.Any("err", err))
response.FailWithMessage("get token failed", c)
return
} else {
if err := service.JsonInBlacklist(model.JwtBlacklist{Jwt: jwtStr}); err != nil {
global.MG_LOG.Error("jwt作废失败!", zap.Any("err", err))
response.FailWithMessage("jwt作废失败", c)
return
}
if err := service.SetRedisJWT(token, user.Username); err != nil {
global.MG_LOG.Error("设置登录状态失败!", zap.Any("err", err))
response.FailWithMessage("设置登录状态失败", c)
return
}
}
}
// if !global.MG_CONFIG.System.UseMultipoint {
response.OkWithDetailed(response.LoginResponse{
User: user,
Token: token,
ExpiresAt: claims.StandardClaims.ExpiresAt * 1000,
}, "success", c)
}
// @Summary 获取用户基本信息[v1.0.0]
// @Security Bearer
// @Description
// @Tags 网红端-用户
// @Success 200 {object} model.UserSimple "{"code": 0, "data": [...]}"
// @Success 200 {string} string "{"code": 1, "message": ""}"
// @Router /influencer/user/detail [get]
func GetUserDetail(c *gin.Context) {
var (
err error
userID string
data interface{}
)
userID = sys.GetUserUuid(c)
err, data = service.GetUserDetail(userID)
if err != nil {
response.FailWithMessage(err.Error(), c)
return
}
response.OkWithData(data, c)
}
// @Summary 修改用户基本信息
// @Security Bearer
// @Description
// @Tags 网红端-用户
// @Param data body request.UserDetail false "data..."
// @Success 200 {string} string "{"code": 0, "data": [...]}"
// @Success 200 {string} string "{"code": 1, "message": ""}"
// @Router /influencer/user/detail [put]
func UpdateUserDetail(c *gin.Context) {
var (
err error
userID string
data request.UserDetail
)
err = c.ShouldBindJSON(&data)
if err != nil {
fmt.Println(err)
}
userID = sys.GetUserUuid(c)
err = service.UpdateUserDetail(userID, &data)
if err != nil {
response.FailWithMessage(err.Error(), c)
return
}
response.OkWithMessage("修改成功", c)
}
// BandPhone
// @Summary 网红绑定手机[v1.0.0]
// @Security Bearer
// @Description
// @Tags 网红端-用户
// @Param data body request.UserBandPhone true "email,password..."
// @Success 200 {string} string "{"code": 0, "data": "绑定成功"}"
// @Success 200 {string} string "{"code": 1, "message": ""}"
// @Router /influencer/user/bandPhone [post]
func BandPhone(c *gin.Context) {
var (
err error
l request.UserBandPhone
userID string
)
_ = c.ShouldBindJSON(&l)
if err := utils.Verify(l, utils.BandPhoneVerify); err != nil {
response.FailWithMessage(err.Error(), c)
return
}
userID = sys.GetUserUuid(c)
if err = service.UserBandPhone(&l, sys.GetUserAppid(c), userID); err != nil {
global.MG_LOG.Error("BandPhone failed!", zap.Any("err", err))
response.FailWithMessage(err.Error(), c)
return
}
response.OkWithMessage("绑定成功", c)
}
// PlatformAuth
// @Summary 平台认证[v1.0.0]
// @Security Bearer
// @Description
// @Tags 网红端-用户
// @Param data body request.UserPlatformAuth true "email,password..."
// @Success 200 {string} string "{"code": 0, "data": "绑定成功"}"
// @Success 200 {string} string "{"code": 1, "message": ""}"
// @Router /influencer/user/platformAuth [post]
func PlatformAuth(c *gin.Context) {
var (
err error
l request.UserPlatformAuth
userID string
)
err = c.ShouldBindJSON(&l)
if err != nil {
fmt.Println(err)
}
if err := utils.Verify(l, utils.PlatformAuthVerify); err != nil {
response.FailWithMessage(err.Error(), c)
return
}
userID = sys.GetUserUuid(c)
if err = service.UserPlatformAuth(&l, userID); err != nil {
global.MG_LOG.Error("PlatformAuth failed!", zap.Any("err", err))
response.FailWithMessage(err.Error(), c)
return
}
response.OkWithMessage("提交成功", c)
}
// PlatformAuth
// @Summary 授权登录[v1.0.0]
// @Security Bearer
// @Description
// @Tags auth
// @Param data body request.UserAuthorized true "email,password..."
// @Success 200 {string} string "{"code": 0, "data": "绑定成功"}"
// @Success 200 {string} string "{"code": 1, "message": ""}"
// @Router /base/authorized [post]
func Authorized(c *gin.Context) {
var (
err error
l request.UserAuthorized
user model.User
)
_ = c.ShouldBindJSON(&l)
if user, err = service.UserAuthorized(&l); err != nil {
global.MG_LOG.Error("Authorized failed!", zap.Any("err", err))
response.FailWithMessage(err.Error(), c)
return
}
tokenNext(c, user)
}
// @Summary 获取用户统计信息[v1.0.0]
// @Security Bearer
// @Description
// @Tags 网红端-用户
// @Success 200 {object} response.UserStatistics "{"code": 0, "data": [...]}"
// @Router /influencer/user/statistics [get]
func GetUserStatistics(c *gin.Context) {
var (
err error
userID string
data interface{}
)
userID = sys.GetUserUuid(c)
err, data = service.GetUserStatistics(userID)
if err != nil {
response.FailWithMessage(err.Error(), c)
return
}
response.OkWithData(data, c)
}
// @Summary 注销账户[v1.0.1]
// @Security Bearer
// @Description
// @Tags 网红端-用户
// @Success 200 {string} string "{"code": 0, "data": "注销成功"}"
// @Router /influencer/user/logoff [post]
func UserLogOff(c *gin.Context) {
var (
err error
userID string
)
userID = sys.GetUserUuid(c)
err = service.UserLogOff(userID)
if err != nil {
response.FailWithMessage(err.Error(), c)
return
}
//token加入黑名单
token := c.Request.Header.Get("x-token")
if err := service.JsonInBlacklist(model.JwtBlacklist{Jwt: token}); err != nil {
global.MG_LOG.Error("jwt作废失败!", zap.Any("err", err))
response.FailWithMessage("jwt作废失败", c)
return
}
response.OkWithMessage("注销成功", c)
}

347
api/influencer/wallet.go

@ -0,0 +1,347 @@
package influencer
import (
"pure/api/sys"
"pure/dto"
"pure/model"
"pure/model/request"
"pure/model/response"
"pure/service"
"pure/utils"
"github.com/gin-gonic/gin"
)
// @Summary 钱包基本信息
// @Security Bearer
// @Description
// @Tags 网红端-用户钱包
// @Success 200 {object} model.Wallet "{"code": 0, "data": [...]}"
// @Success 201 {string} string "{"code": 1, "message": ""}"
// @Router /influencer/wallet/detail [get]
func GetUserWalletDetail(c *gin.Context) {
var (
err error
userID string
data interface{}
)
userID = sys.GetUserUuid(c)
err, data = service.GetUserWalletDetail(userID)
if err != nil {
response.FailWithMessage(err.Error(), c)
return
}
response.OkWithData(data, c)
}
// @Summary 获取账户列表
// @Security Bearer
// @Description
// @Tags 网红端-用户钱包
// @Success 200 {object} []model.Account "{"code": 0, "data": [...]}"
// @Success 201 {string} string "{"code": 1, "message": ""}"
// @Router /influencer/wallet/accountList [get]
func GetUserAccountList(c *gin.Context) {
var (
err error
userID string
result []model.Account
)
userID = sys.GetUserUuid(c)
result, err = service.GetAccountList(userID)
if err != nil {
response.FailWithMessage(err.Error(), c)
return
}
response.OkWithData(result, c)
}
// @Summary 添加账户
// @Security Bearer
// @Description
// @Tags 网红端-用户钱包
// @Param data body request.AddAccount false "data..."
// @Success 200 {string} string "{"code": 0, "data": [...]}"
// @Success 201 {string} string "{"code": 1, "message": ""}"
// @Router /influencer/wallet/account [post]
func AddUserAccount(c *gin.Context) {
var (
err error
userID string
params request.AddAccount
)
_ = c.ShouldBindJSON(&params)
userID = sys.GetUserUuid(c)
if err = service.AddAccount(userID, &params); err != nil {
response.FailWithMessage(err.Error(), c)
return
}
response.OkWithMessage("绑定成功", c)
}
// @Summary 设置账户默认开关
// @Security Bearer
// @Description
// @Tags 网红端-用户钱包
// @Param data body request.IdReq false "data..."
// @Success 200 {string} string "{"code": 0, "data": [...]}"
// @Success 201 {string} string "{"code": 1, "message": ""}"
// @Router /influencer/wallet/account/default [put]
func UpdateAccountIsDefault(c *gin.Context) {
var (
err error
params request.IdReq
)
_ = c.ShouldBindJSON(&params)
if err = utils.Verify(params, utils.IdVerify); err != nil {
response.FailWithMessage(err.Error(), c)
return
}
userId := sys.GetUserUuid(c)
err = service.UpdateAccountIsDefault(userId, &params)
if err != nil {
response.FailWithMessage(err.Error(), c)
return
}
response.OkWithMessage("设置成功", c)
}
// @Summary 解绑账户
// @Security Bearer
// @Description
// @Tags 网红端-用户钱包
// @Param data body request.DeleteAccount false "data..."
// @Success 200 {string} string "{"code": 0, "data": [...]}"
// @Success 201 {string} string "{"code": 1, "message": ""}"
// @Router /influencer/wallet/account [delete]
func DeleteUserAccount(c *gin.Context) {
var (
err error
userID string
params request.DeleteAccount
)
_ = c.ShouldBindJSON(&params)
if err = utils.Verify(params, utils.IdVerify); err != nil {
response.FailWithMessage(err.Error(), c)
return
}
userID = sys.GetUserUuid(c)
err = service.DeleteAccount(userID, &params)
if err != nil {
response.FailWithMessage(err.Error(), c)
return
}
response.OkWithMessage("解绑成功", c)
}
func GetUserCommissionList(c *gin.Context) {
var (
err error
userID string
list interface{}
total int64
data request.SearchCommission
)
c.ShouldBindQuery(&data)
userID = sys.GetUserUuid(c)
err, list, total = service.GetUserCommissionList(userID, &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)
}
func GetUserWithdrawalList(c *gin.Context) {
var (
err error
userID string
list interface{}
total int64
data request.SearchWithdrawal
)
c.ShouldBindQuery(&data)
userID = sys.GetUserUuid(c)
err, list, total = service.GetUserWithdrawalList(userID, &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 网红端-用户钱包
// @Param data body request.WithdrawalParams false "data..."
// @Success 200 {object} model.WithdrawalView "{"code": 0, "data": [...]}"
// @Success 200 {string} string "{"code": 1, "message": ""}"
// @Router /influencer/wallet/withdrawal [post]
func UserWithdrawal(c *gin.Context) {
var (
err error
params request.WithdrawalParams
resp model.WithdrawalView
)
_ = c.ShouldBindJSON(&params)
if err = utils.Verify(params, utils.WithdrawalVerity); err != nil {
response.FailWithMessage(err.Error(), c)
return
}
userId := sys.GetUserUuid(c)
err, resp = service.Withdrawal(userId, &params)
if err != nil {
response.FailWithMessage(err.Error(), c)
return
}
response.OkWithDataMessage(resp, "提现成功", c)
}
// @Summary 获取对账中心数据
// @Security Bearer
// @Description
// @Tags 对账中心
// @Param data query request.GetBillDataParams false "data..."
// @Success 200 {object} dto.BillData "{"code": 0, "data": [...]}"
// @Success 201 {string} string "{"code": 1, "message": ""}"
// @Router /influencer/wallet/bill/data [get]
func GetUserBillData(c *gin.Context) {
var (
err error
params request.GetBillDataParams
result dto.BillData
)
_ = c.ShouldBindQuery(&params)
userId := sys.GetUserUuid(c)
result, err = service.GetBillData(userId, &params)
if err != nil {
response.FailWithMessage(err.Error(), c)
return
}
response.OkWithDataMessage(result, "获取成功", c)
}
// @Summary 获取资金流水记录
// @Security Bearer
// @Description
// @Tags 对账中心
// @Param data query request.SearchBillParams false "data..."
// @Success 200 {object} []model.Bill "{"code": 0, "data": [...]}"
// @Success 201 {string} string "{"code": 1, "message": ""}"
// @Router /influencer/wallet/bill-list [get]
func GetBillList(c *gin.Context) {
var (
err error
params request.SearchBillParams
result []model.Bill
)
_ = c.ShouldBindQuery(&params)
if err = utils.Verify(params, utils.BillListVerity); err != nil {
response.FailWithMessage(err.Error(), c)
return
}
userId := sys.GetUserUuid(c)
if result, err = service.GetBillList(userId, &params); err != nil {
response.FailWithMessage(err.Error(), c)
return
}
response.OkWithDetailed(response.PageResult{
List: result,
Page: params.Page,
PageSize: params.PageSize,
}, "获取成功", c)
}
// @Summary 获取账单通知列表
// @Security Bearer
// @Description
// @Tags 对账中心
// @Success 200 {object} []model.BillNotify "{"code": 0, "data": [...]}"
// @Success 201 {string} string "{"code": 1, "message": ""}"
// @Router /influencer/wallet/bill-notify [get]
func GetBillNotifyList(c *gin.Context) {
var (
err error
params request.SearchNotify
result []model.Notify
)
userId := sys.GetUserUuid(c)
params.Page = 1
params.PageSize = 5
params.RelationType = "1"
if result, _, err = service.GetNotifyList(userId, &params); err != nil {
response.FailWithMessage(err.Error(), c)
return
}
response.OkWithDataMessage(result, "获取成功", c)
}
// @Summary 获取提现详情
// @Security Bearer
// @Description
// @Tags 对账中心
// @Param data query request.FlowNoParam false "data..."
// @Success 200 {object} model.Withdrawal "{"code": 0, "data": [...]}"
// @Success 201 {string} string "{"code": 1, "message": ""}"
// @Router /influencer/wallet/withdrawal [get]
func GetWithdrawal(c *gin.Context) {
var (
err error
params request.FlowNoParam
result model.Withdrawal
)
_ = c.ShouldBindQuery(&params)
if err = utils.Verify(params, utils.FlowNoVerity); err != nil {
response.FailWithMessage(err.Error(), c)
return
}
userId := sys.GetUserUuid(c)
err, result = service.GetWithdrawal(userId, &params)
if err != nil {
response.FailWithMessage(err.Error(), c)
return
}
response.OkWithData(result, c)
}
// @Summary 获取提现记录
// @Security Bearer
// @Description
// @Tags 对账中心
// @Param data query request.PageInfo false "data..."
// @Success 200 {object} []model.Withdrawal "{"code": 0, "data": [...]}"
// @Success 201 {string} string "{"code": 1, "message": ""}"
// @Router /influencer/wallet/withdrawal-list [get]
func GetWithdrawalList(c *gin.Context) {
var (
err error
params request.PageInfo
result []model.Withdrawal
)
_ = c.ShouldBindQuery(&params)
if err = utils.Verify(params, utils.PageInfoVerify); err != nil {
response.FailWithMessage(err.Error(), c)
return
}
userId := sys.GetUserUuid(c)
if err, result = service.GetWithdrawalList(userId, &params); err != nil {
response.FailWithMessage(err.Error(), c)
return
}
response.OkWithDetailed(response.PageResult{
List: result,
Page: params.Page,
PageSize: params.PageSize,
}, "获取成功", c)
}

42
api/sys/sys_brochure.go

@ -0,0 +1,42 @@
package sys
import (
"github.com/gin-gonic/gin"
"go.uber.org/zap"
"pure/global"
"pure/model/request"
"pure/model/response"
"pure/service"
"pure/utils"
)
// GetSysBrochure
// @Summary 隐私协议单页
// @Tags tools
// @Param data query request.SysBrochureType false "params"
// @Success 200 {string} string "{"success":true,"data":{},"msg":""}"
// @Router /customer/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.OkWithDetailed(data.Content, "获取成功", c)
}
}
// GetSysBrochure2
// @Summary 隐私协议单页
// @Tags tools
// @Param data query request.SysBrochureType false "params"
// @Success 200 {string} string "{"success":true,"data":{},"msg":""}"
// @Router /influencer/base/brochure [get]
func GetSysBrochure2(c *gin.Context) {
}

50
api/sys/sys_user.go

@ -0,0 +1,50 @@
package sys
import (
"pure/global"
"pure/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.UserClaims)
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.UserClaims)
return waitUse.Username
}
}
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.UserClaims)
return waitUse.Appid
}
}
func getUserInfo(c *gin.Context) *request.UserClaims {
if claims, exists := c.Get("claims"); !exists {
global.MG_LOG.Error("从Gin的Context中获取从jwt解析出来的用户UUID失败, 请检查路由是否使用jwt中间件!")
return nil
} else {
waitUse := claims.(*request.UserClaims)
return waitUse
}
}

30
api/sys/version.go

@ -0,0 +1,30 @@
package sys
import (
"github.com/gin-gonic/gin"
"pure/model"
"pure/model/response"
"pure/service"
)
// @Summary 获取版本信息
// @Security Bearer
// @Description
// @Tags version
// @Success 200 {string} string "{"code": 0, "data": [...]}"
// @Success 201 {string} string "{"code": 1, "message": ""}"
// @Router /influencer/base/version [get]
func GetVersion(c *gin.Context) {
var (
err error
result model.VersionV
)
platform := c.GetString("platform")
version := c.GetString("version")
result, err = service.CheckVersion(platform, version)
if err != nil {
response.FailWithMessage(err.Error(), c)
} else {
response.OkWithData(result, c)
}
}

122
config-prod.yaml

@ -0,0 +1,122 @@
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: wqrefsad
expires-time: 604800
buffer-time: 86400
local:
path: uploads/file
mysql:
path: 172.16.0.26:3306
config: charset=utf8mb4&parseTime=True&loc=Local
db-name: bkb-prod
username: bkbrd
password: yJGQ3hlV#*4nTJrn
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: 2
# addr: 172.16.0.239:6379
# password: bkbrd:!Fgcye*HGs*Z&q0p
addr: redis-6715eafa-8e3f-4014-9659-ac647bd1ef46.cn-north-4.dcs.myhuaweicloud.com:6379
password: rMof*kkr!mfO7MHW
system:
env: prod
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: SandBox
client-id: Af7cbDvcc0qBEZDWgGU3ATZFJePJnFl-UH6foaGzmOu6w_8l1ewZRv88CO39HA0X_ATSR-TP_ZvM_t55
secret: EFsM94NOvKscr6J-U18rtVp0AIZXlrqWwjXP-vqnNXQ8s2c9TpLQo2hFuf0gYUJg4pjPonqCD4T7nrdW
return-url:
cancel-url:
order-back: 15
order-confirm: 1
tools:
# customer-url: http://120.55.164.69:30204
customer-url: https://h5-dev.bkbackground.com
dysmsapi:
accessSecret: ZAnicsJ4biuCbgpNnqQbYU34FhTmn3&
accessKeyID: LTAI5tLzNwMrdZUhdKpm9wor
signName: 一个地球
templateCode1: SMS_257761932
templateCode2: SMS_257742075
templateCode3: SMS_257742078
templateCode4: SMS_257767780

122
config.yaml

@ -0,0 +1,122 @@
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: wqrefsad
expires-time: 604800
buffer-time: 86400
local:
path: uploads/file
mysql:
path: 172.16.0.26:3306
config: charset=utf8mb4&parseTime=True&loc=Local
db-name: bkb
username: bkbrd
password: yJGQ3hlV#*4nTJrn
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: 1
# addr: 172.16.0.239:6379
# password: bkbrd:!Fgcye*HGs*Z&q0p
addr: redis-6715eafa-8e3f-4014-9659-ac647bd1ef46.cn-north-4.dcs.myhuaweicloud.com:6379
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
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: SandBox
client-id: Af7cbDvcc0qBEZDWgGU3ATZFJePJnFl-UH6foaGzmOu6w_8l1ewZRv88CO39HA0X_ATSR-TP_ZvM_t55
secret: EFsM94NOvKscr6J-U18rtVp0AIZXlrqWwjXP-vqnNXQ8s2c9TpLQo2hFuf0gYUJg4pjPonqCD4T7nrdW
return-url:
cancel-url:
order-back: 15
order-confirm: 1
tools:
# customer-url: http://120.55.164.69:30204
customer-url: https://h5-dev.bkbackground.com
dysmsapi:
accessSecret: ZAnicsJ4biuCbgpNnqQbYU34FhTmn3&
accessKeyID: LTAI5tLzNwMrdZUhdKpm9wor
signName: 一个地球
templateCode1: SMS_257761932
templateCode2: SMS_257742075
templateCode3: SMS_257742078
templateCode4: SMS_257767780

1
config/auto_code.go

@ -0,0 +1 @@
package config

7
config/captcha.go

@ -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"` // 验证码高度
}

5
config/casbin.go

@ -0,0 +1,5 @@
package config
type Casbin struct {
ModelPath string `mapstructure:"model-path" json:"modelPath" yaml:"model-path"` // 存放casbin模型的相对路径
}

23
config/config.go

@ -0,0 +1,23 @@
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"`
Email Email `mapstructure:"email" json:"email" yaml:"email"`
Casbin Casbin `mapstructure:"casbin" json:"casbin" yaml:"casbin"`
System System `mapstructure:"system" json:"system" yaml:"system"`
// 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"`
Qiniu Qiniu `mapstructure:"qiniu" json:"qiniu" yaml:"qiniu"`
AliyunOSS AliyunOSS `mapstructure:"aliyun-oss" json:"aliyunOSS" yaml:"aliyun-oss"`
TencentCOS TencentCOS `mapstructure:"tencent-cos" json:"tencentCOS" yaml:"tencent-cos"`
Timer Timer `mapstructure:"timer" json:"timer" yaml:"timer"`
JPush JPush `mapstructure:"jpush" json:"jpush" yaml:"jpush"`
Paypal Paypal `mapstructure:"paypal" json:"paypal" yaml:"paypal"`
Tools Tools `mapstructure:"tools" json:"tools" yaml:"tools"`
Dysmsapi Dysmsapi `mapstructure:"dysmsapi" json:"dysmsapi" yaml:"dysmsapi"`
}

11
config/dysmsapi.go

@ -0,0 +1,11 @@
package config
type Dysmsapi struct {
AccessSecret string `mapstructure:"accessSecret" json:"accessSecret" yaml:"accessSecret"` //买家端h5域名地址
AccessKeyID string `mapstructure:"accessKeyID" json:"accessKeyID" yaml:"accessKeyID"` //买家端h5域名地址
SignName string `mapstructure:"signName" json:"signName" yaml:"signName"` //买家端h5域名地址
TemplateCode1 string `mapstructure:"templateCode1" json:"templateCode1" yaml:"templateCode1"` //买家端h5域名地址
TemplateCode2 string `mapstructure:"templateCode2" json:"templateCode2" yaml:"templateCode2"` //买家端h5域名地址
TemplateCode3 string `mapstructure:"templateCode3" json:"templateCode3" yaml:"templateCode3"` //买家端h5域名地址
TemplateCode4 string `mapstructure:"templateCode4" json:"templateCode4" yaml:"templateCode4"` //买家端h5域名地址
}

11
config/email.go

@ -0,0 +1,11 @@
package config
type Email struct {
To string `mapstructure:"to" json:"to" yaml:"to"` // 收件人:多个以英文逗号分隔
Port int `mapstructure:"port" json:"port" yaml:"port"` // 端口
From string `mapstructure:"from" json:"from" yaml:"from"` // 收件人
Host string `mapstructure:"host" json:"host" yaml:"host"` // 服务器地址
IsSSL bool `mapstructure:"is-ssl" json:"isSSL" yaml:"is-ssl"` // 是否SSL
Secret string `mapstructure:"secret" json:"secret" yaml:"secret"` // 密钥
Nickname string `mapstructure:"nickname" json:"nickname" yaml:"nickname"` // 昵称
}

2
config/excel.go

@ -0,0 +1,2 @@
package config

21
config/gorm.go

@ -0,0 +1,21 @@
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
}
func (m *Mysql) GetLogMode() string {
return m.LogMode
}

10
config/gorm_settings.go

@ -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"`
}

8
config/jpush.go

@ -0,0 +1,8 @@
package config
type JPush struct {
Appkey string `mapstructure:"appkey" json:"appkey" yaml:"appkey"` //appkey
Secret string `mapstructure:"secret" json:"secret" yaml:"secret"` //密钥
AllUserSign string `mapstructure:"all-user-sign" json:"allUserSign" yaml:"all-user-sign"` //所有用户标签
AndroidIntent string `mapstructure:"android-intent" json:"androidIntent" yaml:"android-intent"` //安卓厂商通道包名
}

7
config/jwt.go

@ -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"` // 缓冲时间
}

2
config/minio.go

@ -0,0 +1,2 @@
package config

31
config/oss.go

@ -0,0 +1,31 @@
package config
type Local struct {
Path string `mapstructure:"path" json:"path" yaml:"path"` // 本地文件路径
}
type Qiniu struct {
Zone string `mapstructure:"zone" json:"zone" yaml:"zone"` // 存储区域
Bucket string `mapstructure:"bucket" json:"bucket" yaml:"bucket"` // 空间名称
ImgPath string `mapstructure:"img-path" json:"imgPath" yaml:"img-path"` // CDN加速域名
UseHTTPS bool `mapstructure:"use-https" json:"useHttps" yaml:"use-https"` // 是否使用https
AccessKey string `mapstructure:"access-key" json:"accessKey" yaml:"access-key"` // 秘钥AK
SecretKey string `mapstructure:"secret-key" json:"secretKey" yaml:"secret-key"` // 秘钥SK
UseCdnDomains bool `mapstructure:"use-cdn-domains" json:"useCdnDomains" yaml:"use-cdn-domains"` // 上传是否使用CDN上传加速
}
type AliyunOSS struct {
Endpoint string `mapstructure:"endpoint" json:"endpoint" yaml:"endpoint"`
AccessKeyId string `mapstructure:"access-key-id" json:"accessKeyId" yaml:"access-key-id"`
AccessKeySecret string `mapstructure:"access-key-secret" json:"accessKeySecret" yaml:"access-key-secret"`
BucketName string `mapstructure:"bucket-name" json:"bucketName" yaml:"bucket-name"`
BucketUrl string `mapstructure:"bucket-url" json:"bucketUrl" yaml:"bucket-url"`
}
type TencentCOS struct {
Bucket string `mapstructure:"bucket" json:"bucket" yaml:"bucket"`
Region string `mapstructure:"region" json:"region" yaml:"region"`
SecretID string `mapstructure:"secret-id" json:"secretID" yaml:"secret-id"`
SecretKey string `mapstructure:"secret-key" json:"secretKey" yaml:"secret-key"`
BaseURL string `mapstructure:"base-url" json:"baseURL" yaml:"base-url"`
PathPrefix string `mapstructure:"path-prefix" json:"pathPrefix" yaml:"path-prefix"`
}

11
config/paypal.go

@ -0,0 +1,11 @@
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"` //取消支付跳转
OrderBack int `mapstructure:"order-back" json:"order-back" yaml:"order-back"` //订单取消时间(分钟)
OrderConfirm int `mapstructure:"order-confirm" json:"order-confirm" yaml:"order-confirm"` //订单确认时间(天)
}

7
config/redis.go

@ -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"` // 密码
}

9
config/system.go

@ -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"` // 多点登录拦截
}

13
config/timer.go

@ -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"` // 时间间隔
}

5
config/tools.go

@ -0,0 +1,5 @@
package config
type Tools struct {
CustomerUrl string `mapstructure:"customer-url" json:"customer-url" yaml:"customer-url"` //买家端h5域名地址
}

13
config/zap.go

@ -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"` // 输出控制台
}

38
core/server.go

@ -0,0 +1,38 @@
package core
import (
"fmt"
"pure/global"
"pure/initialize"
"time"
"go.uber.org/zap"
)
type server interface {
ListenAndServe() error
}
func RunWindowsServer() {
// 初始化redis服务
initialize.Redis()
//NewRedisEventSink(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(`
欢迎使用 MangGuoNews-Admin
当前版本:V2.4.2
默认自动化文档地址:http://127.0.0.1%s/swagger/index.html
默认前端文件运行地址:http://127.0.0.1%s
`, address, address)
global.MG_LOG.Error(s.ListenAndServe().Error())
}

17
core/server_other.go

@ -0,0 +1,17 @@
// +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
}

19
core/server_win.go

@ -0,0 +1,19 @@
// +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,
}
}

56
core/viper.go

@ -0,0 +1,56 @@
package core
import (
"flag"
"fmt"
"os"
"pure/global"
_ "pure/packfile"
"pure/utils"
"github.com/fsnotify/fsnotify"
"github.com/spf13/viper"
)
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
}

103
core/zap.go

@ -0,0 +1,103 @@
package core
import (
"fmt"
"os"
"pure/global"
"pure/utils"
"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"))
}

4378
docs/docs.go

File diff suppressed because it is too large

4354
docs/swagger.json

File diff suppressed because it is too large

2897
docs/swagger.yaml

File diff suppressed because it is too large

820
dto/customer.pb.go

@ -0,0 +1,820 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.31.0
// protoc v3.21.12
// source: customer.proto
package dto
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 LoginRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email"`
Phone string `protobuf:"bytes,2,opt,name=phone,proto3" json:"phone"`
Code string `protobuf:"bytes,3,opt,name=code,proto3" json:"code"`
Password string `protobuf:"bytes,4,opt,name=password,proto3" json:"password"`
Type string `protobuf:"bytes,5,opt,name=type,proto3" json:"type"`
Appid string `protobuf:"bytes,6,opt,name=appid,proto3" json:"appid"`
}
func (x *LoginRequest) Reset() {
*x = LoginRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_customer_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *LoginRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*LoginRequest) ProtoMessage() {}
func (x *LoginRequest) ProtoReflect() protoreflect.Message {
mi := &file_customer_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 LoginRequest.ProtoReflect.Descriptor instead.
func (*LoginRequest) Descriptor() ([]byte, []int) {
return file_customer_proto_rawDescGZIP(), []int{0}
}
func (x *LoginRequest) GetEmail() string {
if x != nil {
return x.Email
}
return ""
}
func (x *LoginRequest) GetPhone() string {
if x != nil {
return x.Phone
}
return ""
}
func (x *LoginRequest) GetCode() string {
if x != nil {
return x.Code
}
return ""
}
func (x *LoginRequest) GetPassword() string {
if x != nil {
return x.Password
}
return ""
}
func (x *LoginRequest) GetType() string {
if x != nil {
return x.Type
}
return ""
}
func (x *LoginRequest) GetAppid() string {
if x != nil {
return x.Appid
}
return ""
}
type RegisterRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email"`
Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code"`
Nickname string `protobuf:"bytes,3,opt,name=nickname,proto3" json:"nickname"`
Avatar string `protobuf:"bytes,4,opt,name=avatar,proto3" json:"avatar"`
Appid string `protobuf:"bytes,5,opt,name=appid,proto3" json:"appid"`
}
func (x *RegisterRequest) Reset() {
*x = RegisterRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_customer_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RegisterRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RegisterRequest) ProtoMessage() {}
func (x *RegisterRequest) ProtoReflect() protoreflect.Message {
mi := &file_customer_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 RegisterRequest.ProtoReflect.Descriptor instead.
func (*RegisterRequest) Descriptor() ([]byte, []int) {
return file_customer_proto_rawDescGZIP(), []int{1}
}
func (x *RegisterRequest) GetEmail() string {
if x != nil {
return x.Email
}
return ""
}
func (x *RegisterRequest) GetCode() string {
if x != nil {
return x.Code
}
return ""
}
func (x *RegisterRequest) GetNickname() string {
if x != nil {
return x.Nickname
}
return ""
}
func (x *RegisterRequest) GetAvatar() string {
if x != nil {
return x.Avatar
}
return ""
}
func (x *RegisterRequest) GetAppid() string {
if x != nil {
return x.Appid
}
return ""
}
type SmsRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Phone string `protobuf:"bytes,1,opt,name=phone,proto3" json:"phone"`
}
func (x *SmsRequest) Reset() {
*x = SmsRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_customer_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SmsRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SmsRequest) ProtoMessage() {}
func (x *SmsRequest) ProtoReflect() protoreflect.Message {
mi := &file_customer_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 SmsRequest.ProtoReflect.Descriptor instead.
func (*SmsRequest) Descriptor() ([]byte, []int) {
return file_customer_proto_rawDescGZIP(), []int{2}
}
func (x *SmsRequest) GetPhone() string {
if x != nil {
return x.Phone
}
return ""
}
type WithdrawRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Phone string `protobuf:"bytes,1,opt,name=phone,proto3" json:"phone"` //账户绑定手机号
Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code"` //验证码
Amount float64 `protobuf:"fixed64,3,opt,name=amount,proto3" json:"amount"` //提现金额
AccountID int32 `protobuf:"varint,4,opt,name=accountID,proto3" json:"accountID"` //账户id
}
func (x *WithdrawRequest) Reset() {
*x = WithdrawRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_customer_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *WithdrawRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*WithdrawRequest) ProtoMessage() {}
func (x *WithdrawRequest) ProtoReflect() protoreflect.Message {
mi := &file_customer_proto_msgTypes[3]
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 WithdrawRequest.ProtoReflect.Descriptor instead.
func (*WithdrawRequest) Descriptor() ([]byte, []int) {
return file_customer_proto_rawDescGZIP(), []int{3}
}
func (x *WithdrawRequest) GetPhone() string {
if x != nil {
return x.Phone
}
return ""
}
func (x *WithdrawRequest) GetCode() string {
if x != nil {
return x.Code
}
return ""
}
func (x *WithdrawRequest) GetAmount() float64 {
if x != nil {
return x.Amount
}
return 0
}
func (x *WithdrawRequest) GetAccountID() int32 {
if x != nil {
return x.AccountID
}
return 0
}
type OrderData struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
All int64 `protobuf:"varint,1,opt,name=all,proto3" json:"all"` // 全部
Unship int64 `protobuf:"varint,2,opt,name=unship,proto3" json:"unship"` // 待发货
Shipped int64 `protobuf:"varint,3,opt,name=shipped,proto3" json:"shipped"` // 已发货
Finished int64 `protobuf:"varint,4,opt,name=finished,proto3" json:"finished"` // 已完成
Cancel int64 `protobuf:"varint,5,opt,name=cancel,proto3" json:"cancel"` // 已取消
}
func (x *OrderData) Reset() {
*x = OrderData{}
if protoimpl.UnsafeEnabled {
mi := &file_customer_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *OrderData) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*OrderData) ProtoMessage() {}
func (x *OrderData) ProtoReflect() protoreflect.Message {
mi := &file_customer_proto_msgTypes[4]
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 OrderData.ProtoReflect.Descriptor instead.
func (*OrderData) Descriptor() ([]byte, []int) {
return file_customer_proto_rawDescGZIP(), []int{4}
}
func (x *OrderData) GetAll() int64 {
if x != nil {
return x.All
}
return 0
}
func (x *OrderData) GetUnship() int64 {
if x != nil {
return x.Unship
}
return 0
}
func (x *OrderData) GetShipped() int64 {
if x != nil {
return x.Shipped
}
return 0
}
func (x *OrderData) GetFinished() int64 {
if x != nil {
return x.Finished
}
return 0
}
func (x *OrderData) GetCancel() int64 {
if x != nil {
return x.Cancel
}
return 0
}
type BillData struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Income float64 `protobuf:"fixed64,1,opt,name=income,proto3" json:"income"` // 收入总额
RewardUnfinished float64 `protobuf:"fixed64,2,opt,name=rewardUnfinished,proto3" json:"rewardUnfinished"` // 在途佣金
OrderMoney float64 `protobuf:"fixed64,3,opt,name=orderMoney,proto3" json:"orderMoney"` // 订单总额
OrderNum int64 `protobuf:"varint,4,opt,name=orderNum,proto3" json:"orderNum"` // 订单数
CancelOrderNum int64 `protobuf:"varint,5,opt,name=cancelOrderNum,proto3" json:"cancelOrderNum"` // 退款订单数
CancelOrderMoney float64 `protobuf:"fixed64,6,opt,name=cancelOrderMoney,proto3" json:"cancelOrderMoney"` // 退款订单总额
FlowIncome float64 `protobuf:"fixed64,7,opt,name=flowIncome,proto3" json:"flowIncome"` // 进账
FlowExpend float64 `protobuf:"fixed64,8,opt,name=flowExpend,proto3" json:"flowExpend"` // 出账
}
func (x *BillData) Reset() {
*x = BillData{}
if protoimpl.UnsafeEnabled {
mi := &file_customer_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *BillData) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*BillData) ProtoMessage() {}
func (x *BillData) ProtoReflect() protoreflect.Message {
mi := &file_customer_proto_msgTypes[5]
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 BillData.ProtoReflect.Descriptor instead.
func (*BillData) Descriptor() ([]byte, []int) {
return file_customer_proto_rawDescGZIP(), []int{5}
}
func (x *BillData) GetIncome() float64 {
if x != nil {
return x.Income
}
return 0
}
func (x *BillData) GetRewardUnfinished() float64 {
if x != nil {
return x.RewardUnfinished
}
return 0
}
func (x *BillData) GetOrderMoney() float64 {
if x != nil {
return x.OrderMoney
}
return 0
}
func (x *BillData) GetOrderNum() int64 {
if x != nil {
return x.OrderNum
}
return 0
}
func (x *BillData) GetCancelOrderNum() int64 {
if x != nil {
return x.CancelOrderNum
}
return 0
}
func (x *BillData) GetCancelOrderMoney() float64 {
if x != nil {
return x.CancelOrderMoney
}
return 0
}
func (x *BillData) GetFlowIncome() float64 {
if x != nil {
return x.FlowIncome
}
return 0
}
func (x *BillData) GetFlowExpend() float64 {
if x != nil {
return x.FlowExpend
}
return 0
}
type MissionOrderStatistic struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
OrderNum int64 `protobuf:"varint,1,opt,name=orderNum,proto3" json:"orderNum"` // 订单总数
OrderDoneNum int64 `protobuf:"varint,2,opt,name=orderDoneNum,proto3" json:"orderDoneNum"` // 完成订单总数
OrderMoney float64 `protobuf:"fixed64,3,opt,name=OrderMoney,proto3" json:"OrderMoney"` // 订单金额
SettleReward float64 `protobuf:"fixed64,4,opt,name=SettleReward,proto3" json:"SettleReward"` // 结算佣金
TransitReward float64 `protobuf:"fixed64,5,opt,name=TransitReward,proto3" json:"TransitReward"` // 在途佣金
RewardRatio float64 `protobuf:"fixed64,6,opt,name=RewardRatio,proto3" json:"RewardRatio"` // 佣金比例
Uv int64 `protobuf:"varint,7,opt,name=Uv,proto3" json:"Uv"` // 浏览人数
OrderUserNum int64 `protobuf:"varint,8,opt,name=OrderUserNum,proto3" json:"OrderUserNum"` // 下单人数
SellNum int64 `protobuf:"varint,9,opt,name=SellNum,proto3" json:"SellNum"` // 销售数量
}
func (x *MissionOrderStatistic) Reset() {
*x = MissionOrderStatistic{}
if protoimpl.UnsafeEnabled {
mi := &file_customer_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MissionOrderStatistic) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MissionOrderStatistic) ProtoMessage() {}
func (x *MissionOrderStatistic) ProtoReflect() protoreflect.Message {
mi := &file_customer_proto_msgTypes[6]
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 MissionOrderStatistic.ProtoReflect.Descriptor instead.
func (*MissionOrderStatistic) Descriptor() ([]byte, []int) {
return file_customer_proto_rawDescGZIP(), []int{6}
}
func (x *MissionOrderStatistic) GetOrderNum() int64 {
if x != nil {
return x.OrderNum
}
return 0
}
func (x *MissionOrderStatistic) GetOrderDoneNum() int64 {
if x != nil {
return x.OrderDoneNum
}
return 0
}
func (x *MissionOrderStatistic) GetOrderMoney() float64 {
if x != nil {
return x.OrderMoney
}
return 0
}
func (x *MissionOrderStatistic) GetSettleReward() float64 {
if x != nil {
return x.SettleReward
}
return 0
}
func (x *MissionOrderStatistic) GetTransitReward() float64 {
if x != nil {
return x.TransitReward
}
return 0
}
func (x *MissionOrderStatistic) GetRewardRatio() float64 {
if x != nil {
return x.RewardRatio
}
return 0
}
func (x *MissionOrderStatistic) GetUv() int64 {
if x != nil {
return x.Uv
}
return 0
}
func (x *MissionOrderStatistic) GetOrderUserNum() int64 {
if x != nil {
return x.OrderUserNum
}
return 0
}
func (x *MissionOrderStatistic) GetSellNum() int64 {
if x != nil {
return x.SellNum
}
return 0
}
var File_customer_proto protoreflect.FileDescriptor
var file_customer_proto_rawDesc = []byte{
0x0a, 0x0e, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x12, 0x03, 0x61, 0x70, 0x69, 0x22, 0x94, 0x01, 0x0a, 0x0c, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x14, 0x0a, 0x05,
0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x68, 0x6f,
0x6e, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f,
0x72, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f,
0x72, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09,
0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x70, 0x70, 0x69, 0x64, 0x18,
0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x70, 0x70, 0x69, 0x64, 0x22, 0x85, 0x01, 0x0a,
0x0f, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02,
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x69,
0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x69,
0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72,
0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x12, 0x14,
0x0a, 0x05, 0x61, 0x70, 0x70, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61,
0x70, 0x70, 0x69, 0x64, 0x22, 0x22, 0x0a, 0x0a, 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, 0x22, 0x71, 0x0a, 0x0f, 0x57, 0x69, 0x74, 0x68,
0x64, 0x72, 0x61, 0x77, 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, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18,
0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1c, 0x0a,
0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x44, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05,
0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x44, 0x22, 0x83, 0x01, 0x0a, 0x09,
0x4f, 0x72, 0x64, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x6c, 0x6c,
0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x61, 0x6c, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x75,
0x6e, 0x73, 0x68, 0x69, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x6e, 0x73,
0x68, 0x69, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x68, 0x69, 0x70, 0x70, 0x65, 0x64, 0x18, 0x03,
0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x73, 0x68, 0x69, 0x70, 0x70, 0x65, 0x64, 0x12, 0x1a, 0x0a,
0x08, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52,
0x08, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x61, 0x6e,
0x63, 0x65, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x63, 0x61, 0x6e, 0x63, 0x65,
0x6c, 0x22, 0x9e, 0x02, 0x0a, 0x08, 0x42, 0x69, 0x6c, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x12, 0x16,
0x0a, 0x06, 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x52, 0x06,
0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x65, 0x12, 0x2a, 0x0a, 0x10, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64,
0x55, 0x6e, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01,
0x52, 0x10, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x55, 0x6e, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68,
0x65, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x4d, 0x6f, 0x6e, 0x65, 0x79,
0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0a, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x4d, 0x6f, 0x6e,
0x65, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x18, 0x04,
0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x12, 0x26,
0x0a, 0x0e, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x4e, 0x75, 0x6d,
0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4f, 0x72,
0x64, 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x12, 0x2a, 0x0a, 0x10, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c,
0x4f, 0x72, 0x64, 0x65, 0x72, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x01,
0x52, 0x10, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x4d, 0x6f, 0x6e,
0x65, 0x79, 0x12, 0x1e, 0x0a, 0x0a, 0x66, 0x6c, 0x6f, 0x77, 0x49, 0x6e, 0x63, 0x6f, 0x6d, 0x65,
0x18, 0x07, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0a, 0x66, 0x6c, 0x6f, 0x77, 0x49, 0x6e, 0x63, 0x6f,
0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x70, 0x65, 0x6e, 0x64,
0x18, 0x08, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0a, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x70, 0x65,
0x6e, 0x64, 0x22, 0xb1, 0x02, 0x0a, 0x15, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4f, 0x72,
0x64, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x12, 0x1a, 0x0a, 0x08,
0x6f, 0x72, 0x64, 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08,
0x6f, 0x72, 0x64, 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x12, 0x22, 0x0a, 0x0c, 0x6f, 0x72, 0x64, 0x65,
0x72, 0x44, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c,
0x6f, 0x72, 0x64, 0x65, 0x72, 0x44, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x12, 0x1e, 0x0a, 0x0a,
0x4f, 0x72, 0x64, 0x65, 0x72, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01,
0x52, 0x0a, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x4d, 0x6f, 0x6e, 0x65, 0x79, 0x12, 0x22, 0x0a, 0x0c,
0x53, 0x65, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x18, 0x04, 0x20, 0x01,
0x28, 0x01, 0x52, 0x0c, 0x53, 0x65, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64,
0x12, 0x24, 0x0a, 0x0d, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72,
0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0d, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74,
0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64,
0x52, 0x61, 0x74, 0x69, 0x6f, 0x18, 0x06, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0b, 0x52, 0x65, 0x77,
0x61, 0x72, 0x64, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x55, 0x76, 0x18, 0x07,
0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x55, 0x76, 0x12, 0x22, 0x0a, 0x0c, 0x4f, 0x72, 0x64, 0x65,
0x72, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c,
0x4f, 0x72, 0x64, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x12, 0x18, 0x0a, 0x07,
0x53, 0x65, 0x6c, 0x6c, 0x4e, 0x75, 0x6d, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x53,
0x65, 0x6c, 0x6c, 0x4e, 0x75, 0x6d, 0x42, 0x0a, 0x5a, 0x08, 0x70, 0x75, 0x72, 0x65, 0x2f, 0x64,
0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_customer_proto_rawDescOnce sync.Once
file_customer_proto_rawDescData = file_customer_proto_rawDesc
)
func file_customer_proto_rawDescGZIP() []byte {
file_customer_proto_rawDescOnce.Do(func() {
file_customer_proto_rawDescData = protoimpl.X.CompressGZIP(file_customer_proto_rawDescData)
})
return file_customer_proto_rawDescData
}
var file_customer_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
var file_customer_proto_goTypes = []interface{}{
(*LoginRequest)(nil), // 0: api.LoginRequest
(*RegisterRequest)(nil), // 1: api.RegisterRequest
(*SmsRequest)(nil), // 2: api.SmsRequest
(*WithdrawRequest)(nil), // 3: api.WithdrawRequest
(*OrderData)(nil), // 4: api.OrderData
(*BillData)(nil), // 5: api.BillData
(*MissionOrderStatistic)(nil), // 6: api.MissionOrderStatistic
}
var file_customer_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for method output_type
0, // [0:0] 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_customer_proto_init() }
func file_customer_proto_init() {
if File_customer_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_customer_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*LoginRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_customer_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RegisterRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_customer_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SmsRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_customer_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*WithdrawRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_customer_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*OrderData); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_customer_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*BillData); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_customer_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MissionOrderStatistic); 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_customer_proto_rawDesc,
NumEnums: 0,
NumMessages: 7,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_customer_proto_goTypes,
DependencyIndexes: file_customer_proto_depIdxs,
MessageInfos: file_customer_proto_msgTypes,
}.Build()
File_customer_proto = out.File
file_customer_proto_rawDesc = nil
file_customer_proto_goTypes = nil
file_customer_proto_depIdxs = nil
}

60
dto/customer.proto

@ -0,0 +1,60 @@
syntax = "proto3";
package api;
option go_package = "pure/dto";
message LoginRequest{
string email = 1;
string phone = 2;
string code = 3;
string password = 4;
string type = 5;
string appid = 6;
}
message RegisterRequest{
string email = 1;
string code = 2;
string nickname = 3;
string avatar = 4;
string appid = 5;
}
message SmsRequest {
string phone = 1;
}
message WithdrawRequest {
string phone = 1;//
string code = 2; //
double amount = 3;//
int32 accountID = 4;//id
}
message OrderData{
int64 all = 1;//
int64 unship = 2;//
int64 shipped = 3;//
int64 finished = 4;//
int64 cancel = 5;//
}
message BillData{
double income = 1;//
double rewardUnfinished = 2;//
double orderMoney = 3;//
int64 orderNum = 4;//
int64 cancelOrderNum = 5;// 退
double cancelOrderMoney = 6;// 退
double flowIncome = 7;//
double flowExpend = 8;//
}
message MissionOrderStatistic{
int64 orderNum = 1;//
int64 orderDoneNum = 2;//
double OrderMoney = 3;//
double SettleReward = 4;//
double TransitReward = 5;//
double RewardRatio = 6; //
int64 Uv = 7;//
int64 OrderUserNum = 8;//
int64 SellNum = 9;//
}

25
global/global.go

@ -0,0 +1,25 @@
package global
import (
"pure/config"
"pure/initialize/api"
"pure/utils/timer"
"github.com/go-redis/redis"
"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
SMS_CLIENT api.SmsClient
EMAIL_CLIENT api.EmailClient
MG_Language interface{}
MG_Timer timer.Timer = timer.NewTimerTask()
)

56
global/model.go

@ -0,0 +1,56 @@
package global
import (
"time"
"gorm.io/gorm"
)
type MG_MODEL struct {
ID uint `gorm:"AUTO_INCREMENT;PRIMARY_KEY;" json:"id"` // 主键ID
CreatedAt time.Time `json:"created_at"` // 创建时间
UpdatedAt time.Time `json:"updated_at"` // 更新时间
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 TIME_MODEL struct {
CreatedAt time.Time `json:"-"`
UpdatedAt time.Time `json:"-"`
DeletedAt gorm.DeletedAt `json:"-"`
}
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 RedisValueScore struct {
Value string `json:"value"`
Score float64 `json:"score"`
}
type BASE_ID_STR struct {
ID string `gorm:"primary_key;size:50" json:"id" form:"id"` //主键
}

118
go.mod

@ -0,0 +1,118 @@
module pure
go 1.20
require (
github.com/aliyun/aliyun-oss-go-sdk v2.2.9+incompatible
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.9.0
github.com/go-kratos/kratos/contrib/registry/nacos/v2 v2.0.0-20230830131453-6c026bce56a9
github.com/go-kratos/kratos/v2 v2.7.0
github.com/go-redis/redis v6.15.9+incompatible
github.com/jordan-wright/email v4.0.1-0.20210109023952-943e75fe5223+incompatible
github.com/lestrrat-go/file-rotatelogs v2.4.0+incompatible
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/shirou/gopsutil v2.21.11+incompatible
github.com/spf13/cast v1.5.1
github.com/spf13/viper v1.16.0
github.com/swaggo/files v1.0.1
github.com/swaggo/gin-swagger v1.6.0
github.com/swaggo/swag v1.8.12
github.com/taskcluster/slugid-go v1.1.0
github.com/tencentyun/cos-go-sdk-v5 v0.7.42
github.com/unrolled/secure v1.13.0
github.com/w3liu/go-common v0.0.0-20210108072342-826b2f3582be
go.uber.org/zap v1.25.0
google.golang.org/grpc v1.56.1
google.golang.org/protobuf v1.31.0
gorm.io/driver/mysql v1.5.1
gorm.io/gorm v1.25.4
)
require (
cloud.google.com/go/compute v1.20.1 // indirect
cloud.google.com/go/compute/metadata v0.2.3 // indirect
github.com/google/uuid v1.3.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
)
require (
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/bytedance/sonic v1.8.0 // indirect
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect
github.com/clbanning/mxj v1.8.4 // indirect
github.com/gin-contrib/sse v0.1.0 // indirect
github.com/go-errors/errors v1.0.1 // indirect
github.com/go-kratos/aegis v0.2.0 // indirect
github.com/go-ole/go-ole v1.2.6 // 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.14.1 // indirect
github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/go-playground/validator/v10 v10.11.2 // indirect
github.com/go-sql-driver/mysql v1.7.0 // indirect
github.com/goccy/go-json v0.10.0 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/go-querystring v1.0.0 // indirect
github.com/gorilla/mux v1.8.0 // indirect
github.com/hashicorp/hcl v1.0.0 // 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/cpuid/v2 v2.0.9 // indirect
github.com/leodido/go-urn v1.2.1 // 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/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/mozillazg/go-httpheader v0.2.1 // 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/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/tklauser/go-sysconf v0.3.12 // indirect
github.com/tklauser/numcpus v0.6.1 // indirect
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
github.com/ugorji/go/codec v1.2.9 // indirect
github.com/yusufpapurcu/wmi v1.2.3 // indirect
go.uber.org/multierr v1.10.0 // indirect
golang.org/x/arch v0.0.0-20210923205945-b76863e36670 // indirect
golang.org/x/crypto v0.14.0 // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/oauth2 v0.13.0
golang.org/x/sync v0.3.0 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/text v0.13.0 // indirect
golang.org/x/time v0.1.0 // indirect
golang.org/x/tools v0.7.0 // indirect
google.golang.org/genproto v0.0.0-20230629202037-9506855d4529 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20230629202037-9506855d4529
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
)

781
go.sum

@ -0,0 +1,781 @@
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/compute v1.20.1 h1:6aKEtlUiwEpJzM001l0yFkpXmUVXaN8W+fbkb2AZNbg=
cloud.google.com/go/compute v1.20.1/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM=
cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY=
cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA=
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/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/KyleBanks/depth v1.2.1 h1:5h8fQADFrWtarTdtDudMmGsC7GPbOAu6RVB3ffsVFHc=
github.com/KyleBanks/depth v1.2.1/go.mod h1:jzSb9d0L43HxTQfT+oSA1EEp2q+ne2uh6XgeJcm8brE=
github.com/PuerkitoBio/goquery v1.5.1/go.mod h1:GsLWisAFVj4WgDibEWF4pvYnkVQBpKBKeU+7zCJoLcc=
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/QcloudApi/qcloud_sign_golang v0.0.0-20141224014652-e4130a326409/go.mod h1:1pk82RBxDY/JZnPQrtqHlUFfCctgdorsd9M06fMynOM=
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/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM=
github.com/bytedance/sonic v1.8.0 h1:ea0Xadu+sHlu7x5O3gKhRpQ1IKiMrSiHttPF0ybECuA=
github.com/bytedance/sonic v1.8.0/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U=
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/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY=
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 h1:qSGYFH7+jGhDF8vLC+iwCD4WpbV1EBDSzWkJODFLams=
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk=
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/clbanning/mxj v1.8.4 h1:HuhwZtbyvyOw+3Z1AowPkU87JkJUSv751ELWaiTpj8I=
github.com/clbanning/mxj v1.8.4/go.mod h1:BVjHeAH+rl9rs6f+QIpeRl0tfu10SXn1pUSa5PVGJng=
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/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/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE=
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/gin-contrib/gzip v0.0.6 h1:NjcunTcGAj5CO1gn4N8jHOSIeRFHIbn51z6K+xaN4d4=
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.9.0 h1:OjyFBKICoexlu99ctXNR2gg+c5pKrKMuyjgARg9qeY8=
github.com/gin-gonic/gin v1.9.0/go.mod h1:W1Me9+hsUSyj3CePGrd1/QrKJMSJ1Tu/0hFEH89961k=
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-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-20230830131453-6c026bce56a9 h1:m6eNghBfLhxZbOJR5yUFSZ4KswrxTlU2oK6lQWROXtI=
github.com/go-kratos/kratos/contrib/registry/nacos/v2 v2.0.0-20230830131453-6c026bce56a9/go.mod h1:6xVbnCGYP1wqhz+nu9ct2K6K+mZkCqm/R6zlMRY7Sug=
github.com/go-kratos/kratos/v2 v2.7.0 h1:9DaVgU9YoHPb/BxDVqeVlVCMduRhiSewG3xE+e9ZAZ8=
github.com/go-kratos/kratos/v2 v2.7.0/go.mod h1:CPn82O93OLHjtnbuyOKhAG5TkSvw+mFnL32c4lZFDwU=
github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY=
github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=
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.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.20.4 h1:O8hJrt0UMnhHcluhIdUgCLRWyM2x7QkBXRvOs7m+O1M=
github.com/go-openapi/spec v0.20.4/go.mod h1:faYFR1CvsJZ0mNsmsphTMSoRrNV3TEDoAM7FOEWeq8I=
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/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s=
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.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA=
github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY=
github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY=
github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY=
github.com/go-playground/validator/v10 v10.11.2 h1:q3SHpufmypg+erIExEKUmsgmhDTyhcJ38oeKGACXohU=
github.com/go-playground/validator/v10 v10.11.2/go.mod h1:NieE624vt4SCTJtD87arVLvdmjPAeV8BQlHtMnw9D7s=
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.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/goccy/go-json v0.10.0 h1:mXKd9Qw4NuzShiRlOXKews24ufknHO7gx30lsDyokKA=
github.com/goccy/go-json v0.10.0/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I=
github.com/goji/httpauth v0.0.0-20160601135302-2da839ab0f4d/go.mod h1:nnjvkQ9ptGaCkuDUx6wNykzzlUixGxvkme+H/lnzb+A=
github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0=
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.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
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/go-querystring v1.0.0 h1:Xkwi/a1rcvNg1PPYe5vI8GbeBY/jrVuDX5ASuANWTrk=
github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck=
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/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/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.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/jordan-wright/email v4.0.1-0.20210109023952-943e75fe5223+incompatible h1:jdpOPRN1zP63Td1hDQbZW73xKmzDvZHzVdNYxhnTMDA=
github.com/jordan-wright/email v4.0.1-0.20210109023952-943e75fe5223+incompatible/go.mod h1:1c7szIrayyPPB/987hsnvNzLushdWf4o/79s3P08L8A=
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.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/cpuid/v2 v2.0.9 h1:lgaqFMSdTdQYdZ04uHyN2d/eKdOMyi2YLSvlQIBFYa4=
github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
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/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/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w=
github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY=
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.7.0/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-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-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/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
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.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
github.com/mozillazg/go-httpheader v0.2.1 h1:geV7TrjbL8KXSyvghnFm+NyTux/hxwueTSrwhe88TQQ=
github.com/mozillazg/go-httpheader v0.2.1/go.mod h1:jJ8xECTlalr6ValeXYdOF8fFUISeBAdw6E61aqQma60=
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/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/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/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/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww=
github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
github.com/shirou/gopsutil v2.21.11+incompatible h1:lOGOyCG67a5dv2hq5Z1BLDUqqKp3HkbjPcz5j6XMS0U=
github.com/shirou/gopsutil v2.21.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA=
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.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.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stretchr/testify v1.8.3 h1:RP3t2pwF7cMEbC1dqtB6poj3niw/9gnV4Cjg5oW5gtY=
github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
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 v1.0.1 h1:J1bVJ4XHZNq0I46UU90611i9/YzdrF7x92oX1ig5IdE=
github.com/swaggo/files v1.0.1/go.mod h1:0qXmMNH6sXNf+73t65aKeB+ApmgxdnkQzVTAj2uaMUg=
github.com/swaggo/gin-swagger v1.6.0 h1:y8sxvQ3E20/RCyrXeFfg60r6H0Z+SwpTjMYsMm+zy8M=
github.com/swaggo/gin-swagger v1.6.0/go.mod h1:BG00cCEy294xtVpyIAHG6+e2Qzj/xKlRdOqDkvq0uzo=
github.com/swaggo/swag v1.8.12 h1:pctzkNPu0AlQP2royqX3apjKCQonAnf7KGoxeO4y64w=
github.com/swaggo/swag v1.8.12/go.mod h1:lNfm6Gg+oAq3zRJQNEMBE66LIJKM44mxFqhEEgy2its=
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/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.563/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/kms v1.0.563/go.mod h1:uom4Nvi9W+Qkom0exYiJ9VWJjXwyxtPYTkKkaLMlfE0=
github.com/tencentyun/cos-go-sdk-v5 v0.7.42 h1:Up1704BJjI5orycXKjpVpvuOInt9GC5pqY4knyE9Uds=
github.com/tencentyun/cos-go-sdk-v5 v0.7.42/go.mod h1:LUFnaqRmGk6pEHOaRmdn2dCZR2j0cSsM5xowWFPTPao=
github.com/tidwall/pretty v1.0.2/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk=
github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU=
github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI=
github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk=
github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY=
github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI=
github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08=
github.com/ugorji/go/codec v1.2.9 h1:rmenucSohSTiyL09Y+l2OCk+FrMxGMzho2+tjr5ticU=
github.com/ugorji/go/codec v1.2.9/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg=
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/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/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/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw=
github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
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.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk=
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.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/arch v0.0.0-20210923205945-b76863e36670 h1:18EFjUmQOcUvxNYSkA6jO9VAiXCnxFY6NyDX0bHDmkU=
golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8=
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-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-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-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc=
golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4=
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-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
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.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/mod v0.9.0 h1:KENHtAZL2y3NLMYZeHY9DW8HW8V+kQyJsY/V9JlKvCs=
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-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-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-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-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-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM=
golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
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/oauth2 v0.13.0 h1:jDDenyj+WgFtmV3zYVoi8aE2BwtXFLWOA67ZfNWftiY=
golang.org/x/oauth2 v0.13.0/go.mod h1:/JMhi4ZRXAf4HG9LiNmxvk+45+96RUlVThiH8FzNBn0=
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.0.0-20220722155255-886fb9371eb4/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-20180909124046-d0be0721c37e/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-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/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-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-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/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-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-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-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/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.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE=
golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
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/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
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.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ=
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k=
golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
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-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-20190606124116-d0a3d012864b/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-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-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.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
golang.org/x/tools v0.7.0 h1:W4OVu8VVOaIO0yzWMNdepAulS7YfoS3Zabrm8DOXXU4=
golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s=
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/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM=
google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds=
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/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.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.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gorm.io/driver/mysql v1.5.1 h1:WUEH5VF9obL/lTtzjmML/5e6VfFR/788coz2uaVCAZw=
gorm.io/driver/mysql v1.5.1/go.mod h1:Jo3Xu7mMhCyj8dlrb3WoCaRd1FhsVh+yMXb1jUInf5o=
gorm.io/gorm v1.25.1/go.mod h1:L4uxeKpfBml98NYqVqwAdmV1a2nBtAec/cf3fpucW/k=
gorm.io/gorm v1.25.4 h1:iyNd8fNAe8W9dvtlgeRI5zSVZPsq3OpcTu37cYcpCmw=
gorm.io/gorm v1.25.4/go.mod h1:L4uxeKpfBml98NYqVqwAdmV1a2nBtAec/cf3fpucW/k=
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=
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4=
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=

253
initialize/api/email.pb.go

@ -0,0 +1,253 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.31.0
// protoc v3.21.12
// source: initialize/api/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"`
// 附件地址
Files []string `protobuf:"bytes,4,rep,name=files,proto3" json:"files,omitempty"`
}
func (x *SendRequest) Reset() {
*x = SendRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_initialize_api_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_initialize_api_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_initialize_api_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 ""
}
func (x *SendRequest) GetFiles() []string {
if x != nil {
return x.Files
}
return nil
}
// 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_initialize_api_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_initialize_api_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_initialize_api_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_initialize_api_email_proto protoreflect.FileDescriptor
var file_initialize_api_email_proto_rawDesc = []byte{
0x0a, 0x1a, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x2f, 0x61, 0x70, 0x69,
0x2f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x03, 0x61, 0x70,
0x69, 0x22, 0x61, 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, 0x12, 0x14,
0x0a, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x66,
0x69, 0x6c, 0x65, 0x73, 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_initialize_api_email_proto_rawDescOnce sync.Once
file_initialize_api_email_proto_rawDescData = file_initialize_api_email_proto_rawDesc
)
func file_initialize_api_email_proto_rawDescGZIP() []byte {
file_initialize_api_email_proto_rawDescOnce.Do(func() {
file_initialize_api_email_proto_rawDescData = protoimpl.X.CompressGZIP(file_initialize_api_email_proto_rawDescData)
})
return file_initialize_api_email_proto_rawDescData
}
var file_initialize_api_email_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_initialize_api_email_proto_goTypes = []interface{}{
(*SendRequest)(nil), // 0: api.SendRequest
(*SendEmailReply)(nil), // 1: api.SendEmailReply
}
var file_initialize_api_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_initialize_api_email_proto_init() }
func file_initialize_api_email_proto_init() {
if File_initialize_api_email_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_initialize_api_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_initialize_api_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_initialize_api_email_proto_rawDesc,
NumEnums: 0,
NumMessages: 2,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_initialize_api_email_proto_goTypes,
DependencyIndexes: file_initialize_api_email_proto_depIdxs,
MessageInfos: file_initialize_api_email_proto_msgTypes,
}.Build()
File_initialize_api_email_proto = out.File
file_initialize_api_email_proto_rawDesc = nil
file_initialize_api_email_proto_goTypes = nil
file_initialize_api_email_proto_depIdxs = nil
}

32
initialize/api/email.proto

@ -0,0 +1,32 @@
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;
//
repeated string files=4;
}
// The response message containing the greetings
message SendEmailReply {
int32 code = 1;
string message = 2;
}

111
initialize/api/email_grpc.pb.go

@ -0,0 +1,111 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc v3.21.12
// source: initialize/api/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
const (
Email_SendEmail_FullMethodName = "/api.Email/SendEmail"
)
// 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, Email_SendEmail_FullMethodName, 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: Email_SendEmail_FullMethodName,
}
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: "initialize/api/email.proto",
}

1429
initialize/api/greeter.pb.go

File diff suppressed because it is too large

126
initialize/api/greeter.proto

@ -0,0 +1,126 @@
syntax = "proto3";
package api;
import "google/protobuf/empty.proto";
//import "common.proto";
option go_package = "bkb-payment/api";
// The greeting service definition.
service Greeter {
// Sends a greeting
rpc Ping (google.protobuf.Empty) returns (PingReply) {
}
rpc CountryList (google.protobuf.Empty) returns (CountryReply) {
}
rpc DistrictCascade (DistrictRequest) returns (DistrictReply) {
}
rpc PayTransactionApp(PayTransRequest) returns (PayTransResponse) {
}
rpc GetPaymentUrl(PayUrlRequest) returns (PayUrlResponse) {
}
rpc PayTransactionAppUrl(PayTransRequest) returns (PayUrlResponse) {
}
rpc SuccessPayback(PaybackRequest) returns (PaybackResp) {
}
rpc PaypalPayback(PaybackRequest) returns (PaybackResp) {
}
rpc GetPayTransaction(google.protobuf.Empty) returns (GetPayTransactionResp) {
}
rpc CloseBill(CloseBillRequest) returns (PingReply) {
}
// rpc ClosePayTransaction(google.protobuf.Empty) returns (PingReply) {
// option (google.api.http) = {
// post: "/pay/transaction/outTradeNo/close"
// };
// }
}
// 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 parentId = 3;
repeated District children = 4;
}
message DistrictReply{
repeated District 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;
}
message PayTransResponse{
string transaction_id = 1;
string status = 2;
string message = 3;
}
message PayUrlRequest{
string mchid = 1;
string pay_channel = 2;
string transaction_id = 3;
}
message PayUrlResponse{
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 PaybackResp{
string out_trade_no = 1;
string trade_state = 2;
string message = 3;
}
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 CloseBillRequest{
string transaction_id = 1;
}

432
initialize/api/greeter_grpc.pb.go

@ -0,0 +1,432 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc v4.23.4
// 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
// 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)
PayTransactionApp(ctx context.Context, in *PayTransRequest, opts ...grpc.CallOption) (*PayTransResponse, error)
GetPaymentUrl(ctx context.Context, in *PayUrlRequest, opts ...grpc.CallOption) (*PayUrlResponse, error)
PayTransactionAppUrl(ctx context.Context, in *PayTransRequest, opts ...grpc.CallOption) (*PayUrlResponse, error)
SuccessPayback(ctx context.Context, in *PaybackRequest, opts ...grpc.CallOption) (*PaybackResp, error)
PaypalPayback(ctx context.Context, in *PaybackRequest, opts ...grpc.CallOption) (*PaybackResp, error)
GetPayTransaction(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetPayTransactionResp, error)
CloseBill(ctx context.Context, in *CloseBillRequest, opts ...grpc.CallOption) (*PingReply, 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, "/api.Greeter/Ping", 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, "/api.Greeter/CountryList", 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, "/api.Greeter/DistrictCascade", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *greeterClient) PayTransactionApp(ctx context.Context, in *PayTransRequest, opts ...grpc.CallOption) (*PayTransResponse, error) {
out := new(PayTransResponse)
err := c.cc.Invoke(ctx, "/api.Greeter/PayTransactionApp", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *greeterClient) GetPaymentUrl(ctx context.Context, in *PayUrlRequest, opts ...grpc.CallOption) (*PayUrlResponse, error) {
out := new(PayUrlResponse)
err := c.cc.Invoke(ctx, "/api.Greeter/GetPaymentUrl", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *greeterClient) PayTransactionAppUrl(ctx context.Context, in *PayTransRequest, opts ...grpc.CallOption) (*PayUrlResponse, error) {
out := new(PayUrlResponse)
err := c.cc.Invoke(ctx, "/api.Greeter/PayTransactionAppUrl", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *greeterClient) SuccessPayback(ctx context.Context, in *PaybackRequest, opts ...grpc.CallOption) (*PaybackResp, error) {
out := new(PaybackResp)
err := c.cc.Invoke(ctx, "/api.Greeter/SuccessPayback", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *greeterClient) PaypalPayback(ctx context.Context, in *PaybackRequest, opts ...grpc.CallOption) (*PaybackResp, error) {
out := new(PaybackResp)
err := c.cc.Invoke(ctx, "/api.Greeter/PaypalPayback", 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, "/api.Greeter/GetPayTransaction", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *greeterClient) CloseBill(ctx context.Context, in *CloseBillRequest, opts ...grpc.CallOption) (*PingReply, error) {
out := new(PingReply)
err := c.cc.Invoke(ctx, "/api.Greeter/CloseBill", 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)
PayTransactionApp(context.Context, *PayTransRequest) (*PayTransResponse, error)
GetPaymentUrl(context.Context, *PayUrlRequest) (*PayUrlResponse, error)
PayTransactionAppUrl(context.Context, *PayTransRequest) (*PayUrlResponse, error)
SuccessPayback(context.Context, *PaybackRequest) (*PaybackResp, error)
PaypalPayback(context.Context, *PaybackRequest) (*PaybackResp, error)
GetPayTransaction(context.Context, *emptypb.Empty) (*GetPayTransactionResp, error)
CloseBill(context.Context, *CloseBillRequest) (*PingReply, 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) PayTransactionApp(context.Context, *PayTransRequest) (*PayTransResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method PayTransactionApp not implemented")
}
func (UnimplementedGreeterServer) GetPaymentUrl(context.Context, *PayUrlRequest) (*PayUrlResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetPaymentUrl not implemented")
}
func (UnimplementedGreeterServer) PayTransactionAppUrl(context.Context, *PayTransRequest) (*PayUrlResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method PayTransactionAppUrl not implemented")
}
func (UnimplementedGreeterServer) SuccessPayback(context.Context, *PaybackRequest) (*PaybackResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method SuccessPayback not implemented")
}
func (UnimplementedGreeterServer) PaypalPayback(context.Context, *PaybackRequest) (*PaybackResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method PaypalPayback not implemented")
}
func (UnimplementedGreeterServer) GetPayTransaction(context.Context, *emptypb.Empty) (*GetPayTransactionResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetPayTransaction not implemented")
}
func (UnimplementedGreeterServer) CloseBill(context.Context, *CloseBillRequest) (*PingReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method CloseBill 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: "/api.Greeter/Ping",
}
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: "/api.Greeter/CountryList",
}
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: "/api.Greeter/DistrictCascade",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(GreeterServer).DistrictCascade(ctx, req.(*DistrictRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Greeter_PayTransactionApp_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).PayTransactionApp(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.Greeter/PayTransactionApp",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(GreeterServer).PayTransactionApp(ctx, req.(*PayTransRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Greeter_GetPaymentUrl_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(PayUrlRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(GreeterServer).GetPaymentUrl(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.Greeter/GetPaymentUrl",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(GreeterServer).GetPaymentUrl(ctx, req.(*PayUrlRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Greeter_PayTransactionAppUrl_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).PayTransactionAppUrl(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.Greeter/PayTransactionAppUrl",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(GreeterServer).PayTransactionAppUrl(ctx, req.(*PayTransRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Greeter_SuccessPayback_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(PaybackRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(GreeterServer).SuccessPayback(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.Greeter/SuccessPayback",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(GreeterServer).SuccessPayback(ctx, req.(*PaybackRequest))
}
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(PaybackRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(GreeterServer).PaypalPayback(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.Greeter/PaypalPayback",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(GreeterServer).PaypalPayback(ctx, req.(*PaybackRequest))
}
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: "/api.Greeter/GetPayTransaction",
}
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_CloseBill_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CloseBillRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(GreeterServer).CloseBill(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.Greeter/CloseBill",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(GreeterServer).CloseBill(ctx, req.(*CloseBillRequest))
}
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: "PayTransactionApp",
Handler: _Greeter_PayTransactionApp_Handler,
},
{
MethodName: "GetPaymentUrl",
Handler: _Greeter_GetPaymentUrl_Handler,
},
{
MethodName: "PayTransactionAppUrl",
Handler: _Greeter_PayTransactionAppUrl_Handler,
},
{
MethodName: "SuccessPayback",
Handler: _Greeter_SuccessPayback_Handler,
},
{
MethodName: "PaypalPayback",
Handler: _Greeter_PaypalPayback_Handler,
},
{
MethodName: "GetPayTransaction",
Handler: _Greeter_GetPayTransaction_Handler,
},
{
MethodName: "CloseBill",
Handler: _Greeter_CloseBill_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "greeter.proto",
}

329
initialize/api/sms.pb.go

@ -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
}

47
initialize/api/sms.proto

@ -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;
}

150
initialize/api/sms_grpc.pb.go

@ -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",
}

110
initialize/gorm.go

@ -0,0 +1,110 @@
package initialize
import (
"fmt"
"os"
"pure/global"
"pure/initialize/internal"
"pure/model"
"go.uber.org/zap"
"gorm.io/driver/mysql"
"gorm.io/gorm"
)
//@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.Account{},
model.Address{},
model.Bill{},
model.Order{},
model.OrderAddress{},
model.TbGoods{},
model.TbGoodsSpecs{},
model.Wallet{},
model.JwtBlacklist{},
//model.SysDictionary{},
//model.SysDictionaryDetail{},
//model.ExaFileUploadAndDownload{},
//model.ExaFile{},
//model.ExaFileChunk{},
//model.ExaCustomer{},
//model.ExaSimpleUploader{},
// Code generated by pure Begin; DO NOT EDIT.
// Code generated by pure End; DO NOT EDIT.
model.Mission{},
model.MissionClaimAddress{},
model.CollectionMission{},
model.CollectionGoods{},
model.PaypalWebhook{},
model.MissionClaimWorks{},
model.MissionClaimOrder{},
model.MissionClaimOrderGoods{},
model.Internationalization{},
model.MissionClaim{},
model.MissionClaimVideo{},
model.PlatformAuth{},
model.SysMissionReward{}, //平台任务奖励
model.DtStatisticOrder{},
model.Withdrawal{}, // 提现
model.User{},
model.Notify{},
model.Version{},
)
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, // 根据版本自动配置
}
fmt.Println(m.LogMode)
if db, err := gorm.Open(mysql.New(mysqlConfig), internal.Gorm.Config()); 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
}
}

89
initialize/grpc.go

@ -0,0 +1,89 @@
package initialize
import (
"context"
"fmt"
"pure/global"
"pure/initialize/api"
"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 PaymentClient() api.GreeterClient {
sc := []constant.ServerConfig{
*constant.NewServerConfig("72535c70-8d6d-400f-9893-4bb3e634f682.nacos.cn-north-4.cse.myhuaweicloud.com", 8848),
}
cc := constant.ClientConfig{
NamespaceId: "dev",
TimeoutMs: 5000,
Username: "nacos",
Password: "nacos",
}
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.payment.grpc"),
grpc.WithDiscovery(r),
grpc.WithMiddleware(
recovery.Recovery()))
if err != nil {
panic(err)
}
return api.NewGreeterClient(conn)
}
func InitNacosClient() {
sc := []constant.ServerConfig{
*constant.NewServerConfig("72535c70-8d6d-400f-9893-4bb3e634f682.nacos.cn-north-4.cse.myhuaweicloud.com", 8848),
}
cc := constant.ClientConfig{
NamespaceId: "dev",
TimeoutMs: 5000,
Username: "nacos",
Password: "nacos",
}
func() {
client, err := clients.NewNamingClient(
vo.NacosClientParam{
ServerConfigs: sc,
ClientConfig: &cc,
},
)
if err != nil {
fmt.Println(err)
panic(err)
}
r := nacos.New(client)
ctx, cel := context.WithTimeout(context.Background(), time.Second*5)
defer cel()
conn, err := grpc.DialInsecure(
ctx,
grpc.WithEndpoint("discovery:///bkb.notify.grpc"),
grpc.WithDiscovery(r),
grpc.WithMiddleware(
recovery.Recovery()))
if err != nil {
panic(err)
}
global.EMAIL_CLIENT = api.NewEmailClient(conn)
global.SMS_CLIENT = api.NewSmsClient(conn)
}()
}

52
initialize/internal/gorm.go

@ -0,0 +1,52 @@
package internal
import (
"log"
"os"
"pure/global"
"time"
"gorm.io/gorm"
"gorm.io/gorm/logger"
)
type DBBASE interface {
GetLogMode() string
}
var Gorm = new(_gorm)
type _gorm struct{}
// Config gorm 自定义配置
// Author [SliverHorn](https://github.com/SliverHorn)
func (g *_gorm) Config() *gorm.Config {
config := &gorm.Config{DisableForeignKeyConstraintWhenMigrating: true}
_default := logger.New(NewWriter(log.New(os.Stdout, "\r\n", log.LstdFlags)), logger.Config{
SlowThreshold: 200 * time.Millisecond,
LogLevel: logger.Warn,
Colorful: true,
})
var logMode DBBASE
switch global.MG_CONFIG.System.DbType {
case "mysql":
logMode = &global.MG_CONFIG.Mysql
break
default:
logMode = &global.MG_CONFIG.Mysql
}
switch logMode.GetLogMode() {
case "silent", "Silent":
config.Logger = _default.LogMode(logger.Silent)
case "error", "Error":
config.Logger = _default.LogMode(logger.Error)
case "warn", "Warn":
config.Logger = _default.LogMode(logger.Warn)
case "info", "Info":
config.Logger = _default.LogMode(logger.Info)
default:
config.Logger = _default.LogMode(logger.Info)
}
return config
}

33
initialize/internal/logger.go

@ -0,0 +1,33 @@
package internal
import (
"fmt"
"pure/global"
"gorm.io/gorm/logger"
)
type writer struct {
logger.Writer
}
// NewWriter writer 构造函数
// Author [SliverHorn](https://github.com/SliverHorn)
func NewWriter(w logger.Writer) *writer {
return &writer{Writer: w}
}
// Printf 格式化打印日志
// Author [SliverHorn](https://github.com/SliverHorn)
func (w *writer) Printf(message string, data ...interface{}) {
var logZap bool
switch global.MG_CONFIG.System.DbType {
case "mysql":
logZap = global.MG_CONFIG.Mysql.LogZap
}
if logZap {
global.MG_LOG.Info(fmt.Sprintf(message+"\n", data...))
} else {
w.Writer.Printf(message, data...)
}
}

24
initialize/international.go

@ -0,0 +1,24 @@
package initialize
import (
"fmt"
"pure/global"
"pure/model"
)
func InternationalizationInit() interface{} {
var (
err error
data []model.Internationalization
language = make(map[string]model.Internationalization)
)
err = global.MG_DB.Model(&model.Internationalization{}).Find(&data).Error
if err != nil {
fmt.Println("多语言模块加载失败")
return nil
}
for v := range data {
language[data[v].Ch] = data[v]
}
return language
}

44
initialize/redis.go

@ -0,0 +1,44 @@
package initialize
import (
"github.com/go-redis/redis"
"go.uber.org/zap"
"pure/global"
"strconv"
"strings"
)
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
}
//开启过期消息订阅
go PubsunChannel(client)
}
func PubsunChannel(client *redis.Client) {
pubsub := client.Subscribe("__keyevent@" + strconv.Itoa(global.MG_CONFIG.Redis.DB) + "__:expired")
//fmt.Println("__keyevent@" + strconv.Itoa(global.MG_CONFIG.Redis.DB) + "__:expired")
defer pubsub.Close()
for msg := range pubsub.Channel() {
key := strings.Split(msg.Payload, "-")
if len(key) > 1 {
switch key[0] {
case "test":
println(msg.Payload)
default:
//默认处理
}
}
}
}

53
initialize/router.go

@ -0,0 +1,53 @@
package initialize
import (
"net/http"
_ "pure/docs"
"pure/global"
"pure/middleware"
globalr "pure/router/global"
"pure/router/influencer"
"github.com/gin-gonic/gin"
swaggerFiles "github.com/swaggo/files"
ginSwagger "github.com/swaggo/gin-swagger"
//"github.com/swaggo/gin-swagger/swaggerFiles"
)
// 初始化总路由
func Routers() *gin.Engine {
Router := gin.Default()
Router.StaticFS(global.MG_CONFIG.Local.Path, http.Dir(global.MG_CONFIG.Local.Path)) // 为用户头像和文件提供静态地址
// Router.Use(middleware.LoadTls()) // 打开就能玩https了
// 跨域
Router.Use(middleware.Cors()) // 如需跨域可以打开
Router.GET("/swagger/*any", ginSwagger.WrapHandler(swaggerFiles.Handler))
Router.Use(middleware.ParamsMiddleware())
//网红端
PrivateGroup2 := Router.Group("influencer")
PrivateGroup4 := Router.Group("")
{
influencer.InitInfluencerOtherRouter(PrivateGroup2) // 基础路由
}
PrivateGroup2.Use(middleware.JWTAuth())
//PrivateGroup4.Use(middleware.JWTAuth())
{
influencer.InitInfluencerUserRouter(PrivateGroup2) // 用户
influencer.InitInfluencerWalletRouter(PrivateGroup2) // 钱包
influencer.InitInfluencerMissionRouter(PrivateGroup2) // 任务
influencer.InitInfluencerGoodsRouter(PrivateGroup2) // 商品
influencer.InitInfluencerOrderRouter(PrivateGroup2) // 订单
globalr.InitGlobalRouter(PrivateGroup2) // 地址
globalr.InitDictRouter(PrivateGroup4) // 字典
influencer.InitBanner(PrivateGroup2) //banner
}
PrivateGroup3 := Router.Group("")
PrivateGroup3.Use(middleware.JWTAuth2())
{
globalr.InitGlobalRouter(PrivateGroup3) // 用户
}
return Router
}

23
initialize/timer.go

@ -0,0 +1,23 @@
package initialize
import (
"fmt"
"pure/config"
"pure/global"
"pure/utils"
)
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)
}
}
}

22
initialize/validator.go

@ -0,0 +1,22 @@
package initialize
import "pure/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()},
},
)
}

36
main.go

@ -0,0 +1,36 @@
package main
import (
"pure/core"
"pure/global"
"pure/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 Swagger Example API
// @version 0.0.1
// @description 接口文档
// @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.Minio()
initialize.InitNacosClient() //初始化微服务连接
initialize.Timer()
global.MG_Language = initialize.InternationalizationInit()
if global.MG_DB != nil {
initialize.MysqlTables(global.MG_DB) //初始化表
// 程序结束前关闭数据库链接
db, _ := global.MG_DB.DB()
defer db.Close()
}
core.RunWindowsServer()
}

132
middleware/Ijwt.go

@ -0,0 +1,132 @@
package middleware
import (
"strconv"
"time"
"pure/global"
"pure/model"
"pure/model/request"
"pure/model/response"
"pure/service"
"github.com/dgrijalva/jwt-go"
"github.com/gin-gonic/gin"
"go.uber.org/zap"
)
func InfluencerJWTAuth() 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 := NewInfluencerJWT()
// parseToken 解析token包含的信息
claims, err := j.ParseInfluencerToken(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 err, _ = service.FindUserByUuid(claims.UUID.String()); err != nil {
// _ = service.JsonInBlacklist(model.JwtBlacklist{Jwt: token})
// response.FailWithDetailed(gin.H{"reload": true}, err.Error(), c)
// c.Abort()
// }
if claims.ExpiresAt-time.Now().Unix() < claims.BufferTime {
claims.ExpiresAt = time.Now().Unix() + global.MG_CONFIG.JWT.ExpiresTime
newToken, _ := j.CreateInfluencerToken(*claims)
newClaims, _ := j.ParseInfluencerToken(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()
}
}
func NewInfluencerJWT() *JWT {
return &JWT{
[]byte(global.MG_CONFIG.JWT.SigningKey),
}
}
// 创建一个token
func (j *JWT) CreateInfluencerToken(claims request.UserClaims) (string, error) {
token := jwt.NewWithClaims(jwt.SigningMethodHS256, claims)
return token.SignedString(j.SigningKey)
}
// 解析 token
func (j *JWT) ParseInfluencerToken(tokenString string) (*request.UserClaims, error) {
token, err := jwt.ParseWithClaims(tokenString, &request.UserClaims{}, 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.UserClaims); 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
//}

26
middleware/cors.go

@ -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()
}
}

61
middleware/error.go

@ -0,0 +1,61 @@
package middleware
import (
"net"
"net/http"
"net/http/httputil"
"os"
"pure/global"
"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()
}
}

203
middleware/jwt.go

@ -0,0 +1,203 @@
package middleware
import (
"errors"
"pure/global"
"pure/model"
"pure/model/request"
"pure/model/response"
"pure/service"
"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 err, _ = service.FindUserByUuid(claims.UUID.String()); err != nil {
// _ = service.JsonInBlacklist(model.JwtBlacklist{Jwt: token})
// response.FailWithDetailed(gin.H{"reload": true}, err.Error(), c)
// c.Abort()
// }
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()
}
}
func JWTAuth2() 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 {
j = NewInfluencerJWT()
claims, err = j.ParseInfluencerToken(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 err, _ = service.FindUserByUuid(claims.UUID.String()); err != nil {
// _ = service.JsonInBlacklist(model.JwtBlacklist{Jwt: token})
// response.FailWithDetailed(gin.H{"reload": true}, err.Error(), c)
// c.Abort()
// }
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.UserClaims) (string, error) {
token := jwt.NewWithClaims(jwt.SigningMethodHS256, claims)
return token.SignedString(j.SigningKey)
}
// 解析 token
func (j *JWT) ParseToken(tokenString string) (*request.UserClaims, error) {
token, err := jwt.ParseWithClaims(tokenString, &request.UserClaims{}, 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.UserClaims); 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
//}

26
middleware/loadtls.go

@ -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()
}
}

23
middleware/need_init.go

@ -0,0 +1,23 @@
package middleware
import (
"pure/global"
"pure/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()
}
// 处理请求
}
}

50
middleware/params.go

@ -0,0 +1,50 @@
package middleware
import (
"github.com/gin-gonic/gin"
"pure/model"
"pure/model/response"
"pure/service"
"strings"
)
func ParamsMiddleware() gin.HandlerFunc {
return func(c *gin.Context) {
var err error
defer func() {
if err != nil {
c.Abort()
} else {
c.Next()
}
}()
type params struct {
Version string `json:"version"`
}
var p params
if err = c.ShouldBindHeader(&p); err != nil {
response.FailWithMessage("缺少必要参数", c)
return
}
var platform string
tmp := strings.ToUpper(c.Request.UserAgent())
if strings.Contains(tmp, "IPHONE") || strings.Contains(tmp, "IOS") { //
platform = "2"
} else {
platform = "1"
}
c.Set("platform", platform)
if p.Version != "" {
//校验版本号可用性
var version model.VersionV
version, err = service.GetVersion(platform, p.Version)
if err != nil {
response.FailWithMessage("版本号不可取", c)
return
} else {
c.Set("version", version.Version)
c.Set("version_status", version.Status)
}
}
}
}

29
model/account.go

@ -0,0 +1,29 @@
package model
import "pure/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"
}

22
model/address.go

@ -0,0 +1,22 @@
package model
import "pure/global"
type Address struct {
global.MG_MODEL
UserID string `gorm:"size:255" json:"userId"`
FirstName string `gorm:"size:255" json:"firstName"` //first name
LastName string `gorm:"size:255" json:"lastName"` //last name
Street string `gorm:"size:255" json:"street"` //street
Phone string `gorm:"size:20" json:"phone"` //手机号
Bldg string `gorm:"size:255" json:"bldg"` //apt,ste,bldg
City string `gorm:"size:255" json:"city"` //city
State string `gorm:"size:255" json:"state"` //state
ZipCode string `gorm:"size:255" 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"
}

21
model/application.go

@ -0,0 +1,21 @@
// 自动生成模板Application
package model
import "pure/global"
// 如果含有time.Time 请自行import time包
type Application struct {
global.MG_MODEL
Owner string `gorm:"size:50;comment:用户所属" json:"owner" ` // 用户所属
Name string `gorm:"size:50;comment:应用名称" json:"name" ` // 应用名称
Appid string `gorm:"size:50;comment:应用ID" json:"appid" ` // 应用ID
Logo string `gorm:"size:255;comment:应用logo" json:"logo" ` // 应用logo
Organization string `gorm:"size:50;comment:组织" json:"organization" ` // 组织
Provider string `gorm:"type:text;comment:提供者" json:"provider" ` // 提供者
ClientID string `gorm:"size:50;comment:客户端ID" json:"clientID" ` // 客户端ID
ClientSecret string `gorm:"size:50;comment:客户端密钥" json:"clientSecret" ` // 客户端密钥
}
func (Application) TableName() string {
return "application"
}

22
model/banner.go

@ -0,0 +1,22 @@
package model
import "pure/global"
type Banner struct {
RelationId string `gorm:"size:50" json:"relationId"` //关联项目id
RelationType string `gorm:"size:4" json:"relationType"` //关联类型 01-任务
Title string `gorm:"size:80" json:"title"` //标题
CoverUrl string `gorm:"size:500" json:"coverUrl"` //封面图
LinkType string `gorm:"size:2" json:"linkType" form:"linkType"` //链接类型 0:内链 1:外链
Link string `gorm:"size:500" json:"link"` //链接地址
Type string `gorm:"size:4" json:"type"` //任务-0101 平台奖励页-0102
Sort int `gorm:"" json:"sort"` //排序
Status string `gorm:"size:4" json:"status"` //状态 0=下架 1=上架
CreateBy string `gorm:"size:64" json:"createBy"` //创建人
UpdateBy string `gorm:"size:64" json:"updateBy"` //更新人
global.MG_MODEL
}
func (Banner) TableName() string {
return "banner"
}

9
model/base.go

@ -0,0 +1,9 @@
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:"-"` //上级/下级
}

51
model/bill.go

@ -0,0 +1,51 @@
package model
import (
"pure/global"
)
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-提现 4-平台奖励
Title string `gorm:"size:255" json:"title"` // 账单标题
ClaimNo string `json:"claim_no"` //领取任务编号
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"` //平台 seller(买家端) / customer(客户端) / influencer(网红端)
TransactionId string `gorm:"size:50" json:"transaction_id"` // 交易编号
}
type BillView struct {
ID uint `json:"id"` // id
OrderID string `json:"order_id"` // 订单编号
TransactionId string `json:"transaction_id"` // 交易编号
}
type BillNotify struct {
Title string `json:"title"` // 标题
RelationType string `json:"relation_type"` // 关联类型
RelationId string `json:"relation_id"` // 关联id
}
type BillFlowData struct {
Status int `json:"status"`
Price float64 `json:"price"`
}
func (Bill) TableName() string {
return "bill"
}
func (BillView) TableName() string {
return "bill"
}

22
model/bill_fund.go

@ -0,0 +1,22 @@
package model
import "pure/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"
}

13
model/collectiom_goods.go

@ -0,0 +1,13 @@
package model
import "pure/global"
type CollectionGoods struct { //买家端收藏商品
SpuNo string `gorm:"size:60" json:"spu_no"` //spu_no
CreateBy string `gorm:"size:64" json:"create_by"` //创建人
global.MG_MODEL
}
func (CollectionGoods) TableName() string {
return "collection_goods"
}

13
model/collection_mission.go

@ -0,0 +1,13 @@
package model
import "pure/global"
type CollectionMission struct { //网红端收藏任务
MissionId uint `gorm:"type:int(11)" json:"mission_id"` //任务id
CreateBy string `gorm:"size:64" json:"create_by"` //创建人
global.MG_MODEL
}
func (CollectionMission) TableName() string {
return "collection_mission"
}

49
model/dict.go

@ -0,0 +1,49 @@
package model
import "pure/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"
}

26
model/dt_statistic_order.go

@ -0,0 +1,26 @@
package model
import "pure/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"` // 收入
}
func (DtStatisticOrder) TableName() string {
return "dt_statistic_order"
}

14
model/goods_visit.go

@ -0,0 +1,14 @@
package model
import "pure/global"
type GoodsVisit struct {
global.MG_MODEL
UserID string `gorm:"size:50;index" json:"user_id"` // 用户id
GoodsID uint `gorm:"size:50" json:"goods_id"`
ClaimNo string `json:"claim_no"` // 领取任务id
}
func (GoodsVisit) TableName() string {
return "goods_visit"
}

13
model/internationalization.go

@ -0,0 +1,13 @@
package model
import "pure/global"
type Internationalization struct {
global.MG_MODEL
Ch string `gorm:"size:200" json:"ch"`
En string `gorm:"size:200" json:"en"`
}
func (Internationalization) TableName() string {
return "internationalization"
}

98
model/mission.go

@ -0,0 +1,98 @@
package model
import (
"time"
"pure/global"
)
type Mission struct { // 任务
Title string `gorm:"type:mediumtext" json:"title"` // 标题
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"` // 收藏人数
CreateBy string `gorm:"size:64" json:"create_by"` // 创建人
Status int `gorm:"type:tinyint(1);" json:"status"` // 状态 1:未开始 2:进行中 3:已结束
ClaimStock int64 `json:"claim_stock"` // 可接任务库存
Sample
VideoMaterial
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"` // 描述/卖点
global.MG_MODEL
}
type MissionDetail struct {
Title string `json:"title"` // 标题
GoodsId uint `json:"-"`
GoodsStatus int `json:"goods_status"` // 关联商品状态 1:正常 2:已下架
Goods TbGoodsSpecsView `gorm:"ForeignKey:GoodsId;AssociationForeignKey:ID" 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 `json:"hire_money_expect"` // 预计佣金描述
StartTime *time.Time `json:"start_time"` // 任务起始时间
EndTime *time.Time `json:"end_time"` // 任务结束时间
ClaimNum int64 `gorm:"type:int(11)" json:"claim_num"` // 接任务人数
CreateBy string `json:"-"` //
CollectStatus bool `gorm:"-" json:"collect_status"` // 收藏状态 true:已收藏 false:未收藏
Store SellerStoreInfo `gorm:"-" json:"store"` // 商家信息
Status int `json:"status"` // 状态 1:未开始 2:进行中 3:已结束
// OrderNum int64 `gorm:"-" json:"order_num"` //订单数
Sample
VideoMaterial
ClaimStock int64 `json:"claim_stock"` // 可接任务库存
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"` // 描述/卖点
ReleaseChannels string `gorm:"-" json:"release_channels"` // 发布渠道
ReleaseCountry string `gorm:"-" json:"release_country"` // 发布国家
ClaimStatusExcept string `json:"claim_status_except"` // 可接任务状态描述
ClaimStatusExceptEng string `json:"claim_status_except_eng"` // 英文版状态描述
GoodsUrl string `json:"goods_url"` // 商品链接
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"` // 视频发布国家
}
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 抽成比例
}
type MissionBonus struct {
Total float64 `json:"total"`
UserTotal float64 `json:"user_total"`
}
func (Mission) TableName() string {
return "mission"
}
func (MissionDetail) TableName() string {
return "mission"
}

49
model/mission_claim.go

@ -0,0 +1,49 @@
package model
import (
"pure/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:已完成
OrderNum int64 `gorm:"type:int" json:"orderNum"` // 订单数
OrderMoney float64 `gorm:"type:decimal(10,2)" json:"orderMoney"` // 订单金额
RewardFinished float64 `gorm:"type:decimal(10,2)" json:"rewardFinished"` // 佣金结算
RewardUnfinished float64 `gorm:"type:decimal(10,2)" json:"rewardUnfinished"` // 在途佣金
Email string `gorm:"size:255" json:"email"` //发送邮箱
SendFinished int `gorm:"type:tinyint(1);" json:"send_finished"` //状态 1:已发送 2:发送失败
global.MG_MODEL
}
type MissionClaimDetail struct {
global.MG_MODEL
ClaimNo string `json:"claim_no"` //领取任务编号
MissionId uint `json:"mission_id"` //任务id
AchieveNum int64 `json:"achieve_num"` //已完成商品数量
Status int `json:"status"` //状态 1:已领取待发货 2:已发货 3:已收货推广中
SpreadUrl string `json:"spread_url"` //推广链接
TotalBonus int64 `json:"total_bonus"` //累计佣金
StatusExcept string `json:"status_except" gorm:"-"` //状态描述
ExpireAt time.Time `json:"expire_at"` //任务推广过期时间
Email string `json:"email"` //发送邮箱
Finished int `json:"finished"` // 任务完成状态 0:未完成 1:已完成
Order MissionClaimOrderInfo `gorm:"ForeignKey:MissionClaimId;AssociationForeignKey:ID" json:"order"` //任务订单
Mission MissionDetail `gorm:"ForeignKey:MissionId;AssociationForeignKey:ID" json:"mission"` //关联任务
Works []MissionClaimWorks `gorm:"ForeignKey:MissionClaimId;AssociationForeignKey:ID" json:"works"` //发布作品
Video MissionClaimVideo `gorm:"ForeignKey:MissionClaimId;AssociationForeignKey:ID" json:"video"` //上传视频
}
func (MissionClaim) TableName() string {
return "mission_claim"
}
func (MissionClaimDetail) TableName() string {
return "mission_claim"
}

12
model/mission_claim_address.go

@ -0,0 +1,12 @@
package model
type MissionClaimAddress struct { //领取任务地址
Address
AddressId uint `gorm:"type:int(11)" json:"address_id"` //地址id
MissionClaimId uint `gorm:"type:int(11)" json:"mission_claim_id"` //领取任务id
OrderID string `gorm:"size:50;index" json:"order_id"` //订单号
}
func (MissionClaimAddress) TableName() string {
return "mission_claim_address"
}

43
model/mission_claim_order.go

@ -0,0 +1,43 @@
package model
import (
"pure/global"
"time"
)
type MissionClaimOrder struct { //任务领取sku订单
global.MG_MODEL
OrderID string `gorm:"size:50;index" json:"order_id"` //订单号
MissionClaimId uint `gorm:"type:int(11)" json:"mission_claim_id"` //领取任务id
SpuNo string `gorm:"type:varchar(60);" json:"spu_no"` //spu编号
SkuNo string `gorm:"type:varchar(60);" json:"sku_no"` //sku编号
Number int `gorm:"type:int(10)" json:"number"` //数量
CreateBy string `gorm:"size:64" json:"create_by"` //创建人
Status int `gorm:"type:int(1)" json:"status"` //订单状态 2:待发货 3:已发货
SendTime *time.Time `gorm:"send_time" json:"sendTime"` //发货时间
Courier string `gorm:"size:50" json:"courier"` //快递公司
CourierUrl string `gorm:"size:255" json:"courier_url"` //快递查询地址
CourierNumber string `gorm:"size:50" json:"courierNumber"` //快递单号
TrackId uint `json:"track_id"` // track表id
ConfirmTime *time.Time `gorm:"" json:"confirmTime"` //收货时间
}
type MissionClaimOrderInfo struct {
OrderID string `json:"order_id"` //订单号
MissionClaimId uint `json:"mission_claim_id"` //领取任务id
Status int `json:"status"` //订单状态 2:待发货 3:已发货
Courier string `json:"courier"` //快递公司
CourierUrl string `json:"courier_url"` //快递查询地址
CourierNumber string `json:"courier_number"` //快递单号
SendTime *time.Time `gorm:"send_time" json:"send_time"` //发货时间
OrderGoods MissionClaimOrderGoods `gorm:"ForeignKey:OrderID;references:OrderID;" json:"order_goods"` //订单商品信息
Deliver OrderDeliver `gorm:"-" json:"deliver"` //发货信息
}
func (MissionClaimOrder) TableName() string {
return "mission_claim_order"
}
func (MissionClaimOrderInfo) TableName() string {
return "mission_claim_order"
}

17
model/mission_claim_order_goods.go

@ -0,0 +1,17 @@
package model
import "pure/global"
type MissionClaimOrderGoods struct { //任务订单关联商品
global.MG_MODEL
OrderID string `gorm:"size:50;index" json:"order_id"` //订单号
SkuNo string `gorm:"type:varchar(60);" json:"sku_no"` //sku编号
Title string `gorm:"type:varchar(255);" json:"title"` //名称
Image string `gorm:"size:255" json:"image"` //规格图片url
Specs string `gorm:"type:text;" json:"specs"` //规格
Price float64 `gorm:"type:decimal(10,2);" json:"price"` //价格
}
func (MissionClaimOrderGoods) TableName() string {
return "mission_claim_order_goods"
}

37
model/mission_claim_video.go

@ -0,0 +1,37 @@
package model
import (
"pure/global"
"time"
)
type MissionClaimVideo struct { //固定费用上传视频
global.MG_MODEL
MissionClaimId uint `gorm:"type:int(11)" json:"mission_claim_id"` //领取任务id
VideoUrl string `gorm:"size:255" json:"video_url"` //视频上传地址
Cover string `json:"cover" gorm:"size:255"` //视频封面
Remark string `json:"remark"`
Status int `json:"status"` //状态 1:待审核 2:审核通过 3:审核不通过
RewardStatus int `gorm:"type:tinyint(1)" json:"reward_status"` // 奖励发放状态 1:未发放 2:已发放
SourceType int `json:"source_type" gorm:"type:tinyint(1);default:1"` //类型:1:固定费用上传 2:奖励任务上传 3:后台上传
MissionId uint `json:"mission_id"` //任务ID
CreateBy string `gorm:"size:64" json:"create_by"` //创建人
CreateTime time.Time `gorm:"-" json:"created_at"` // 创建时间
Width int `json:"width"` //宽度
Height int `json:"height"` //高度
}
type MissionClaimVideoDetail struct {
MissionClaimVideo
Mission MissionDetail `gorm:"ForeignKey:ID;References:MissionId" json:"mission"` //任务信息
Influencer UserSimple `gorm:"ForeignKey:UUID;References:CreateBy" json:"influencer"` //网红信息
}
func (MissionClaimVideo) TableName() string {
return "mission_claim_video"
}
func (MissionClaimVideoDetail) TableName() string {
return "mission_claim_video"
}

17
model/mission_claim_works.go

@ -0,0 +1,17 @@
package model
import "pure/global"
type MissionClaimWorks struct { //领取任务发布的作品
global.MG_MODEL
MissionClaimId uint `gorm:"type:int(11)" json:"mission_claim_id"` //领取任务id
Type int `gorm:"type:tinyint(1)" json:"type"` //平台 1:ins 2:YouTube 3:tiktok 4:Facebook 5:Twitter
Homepage string `gorm:"size:255" json:"homepage"` //作品主页地址
Image string `json:"image"` //作品凭证截图
VideoUrl string `gorm:"size:255" json:"video_url"` //视频上传地址
}
func (MissionClaimWorks) TableName() string {
return "mission_claim_works"
}

27
model/mission_recommend.go

@ -0,0 +1,27 @@
package model
import (
"pure/global"
)
type MissionRecommend struct { //任务推荐
RelationId uint `gorm:"type:int(11);" json:"relation_id"` //关联ID,任务视频ID
CreateBy string `gorm:"size:64" json:"create_by"` //创建人
Status int `gorm:"type:tinyint(1);" json:"status"` //状态 1:上架 2:下架
Sort int `gorm:"type:tinyint(2)" json:"sort"` //倒序 //排序
UpdateBy string `gorm:"size:64" json:"-"` //更新人
global.MG_MODEL
}
type MissionRecommendDetail struct { //任务推荐
MissionRecommend //更新人
MissionVideo MissionClaimVideoDetail `gorm:"ForeignKey:ID;References:RelationId" json:"mission_video"` //任务视频信息
}
func (MissionRecommend) TableName() string {
return "mission_recommend"
}
func (MissionRecommendDetail) TableName() string {
return "mission_recommend"
}

16
model/notify.go

@ -0,0 +1,16 @@
package model
import "pure/global"
type Notify struct { // 通知
global.MG_MODEL
UserId string `gorm:"size:64" json:"userId"` // 用户id
RelationType string `gorm:"size:1" json:"relation_type"` // 关联类型 1-提现
RelationId string `gorm:"size:64" json:"relation_id"` // 关联id
Title string `gorm:"size:255" json:"title"` // 通知标题
Content string `gorm:"size:255" json:"content"` // 通知内容
}
func (Notify) TableName() string {
return "notify"
}

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save