Compare commits
4 Commits
Author | SHA1 | Date |
---|---|---|
文武 | 6ae7a95e40 | 4 months ago |
文武 | e389f8baad | 6 months ago |
文武 | 06544e0350 | 6 months ago |
文武 | 48d5a9de7f | 6 months ago |
215 changed files with 30960 additions and 2 deletions
@ -0,0 +1,49 @@ |
|||
workspace: |
|||
base: /project |
|||
path: src/demo |
|||
|
|||
branches: [ master,develop,uat ] |
|||
|
|||
|
|||
pipeline: |
|||
|
|||
build: |
|||
image: golang:1.20-alpine |
|||
commands: |
|||
- export GO111MODULE=on |
|||
- export GOPROXY=https://goproxy.cn,direct |
|||
- CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o server.app |
|||
# - make build |
|||
|
|||
docker-dev: |
|||
image: plugins/docker |
|||
repo: registry.cn-shenzhen.aliyuncs.com/ax-stor/ax-bkb-seller |
|||
registry: registry.cn-shenzhen.aliyuncs.com |
|||
use_cache: true |
|||
dockerfile: Dockerfile |
|||
secrets: [ docker_username, docker_password ] |
|||
tags: shop-api |
|||
when: |
|||
branch: develop |
|||
|
|||
# deploy-dev: |
|||
# image: roffe/kubectl |
|||
# commands: |
|||
# - rm -rf /root/.kube && cp -r .kube /root |
|||
# - kubectl delete -f deployDev.yaml || true |
|||
# - kubectl apply -f deployDev.yaml |
|||
# when: |
|||
# branch: develop |
|||
deploy-dev: |
|||
image: appleboy/drone-ssh |
|||
host: 1.92.109.79 |
|||
username: root |
|||
password: |
|||
from_secret: ssh_password |
|||
port: 22 # 可选,指定 SSH 端口,默认为 22 |
|||
script: |
|||
- docker rm -f shop-api |
|||
- docker pull registry.cn-shenzhen.aliyuncs.com/ax-stor/ax-bkb-seller:shop-api |
|||
- docker run --name=shop-api -p 30204:8001 -d registry.cn-shenzhen.aliyuncs.com/ax-stor/ax-bkb-seller:shop-api |
|||
when: |
|||
branch: develop |
@ -0,0 +1,41 @@ |
|||
# Reference https://github.com/github/gitignore/blob/master/Go.gitignore |
|||
# Binaries for programs and plugins |
|||
*.exe |
|||
*.exe~ |
|||
*.dll |
|||
*.dylib |
|||
|
|||
# Test binary, built with `go test -c` |
|||
*.test |
|||
|
|||
# Output of the go coverage tool, specifically when used with LiteIDE |
|||
*.out |
|||
|
|||
# Dependency directories (remove the comment below to include it) |
|||
vendor/ |
|||
|
|||
# Go workspace file |
|||
go.work |
|||
|
|||
# Compiled Object files, Static and Dynamic libs (Shared Objects) |
|||
*.o |
|||
*.a |
|||
*.so |
|||
|
|||
# OS General |
|||
Thumbs.db |
|||
.DS_Store |
|||
|
|||
# project |
|||
*.cert |
|||
*.key |
|||
*.log |
|||
bin/ |
|||
|
|||
# Develop tools |
|||
.vscode/ |
|||
.idea/ |
|||
*.swp |
|||
__debug_bin* |
|||
*.history |
|||
cache/ |
@ -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 |
@ -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 initialize/api -name *.proto") |
|||
else |
|||
INTERNAL_PROTO_FILES=$(shell find internal -name *.proto) |
|||
API_PROTO_FILES=$(shell find initialize/api -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=./initialize/api \
|
|||
--go_out=paths=source_relative:./initialize/api \
|
|||
--go-http_out=paths=source_relative:./initialize/api/http \
|
|||
--go-grpc_out=paths=source_relative:./initialize/api \
|
|||
--openapi_out=fq_schema_naming=true,default_response=false:. \
|
|||
$(API_PROTO_FILES) |
|||
ls ./initialize/api/*.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 |
@ -1,2 +1 @@ |
|||
# shop-api |
|||
|
|||
# app-api |
@ -0,0 +1,266 @@ |
|||
package api |
|||
|
|||
import ( |
|||
"regexp" |
|||
"shop-api/global" |
|||
"shop-api/middleware" |
|||
"shop-api/model" |
|||
"shop-api/model/request" |
|||
"shop-api/model/response" |
|||
"shop-api/service" |
|||
"time" |
|||
|
|||
"shop-api/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 /base/login [post]
|
|||
func Login(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 |
|||
} |
|||
} 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)) |
|||
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]
|
|||
// @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 /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 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(), |
|||
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: model.UserSimple{ |
|||
UUID: user.UUID, |
|||
NickName: user.NickName, |
|||
Avatar: user.Avatar, |
|||
Tags: user.Tags, |
|||
}, |
|||
Token: token, |
|||
ExpiresAt: claims.StandardClaims.ExpiresAt * 1000, |
|||
}, "success", c) |
|||
} |
|||
|
|||
// @Summary 授权登录[v1.0.0]
|
|||
// @Description
|
|||
// @Tags auth
|
|||
// @Param data body request.UserAuthorized true "email,password..."
|
|||
// @Success 200 {object} response.LoginResponse "{"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 auth
|
|||
// @Param data query request.AppProvider true "email,password..."
|
|||
// @Success 200 {object} model.ProviderSimple "{"code": 0, "data": "获取成功"}"
|
|||
// @Success 200 {string} string "{"code": 1, "message": ""}"
|
|||
// @Router /base/provider [get]
|
|||
func GetProviderList(c *gin.Context) { |
|||
var ( |
|||
l request.AppProvider |
|||
) |
|||
_ = c.ShouldBind(&l) |
|||
if data, err := service.GetProviderList(&l); err != nil { |
|||
global.MG_LOG.Error("GetProviderList failed!", zap.Any("err", err)) |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} else { |
|||
response.OkWithData(data, c) |
|||
} |
|||
} |
|||
|
|||
// @Summary 获取第三方登录信息[v1.0.0]
|
|||
// @Security Bearer
|
|||
// @Description
|
|||
// @Tags auth
|
|||
// @Param data query request.ProviderAuth true "provider"
|
|||
// @Success 200 {object} string "{"code": 0, "data": "获取成功"}"
|
|||
// @Success 200 {string} string "{"code": 1, "message": ""}"
|
|||
// @Router /base/authUrl [get]
|
|||
func GetProviderAuthUrl(c *gin.Context) { |
|||
var ( |
|||
err error |
|||
l request.ProviderAuth |
|||
) |
|||
_ = c.ShouldBind(&l) |
|||
if err := utils.Verify(l, utils.RegisterVerify); err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
err, data := service.GetProviderAuthUrl(&l) |
|||
if err != nil { |
|||
global.MG_LOG.Error("GetProviderAuthUrl failed!", zap.Any("err", err)) |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} else { |
|||
response.OkWithData(data, c) |
|||
} |
|||
} |
|||
|
|||
// GetChainInfo
|
|||
// @Summary 获取区块链数据
|
|||
// @Description
|
|||
// @Tags Chain
|
|||
// @Param data query request.ChainParams false "data..."
|
|||
// @Success 200 {object} []response.ChainResp "{"code": 0, "data": [...]}"
|
|||
// @Success 201 {string} string "{"code": 1, "message": ""}"
|
|||
// @Router /base/chain [get]
|
|||
func GetChainInfo(c *gin.Context) { |
|||
var ( |
|||
err error |
|||
params request.ChainParams |
|||
result []response.ChainResp |
|||
) |
|||
_ = c.ShouldBindQuery(¶ms) |
|||
if err := utils.Verify(params, utils.ChainVerify); err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
err, result = service.GetChainInfo(params.Hash) |
|||
if err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
response.OkWithDataMessage(result, "success", c) |
|||
} |
@ -0,0 +1,436 @@ |
|||
package customer |
|||
|
|||
import ( |
|||
"bytes" |
|||
"io" |
|||
"shop-api/utils" |
|||
|
|||
"shop-api/api/sys" |
|||
"shop-api/dto" |
|||
"shop-api/model" |
|||
"shop-api/model/request" |
|||
"shop-api/model/response" |
|||
"shop-api/service" |
|||
|
|||
"github.com/gin-gonic/gin" |
|||
) |
|||
|
|||
// @Summary 获取订单数据
|
|||
// @Security Bearer
|
|||
// @Description
|
|||
// @Tags 客户端-订单
|
|||
// @Success 200 {object} response.OrderData "{"code": 0, "data": [...]}"
|
|||
// @Success 201 {string} string "{"code": 1, "message": ""}"
|
|||
// @Router /order/data [get]
|
|||
func GetUserOrderData(c *gin.Context) { |
|||
var ( |
|||
err error |
|||
result response.OrderData |
|||
) |
|||
userId := sys.GetUserUuid(c) |
|||
result, err = service.GetUserOrderData(userId) |
|||
if err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
response.OkWithDataMessage(result, "获取成功", c) |
|||
} |
|||
|
|||
// @Summary 获取订单列表
|
|||
// @Security Bearer
|
|||
// @Description
|
|||
// @Tags 客户端-订单
|
|||
// @Param data query request.SearchOrderList false "data..."
|
|||
// @Success 200 {object} []model.OrderList "{"code": 0, "data": [...]}"
|
|||
// @Success 201 {string} string "{"code": 1, "message": ""}"
|
|||
// @Router /order/list [get]
|
|||
func GetUserOrderList(c *gin.Context) { |
|||
var ( |
|||
err error |
|||
userID string |
|||
list interface{} |
|||
total int64 |
|||
data request.SearchOrderList |
|||
) |
|||
_ = c.ShouldBindQuery(&data) |
|||
userID = sys.GetUserUuid(c) |
|||
err, list, total = service.GetUserOrderList(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 query request.SearchOrderDetail false "data..."
|
|||
// @Success 200 {object} model.OrderDetail "{"code": 0, "data": [...]}"
|
|||
// @Success 201 {string} string "{"code": 1, "message": ""}"
|
|||
// @Router /order/detail [get]
|
|||
func GetUserOrderDetail(c *gin.Context) { |
|||
var ( |
|||
err error |
|||
userID string |
|||
list interface{} |
|||
data request.SearchOrderDetail |
|||
) |
|||
_ = c.ShouldBindQuery(&data) |
|||
userID = sys.GetUserUuid(c) |
|||
err, list = service.GetUserOrderDetail(userID, &data) |
|||
if err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
response.OkWithDetailed(list, "获取成功", c) |
|||
} |
|||
func AddUserOrder(c *gin.Context) { |
|||
var ( |
|||
err error |
|||
userID string |
|||
params request.CreateOrderParams |
|||
result interface{} |
|||
) |
|||
_ = c.ShouldBind(¶ms) |
|||
userID = sys.GetUserUuid(c) |
|||
err, result = service.AddUserOrder(userID, ¶ms) |
|||
if err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
response.OkWithData(result, c) |
|||
} |
|||
|
|||
// @Summary 下单-payment
|
|||
// @Security Bearer
|
|||
// @Description
|
|||
// @Tags 客户端-订单
|
|||
// @Param data body request.CreateOrderParams false "data..."
|
|||
// @Success 200 {object} response.Order "{"code": 0, "data": [...]}"
|
|||
// @Success 201 {string} string "{"code": 1, "message": ""}"
|
|||
// @Router /order/create [post]
|
|||
func AddUserOrder1(c *gin.Context) { |
|||
var ( |
|||
err error |
|||
userID string |
|||
device request.Device |
|||
params dto.CreateOrderRequest |
|||
result interface{} |
|||
) |
|||
_ = c.ShouldBind(¶ms) |
|||
userID = sys.GetUserUuid(c) |
|||
device.OsType, device.TerminalType = utils.DetectOsType(sys.GetUA(c)) |
|||
err, result = service.AddUserOrderV1(userID, &device, ¶ms) |
|||
if err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
response.OkWithData(result, c) |
|||
} |
|||
|
|||
// @Summary 修改订单状态(取消订单,确认收货订单)
|
|||
// @Security Bearer
|
|||
// @Description
|
|||
// @Tags 客户端-订单
|
|||
// @Param data body request.UpdateUserOrderStatus false "data..."
|
|||
// @Success 200 {string} string "{"code": 0, "data": [...]}"
|
|||
// @Success 201 {string} string "{"code": 1, "message": ""}"
|
|||
// @Router /order/orderStatus [put]
|
|||
func UpdateUserOrderStatus(c *gin.Context) { |
|||
var ( |
|||
err error |
|||
userID string |
|||
data request.UpdateUserOrderStatus |
|||
) |
|||
_ = c.ShouldBind(&data) |
|||
userID = sys.GetUserUuid(c) |
|||
err = service.UpdateUserOrderStatus(userID, &data) |
|||
if err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
response.OkWithMessage("修改成功", c) |
|||
} |
|||
|
|||
// @Summary 修改订单收货信息
|
|||
// @Security Bearer
|
|||
// @Description
|
|||
// @Tags 客户端-订单
|
|||
// @Param data body request.UpdateOrderAddress false "data..."
|
|||
// @Success 200 {string} string "{"code": 0, "data": [...]}"
|
|||
// @Success 201 {string} string "{"code": 1, "message": ""}"
|
|||
// @Router /order/address [put]
|
|||
func UpdateOrderAddress(c *gin.Context) { |
|||
var ( |
|||
err error |
|||
params request.UpdateOrderAddress |
|||
) |
|||
_ = c.ShouldBindJSON(¶ms) |
|||
userId := sys.GetUserUuid(c) |
|||
if err = service.UpdateOrderAddress(userId, ¶ms); err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
response.OkWithMessage("修改成功", c) |
|||
} |
|||
|
|||
// @Summary 订单支付完成页确认订单
|
|||
// @Security Bearer
|
|||
// @Description
|
|||
// @Tags 客户端-订单
|
|||
// @Param data query request.CheckOrderParams false "data..."
|
|||
// @Success 200 {string} string "{"code": 0, "data": [...]}"
|
|||
// @Success 201 {string} string "{"code": 1, "message": ""}"
|
|||
// @Router /order/checkOrder [get]
|
|||
func CheckOrder(c *gin.Context) { |
|||
var ( |
|||
err error |
|||
userID string |
|||
data request.CheckOrderParams |
|||
) |
|||
err = c.ShouldBind(&data) |
|||
if err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
userID = sys.GetUserUuid(c) |
|||
err = service.CheckOrderStatus(userID, &data) |
|||
if err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
response.OkWithMessage("确认完成", c) |
|||
} |
|||
|
|||
// @Summary 删除订单
|
|||
// @Security Bearer
|
|||
// @Description
|
|||
// @Tags 客户端-订单
|
|||
// @Param data body request.DeleteUserORder false "data..."
|
|||
// @Success 200 {string} string "{"code": 0, "data": [...]}"
|
|||
// @Success 201 {string} string "{"code": 1, "message": ""}"
|
|||
// @Router /order/order [delete]
|
|||
func DeleteUserOrder(c *gin.Context) { |
|||
var ( |
|||
err error |
|||
userID string |
|||
data request.DeleteUserORder |
|||
) |
|||
c.ShouldBind(&data) |
|||
userID = sys.GetUserUuid(c) |
|||
err = service.DeleteUserOrderStatus(userID, &data) |
|||
if err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
response.OkWithMessage("删除成功", c) |
|||
} |
|||
func GetPayOrderSign(c *gin.Context) { |
|||
var ( |
|||
err error |
|||
userID string |
|||
params request.SearchOrderDetail |
|||
result interface{} |
|||
) |
|||
_ = c.ShouldBind(¶ms) |
|||
userID = sys.GetUserUuid(c) |
|||
err, result = service.GetPayOrderSign(userID, ¶ms) |
|||
if err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
response.OkWithData(result, c) |
|||
} |
|||
|
|||
// @Summary 再次调起支付-payment
|
|||
// @Security Bearer
|
|||
// @Description
|
|||
// @Tags 客户端-订单
|
|||
// @Param data body request.OrderPay false "data..."
|
|||
// @Success 200 {object} response.Order "{"code": 0, "data": [...]}"
|
|||
// @Success 201 {string} string "{"code": 1, "message": ""}"
|
|||
// @Router /order/orderPay [post]
|
|||
func GetPayOrderSign1(c *gin.Context) { |
|||
var ( |
|||
err error |
|||
userID string |
|||
device request.Device |
|||
params request.OrderPay |
|||
result interface{} |
|||
) |
|||
_ = c.ShouldBind(¶ms) |
|||
userID = sys.GetUserUuid(c) |
|||
device.OsType, device.TerminalType = utils.DetectOsType(sys.GetUA(c)) |
|||
err, result = service.GetPayOrderSign1(userID, &device, ¶ms) |
|||
if err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
response.OkWithData(result, c) |
|||
} |
|||
|
|||
func UserOrderMessage(c *gin.Context) { |
|||
var ( |
|||
err error |
|||
data model.PaypalWebhookDetail |
|||
body []byte |
|||
) |
|||
body, err = io.ReadAll(c.Request.Body) |
|||
if err != nil { |
|||
// global.MG_LOG.Error("read body from request error:", zap.Any("err", err))
|
|||
} else { |
|||
c.Request.Body = io.NopCloser(bytes.NewBuffer(body)) |
|||
} |
|||
_, _ = service.CreateWebhookRecord(body) |
|||
_ = c.ShouldBind(&data) |
|||
err = service.UserOrderMessage(&data) |
|||
if err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
response.OkWithMessage("回调成功", c) |
|||
} |
|||
|
|||
func PaymentCallback(c *gin.Context) { |
|||
var ( |
|||
err error |
|||
body []byte |
|||
params dto.PaybackBody |
|||
) |
|||
body, err = io.ReadAll(c.Request.Body) |
|||
if err != nil { |
|||
// global.MG_LOG.Error("read body from request error:", zap.Any("err", err))
|
|||
} else { |
|||
c.Request.Body = io.NopCloser(bytes.NewBuffer(body)) |
|||
} |
|||
service.CreateWebhookRecord(body) |
|||
_ = c.ShouldBind(¶ms) |
|||
err = service.PaypalCallback1(¶ms) |
|||
if err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
response.OkWithMessage("回调成功", c) |
|||
} |
|||
|
|||
// @Summary 获取订单商品快照
|
|||
// @Security Bearer
|
|||
// @Description
|
|||
// @Tags 客户端-订单
|
|||
// @Param data query request.SearchOrderDetail false "data..."
|
|||
// @Success 200 {object} model.OrderGoodsDetail "{"code": 0, "data": [...]}"
|
|||
// @Success 201 {string} string "{"code": 1, "message": ""}"
|
|||
// @Router /order/goods/snapshot [get]
|
|||
func GetOrderGoodsInfo(c *gin.Context) { |
|||
var ( |
|||
err error |
|||
params request.SearchOrderDetail |
|||
result model.OrderGoodsDetail |
|||
) |
|||
_ = c.ShouldBindQuery(¶ms) |
|||
userId := sys.GetUserUuid(c) |
|||
err, result = service.GetOrderGoods(userId, ¶ms) |
|||
if err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} else { |
|||
response.OkWithDataMessage(result, "获取成功", c) |
|||
return |
|||
} |
|||
} |
|||
|
|||
// @Summary 获取订单申请退款/退货详情
|
|||
// @Security Bearer
|
|||
// @Description
|
|||
// @Tags 客户端-订单
|
|||
// @Param data query request.IdReq false "data..."
|
|||
// @Success 200 {object} model.OrderPostSale "{"code": 0, "data": [...]}"
|
|||
// @Success 201 {string} string "{"code": 1, "message": ""}"
|
|||
// @Router /order/postSale [get]
|
|||
func GetOrderPostSale(c *gin.Context) { |
|||
var ( |
|||
err error |
|||
params request.IdReq |
|||
result model.OrderPostSale |
|||
) |
|||
_ = c.ShouldBindQuery(¶ms) |
|||
userId := sys.GetUserUuid(c) |
|||
if result, err = service.GetOrderPostSale(userId, ¶ms); err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
response.OkWithDetailed(result, "获取成功", c) |
|||
} |
|||
|
|||
// @Summary 订单申请退款/退货
|
|||
// @Security Bearer
|
|||
// @Description
|
|||
// @Tags 客户端-订单
|
|||
// @Param data body request.PostSaleParams false "data..."
|
|||
// @Success 200 {string} string "{"code": 0, "data": [...]}"
|
|||
// @Success 201 {string} string "{"code": 1, "message": ""}"
|
|||
// @Router /order/postSale [post]
|
|||
func OrderPostSale(c *gin.Context) { |
|||
var ( |
|||
err error |
|||
params request.PostSaleParams |
|||
result string |
|||
) |
|||
_ = c.ShouldBindJSON(¶ms) |
|||
userId := sys.GetUserUuid(c) |
|||
if result, err = service.OrderPostSale(userId, ¶ms); err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
response.OkWithData(result, 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 /order/postSale [delete]
|
|||
func CancelOrderPostSale(c *gin.Context) { |
|||
var ( |
|||
err error |
|||
params request.IdReq |
|||
result string |
|||
) |
|||
_ = c.ShouldBindJSON(¶ms) |
|||
userId := sys.GetUserUuid(c) |
|||
result, err = service.CancelOrderPostSale(userId, ¶ms) |
|||
if err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
response.OkWithData(result, c) |
|||
} |
|||
|
|||
// @Summary 获取支付方式列表
|
|||
// @Security Bearer
|
|||
// @Description
|
|||
// @Tags 客户端-订单
|
|||
// @Success 200 {array} model.PaymentMethod "{"code": 0, "data": [...]}"
|
|||
// @Router /global/payment-methods [get]
|
|||
func PaymentMethod(c *gin.Context) { |
|||
var ( |
|||
err error |
|||
list []model.PaymentMethod |
|||
) |
|||
err, list = service.GetCountryPaymentMethod(c) |
|||
if err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
response.OkWithDetailed(list, "获取成功", c) |
|||
} |
@ -0,0 +1,55 @@ |
|||
package customer |
|||
|
|||
import ( |
|||
"shop-api/api/sys" |
|||
"shop-api/global" |
|||
"shop-api/model/request" |
|||
"shop-api/model/response" |
|||
"shop-api/service" |
|||
"shop-api/utils" |
|||
|
|||
"github.com/gin-gonic/gin" |
|||
"go.uber.org/zap" |
|||
) |
|||
|
|||
// GetTbGoodsDetail
|
|||
// @Summary 获取商品详情
|
|||
// @Description
|
|||
// @Tags goods
|
|||
// @Security ApiKeyAuth
|
|||
// @Param data query request.Goods false "params"
|
|||
// @Success 200 {object} model.TbGoodsDetail "{"code": 200, "data": {}}"
|
|||
// @Router /goods/detail [get]
|
|||
func GetTbGoodsDetail(c *gin.Context) { |
|||
var info request.Goods |
|||
_ = c.ShouldBindQuery(&info) |
|||
if err, data := service.GetTbGoodsWithMission(sys.GetUserUuid(c), info); err != nil { |
|||
global.MG_LOG.Error("获取失败!", zap.Any("err", err)) |
|||
response.FailWithMessage("获取失败", c) |
|||
} else { |
|||
response.OkWithData(data, c) |
|||
} |
|||
} |
|||
|
|||
// CollectGoods
|
|||
// @Summary 收藏/取消收藏商品 [v1.0]
|
|||
// @Description
|
|||
// @Tags goods
|
|||
// @Security ApiKeyAuth
|
|||
// @Param data body request.SpuNo false "params"
|
|||
// @Success 200 {string} string "{"code": 200, "data": {}}"
|
|||
// @Router /goods/collect [post]
|
|||
func CollectGoods(c *gin.Context) { |
|||
var info request.SpuNo |
|||
_ = c.ShouldBindJSON(&info) |
|||
if err := utils.Verify(info, utils.SpuNoVerify); err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
if err, id := service.ChangeCollectionGoods(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) |
|||
} |
|||
} |
@ -0,0 +1,77 @@ |
|||
package customer |
|||
|
|||
import ( |
|||
"regexp" |
|||
"time" |
|||
|
|||
"shop-api/model/request" |
|||
"shop-api/model/response" |
|||
"shop-api/service" |
|||
"shop-api/utils" |
|||
|
|||
"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(¶ms) |
|||
if err = utils.Verify(params, utils.SendMessageVerity); err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
//校验手机号格式
|
|||
if ok, _ := regexp.MatchString(utils.RegPhoneNumber, params.Phone); !ok { |
|||
response.FailWithMessage("手机号码格式不合法", c) |
|||
return |
|||
} |
|||
if err = utils.SendSms(params.Phone, params.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(¶ms) |
|||
if err = utils.Verify(params, utils.SendEmailVerify); err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
//校验邮箱格式
|
|||
if ok, _ := regexp.MatchString(utils.RegEmailNumber, params.Email); !ok { |
|||
response.FailWithMessage("邮箱格式不合法", c) |
|||
return |
|||
} |
|||
if code, err = utils.SendEmail(params.Email, "1"); err != nil { |
|||
response.FailWithMessage("发送失败,"+err.Error(), c) |
|||
return |
|||
} |
|||
_ = service.RedisSet("email_code:"+params.Email, code, 5*time.Minute) |
|||
response.OkWithMessage("发送成功", c) |
|||
} |
@ -0,0 +1 @@ |
|||
package customer |
@ -0,0 +1,140 @@ |
|||
package global |
|||
|
|||
import ( |
|||
"shop-api/api/sys" |
|||
"shop-api/dto" |
|||
"shop-api/global" |
|||
"shop-api/model/request" |
|||
"shop-api/model/response" |
|||
"shop-api/service" |
|||
|
|||
"github.com/gin-gonic/gin" |
|||
) |
|||
|
|||
// @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 interface{} |
|||
) |
|||
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 dto.CreateAddressRequest 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 dto.CreateAddressRequest |
|||
) |
|||
err = c.ShouldBindJSON(&data) |
|||
if err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
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 dto.UpdateAddressRequest |
|||
) |
|||
err = c.ShouldBindJSON(&data) |
|||
if err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
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 |
|||
) |
|||
err = c.ShouldBindJSON(&data) |
|||
if err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
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 interface{} |
|||
) |
|||
err, data = service.GetUsSelect() |
|||
if err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
response.OkWithData(data, c) |
|||
} |
@ -0,0 +1,41 @@ |
|||
package sys |
|||
|
|||
import ( |
|||
"github.com/gin-gonic/gin" |
|||
|
|||
"shop-api/global" |
|||
"shop-api/model/request" |
|||
"shop-api/model/response" |
|||
"shop-api/service" |
|||
"shop-api/utils" |
|||
) |
|||
|
|||
// GetSysBrochure
|
|||
// @Summary 隐私协议单页
|
|||
// @Tags tools
|
|||
// @Param data query request.SysBrochureType false "params"
|
|||
// @Success 200 {string} string "{"success":true,"data":{},"msg":""}"
|
|||
// @Router /base/brochure [get]
|
|||
func GetSysBrochure(c *gin.Context) { |
|||
var info request.SysBrochureType |
|||
_ = c.ShouldBindQuery(&info) |
|||
|
|||
if err := utils.Verify(info, utils.TypeVerify); err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
if err, data := service.GetSysBrochure(info.Type); err != nil { |
|||
global.MG_LOG.Error("获取失败! err " + err.Error()) |
|||
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) {} |
@ -0,0 +1,55 @@ |
|||
package sys |
|||
|
|||
import ( |
|||
"shop-api/global" |
|||
"shop-api/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解析出来的用户UUID
|
|||
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 |
|||
} |
|||
} |
|||
|
|||
// 从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 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 |
|||
} |
|||
} |
|||
|
|||
func GetUA(c *gin.Context) string { |
|||
return c.GetHeader("User-Agent") |
|||
} |
@ -0,0 +1,25 @@ |
|||
package sys |
|||
|
|||
import ( |
|||
"context" |
|||
"shop-api/initialize/api" |
|||
|
|||
"github.com/gin-gonic/gin" |
|||
"google.golang.org/protobuf/types/known/emptypb" |
|||
|
|||
"shop-api/global" |
|||
"shop-api/model/response" |
|||
) |
|||
|
|||
func Test(c *gin.Context) { |
|||
ping, err := api.NewGreeterClient(global.PAY_CONN).Ping(context.Background(), &emptypb.Empty{}) |
|||
if err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
response.OkWithData(ping.Message, c) |
|||
} |
|||
|
|||
func Test2(c *gin.Context) { |
|||
|
|||
} |
@ -0,0 +1,65 @@ |
|||
package api |
|||
|
|||
import ( |
|||
"regexp" |
|||
"shop-api/api/sys" |
|||
"shop-api/global" |
|||
"shop-api/model/request" |
|||
"shop-api/model/response" |
|||
"shop-api/service" |
|||
"shop-api/utils" |
|||
|
|||
"github.com/gin-gonic/gin" |
|||
"go.uber.org/zap" |
|||
) |
|||
|
|||
// @Summary 购买申诉[v1.0.0]
|
|||
// @Security Bearer
|
|||
// @Description
|
|||
// @Tags user
|
|||
// @Param data body request.UserAppeal true "respon"
|
|||
// @Success 200 {string} string "{"code": 0, "data": [...]}"
|
|||
// @Success 200 {string} string "{"code": 1, "message": ""}"
|
|||
// @Router /user/appeal [post]
|
|||
func UserAppeal(c *gin.Context) { |
|||
var a request.UserAppeal |
|||
_ = c.ShouldBindJSON(&a) |
|||
if err := utils.Verify(a, utils.UserAppealVerify); err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
if err := service.UserAppeal(&a, sys.GetUserUuid(c)); err != nil { |
|||
global.MG_LOG.Error("Appeal failed!", zap.Any("err", err)) |
|||
response.FailWithMessage("Appeal failed", c) |
|||
return |
|||
} |
|||
response.OkWithMessage("Appeal successful", c) |
|||
} |
|||
|
|||
// @Summary 绑定邮箱[v1.0.0]
|
|||
// @Security Bearer
|
|||
// @Description
|
|||
// @Tags user
|
|||
// @Param data body request.UserEmail true "email"
|
|||
// @Success 200 {string} string "{"code": 0, "data": [...]}"
|
|||
// @Success 200 {string} string "{"code": 1, "message": ""}"
|
|||
// @Router /user/email [put]
|
|||
func BandUserEmail(c *gin.Context) { |
|||
var a request.UserEmail |
|||
_ = c.ShouldBindJSON(&a) |
|||
if err := utils.Verify(a, utils.UserEmailVerify); err != nil { |
|||
response.FailWithMessage(err.Error(), c) |
|||
return |
|||
} |
|||
//校验邮箱格式
|
|||
if ok, _ := regexp.MatchString(utils.RegEmailNumber, a.Email); !ok { |
|||
response.FailWithMessage("邮箱格式不合法", c) |
|||
return |
|||
} |
|||
if err := service.UserEmail(&a, sys.GetUserUuid(c), sys.GetUserAppid(c)); err != nil { |
|||
global.MG_LOG.Error("Band failed!", zap.Any("err", err)) |
|||
response.FailWithMessage("Band failed", c) |
|||
return |
|||
} |
|||
response.OkWithMessage("Band successful", c) |
|||
} |
@ -0,0 +1,98 @@ |
|||
captcha: |
|||
key-long: 6 |
|||
img-width: 240 |
|||
img-height: 80 |
|||
|
|||
|
|||
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: 1 |
|||
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: https://h5-dev.bkbackground.com/Complete |
|||
cancel-url: https://h5-dev.bkbackground.com/Fail |
|||
order-back: 24 |
|||
order-confirm: 30 |
|||
|
|||
payment: |
|||
notify-url: https://shop-api.bkbackground.com/order/payment/callback |
|||
return-url: https://h5.bkbackground.com/Complete |
|||
cancel-url: https://h5.bkbackground.com/Fail |
|||
|
|||
tools: |
|||
customer-url: http://120.55.164.69:30204 |
|||
|
|||
dysmsapi: |
|||
accessSecret: ZAnicsJ4biuCbgpNnqQbYU34FhTmn3& |
|||
accessKeyID: LTAI5tLzNwMrdZUhdKpm9wor |
|||
signName: 一个地球 |
|||
templateCode1: SMS_257761932 |
|||
templateCode2: SMS_257742075 |
|||
templateCode3: SMS_257742078 |
|||
templateCode4: SMS_257767780 |
@ -0,0 +1,98 @@ |
|||
captcha: |
|||
key-long: 6 |
|||
img-width: 240 |
|||
img-height: 80 |
|||
|
|||
|
|||
jwt: |
|||
signing-key: wqrefsad |
|||
expires-time: 604800 |
|||
buffer-time: 86400 |
|||
local: |
|||
path: uploads/file |
|||
mysql: |
|||
path: 1.92.109.79:30306 |
|||
config: charset=utf8mb4&parseTime=True&loc=Local |
|||
db-name: bkb |
|||
username: root |
|||
password: vBwU7vwAGQ |
|||
max-idle-conns: 10 |
|||
max-open-conns: 100 |
|||
log-mode: info |
|||
log-zap: "" |
|||
minio: |
|||
endpoint: file.mangguonews.com |
|||
access-key-id: minio |
|||
secret-access-key: minio123 |
|||
use-ssl: false |
|||
redis: |
|||
db: 1 |
|||
addr: 1.92.109.79:30379 |
|||
password: rMof*kkr!mfO7MHW |
|||
|
|||
system: |
|||
env: develop |
|||
addr: 8001 |
|||
db-type: mysql |
|||
oss-type: local |
|||
use-multipoint: false |
|||
|
|||
timer: |
|||
start: true |
|||
spec: '@daily' |
|||
detail: |
|||
- tableName: sys_operation_records |
|||
compareField: created_at |
|||
interval: 2160h |
|||
zap: |
|||
level: warn |
|||
format: console |
|||
prefix: '[NFT-ADMIN]' |
|||
director: log |
|||
link-name: nft.log |
|||
showLine: true |
|||
encode-level: LowercaseColorLevelEncoder |
|||
stacktrace-key: stacktrace |
|||
log-in-console: true |
|||
|
|||
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: https://h5-dev.bkbackground.com/Complete |
|||
cancel-url: https://h5-dev.bkbackground.com/Fail |
|||
order-back: 24 |
|||
order-confirm: 30 |
|||
|
|||
payment: |
|||
notify-url: https://shop-api-dev.bkbackground.com/order/payment/callback |
|||
return-url: https://h5-dev.bkbackground.com/Complete |
|||
cancel-url: https://h5-dev.bkbackground.com/Fail |
|||
|
|||
tools: |
|||
customer-url: http://1.92.109.79:30204 |
|||
|
|||
dysmsapi: |
|||
accessSecret: ZAnicsJ4biuCbgpNnqQbYU34FhTmn3& |
|||
accessKeyID: LTAI5tLzNwMrdZUhdKpm9wor |
|||
signName: 一个地球 |
|||
templateCode1: SMS_257761932 |
|||
templateCode2: SMS_257742075 |
|||
templateCode3: SMS_257742078 |
|||
templateCode4: SMS_257767780 |
@ -0,0 +1 @@ |
|||
package config |
@ -0,0 +1,7 @@ |
|||
package config |
|||
|
|||
type Captcha struct { |
|||
KeyLong int `mapstructure:"key-long" json:"keyLong" yaml:"key-long"` // 验证码长度
|
|||
ImgWidth int `mapstructure:"img-width" json:"imgWidth" yaml:"img-width"` // 验证码宽度
|
|||
ImgHeight int `mapstructure:"img-height" json:"imgHeight" yaml:"img-height"` // 验证码高度
|
|||
} |
@ -0,0 +1,5 @@ |
|||
package config |
|||
|
|||
type Casbin struct { |
|||
ModelPath string `mapstructure:"model-path" json:"modelPath" yaml:"model-path"` // 存放casbin模型的相对路径
|
|||
} |
@ -0,0 +1,21 @@ |
|||
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"` |
|||
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
|
|||
Minio Minio `mapstructure:"minio" json:"minio" yaml:"minio"` |
|||
Local Local `mapstructure:"local" json:"local" yaml:"local"` |
|||
Qiniu Qiniu `mapstructure:"qiniu" json:"qiniu" yaml:"qiniu"` |
|||
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"` |
|||
Payment Payment `mapstructure:"payment" json:"payment" yaml:"payment"` |
|||
} |
@ -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域名地址
|
|||
} |
@ -0,0 +1,2 @@ |
|||
package config |
|||
|
@ -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 |
|||
} |
@ -0,0 +1,10 @@ |
|||
package config |
|||
|
|||
type GormSettings struct { |
|||
Settings []Settings `mapstructure:"settings" json:"settings" yaml:"settings"` |
|||
} |
|||
|
|||
type Settings struct { |
|||
DsnName string `mapstructure:"dsn-name" json:"dsnName" yaml:"dsn-name"` |
|||
BindTables []interface{} `mapstructure:"bind-tables" json:"bindTables" yaml:"bind-tables"` |
|||
} |
@ -0,0 +1,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"` //安卓厂商通道包名
|
|||
} |
@ -0,0 +1,7 @@ |
|||
package config |
|||
|
|||
type JWT struct { |
|||
SigningKey string `mapstructure:"signing-key" json:"SigningKey" yaml:"signing-key"` // jwt签名
|
|||
ExpiresTime int64 `mapstructure:"expires-time" json:"expiresTime" yaml:"expires-time"` // 过期时间
|
|||
BufferTime int64 `mapstructure:"buffer-time" json:"bufferTime" yaml:"buffer-time"` // 缓冲时间
|
|||
} |
@ -0,0 +1,8 @@ |
|||
package config |
|||
|
|||
type Minio struct { |
|||
Endpoint string `mapstructure:"endpoint" json:"endpoint" yaml:"endpoint"` //端点
|
|||
AccessKeyID string `mapstructure:"accessKeyID" json:"accessKeyID" yaml:"access-key-id"` //用户ID
|
|||
SecretAccessKey string `mapstructure:"secretAccessKey" json:"secretAccessKey" yaml:"secret-access-key"` //密钥
|
|||
UseSSL bool `mapstructure:"useSSL" json:"useSSL" yaml:"use-ssl"` //是否使用ssl
|
|||
} |
@ -0,0 +1,16 @@ |
|||
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上传加速
|
|||
} |
|||
|
@ -0,0 +1,7 @@ |
|||
package config |
|||
|
|||
type Payment struct { |
|||
NotifyUrl string `mapstructure:"notify-url" json:"notify-url" yaml:"notify-url"` //支付结果回调通知地址
|
|||
ReturnUrl string `mapstructure:"return-url" json:"return-url" yaml:"return-url"` //支付完成跳转
|
|||
CancelUrl string `mapstructure:"cancel-url" json:"cancel-url" yaml:"cancel-url"` //取消支付跳转
|
|||
} |
@ -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"` //订单确认时间(天)
|
|||
} |
@ -0,0 +1,7 @@ |
|||
package config |
|||
|
|||
type Redis struct { |
|||
DB int `mapstructure:"db" json:"db" yaml:"db"` // redis的哪个数据库
|
|||
Addr string `mapstructure:"addr" json:"addr" yaml:"addr"` // 服务器地址:端口
|
|||
Password string `mapstructure:"password" json:"password" yaml:"password"` // 密码
|
|||
} |
@ -0,0 +1,9 @@ |
|||
package config |
|||
|
|||
type System struct { |
|||
Env string `mapstructure:"env" json:"env" yaml:"env"` // 环境值
|
|||
Addr int `mapstructure:"addr" json:"addr" yaml:"addr"` // 端口值
|
|||
DbType string `mapstructure:"db-type" json:"dbType" yaml:"db-type"` // 数据库类型:mysql(默认)|sqlite|sqlserver|postgresql
|
|||
OssType string `mapstructure:"oss-type" json:"ossType" yaml:"oss-type"` // Oss类型
|
|||
UseMultipoint bool `mapstructure:"use-multipoint" json:"useMultipoint" yaml:"use-multipoint"` // 多点登录拦截
|
|||
} |
@ -0,0 +1,13 @@ |
|||
package config |
|||
|
|||
type Timer struct { |
|||
Start bool `mapstructure:"start" json:"start" yaml:"start"` // 是否启用
|
|||
Spec string `mapstructure:"spec" json:"spec" yaml:"spec"` // CRON表达式
|
|||
Detail []Detail `mapstructure:"detail" json:"detail" yaml:"detail"` |
|||
} |
|||
|
|||
type Detail struct { |
|||
TableName string `mapstructure:"tableName" json:"tableName" yaml:"tableName"` // 需要清理的表名
|
|||
CompareField string `mapstructure:"compareField" json:"compareField" yaml:"compareField"` // 需要比较时间的字段
|
|||
Interval string `mapstructure:"interval" json:"interval" yaml:"interval"` // 时间间隔
|
|||
} |
@ -0,0 +1,5 @@ |
|||
package config |
|||
|
|||
type Tools struct { |
|||
CustomerUrl string `mapstructure:"customer-url" json:"customer-url" yaml:"customer-url"` //买家端h5域名地址
|
|||
} |
@ -0,0 +1,13 @@ |
|||
package config |
|||
|
|||
type Zap struct { |
|||
Level string `mapstructure:"level" json:"level" yaml:"level"` // 级别
|
|||
Format string `mapstructure:"format" json:"format" yaml:"format"` // 输出
|
|||
Prefix string `mapstructure:"prefix" json:"prefix" yaml:"prefix"` // 日志前缀
|
|||
Director string `mapstructure:"director" json:"director" yaml:"director"` // 日志文件夹
|
|||
LinkName string `mapstructure:"link-name" json:"linkName" yaml:"link-name"` // 软链接名称
|
|||
ShowLine bool `mapstructure:"show-line" json:"showLine" yaml:"showLine"` // 显示行
|
|||
EncodeLevel string `mapstructure:"encode-level" json:"encodeLevel" yaml:"encode-level"` // 编码级
|
|||
StacktraceKey string `mapstructure:"stacktrace-key" json:"stacktraceKey" yaml:"stacktrace-key"` // 栈名
|
|||
LogInConsole bool `mapstructure:"log-in-console" json:"logInConsole" yaml:"log-in-console"` // 输出控制台
|
|||
} |
@ -0,0 +1,30 @@ |
|||
package core |
|||
|
|||
import ( |
|||
"fmt" |
|||
"time" |
|||
|
|||
"shop-api/global" |
|||
"shop-api/initialize" |
|||
|
|||
"go.uber.org/zap" |
|||
) |
|||
|
|||
type server interface { |
|||
ListenAndServe() error |
|||
} |
|||
|
|||
func RunWindowsServer() { |
|||
// 初始化redis服务
|
|||
initialize.Redis() |
|||
Router := initialize.Routers() |
|||
|
|||
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)) |
|||
|
|||
global.MG_LOG.Error(s.ListenAndServe().Error()) |
|||
} |
@ -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 |
|||
} |
@ -0,0 +1,56 @@ |
|||
package core |
|||
|
|||
import ( |
|||
"flag" |
|||
"fmt" |
|||
"os" |
|||
|
|||
"shop-api/global" |
|||
|
|||
"shop-api/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 |
|||
} |
@ -0,0 +1,104 @@ |
|||
package core |
|||
|
|||
import ( |
|||
"fmt" |
|||
"os" |
|||
"time" |
|||
|
|||
"shop-api/global" |
|||
"shop-api/utils" |
|||
|
|||
"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")) |
|||
} |
File diff suppressed because it is too large
File diff suppressed because it is too large
File diff suppressed because it is too large
File diff suppressed because it is too large
@ -0,0 +1,74 @@ |
|||
syntax = "proto3"; |
|||
|
|||
package api; |
|||
|
|||
option go_package = "shop-api/dto"; |
|||
|
|||
message LoginRequest { |
|||
string phone = 1; |
|||
string code = 2; |
|||
} |
|||
|
|||
message SmsRequest { |
|||
string phone = 1; |
|||
} |
|||
message WithdrawRequest { |
|||
string phone = 1;//账户绑定手机号 |
|||
string code = 2; //验证码 |
|||
double amount = 3;//提现金额 |
|||
int32 accountID = 4;//账户id |
|||
} |
|||
|
|||
message CreateAddressRequest { |
|||
string firstName = 1; |
|||
string lastName = 2; |
|||
string street = 3; |
|||
string phone = 4; |
|||
string bldg = 5; |
|||
string city = 6; |
|||
string state = 7; |
|||
string zipCode = 8; |
|||
int32 default = 9; |
|||
} |
|||
message UpdateAddressRequest { |
|||
int64 id = 1; |
|||
string firstName = 2; |
|||
string lastName = 3; |
|||
string street = 4; |
|||
string phone = 5; |
|||
string bldg = 6; |
|||
string city = 7; |
|||
string state = 8; |
|||
string zipCode = 9; |
|||
int32 default = 10; |
|||
} |
|||
message IdRequest { |
|||
int64 id = 1; |
|||
} |
|||
message CreateOrderRequest { |
|||
string code = 1;// 网红领取任务码 |
|||
int32 skuID = 2;// skuId |
|||
int32 number = 3;// 购买数量 |
|||
int32 addressID = 4;// 地址id |
|||
int32 payMode = 5;// 支付方式 1:paypal |
|||
string platform = 6; |
|||
string payment_method = 7; |
|||
} |
|||
message PaybackBody { |
|||
string attach = 1; |
|||
string out_trade_no = 2; |
|||
string transaction_id = 3; |
|||
string pay_id = 4; |
|||
string capture_id = 5; |
|||
string status = 6; |
|||
string message = 7; |
|||
string resource_type = 8; |
|||
} |
|||
message OrderData { |
|||
int64 all = 1;// 全部 |
|||
int64 unpaid = 2;// 未付款 |
|||
int64 unship = 3;// 待发货 |
|||
int64 shipped = 4;// 已发货 |
|||
int64 finished = 5;// 已完成 |
|||
int64 cancel = 6;// 已取消 |
|||
} |
@ -0,0 +1,27 @@ |
|||
package global |
|||
|
|||
import ( |
|||
"google.golang.org/grpc" |
|||
"shop-api/config" |
|||
"shop-api/initialize/api" |
|||
"shop-api/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_CONN *grpc.ClientConn |
|||
SMS_CLIENT api.SmsClient |
|||
EMAIL_CLIENT api.EmailClient |
|||
MG_Language interface{} |
|||
MG_Timer timer.Timer = timer.NewTimerTask() |
|||
) |
@ -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:"createdAt"` // 创建时间
|
|||
UpdatedAt time.Time `json:"updatedAt"` // 更新时间
|
|||
DeletedAt gorm.DeletedAt `gorm:"index" 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 TIME_MODEL_VIEW struct { |
|||
CreatedAtStr string `gorm:"-" json:"createdAt"` |
|||
UpdatedAtStr string `gorm:"-" json:"updatedAt"` |
|||
} |
|||
|
|||
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"` |
|||
} |
@ -0,0 +1,111 @@ |
|||
module shop-api |
|||
|
|||
go 1.20 |
|||
|
|||
require ( |
|||
github.com/carlmjohnson/requests v0.23.5 |
|||
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/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/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.7 // 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/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/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/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.16.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/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 |
|||
) |
@ -0,0 +1,759 @@ |
|||
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/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/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/carlmjohnson/requests v0.23.5 h1:NPANcAofwwSuC6SIMwlgmHry2V3pLrSqRiSBKYbNHHA= |
|||
github.com/carlmjohnson/requests v0.23.5/go.mod h1:zG9P28thdRnN61aD7iECFhH5iGGKX2jIjKQD9kqYH+o= |
|||
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/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.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= |
|||
github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= |
|||
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= |
|||
github.com/golang/snappy v0.0.2/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= |
|||
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= |
|||
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= |
|||
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= |
|||
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= |
|||
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= |
|||
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= |
|||
github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= |
|||
github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= |
|||
github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= |
|||
github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= |
|||
github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= |
|||
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= |
|||
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= |
|||
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= |
|||
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= |
|||
github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= |
|||
github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= |
|||
github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= |
|||
github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= |
|||
github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= |
|||
github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= |
|||
github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= |
|||
github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= |
|||
github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= |
|||
github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= |
|||
github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= |
|||
github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= |
|||
github.com/google/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.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/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.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/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/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/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.16.0 h1:7eBu7KsSvFDtSXUIDbh3aqlK4DPsZ1rByC8PFfBThos= |
|||
golang.org/x/net v0.16.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.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/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 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= |
|||
google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= |
|||
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= |
|||
google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= |
|||
google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= |
|||
google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= |
|||
google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= |
|||
google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= |
|||
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= |
|||
google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= |
|||
google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= |
|||
google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= |
|||
google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= |
|||
google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= |
|||
google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= |
|||
google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= |
|||
google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= |
|||
google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= |
|||
google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= |
|||
google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= |
|||
google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= |
|||
google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= |
|||
google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= |
|||
google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= |
|||
google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= |
|||
google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= |
|||
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= |
|||
google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= |
|||
google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= |
|||
google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= |
|||
google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= |
|||
google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= |
|||
google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= |
|||
google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= |
|||
google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= |
|||
google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= |
|||
google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= |
|||
google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= |
|||
google.golang.org/genproto v0.0.0-20230629202037-9506855d4529 h1:9JucMWR7sPvCxUFd6UsOUNmA5kCcWOfORaT3tpAsKQs= |
|||
google.golang.org/genproto v0.0.0-20230629202037-9506855d4529/go.mod h1:xZnkP7mREFX5MORlOPEzLMr+90PPZQ2QWzrVTWfAq64= |
|||
google.golang.org/genproto/googleapis/api v0.0.0-20230629202037-9506855d4529 h1:s5YSX+ZH5b5vS9rnpGymvIyMpLRJizowqDlOuyjXnTk= |
|||
google.golang.org/genproto/googleapis/api v0.0.0-20230629202037-9506855d4529/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= |
|||
google.golang.org/genproto/googleapis/rpc v0.0.0-20230629202037-9506855d4529 h1:DEH99RbiLZhMxrpEJCZ0A+wdTe0EOgou/poSLx9vWf4= |
|||
google.golang.org/genproto/googleapis/rpc v0.0.0-20230629202037-9506855d4529/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= |
|||
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= |
|||
google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= |
|||
google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= |
|||
google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= |
|||
google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= |
|||
google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= |
|||
google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= |
|||
google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= |
|||
google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= |
|||
google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= |
|||
google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= |
|||
google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= |
|||
google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= |
|||
google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= |
|||
google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= |
|||
google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= |
|||
google.golang.org/grpc v1.56.1 h1:z0dNfjIl0VpaZ9iSVjA6daGatAYwPGstTjt5vkRMFkQ= |
|||
google.golang.org/grpc v1.56.1/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= |
|||
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= |
|||
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= |
|||
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= |
|||
google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= |
|||
google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= |
|||
google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= |
|||
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= |
|||
google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= |
|||
google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= |
|||
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= |
|||
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= |
|||
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= |
|||
google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= |
|||
google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= |
|||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= |
|||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= |
|||
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= |
|||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= |
|||
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= |
|||
gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= |
|||
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= |
|||
gopkg.in/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= |
@ -0,0 +1,65 @@ |
|||
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 api -name *.proto") |
|||
else |
|||
INTERNAL_PROTO_FILES=$(shell find internal -name *.proto) |
|||
API_PROTO_FILES=$(shell find api -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=./api \
|
|||
--go_out=paths=source_relative:./api \
|
|||
--go-http_out=paths=source_relative:./api \
|
|||
--go-grpc_out=paths=source_relative:./api \
|
|||
--openapi_out=fq_schema_naming=true,default_response=false:. \
|
|||
$(API_PROTO_FILES) |
|||
|
|||
|
|||
# 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 |
@ -0,0 +1,242 @@ |
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|||
// versions:
|
|||
// protoc-gen-go v1.28.0
|
|||
// protoc v4.23.4
|
|||
// source: email.proto
|
|||
|
|||
package api |
|||
|
|||
import ( |
|||
protoreflect "google.golang.org/protobuf/reflect/protoreflect" |
|||
protoimpl "google.golang.org/protobuf/runtime/protoimpl" |
|||
reflect "reflect" |
|||
sync "sync" |
|||
) |
|||
|
|||
const ( |
|||
// Verify that this generated code is sufficiently up-to-date.
|
|||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) |
|||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
|||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) |
|||
) |
|||
|
|||
type SendRequest struct { |
|||
state protoimpl.MessageState |
|||
sizeCache protoimpl.SizeCache |
|||
unknownFields protoimpl.UnknownFields |
|||
|
|||
//收件人 必填参数
|
|||
To []string `protobuf:"bytes,1,rep,name=to,proto3" json:"to,omitempty"` |
|||
//邮件主题,必填参数
|
|||
Subject string `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"` |
|||
//消息体,支持富文本
|
|||
Body string `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"` |
|||
} |
|||
|
|||
func (x *SendRequest) Reset() { |
|||
*x = SendRequest{} |
|||
if protoimpl.UnsafeEnabled { |
|||
mi := &file_email_proto_msgTypes[0] |
|||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
|||
ms.StoreMessageInfo(mi) |
|||
} |
|||
} |
|||
|
|||
func (x *SendRequest) String() string { |
|||
return protoimpl.X.MessageStringOf(x) |
|||
} |
|||
|
|||
func (*SendRequest) ProtoMessage() {} |
|||
|
|||
func (x *SendRequest) ProtoReflect() protoreflect.Message { |
|||
mi := &file_email_proto_msgTypes[0] |
|||
if protoimpl.UnsafeEnabled && x != nil { |
|||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
|||
if ms.LoadMessageInfo() == nil { |
|||
ms.StoreMessageInfo(mi) |
|||
} |
|||
return ms |
|||
} |
|||
return mi.MessageOf(x) |
|||
} |
|||
|
|||
// Deprecated: Use SendRequest.ProtoReflect.Descriptor instead.
|
|||
func (*SendRequest) Descriptor() ([]byte, []int) { |
|||
return file_email_proto_rawDescGZIP(), []int{0} |
|||
} |
|||
|
|||
func (x *SendRequest) GetTo() []string { |
|||
if x != nil { |
|||
return x.To |
|||
} |
|||
return nil |
|||
} |
|||
|
|||
func (x *SendRequest) GetSubject() string { |
|||
if x != nil { |
|||
return x.Subject |
|||
} |
|||
return "" |
|||
} |
|||
|
|||
func (x *SendRequest) GetBody() string { |
|||
if x != nil { |
|||
return x.Body |
|||
} |
|||
return "" |
|||
} |
|||
|
|||
// The response message containing the greetings
|
|||
type SendEmailReply struct { |
|||
state protoimpl.MessageState |
|||
sizeCache protoimpl.SizeCache |
|||
unknownFields protoimpl.UnknownFields |
|||
|
|||
Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` |
|||
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` |
|||
} |
|||
|
|||
func (x *SendEmailReply) Reset() { |
|||
*x = SendEmailReply{} |
|||
if protoimpl.UnsafeEnabled { |
|||
mi := &file_email_proto_msgTypes[1] |
|||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
|||
ms.StoreMessageInfo(mi) |
|||
} |
|||
} |
|||
|
|||
func (x *SendEmailReply) String() string { |
|||
return protoimpl.X.MessageStringOf(x) |
|||
} |
|||
|
|||
func (*SendEmailReply) ProtoMessage() {} |
|||
|
|||
func (x *SendEmailReply) ProtoReflect() protoreflect.Message { |
|||
mi := &file_email_proto_msgTypes[1] |
|||
if protoimpl.UnsafeEnabled && x != nil { |
|||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
|||
if ms.LoadMessageInfo() == nil { |
|||
ms.StoreMessageInfo(mi) |
|||
} |
|||
return ms |
|||
} |
|||
return mi.MessageOf(x) |
|||
} |
|||
|
|||
// Deprecated: Use SendEmailReply.ProtoReflect.Descriptor instead.
|
|||
func (*SendEmailReply) Descriptor() ([]byte, []int) { |
|||
return file_email_proto_rawDescGZIP(), []int{1} |
|||
} |
|||
|
|||
func (x *SendEmailReply) GetCode() int32 { |
|||
if x != nil { |
|||
return x.Code |
|||
} |
|||
return 0 |
|||
} |
|||
|
|||
func (x *SendEmailReply) GetMessage() string { |
|||
if x != nil { |
|||
return x.Message |
|||
} |
|||
return "" |
|||
} |
|||
|
|||
var File_email_proto protoreflect.FileDescriptor |
|||
|
|||
var file_email_proto_rawDesc = []byte{ |
|||
0x0a, 0x0b, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x03, 0x61, |
|||
0x70, 0x69, 0x22, 0x4b, 0x0a, 0x0b, 0x53, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, |
|||
0x74, 0x12, 0x0e, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x02, 0x74, |
|||
0x6f, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, |
|||
0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x62, |
|||
0x6f, 0x64, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x22, |
|||
0x3e, 0x0a, 0x0e, 0x53, 0x65, 0x6e, 0x64, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x70, 0x6c, |
|||
0x79, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, |
|||
0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, |
|||
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x32, |
|||
0x3d, 0x0a, 0x05, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x34, 0x0a, 0x09, 0x53, 0x65, 0x6e, 0x64, |
|||
0x45, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x10, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x6e, 0x64, |
|||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x65, |
|||
0x6e, 0x64, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x42, 0x10, |
|||
0x5a, 0x0e, 0x62, 0x6b, 0x62, 0x2d, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x2f, 0x61, 0x70, 0x69, |
|||
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, |
|||
} |
|||
|
|||
var ( |
|||
file_email_proto_rawDescOnce sync.Once |
|||
file_email_proto_rawDescData = file_email_proto_rawDesc |
|||
) |
|||
|
|||
func file_email_proto_rawDescGZIP() []byte { |
|||
file_email_proto_rawDescOnce.Do(func() { |
|||
file_email_proto_rawDescData = protoimpl.X.CompressGZIP(file_email_proto_rawDescData) |
|||
}) |
|||
return file_email_proto_rawDescData |
|||
} |
|||
|
|||
var file_email_proto_msgTypes = make([]protoimpl.MessageInfo, 2) |
|||
var file_email_proto_goTypes = []interface{}{ |
|||
(*SendRequest)(nil), // 0: api.SendRequest
|
|||
(*SendEmailReply)(nil), // 1: api.SendEmailReply
|
|||
} |
|||
var file_email_proto_depIdxs = []int32{ |
|||
0, // 0: api.Email.SendEmail:input_type -> api.SendRequest
|
|||
1, // 1: api.Email.SendEmail:output_type -> api.SendEmailReply
|
|||
1, // [1:2] is the sub-list for method output_type
|
|||
0, // [0:1] is the sub-list for method input_type
|
|||
0, // [0:0] is the sub-list for extension type_name
|
|||
0, // [0:0] is the sub-list for extension extendee
|
|||
0, // [0:0] is the sub-list for field type_name
|
|||
} |
|||
|
|||
func init() { file_email_proto_init() } |
|||
func file_email_proto_init() { |
|||
if File_email_proto != nil { |
|||
return |
|||
} |
|||
if !protoimpl.UnsafeEnabled { |
|||
file_email_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { |
|||
switch v := v.(*SendRequest); i { |
|||
case 0: |
|||
return &v.state |
|||
case 1: |
|||
return &v.sizeCache |
|||
case 2: |
|||
return &v.unknownFields |
|||
default: |
|||
return nil |
|||
} |
|||
} |
|||
file_email_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { |
|||
switch v := v.(*SendEmailReply); i { |
|||
case 0: |
|||
return &v.state |
|||
case 1: |
|||
return &v.sizeCache |
|||
case 2: |
|||
return &v.unknownFields |
|||
default: |
|||
return nil |
|||
} |
|||
} |
|||
} |
|||
type x struct{} |
|||
out := protoimpl.TypeBuilder{ |
|||
File: protoimpl.DescBuilder{ |
|||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), |
|||
RawDescriptor: file_email_proto_rawDesc, |
|||
NumEnums: 0, |
|||
NumMessages: 2, |
|||
NumExtensions: 0, |
|||
NumServices: 1, |
|||
}, |
|||
GoTypes: file_email_proto_goTypes, |
|||
DependencyIndexes: file_email_proto_depIdxs, |
|||
MessageInfos: file_email_proto_msgTypes, |
|||
}.Build() |
|||
File_email_proto = out.File |
|||
file_email_proto_rawDesc = nil |
|||
file_email_proto_goTypes = nil |
|||
file_email_proto_depIdxs = nil |
|||
} |
@ -0,0 +1,30 @@ |
|||
syntax = "proto3"; |
|||
|
|||
package api; |
|||
|
|||
|
|||
option go_package = "bkb-notify/api"; |
|||
|
|||
|
|||
// The Email service definition. |
|||
service Email { |
|||
// 发送一个邮件 |
|||
rpc SendEmail (SendRequest) returns (SendEmailReply) { |
|||
|
|||
} |
|||
} |
|||
|
|||
message SendRequest { |
|||
//收件人 必填参数 |
|||
repeated string to=1; |
|||
//邮件主题,必填参数 |
|||
string subject=2; |
|||
//消息体,支持富文本 |
|||
string body=3; |
|||
} |
|||
|
|||
// The response message containing the greetings |
|||
message SendEmailReply { |
|||
int32 code = 1; |
|||
string message = 2; |
|||
} |
@ -0,0 +1,107 @@ |
|||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|||
// versions:
|
|||
// - protoc-gen-go-grpc v1.2.0
|
|||
// - protoc v4.23.4
|
|||
// source: email.proto
|
|||
|
|||
package api |
|||
|
|||
import ( |
|||
context "context" |
|||
grpc "google.golang.org/grpc" |
|||
codes "google.golang.org/grpc/codes" |
|||
status "google.golang.org/grpc/status" |
|||
) |
|||
|
|||
// This is a compile-time assertion to ensure that this generated file
|
|||
// is compatible with the grpc package it is being compiled against.
|
|||
// Requires gRPC-Go v1.32.0 or later.
|
|||
const _ = grpc.SupportPackageIsVersion7 |
|||
|
|||
// EmailClient is the client API for Email service.
|
|||
//
|
|||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
|||
type EmailClient interface { |
|||
// 发送一个邮件
|
|||
SendEmail(ctx context.Context, in *SendRequest, opts ...grpc.CallOption) (*SendEmailReply, error) |
|||
} |
|||
|
|||
type emailClient struct { |
|||
cc grpc.ClientConnInterface |
|||
} |
|||
|
|||
func NewEmailClient(cc grpc.ClientConnInterface) EmailClient { |
|||
return &emailClient{cc} |
|||
} |
|||
|
|||
func (c *emailClient) SendEmail(ctx context.Context, in *SendRequest, opts ...grpc.CallOption) (*SendEmailReply, error) { |
|||
out := new(SendEmailReply) |
|||
err := c.cc.Invoke(ctx, "/api.Email/SendEmail", in, out, opts...) |
|||
if err != nil { |
|||
return nil, err |
|||
} |
|||
return out, nil |
|||
} |
|||
|
|||
// EmailServer is the server API for Email service.
|
|||
// All implementations must embed UnimplementedEmailServer
|
|||
// for forward compatibility
|
|||
type EmailServer interface { |
|||
// 发送一个邮件
|
|||
SendEmail(context.Context, *SendRequest) (*SendEmailReply, error) |
|||
mustEmbedUnimplementedEmailServer() |
|||
} |
|||
|
|||
// UnimplementedEmailServer must be embedded to have forward compatible implementations.
|
|||
type UnimplementedEmailServer struct { |
|||
} |
|||
|
|||
func (UnimplementedEmailServer) SendEmail(context.Context, *SendRequest) (*SendEmailReply, error) { |
|||
return nil, status.Errorf(codes.Unimplemented, "method SendEmail not implemented") |
|||
} |
|||
func (UnimplementedEmailServer) mustEmbedUnimplementedEmailServer() {} |
|||
|
|||
// UnsafeEmailServer may be embedded to opt out of forward compatibility for this service.
|
|||
// Use of this interface is not recommended, as added methods to EmailServer will
|
|||
// result in compilation errors.
|
|||
type UnsafeEmailServer interface { |
|||
mustEmbedUnimplementedEmailServer() |
|||
} |
|||
|
|||
func RegisterEmailServer(s grpc.ServiceRegistrar, srv EmailServer) { |
|||
s.RegisterService(&Email_ServiceDesc, srv) |
|||
} |
|||
|
|||
func _Email_SendEmail_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
|||
in := new(SendRequest) |
|||
if err := dec(in); err != nil { |
|||
return nil, err |
|||
} |
|||
if interceptor == nil { |
|||
return srv.(EmailServer).SendEmail(ctx, in) |
|||
} |
|||
info := &grpc.UnaryServerInfo{ |
|||
Server: srv, |
|||
FullMethod: "/api.Email/SendEmail", |
|||
} |
|||
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
|||
return srv.(EmailServer).SendEmail(ctx, req.(*SendRequest)) |
|||
} |
|||
return interceptor(ctx, in, info, handler) |
|||
} |
|||
|
|||
// Email_ServiceDesc is the grpc.ServiceDesc for Email service.
|
|||
// It's only intended for direct use with grpc.RegisterService,
|
|||
// and not to be introspected or modified (even as a copy)
|
|||
var Email_ServiceDesc = grpc.ServiceDesc{ |
|||
ServiceName: "api.Email", |
|||
HandlerType: (*EmailServer)(nil), |
|||
Methods: []grpc.MethodDesc{ |
|||
{ |
|||
MethodName: "SendEmail", |
|||
Handler: _Email_SendEmail_Handler, |
|||
}, |
|||
}, |
|||
Streams: []grpc.StreamDesc{}, |
|||
Metadata: "email.proto", |
|||
} |
File diff suppressed because it is too large
@ -0,0 +1,257 @@ |
|||
syntax = "proto3"; |
|||
|
|||
package api; |
|||
|
|||
import "google/api/annotations.proto"; |
|||
import "google/protobuf/empty.proto"; |
|||
|
|||
option go_package = "bkb-payment/api"; |
|||
|
|||
|
|||
// The greeting service definition. |
|||
service Greeter { |
|||
// Sends a greeting |
|||
rpc Ping (google.protobuf.Empty) returns (PingReply) { |
|||
option (google.api.http) = { |
|||
get: "/ping" |
|||
}; |
|||
} |
|||
rpc CountryList (google.protobuf.Empty) returns (CountryReply) { |
|||
option (google.api.http) = { |
|||
get: "/country/list" |
|||
}; |
|||
} |
|||
rpc DistrictCascade (DistrictRequest) returns (DistrictReply) { |
|||
option (google.api.http) = { |
|||
get: "/district/cascade" |
|||
}; |
|||
} |
|||
rpc PayConsult (PayConsultRequest) returns (PayConsultReply) {} |
|||
rpc PayTransactionWebUrl (PayTransRequest) returns (WebPayResponse) {} |
|||
rpc PaypalPayback (PaypalWebhook) returns (PaypalPaybackResp) { |
|||
option (google.api.http) = { |
|||
post: "/paypal/callback" |
|||
body: "*" |
|||
}; |
|||
} |
|||
rpc AlipayGPayback (AlipayGWebhook) returns (AlipayGPaybackResp) { |
|||
option (google.api.http) = { |
|||
post: "/alipay-g/callback" |
|||
body: "*" |
|||
}; |
|||
} |
|||
rpc AlipayGCapture (AlipayGWebhook) returns (AlipayGPaybackResp) { |
|||
option (google.api.http) = { |
|||
post: "/alipay-g/capture" |
|||
body: "*" |
|||
}; |
|||
} |
|||
rpc PayoutsWebUrl (PayoutRequest) returns (WebPayResponse) { |
|||
option (google.api.http) = { |
|||
post: "/pay/payouts" |
|||
body: "*" |
|||
}; |
|||
} |
|||
rpc GetPayTransaction (google.protobuf.Empty) returns (GetPayTransactionResp) { |
|||
option (google.api.http) = { |
|||
get: "/pay/transaction/outTradeNo" |
|||
}; |
|||
} |
|||
rpc CancelBill (CancelBillRequest) returns (PingReply) {} |
|||
rpc RefundBill (RefundRequest) returns (RefundResponse) {} |
|||
} |
|||
|
|||
// The response message containing the greetings |
|||
message PingReply { |
|||
string message = 1; |
|||
} |
|||
message Country { |
|||
int32 id = 1; |
|||
string name = 2; |
|||
} |
|||
message CountryReply { |
|||
repeated Country list = 1; |
|||
} |
|||
message DistrictRequest { |
|||
int32 country = 1; |
|||
} |
|||
message District { |
|||
string label = 1; |
|||
string adcode = 2; |
|||
int32 parent_id = 3; |
|||
repeated District children = 4; |
|||
} |
|||
message DistrictReply { |
|||
repeated District list = 1; |
|||
} |
|||
message PayConsultRequest { |
|||
string appid = 1; |
|||
double amount = 2; |
|||
string currency = 3; |
|||
string pay_channel = 4; |
|||
string user_region = 5; |
|||
string os_type = 6; |
|||
string terminal_type = 7; |
|||
} |
|||
message PaymentMethod { |
|||
string logo_name = 1; |
|||
string logo_url = 2; |
|||
string type_value = 3; |
|||
string category = 4; |
|||
bool enabled = 5; |
|||
} |
|||
message PayConsultReply { |
|||
repeated PaymentMethod list = 1; |
|||
} |
|||
message PayTransRequest { |
|||
string appid = 1; |
|||
string mchid = 2; |
|||
string out_trade_no = 3; |
|||
string attach = 4; |
|||
string notify_url = 5; |
|||
double amount = 6; |
|||
string currency = 7; |
|||
string pay_channel = 8; |
|||
string return_url = 9; |
|||
string cancel_url = 10; |
|||
string description = 11; |
|||
string os_type = 12; |
|||
string terminal_type = 13; |
|||
string payment_method = 14; |
|||
} |
|||
message WebPayResponse { |
|||
string pay_channel = 1; |
|||
string pay_id = 2; |
|||
string pay_return = 3; |
|||
string pay_status = 4; |
|||
} |
|||
message PaybackRequest { |
|||
string mchid = 1; |
|||
string pay_channel = 2; |
|||
string pay_id = 3; |
|||
string event_type = 4; |
|||
} |
|||
message PaypalPaybackResp { |
|||
string out_trade_no = 1; |
|||
string trade_state = 2; |
|||
string message = 3; |
|||
} |
|||
message PayoutRequest { |
|||
string appid = 1; |
|||
string mchid = 2; |
|||
string out_trade_no = 3; |
|||
string attach = 4; |
|||
string notify_url = 5; |
|||
double amount = 6; |
|||
string currency = 7; |
|||
string pay_channel = 8; |
|||
string paypal_name = 9; |
|||
} |
|||
message GetPayTransOutTradeNoRequest { |
|||
string appid = 1; |
|||
string mchid = 2; |
|||
string out_trade_no = 3; |
|||
} |
|||
message GetPayTransactionResp { |
|||
GetPayTransaction data = 1; |
|||
} |
|||
message GetPayTransaction { |
|||
string appid = 1; |
|||
string mchid = 2; |
|||
} |
|||
message CancelBillRequest { |
|||
string appid = 1; |
|||
string mchid = 2; |
|||
string transaction_id = 3; |
|||
} |
|||
message RefundRequest { |
|||
string appid = 1; |
|||
string mchid = 2; |
|||
string out_trade_no = 3; |
|||
string pay_id = 4; |
|||
string attach = 5; |
|||
string notify_url = 6; |
|||
double amount = 7; |
|||
string description = 8; |
|||
} |
|||
message RefundResponse { |
|||
string refund_status = 1; |
|||
string refund_id = 2; |
|||
} |
|||
message PaypalWebhook { |
|||
string id = 1; |
|||
string create_time = 2; |
|||
string resource_type = 3; |
|||
string event_type = 4; |
|||
string summary = 5; |
|||
PaybackResource resource = 6; |
|||
} |
|||
message PaybackResource { |
|||
string id = 1; |
|||
string create_time = 2; |
|||
string update_time = 3; |
|||
string state = 4; |
|||
string status = 5; |
|||
repeated PurchaseUnit purchase_units = 6; |
|||
BatchHeader batch_header = 7; |
|||
} |
|||
message PurchaseUnit { |
|||
Payment payments = 1; |
|||
} |
|||
message Payment { |
|||
repeated Capture captures = 1; |
|||
} |
|||
message BatchHeader { |
|||
string batch_status = 1; |
|||
string payout_batch_id = 2; |
|||
SenderBatchHeader sender_batch_header = 3; |
|||
} |
|||
message SenderBatchHeader { |
|||
string sender_batch_id = 1; |
|||
} |
|||
message Capture { |
|||
string id = 1; |
|||
string status = 2; |
|||
string create_time = 3; |
|||
string update_time = 4; |
|||
} |
|||
message AlipayGResult { |
|||
string result_code = 1; |
|||
string result_status = 2; |
|||
string result_message = 3; |
|||
} |
|||
message AlipayGAmount { |
|||
string value = 1; |
|||
string currency = 2; |
|||
} |
|||
message AlipayQuote { |
|||
bool guaranteed = 1; |
|||
string quote_currency_pair = 2; |
|||
string quote_expiry_time = 3; |
|||
string quote_id = 4; |
|||
double quote_price = 5; |
|||
string quote_start_time = 6; |
|||
} |
|||
message AlipayGWebhook { |
|||
string notify_type = 1; |
|||
AlipayGResult result = 2; |
|||
string payment_request_id = 3; |
|||
string payment_id = 4; |
|||
AlipayGAmount payment_amount = 5; |
|||
string payment_create_time = 6; |
|||
string payment_time = 7; |
|||
string capture_request_id = 8; |
|||
string capture_id = 9; |
|||
AlipayGAmount capture_amount = 10; |
|||
string capture_time = 11; |
|||
string refund_status = 12; |
|||
string refund_request_id = 13; |
|||
string refund_id = 14; |
|||
AlipayGAmount refund_amount = 15; |
|||
string refund_time = 16; |
|||
AlipayGAmount gross_settlement_amount = 17; |
|||
AlipayQuote settlement_quote = 18; |
|||
} |
|||
message AlipayGPaybackResp { |
|||
AlipayGResult result = 1; |
|||
} |
@ -0,0 +1,519 @@ |
|||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|||
// versions:
|
|||
// - protoc-gen-go-grpc v1.3.0
|
|||
// - protoc v3.21.12
|
|||
// source: greeter.proto
|
|||
|
|||
package api |
|||
|
|||
import ( |
|||
context "context" |
|||
grpc "google.golang.org/grpc" |
|||
codes "google.golang.org/grpc/codes" |
|||
status "google.golang.org/grpc/status" |
|||
emptypb "google.golang.org/protobuf/types/known/emptypb" |
|||
) |
|||
|
|||
// This is a compile-time assertion to ensure that this generated file
|
|||
// is compatible with the grpc package it is being compiled against.
|
|||
// Requires gRPC-Go v1.32.0 or later.
|
|||
const _ = grpc.SupportPackageIsVersion7 |
|||
|
|||
const ( |
|||
Greeter_Ping_FullMethodName = "/api.Greeter/Ping" |
|||
Greeter_CountryList_FullMethodName = "/api.Greeter/CountryList" |
|||
Greeter_DistrictCascade_FullMethodName = "/api.Greeter/DistrictCascade" |
|||
Greeter_PayConsult_FullMethodName = "/api.Greeter/PayConsult" |
|||
Greeter_PayTransactionWebUrl_FullMethodName = "/api.Greeter/PayTransactionWebUrl" |
|||
Greeter_PaypalPayback_FullMethodName = "/api.Greeter/PaypalPayback" |
|||
Greeter_AlipayGPayback_FullMethodName = "/api.Greeter/AlipayGPayback" |
|||
Greeter_AlipayGCapture_FullMethodName = "/api.Greeter/AlipayGCapture" |
|||
Greeter_PayoutsWebUrl_FullMethodName = "/api.Greeter/PayoutsWebUrl" |
|||
Greeter_GetPayTransaction_FullMethodName = "/api.Greeter/GetPayTransaction" |
|||
Greeter_CancelBill_FullMethodName = "/api.Greeter/CancelBill" |
|||
Greeter_RefundBill_FullMethodName = "/api.Greeter/RefundBill" |
|||
) |
|||
|
|||
// GreeterClient is the client API for Greeter service.
|
|||
//
|
|||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
|||
type GreeterClient interface { |
|||
// Sends a greeting
|
|||
Ping(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*PingReply, error) |
|||
CountryList(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*CountryReply, error) |
|||
DistrictCascade(ctx context.Context, in *DistrictRequest, opts ...grpc.CallOption) (*DistrictReply, error) |
|||
PayConsult(ctx context.Context, in *PayConsultRequest, opts ...grpc.CallOption) (*PayConsultReply, error) |
|||
PayTransactionWebUrl(ctx context.Context, in *PayTransRequest, opts ...grpc.CallOption) (*WebPayResponse, error) |
|||
PaypalPayback(ctx context.Context, in *PaypalWebhook, opts ...grpc.CallOption) (*PaypalPaybackResp, error) |
|||
AlipayGPayback(ctx context.Context, in *AlipayGWebhook, opts ...grpc.CallOption) (*AlipayGPaybackResp, error) |
|||
AlipayGCapture(ctx context.Context, in *AlipayGWebhook, opts ...grpc.CallOption) (*AlipayGPaybackResp, error) |
|||
PayoutsWebUrl(ctx context.Context, in *PayoutRequest, opts ...grpc.CallOption) (*WebPayResponse, error) |
|||
GetPayTransaction(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetPayTransactionResp, error) |
|||
CancelBill(ctx context.Context, in *CancelBillRequest, opts ...grpc.CallOption) (*PingReply, error) |
|||
RefundBill(ctx context.Context, in *RefundRequest, opts ...grpc.CallOption) (*RefundResponse, error) |
|||
} |
|||
|
|||
type greeterClient struct { |
|||
cc grpc.ClientConnInterface |
|||
} |
|||
|
|||
func NewGreeterClient(cc grpc.ClientConnInterface) GreeterClient { |
|||
return &greeterClient{cc} |
|||
} |
|||
|
|||
func (c *greeterClient) Ping(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*PingReply, error) { |
|||
out := new(PingReply) |
|||
err := c.cc.Invoke(ctx, Greeter_Ping_FullMethodName, in, out, opts...) |
|||
if err != nil { |
|||
return nil, err |
|||
} |
|||
return out, nil |
|||
} |
|||
|
|||
func (c *greeterClient) CountryList(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*CountryReply, error) { |
|||
out := new(CountryReply) |
|||
err := c.cc.Invoke(ctx, Greeter_CountryList_FullMethodName, in, out, opts...) |
|||
if err != nil { |
|||
return nil, err |
|||
} |
|||
return out, nil |
|||
} |
|||
|
|||
func (c *greeterClient) DistrictCascade(ctx context.Context, in *DistrictRequest, opts ...grpc.CallOption) (*DistrictReply, error) { |
|||
out := new(DistrictReply) |
|||
err := c.cc.Invoke(ctx, Greeter_DistrictCascade_FullMethodName, in, out, opts...) |
|||
if err != nil { |
|||
return nil, err |
|||
} |
|||
return out, nil |
|||
} |
|||
|
|||
func (c *greeterClient) PayConsult(ctx context.Context, in *PayConsultRequest, opts ...grpc.CallOption) (*PayConsultReply, error) { |
|||
out := new(PayConsultReply) |
|||
err := c.cc.Invoke(ctx, Greeter_PayConsult_FullMethodName, in, out, opts...) |
|||
if err != nil { |
|||
return nil, err |
|||
} |
|||
return out, nil |
|||
} |
|||
|
|||
func (c *greeterClient) PayTransactionWebUrl(ctx context.Context, in *PayTransRequest, opts ...grpc.CallOption) (*WebPayResponse, error) { |
|||
out := new(WebPayResponse) |
|||
err := c.cc.Invoke(ctx, Greeter_PayTransactionWebUrl_FullMethodName, in, out, opts...) |
|||
if err != nil { |
|||
return nil, err |
|||
} |
|||
return out, nil |
|||
} |
|||
|
|||
func (c *greeterClient) PaypalPayback(ctx context.Context, in *PaypalWebhook, opts ...grpc.CallOption) (*PaypalPaybackResp, error) { |
|||
out := new(PaypalPaybackResp) |
|||
err := c.cc.Invoke(ctx, Greeter_PaypalPayback_FullMethodName, in, out, opts...) |
|||
if err != nil { |
|||
return nil, err |
|||
} |
|||
return out, nil |
|||
} |
|||
|
|||
func (c *greeterClient) AlipayGPayback(ctx context.Context, in *AlipayGWebhook, opts ...grpc.CallOption) (*AlipayGPaybackResp, error) { |
|||
out := new(AlipayGPaybackResp) |
|||
err := c.cc.Invoke(ctx, Greeter_AlipayGPayback_FullMethodName, in, out, opts...) |
|||
if err != nil { |
|||
return nil, err |
|||
} |
|||
return out, nil |
|||
} |
|||
|
|||
func (c *greeterClient) AlipayGCapture(ctx context.Context, in *AlipayGWebhook, opts ...grpc.CallOption) (*AlipayGPaybackResp, error) { |
|||
out := new(AlipayGPaybackResp) |
|||
err := c.cc.Invoke(ctx, Greeter_AlipayGCapture_FullMethodName, in, out, opts...) |
|||
if err != nil { |
|||
return nil, err |
|||
} |
|||
return out, nil |
|||
} |
|||
|
|||
func (c *greeterClient) PayoutsWebUrl(ctx context.Context, in *PayoutRequest, opts ...grpc.CallOption) (*WebPayResponse, error) { |
|||
out := new(WebPayResponse) |
|||
err := c.cc.Invoke(ctx, Greeter_PayoutsWebUrl_FullMethodName, in, out, opts...) |
|||
if err != nil { |
|||
return nil, err |
|||
} |
|||
return out, nil |
|||
} |
|||
|
|||
func (c *greeterClient) GetPayTransaction(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetPayTransactionResp, error) { |
|||
out := new(GetPayTransactionResp) |
|||
err := c.cc.Invoke(ctx, Greeter_GetPayTransaction_FullMethodName, in, out, opts...) |
|||
if err != nil { |
|||
return nil, err |
|||
} |
|||
return out, nil |
|||
} |
|||
|
|||
func (c *greeterClient) CancelBill(ctx context.Context, in *CancelBillRequest, opts ...grpc.CallOption) (*PingReply, error) { |
|||
out := new(PingReply) |
|||
err := c.cc.Invoke(ctx, Greeter_CancelBill_FullMethodName, in, out, opts...) |
|||
if err != nil { |
|||
return nil, err |
|||
} |
|||
return out, nil |
|||
} |
|||
|
|||
func (c *greeterClient) RefundBill(ctx context.Context, in *RefundRequest, opts ...grpc.CallOption) (*RefundResponse, error) { |
|||
out := new(RefundResponse) |
|||
err := c.cc.Invoke(ctx, Greeter_RefundBill_FullMethodName, in, out, opts...) |
|||
if err != nil { |
|||
return nil, err |
|||
} |
|||
return out, nil |
|||
} |
|||
|
|||
// GreeterServer is the server API for Greeter service.
|
|||
// All implementations must embed UnimplementedGreeterServer
|
|||
// for forward compatibility
|
|||
type GreeterServer interface { |
|||
// Sends a greeting
|
|||
Ping(context.Context, *emptypb.Empty) (*PingReply, error) |
|||
CountryList(context.Context, *emptypb.Empty) (*CountryReply, error) |
|||
DistrictCascade(context.Context, *DistrictRequest) (*DistrictReply, error) |
|||
PayConsult(context.Context, *PayConsultRequest) (*PayConsultReply, error) |
|||
PayTransactionWebUrl(context.Context, *PayTransRequest) (*WebPayResponse, error) |
|||
PaypalPayback(context.Context, *PaypalWebhook) (*PaypalPaybackResp, error) |
|||
AlipayGPayback(context.Context, *AlipayGWebhook) (*AlipayGPaybackResp, error) |
|||
AlipayGCapture(context.Context, *AlipayGWebhook) (*AlipayGPaybackResp, error) |
|||
PayoutsWebUrl(context.Context, *PayoutRequest) (*WebPayResponse, error) |
|||
GetPayTransaction(context.Context, *emptypb.Empty) (*GetPayTransactionResp, error) |
|||
CancelBill(context.Context, *CancelBillRequest) (*PingReply, error) |
|||
RefundBill(context.Context, *RefundRequest) (*RefundResponse, error) |
|||
mustEmbedUnimplementedGreeterServer() |
|||
} |
|||
|
|||
// UnimplementedGreeterServer must be embedded to have forward compatible implementations.
|
|||
type UnimplementedGreeterServer struct { |
|||
} |
|||
|
|||
func (UnimplementedGreeterServer) Ping(context.Context, *emptypb.Empty) (*PingReply, error) { |
|||
return nil, status.Errorf(codes.Unimplemented, "method Ping not implemented") |
|||
} |
|||
func (UnimplementedGreeterServer) CountryList(context.Context, *emptypb.Empty) (*CountryReply, error) { |
|||
return nil, status.Errorf(codes.Unimplemented, "method CountryList not implemented") |
|||
} |
|||
func (UnimplementedGreeterServer) DistrictCascade(context.Context, *DistrictRequest) (*DistrictReply, error) { |
|||
return nil, status.Errorf(codes.Unimplemented, "method DistrictCascade not implemented") |
|||
} |
|||
func (UnimplementedGreeterServer) PayConsult(context.Context, *PayConsultRequest) (*PayConsultReply, error) { |
|||
return nil, status.Errorf(codes.Unimplemented, "method PayConsult not implemented") |
|||
} |
|||
func (UnimplementedGreeterServer) PayTransactionWebUrl(context.Context, *PayTransRequest) (*WebPayResponse, error) { |
|||
return nil, status.Errorf(codes.Unimplemented, "method PayTransactionWebUrl not implemented") |
|||
} |
|||
func (UnimplementedGreeterServer) PaypalPayback(context.Context, *PaypalWebhook) (*PaypalPaybackResp, error) { |
|||
return nil, status.Errorf(codes.Unimplemented, "method PaypalPayback not implemented") |
|||
} |
|||
func (UnimplementedGreeterServer) AlipayGPayback(context.Context, *AlipayGWebhook) (*AlipayGPaybackResp, error) { |
|||
return nil, status.Errorf(codes.Unimplemented, "method AlipayGPayback not implemented") |
|||
} |
|||
func (UnimplementedGreeterServer) AlipayGCapture(context.Context, *AlipayGWebhook) (*AlipayGPaybackResp, error) { |
|||
return nil, status.Errorf(codes.Unimplemented, "method AlipayGCapture not implemented") |
|||
} |
|||
func (UnimplementedGreeterServer) PayoutsWebUrl(context.Context, *PayoutRequest) (*WebPayResponse, error) { |
|||
return nil, status.Errorf(codes.Unimplemented, "method PayoutsWebUrl not implemented") |
|||
} |
|||
func (UnimplementedGreeterServer) GetPayTransaction(context.Context, *emptypb.Empty) (*GetPayTransactionResp, error) { |
|||
return nil, status.Errorf(codes.Unimplemented, "method GetPayTransaction not implemented") |
|||
} |
|||
func (UnimplementedGreeterServer) CancelBill(context.Context, *CancelBillRequest) (*PingReply, error) { |
|||
return nil, status.Errorf(codes.Unimplemented, "method CancelBill not implemented") |
|||
} |
|||
func (UnimplementedGreeterServer) RefundBill(context.Context, *RefundRequest) (*RefundResponse, error) { |
|||
return nil, status.Errorf(codes.Unimplemented, "method RefundBill not implemented") |
|||
} |
|||
func (UnimplementedGreeterServer) mustEmbedUnimplementedGreeterServer() {} |
|||
|
|||
// UnsafeGreeterServer may be embedded to opt out of forward compatibility for this service.
|
|||
// Use of this interface is not recommended, as added methods to GreeterServer will
|
|||
// result in compilation errors.
|
|||
type UnsafeGreeterServer interface { |
|||
mustEmbedUnimplementedGreeterServer() |
|||
} |
|||
|
|||
func RegisterGreeterServer(s grpc.ServiceRegistrar, srv GreeterServer) { |
|||
s.RegisterService(&Greeter_ServiceDesc, srv) |
|||
} |
|||
|
|||
func _Greeter_Ping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
|||
in := new(emptypb.Empty) |
|||
if err := dec(in); err != nil { |
|||
return nil, err |
|||
} |
|||
if interceptor == nil { |
|||
return srv.(GreeterServer).Ping(ctx, in) |
|||
} |
|||
info := &grpc.UnaryServerInfo{ |
|||
Server: srv, |
|||
FullMethod: Greeter_Ping_FullMethodName, |
|||
} |
|||
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
|||
return srv.(GreeterServer).Ping(ctx, req.(*emptypb.Empty)) |
|||
} |
|||
return interceptor(ctx, in, info, handler) |
|||
} |
|||
|
|||
func _Greeter_CountryList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
|||
in := new(emptypb.Empty) |
|||
if err := dec(in); err != nil { |
|||
return nil, err |
|||
} |
|||
if interceptor == nil { |
|||
return srv.(GreeterServer).CountryList(ctx, in) |
|||
} |
|||
info := &grpc.UnaryServerInfo{ |
|||
Server: srv, |
|||
FullMethod: Greeter_CountryList_FullMethodName, |
|||
} |
|||
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
|||
return srv.(GreeterServer).CountryList(ctx, req.(*emptypb.Empty)) |
|||
} |
|||
return interceptor(ctx, in, info, handler) |
|||
} |
|||
|
|||
func _Greeter_DistrictCascade_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
|||
in := new(DistrictRequest) |
|||
if err := dec(in); err != nil { |
|||
return nil, err |
|||
} |
|||
if interceptor == nil { |
|||
return srv.(GreeterServer).DistrictCascade(ctx, in) |
|||
} |
|||
info := &grpc.UnaryServerInfo{ |
|||
Server: srv, |
|||
FullMethod: Greeter_DistrictCascade_FullMethodName, |
|||
} |
|||
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
|||
return srv.(GreeterServer).DistrictCascade(ctx, req.(*DistrictRequest)) |
|||
} |
|||
return interceptor(ctx, in, info, handler) |
|||
} |
|||
|
|||
func _Greeter_PayConsult_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
|||
in := new(PayConsultRequest) |
|||
if err := dec(in); err != nil { |
|||
return nil, err |
|||
} |
|||
if interceptor == nil { |
|||
return srv.(GreeterServer).PayConsult(ctx, in) |
|||
} |
|||
info := &grpc.UnaryServerInfo{ |
|||
Server: srv, |
|||
FullMethod: Greeter_PayConsult_FullMethodName, |
|||
} |
|||
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
|||
return srv.(GreeterServer).PayConsult(ctx, req.(*PayConsultRequest)) |
|||
} |
|||
return interceptor(ctx, in, info, handler) |
|||
} |
|||
|
|||
func _Greeter_PayTransactionWebUrl_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
|||
in := new(PayTransRequest) |
|||
if err := dec(in); err != nil { |
|||
return nil, err |
|||
} |
|||
if interceptor == nil { |
|||
return srv.(GreeterServer).PayTransactionWebUrl(ctx, in) |
|||
} |
|||
info := &grpc.UnaryServerInfo{ |
|||
Server: srv, |
|||
FullMethod: Greeter_PayTransactionWebUrl_FullMethodName, |
|||
} |
|||
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
|||
return srv.(GreeterServer).PayTransactionWebUrl(ctx, req.(*PayTransRequest)) |
|||
} |
|||
return interceptor(ctx, in, info, handler) |
|||
} |
|||
|
|||
func _Greeter_PaypalPayback_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
|||
in := new(PaypalWebhook) |
|||
if err := dec(in); err != nil { |
|||
return nil, err |
|||
} |
|||
if interceptor == nil { |
|||
return srv.(GreeterServer).PaypalPayback(ctx, in) |
|||
} |
|||
info := &grpc.UnaryServerInfo{ |
|||
Server: srv, |
|||
FullMethod: Greeter_PaypalPayback_FullMethodName, |
|||
} |
|||
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
|||
return srv.(GreeterServer).PaypalPayback(ctx, req.(*PaypalWebhook)) |
|||
} |
|||
return interceptor(ctx, in, info, handler) |
|||
} |
|||
|
|||
func _Greeter_AlipayGPayback_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
|||
in := new(AlipayGWebhook) |
|||
if err := dec(in); err != nil { |
|||
return nil, err |
|||
} |
|||
if interceptor == nil { |
|||
return srv.(GreeterServer).AlipayGPayback(ctx, in) |
|||
} |
|||
info := &grpc.UnaryServerInfo{ |
|||
Server: srv, |
|||
FullMethod: Greeter_AlipayGPayback_FullMethodName, |
|||
} |
|||
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
|||
return srv.(GreeterServer).AlipayGPayback(ctx, req.(*AlipayGWebhook)) |
|||
} |
|||
return interceptor(ctx, in, info, handler) |
|||
} |
|||
|
|||
func _Greeter_AlipayGCapture_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
|||
in := new(AlipayGWebhook) |
|||
if err := dec(in); err != nil { |
|||
return nil, err |
|||
} |
|||
if interceptor == nil { |
|||
return srv.(GreeterServer).AlipayGCapture(ctx, in) |
|||
} |
|||
info := &grpc.UnaryServerInfo{ |
|||
Server: srv, |
|||
FullMethod: Greeter_AlipayGCapture_FullMethodName, |
|||
} |
|||
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
|||
return srv.(GreeterServer).AlipayGCapture(ctx, req.(*AlipayGWebhook)) |
|||
} |
|||
return interceptor(ctx, in, info, handler) |
|||
} |
|||
|
|||
func _Greeter_PayoutsWebUrl_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
|||
in := new(PayoutRequest) |
|||
if err := dec(in); err != nil { |
|||
return nil, err |
|||
} |
|||
if interceptor == nil { |
|||
return srv.(GreeterServer).PayoutsWebUrl(ctx, in) |
|||
} |
|||
info := &grpc.UnaryServerInfo{ |
|||
Server: srv, |
|||
FullMethod: Greeter_PayoutsWebUrl_FullMethodName, |
|||
} |
|||
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
|||
return srv.(GreeterServer).PayoutsWebUrl(ctx, req.(*PayoutRequest)) |
|||
} |
|||
return interceptor(ctx, in, info, handler) |
|||
} |
|||
|
|||
func _Greeter_GetPayTransaction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
|||
in := new(emptypb.Empty) |
|||
if err := dec(in); err != nil { |
|||
return nil, err |
|||
} |
|||
if interceptor == nil { |
|||
return srv.(GreeterServer).GetPayTransaction(ctx, in) |
|||
} |
|||
info := &grpc.UnaryServerInfo{ |
|||
Server: srv, |
|||
FullMethod: Greeter_GetPayTransaction_FullMethodName, |
|||
} |
|||
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
|||
return srv.(GreeterServer).GetPayTransaction(ctx, req.(*emptypb.Empty)) |
|||
} |
|||
return interceptor(ctx, in, info, handler) |
|||
} |
|||
|
|||
func _Greeter_CancelBill_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
|||
in := new(CancelBillRequest) |
|||
if err := dec(in); err != nil { |
|||
return nil, err |
|||
} |
|||
if interceptor == nil { |
|||
return srv.(GreeterServer).CancelBill(ctx, in) |
|||
} |
|||
info := &grpc.UnaryServerInfo{ |
|||
Server: srv, |
|||
FullMethod: Greeter_CancelBill_FullMethodName, |
|||
} |
|||
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
|||
return srv.(GreeterServer).CancelBill(ctx, req.(*CancelBillRequest)) |
|||
} |
|||
return interceptor(ctx, in, info, handler) |
|||
} |
|||
|
|||
func _Greeter_RefundBill_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
|||
in := new(RefundRequest) |
|||
if err := dec(in); err != nil { |
|||
return nil, err |
|||
} |
|||
if interceptor == nil { |
|||
return srv.(GreeterServer).RefundBill(ctx, in) |
|||
} |
|||
info := &grpc.UnaryServerInfo{ |
|||
Server: srv, |
|||
FullMethod: Greeter_RefundBill_FullMethodName, |
|||
} |
|||
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
|||
return srv.(GreeterServer).RefundBill(ctx, req.(*RefundRequest)) |
|||
} |
|||
return interceptor(ctx, in, info, handler) |
|||
} |
|||
|
|||
// Greeter_ServiceDesc is the grpc.ServiceDesc for Greeter service.
|
|||
// It's only intended for direct use with grpc.RegisterService,
|
|||
// and not to be introspected or modified (even as a copy)
|
|||
var Greeter_ServiceDesc = grpc.ServiceDesc{ |
|||
ServiceName: "api.Greeter", |
|||
HandlerType: (*GreeterServer)(nil), |
|||
Methods: []grpc.MethodDesc{ |
|||
{ |
|||
MethodName: "Ping", |
|||
Handler: _Greeter_Ping_Handler, |
|||
}, |
|||
{ |
|||
MethodName: "CountryList", |
|||
Handler: _Greeter_CountryList_Handler, |
|||
}, |
|||
{ |
|||
MethodName: "DistrictCascade", |
|||
Handler: _Greeter_DistrictCascade_Handler, |
|||
}, |
|||
{ |
|||
MethodName: "PayConsult", |
|||
Handler: _Greeter_PayConsult_Handler, |
|||
}, |
|||
{ |
|||
MethodName: "PayTransactionWebUrl", |
|||
Handler: _Greeter_PayTransactionWebUrl_Handler, |
|||
}, |
|||
{ |
|||
MethodName: "PaypalPayback", |
|||
Handler: _Greeter_PaypalPayback_Handler, |
|||
}, |
|||
{ |
|||
MethodName: "AlipayGPayback", |
|||
Handler: _Greeter_AlipayGPayback_Handler, |
|||
}, |
|||
{ |
|||
MethodName: "AlipayGCapture", |
|||
Handler: _Greeter_AlipayGCapture_Handler, |
|||
}, |
|||
{ |
|||
MethodName: "PayoutsWebUrl", |
|||
Handler: _Greeter_PayoutsWebUrl_Handler, |
|||
}, |
|||
{ |
|||
MethodName: "GetPayTransaction", |
|||
Handler: _Greeter_GetPayTransaction_Handler, |
|||
}, |
|||
{ |
|||
MethodName: "CancelBill", |
|||
Handler: _Greeter_CancelBill_Handler, |
|||
}, |
|||
{ |
|||
MethodName: "RefundBill", |
|||
Handler: _Greeter_RefundBill_Handler, |
|||
}, |
|||
}, |
|||
Streams: []grpc.StreamDesc{}, |
|||
Metadata: "greeter.proto", |
|||
} |
@ -0,0 +1,329 @@ |
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|||
// versions:
|
|||
// protoc-gen-go v1.31.0
|
|||
// protoc v3.21.12
|
|||
// source: sms.proto
|
|||
|
|||
package api |
|||
|
|||
import ( |
|||
_ "google.golang.org/genproto/googleapis/api/annotations" |
|||
protoreflect "google.golang.org/protobuf/reflect/protoreflect" |
|||
protoimpl "google.golang.org/protobuf/runtime/protoimpl" |
|||
reflect "reflect" |
|||
sync "sync" |
|||
) |
|||
|
|||
const ( |
|||
// Verify that this generated code is sufficiently up-to-date.
|
|||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) |
|||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
|||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) |
|||
) |
|||
|
|||
type SendSmsRequest struct { |
|||
state protoimpl.MessageState |
|||
sizeCache protoimpl.SizeCache |
|||
unknownFields protoimpl.UnknownFields |
|||
|
|||
// 手机号码,必填
|
|||
Phone string `protobuf:"bytes,1,opt,name=phone,proto3" json:"phone,omitempty"` |
|||
// 短信场景值 1,2,3,4
|
|||
SmsType int32 `protobuf:"varint,2,opt,name=smsType,proto3" json:"smsType,omitempty"` |
|||
// 国际区号 86 中国 1美国
|
|||
AreaCode string `protobuf:"bytes,3,opt,name=areaCode,proto3" json:"areaCode,omitempty"` |
|||
} |
|||
|
|||
func (x *SendSmsRequest) Reset() { |
|||
*x = SendSmsRequest{} |
|||
if protoimpl.UnsafeEnabled { |
|||
mi := &file_sms_proto_msgTypes[0] |
|||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
|||
ms.StoreMessageInfo(mi) |
|||
} |
|||
} |
|||
|
|||
func (x *SendSmsRequest) String() string { |
|||
return protoimpl.X.MessageStringOf(x) |
|||
} |
|||
|
|||
func (*SendSmsRequest) ProtoMessage() {} |
|||
|
|||
func (x *SendSmsRequest) ProtoReflect() protoreflect.Message { |
|||
mi := &file_sms_proto_msgTypes[0] |
|||
if protoimpl.UnsafeEnabled && x != nil { |
|||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
|||
if ms.LoadMessageInfo() == nil { |
|||
ms.StoreMessageInfo(mi) |
|||
} |
|||
return ms |
|||
} |
|||
return mi.MessageOf(x) |
|||
} |
|||
|
|||
// Deprecated: Use SendSmsRequest.ProtoReflect.Descriptor instead.
|
|||
func (*SendSmsRequest) Descriptor() ([]byte, []int) { |
|||
return file_sms_proto_rawDescGZIP(), []int{0} |
|||
} |
|||
|
|||
func (x *SendSmsRequest) GetPhone() string { |
|||
if x != nil { |
|||
return x.Phone |
|||
} |
|||
return "" |
|||
} |
|||
|
|||
func (x *SendSmsRequest) GetSmsType() int32 { |
|||
if x != nil { |
|||
return x.SmsType |
|||
} |
|||
return 0 |
|||
} |
|||
|
|||
func (x *SendSmsRequest) GetAreaCode() string { |
|||
if x != nil { |
|||
return x.AreaCode |
|||
} |
|||
return "" |
|||
} |
|||
|
|||
// 短信发送回复
|
|||
type SendSmsReply struct { |
|||
state protoimpl.MessageState |
|||
sizeCache protoimpl.SizeCache |
|||
unknownFields protoimpl.UnknownFields |
|||
|
|||
Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` |
|||
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` |
|||
} |
|||
|
|||
func (x *SendSmsReply) Reset() { |
|||
*x = SendSmsReply{} |
|||
if protoimpl.UnsafeEnabled { |
|||
mi := &file_sms_proto_msgTypes[1] |
|||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
|||
ms.StoreMessageInfo(mi) |
|||
} |
|||
} |
|||
|
|||
func (x *SendSmsReply) String() string { |
|||
return protoimpl.X.MessageStringOf(x) |
|||
} |
|||
|
|||
func (*SendSmsReply) ProtoMessage() {} |
|||
|
|||
func (x *SendSmsReply) ProtoReflect() protoreflect.Message { |
|||
mi := &file_sms_proto_msgTypes[1] |
|||
if protoimpl.UnsafeEnabled && x != nil { |
|||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
|||
if ms.LoadMessageInfo() == nil { |
|||
ms.StoreMessageInfo(mi) |
|||
} |
|||
return ms |
|||
} |
|||
return mi.MessageOf(x) |
|||
} |
|||
|
|||
// Deprecated: Use SendSmsReply.ProtoReflect.Descriptor instead.
|
|||
func (*SendSmsReply) Descriptor() ([]byte, []int) { |
|||
return file_sms_proto_rawDescGZIP(), []int{1} |
|||
} |
|||
|
|||
func (x *SendSmsReply) GetCode() int32 { |
|||
if x != nil { |
|||
return x.Code |
|||
} |
|||
return 0 |
|||
} |
|||
|
|||
func (x *SendSmsReply) GetMessage() string { |
|||
if x != nil { |
|||
return x.Message |
|||
} |
|||
return "" |
|||
} |
|||
|
|||
type SmsCodeVerifyRequest struct { |
|||
state protoimpl.MessageState |
|||
sizeCache protoimpl.SizeCache |
|||
unknownFields protoimpl.UnknownFields |
|||
|
|||
// 手机号码,必填
|
|||
Phone string `protobuf:"bytes,1,opt,name=phone,proto3" json:"phone,omitempty"` |
|||
// 短信验证码
|
|||
Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"` |
|||
} |
|||
|
|||
func (x *SmsCodeVerifyRequest) Reset() { |
|||
*x = SmsCodeVerifyRequest{} |
|||
if protoimpl.UnsafeEnabled { |
|||
mi := &file_sms_proto_msgTypes[2] |
|||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
|||
ms.StoreMessageInfo(mi) |
|||
} |
|||
} |
|||
|
|||
func (x *SmsCodeVerifyRequest) String() string { |
|||
return protoimpl.X.MessageStringOf(x) |
|||
} |
|||
|
|||
func (*SmsCodeVerifyRequest) ProtoMessage() {} |
|||
|
|||
func (x *SmsCodeVerifyRequest) ProtoReflect() protoreflect.Message { |
|||
mi := &file_sms_proto_msgTypes[2] |
|||
if protoimpl.UnsafeEnabled && x != nil { |
|||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
|||
if ms.LoadMessageInfo() == nil { |
|||
ms.StoreMessageInfo(mi) |
|||
} |
|||
return ms |
|||
} |
|||
return mi.MessageOf(x) |
|||
} |
|||
|
|||
// Deprecated: Use SmsCodeVerifyRequest.ProtoReflect.Descriptor instead.
|
|||
func (*SmsCodeVerifyRequest) Descriptor() ([]byte, []int) { |
|||
return file_sms_proto_rawDescGZIP(), []int{2} |
|||
} |
|||
|
|||
func (x *SmsCodeVerifyRequest) GetPhone() string { |
|||
if x != nil { |
|||
return x.Phone |
|||
} |
|||
return "" |
|||
} |
|||
|
|||
func (x *SmsCodeVerifyRequest) GetCode() string { |
|||
if x != nil { |
|||
return x.Code |
|||
} |
|||
return "" |
|||
} |
|||
|
|||
var File_sms_proto protoreflect.FileDescriptor |
|||
|
|||
var file_sms_proto_rawDesc = []byte{ |
|||
0x0a, 0x09, 0x73, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x03, 0x61, 0x70, 0x69, |
|||
0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, |
|||
0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5c, |
|||
0x0a, 0x0e, 0x53, 0x65, 0x6e, 0x64, 0x53, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, |
|||
0x12, 0x14, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, |
|||
0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x6d, 0x73, 0x54, 0x79, 0x70, |
|||
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x73, 0x6d, 0x73, 0x54, 0x79, 0x70, 0x65, |
|||
0x12, 0x1a, 0x0a, 0x08, 0x61, 0x72, 0x65, 0x61, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, |
|||
0x28, 0x09, 0x52, 0x08, 0x61, 0x72, 0x65, 0x61, 0x43, 0x6f, 0x64, 0x65, 0x22, 0x3c, 0x0a, 0x0c, |
|||
0x53, 0x65, 0x6e, 0x64, 0x53, 0x6d, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x12, 0x0a, 0x04, |
|||
0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, |
|||
0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, |
|||
0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x40, 0x0a, 0x14, 0x53, 0x6d, |
|||
0x73, 0x43, 0x6f, 0x64, 0x65, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, |
|||
0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, |
|||
0x09, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, |
|||
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x32, 0xa9, 0x01, 0x0a, |
|||
0x03, 0x53, 0x6d, 0x73, 0x12, 0x4a, 0x0a, 0x0b, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, |
|||
0x61, 0x67, 0x65, 0x12, 0x13, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x53, 0x6d, |
|||
0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, |
|||
0x65, 0x6e, 0x64, 0x53, 0x6d, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x13, 0x82, 0xd3, 0xe4, |
|||
0x93, 0x02, 0x0d, 0x3a, 0x01, 0x2a, 0x22, 0x08, 0x73, 0x6d, 0x73, 0x2f, 0x73, 0x65, 0x6e, 0x64, |
|||
0x12, 0x56, 0x0a, 0x0a, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x19, |
|||
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x6d, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x56, 0x65, 0x72, 0x69, |
|||
0x66, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, |
|||
0x53, 0x65, 0x6e, 0x64, 0x53, 0x6d, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x1a, 0x82, 0xd3, |
|||
0xe4, 0x93, 0x02, 0x14, 0x3a, 0x01, 0x2a, 0x22, 0x0f, 0x73, 0x6d, 0x73, 0x2f, 0x63, 0x6f, 0x64, |
|||
0x65, 0x2d, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x42, 0x10, 0x5a, 0x0e, 0x62, 0x6b, 0x62, 0x2d, |
|||
0x6e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, |
|||
0x6f, 0x33, |
|||
} |
|||
|
|||
var ( |
|||
file_sms_proto_rawDescOnce sync.Once |
|||
file_sms_proto_rawDescData = file_sms_proto_rawDesc |
|||
) |
|||
|
|||
func file_sms_proto_rawDescGZIP() []byte { |
|||
file_sms_proto_rawDescOnce.Do(func() { |
|||
file_sms_proto_rawDescData = protoimpl.X.CompressGZIP(file_sms_proto_rawDescData) |
|||
}) |
|||
return file_sms_proto_rawDescData |
|||
} |
|||
|
|||
var file_sms_proto_msgTypes = make([]protoimpl.MessageInfo, 3) |
|||
var file_sms_proto_goTypes = []interface{}{ |
|||
(*SendSmsRequest)(nil), // 0: api.SendSmsRequest
|
|||
(*SendSmsReply)(nil), // 1: api.SendSmsReply
|
|||
(*SmsCodeVerifyRequest)(nil), // 2: api.SmsCodeVerifyRequest
|
|||
} |
|||
var file_sms_proto_depIdxs = []int32{ |
|||
0, // 0: api.Sms.SendMessage:input_type -> api.SendSmsRequest
|
|||
2, // 1: api.Sms.VerifyCode:input_type -> api.SmsCodeVerifyRequest
|
|||
1, // 2: api.Sms.SendMessage:output_type -> api.SendSmsReply
|
|||
1, // 3: api.Sms.VerifyCode:output_type -> api.SendSmsReply
|
|||
2, // [2:4] is the sub-list for method output_type
|
|||
0, // [0:2] is the sub-list for method input_type
|
|||
0, // [0:0] is the sub-list for extension type_name
|
|||
0, // [0:0] is the sub-list for extension extendee
|
|||
0, // [0:0] is the sub-list for field type_name
|
|||
} |
|||
|
|||
func init() { file_sms_proto_init() } |
|||
func file_sms_proto_init() { |
|||
if File_sms_proto != nil { |
|||
return |
|||
} |
|||
if !protoimpl.UnsafeEnabled { |
|||
file_sms_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { |
|||
switch v := v.(*SendSmsRequest); i { |
|||
case 0: |
|||
return &v.state |
|||
case 1: |
|||
return &v.sizeCache |
|||
case 2: |
|||
return &v.unknownFields |
|||
default: |
|||
return nil |
|||
} |
|||
} |
|||
file_sms_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { |
|||
switch v := v.(*SendSmsReply); i { |
|||
case 0: |
|||
return &v.state |
|||
case 1: |
|||
return &v.sizeCache |
|||
case 2: |
|||
return &v.unknownFields |
|||
default: |
|||
return nil |
|||
} |
|||
} |
|||
file_sms_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { |
|||
switch v := v.(*SmsCodeVerifyRequest); i { |
|||
case 0: |
|||
return &v.state |
|||
case 1: |
|||
return &v.sizeCache |
|||
case 2: |
|||
return &v.unknownFields |
|||
default: |
|||
return nil |
|||
} |
|||
} |
|||
} |
|||
type x struct{} |
|||
out := protoimpl.TypeBuilder{ |
|||
File: protoimpl.DescBuilder{ |
|||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), |
|||
RawDescriptor: file_sms_proto_rawDesc, |
|||
NumEnums: 0, |
|||
NumMessages: 3, |
|||
NumExtensions: 0, |
|||
NumServices: 1, |
|||
}, |
|||
GoTypes: file_sms_proto_goTypes, |
|||
DependencyIndexes: file_sms_proto_depIdxs, |
|||
MessageInfos: file_sms_proto_msgTypes, |
|||
}.Build() |
|||
File_sms_proto = out.File |
|||
file_sms_proto_rawDesc = nil |
|||
file_sms_proto_goTypes = nil |
|||
file_sms_proto_depIdxs = nil |
|||
} |
@ -0,0 +1,47 @@ |
|||
syntax = "proto3"; |
|||
|
|||
package api; |
|||
|
|||
import "google/api/annotations.proto"; |
|||
option go_package = "bkb-notify/api"; |
|||
|
|||
|
|||
// The Email service definition. |
|||
service Sms { |
|||
// 发送一条短信 |
|||
rpc SendMessage (SendSmsRequest) returns (SendSmsReply) { |
|||
option (google.api.http) = { |
|||
post: "sms/send" |
|||
body: "*" |
|||
}; |
|||
} |
|||
// 校验短信code |
|||
rpc VerifyCode (SmsCodeVerifyRequest) returns (SendSmsReply) { |
|||
option (google.api.http) = { |
|||
post: "sms/code-verify" |
|||
body: "*" |
|||
}; |
|||
} |
|||
} |
|||
|
|||
message SendSmsRequest { |
|||
//手机号码,必填 |
|||
string phone=1; |
|||
//短信场景值 1,2,3,4 |
|||
int32 smsType=2; |
|||
//国际区号 86 中国 1美国 |
|||
string areaCode = 3; |
|||
} |
|||
|
|||
// 短信发送回复 |
|||
message SendSmsReply { |
|||
int32 code = 1; |
|||
string message = 2; |
|||
} |
|||
|
|||
message SmsCodeVerifyRequest { |
|||
//手机号码,必填 |
|||
string phone=1; |
|||
//短信验证码 |
|||
string code=2; |
|||
} |
@ -0,0 +1,150 @@ |
|||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|||
// versions:
|
|||
// - protoc-gen-go-grpc v1.3.0
|
|||
// - protoc v3.21.12
|
|||
// source: sms.proto
|
|||
|
|||
package api |
|||
|
|||
import ( |
|||
context "context" |
|||
grpc "google.golang.org/grpc" |
|||
codes "google.golang.org/grpc/codes" |
|||
status "google.golang.org/grpc/status" |
|||
) |
|||
|
|||
// This is a compile-time assertion to ensure that this generated file
|
|||
// is compatible with the grpc package it is being compiled against.
|
|||
// Requires gRPC-Go v1.32.0 or later.
|
|||
const _ = grpc.SupportPackageIsVersion7 |
|||
|
|||
const ( |
|||
Sms_SendMessage_FullMethodName = "/api.Sms/SendMessage" |
|||
Sms_VerifyCode_FullMethodName = "/api.Sms/VerifyCode" |
|||
) |
|||
|
|||
// SmsClient is the client API for Sms service.
|
|||
//
|
|||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
|||
type SmsClient interface { |
|||
// 发送一条短信
|
|||
SendMessage(ctx context.Context, in *SendSmsRequest, opts ...grpc.CallOption) (*SendSmsReply, error) |
|||
// 校验短信code
|
|||
VerifyCode(ctx context.Context, in *SmsCodeVerifyRequest, opts ...grpc.CallOption) (*SendSmsReply, error) |
|||
} |
|||
|
|||
type smsClient struct { |
|||
cc grpc.ClientConnInterface |
|||
} |
|||
|
|||
func NewSmsClient(cc grpc.ClientConnInterface) SmsClient { |
|||
return &smsClient{cc} |
|||
} |
|||
|
|||
func (c *smsClient) SendMessage(ctx context.Context, in *SendSmsRequest, opts ...grpc.CallOption) (*SendSmsReply, error) { |
|||
out := new(SendSmsReply) |
|||
err := c.cc.Invoke(ctx, Sms_SendMessage_FullMethodName, in, out, opts...) |
|||
if err != nil { |
|||
return nil, err |
|||
} |
|||
return out, nil |
|||
} |
|||
|
|||
func (c *smsClient) VerifyCode(ctx context.Context, in *SmsCodeVerifyRequest, opts ...grpc.CallOption) (*SendSmsReply, error) { |
|||
out := new(SendSmsReply) |
|||
err := c.cc.Invoke(ctx, Sms_VerifyCode_FullMethodName, in, out, opts...) |
|||
if err != nil { |
|||
return nil, err |
|||
} |
|||
return out, nil |
|||
} |
|||
|
|||
// SmsServer is the server API for Sms service.
|
|||
// All implementations must embed UnimplementedSmsServer
|
|||
// for forward compatibility
|
|||
type SmsServer interface { |
|||
// 发送一条短信
|
|||
SendMessage(context.Context, *SendSmsRequest) (*SendSmsReply, error) |
|||
// 校验短信code
|
|||
VerifyCode(context.Context, *SmsCodeVerifyRequest) (*SendSmsReply, error) |
|||
mustEmbedUnimplementedSmsServer() |
|||
} |
|||
|
|||
// UnimplementedSmsServer must be embedded to have forward compatible implementations.
|
|||
type UnimplementedSmsServer struct { |
|||
} |
|||
|
|||
func (UnimplementedSmsServer) SendMessage(context.Context, *SendSmsRequest) (*SendSmsReply, error) { |
|||
return nil, status.Errorf(codes.Unimplemented, "method SendMessage not implemented") |
|||
} |
|||
func (UnimplementedSmsServer) VerifyCode(context.Context, *SmsCodeVerifyRequest) (*SendSmsReply, error) { |
|||
return nil, status.Errorf(codes.Unimplemented, "method VerifyCode not implemented") |
|||
} |
|||
func (UnimplementedSmsServer) mustEmbedUnimplementedSmsServer() {} |
|||
|
|||
// UnsafeSmsServer may be embedded to opt out of forward compatibility for this service.
|
|||
// Use of this interface is not recommended, as added methods to SmsServer will
|
|||
// result in compilation errors.
|
|||
type UnsafeSmsServer interface { |
|||
mustEmbedUnimplementedSmsServer() |
|||
} |
|||
|
|||
func RegisterSmsServer(s grpc.ServiceRegistrar, srv SmsServer) { |
|||
s.RegisterService(&Sms_ServiceDesc, srv) |
|||
} |
|||
|
|||
func _Sms_SendMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
|||
in := new(SendSmsRequest) |
|||
if err := dec(in); err != nil { |
|||
return nil, err |
|||
} |
|||
if interceptor == nil { |
|||
return srv.(SmsServer).SendMessage(ctx, in) |
|||
} |
|||
info := &grpc.UnaryServerInfo{ |
|||
Server: srv, |
|||
FullMethod: Sms_SendMessage_FullMethodName, |
|||
} |
|||
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
|||
return srv.(SmsServer).SendMessage(ctx, req.(*SendSmsRequest)) |
|||
} |
|||
return interceptor(ctx, in, info, handler) |
|||
} |
|||
|
|||
func _Sms_VerifyCode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
|||
in := new(SmsCodeVerifyRequest) |
|||
if err := dec(in); err != nil { |
|||
return nil, err |
|||
} |
|||
if interceptor == nil { |
|||
return srv.(SmsServer).VerifyCode(ctx, in) |
|||
} |
|||
info := &grpc.UnaryServerInfo{ |
|||
Server: srv, |
|||
FullMethod: Sms_VerifyCode_FullMethodName, |
|||
} |
|||
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
|||
return srv.(SmsServer).VerifyCode(ctx, req.(*SmsCodeVerifyRequest)) |
|||
} |
|||
return interceptor(ctx, in, info, handler) |
|||
} |
|||
|
|||
// Sms_ServiceDesc is the grpc.ServiceDesc for Sms service.
|
|||
// It's only intended for direct use with grpc.RegisterService,
|
|||
// and not to be introspected or modified (even as a copy)
|
|||
var Sms_ServiceDesc = grpc.ServiceDesc{ |
|||
ServiceName: "api.Sms", |
|||
HandlerType: (*SmsServer)(nil), |
|||
Methods: []grpc.MethodDesc{ |
|||
{ |
|||
MethodName: "SendMessage", |
|||
Handler: _Sms_SendMessage_Handler, |
|||
}, |
|||
{ |
|||
MethodName: "VerifyCode", |
|||
Handler: _Sms_VerifyCode_Handler, |
|||
}, |
|||
}, |
|||
Streams: []grpc.StreamDesc{}, |
|||
Metadata: "sms.proto", |
|||
} |
@ -0,0 +1,111 @@ |
|||
package initialize |
|||
|
|||
import ( |
|||
"fmt" |
|||
"os" |
|||
|
|||
"shop-api/global" |
|||
"shop-api/initialize/internal" |
|||
"shop-api/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.InfluencerUser{},
|
|||
model.Order{}, |
|||
model.OrderAddress{}, |
|||
//model.OrderCommod{},
|
|||
model.OrderGoods{}, |
|||
model.OrderGoodsSpecs{}, |
|||
//model.CustomerUser{},
|
|||
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.User{}, |
|||
model.UserAppeal{}, |
|||
model.OrderPostSale{}, |
|||
model.DtStatisticOrder{}, |
|||
) |
|||
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 |
|||
} |
|||
} |
@ -0,0 +1,110 @@ |
|||
package initialize |
|||
|
|||
import ( |
|||
"context" |
|||
"fmt" |
|||
"shop-api/global" |
|||
"shop-api/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 init() { |
|||
sc := []constant.ServerConfig{ |
|||
*constant.NewServerConfig("1.92.109.79", 30848), |
|||
} |
|||
cc := constant.ClientConfig{ |
|||
NamespaceId: "dev", |
|||
TimeoutMs: 5000, |
|||
} |
|||
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()), |
|||
grpc.WithTimeout(10*time.Second), |
|||
) |
|||
if err != nil { |
|||
panic(err) |
|||
} |
|||
global.PAY_CONN = conn |
|||
} |
|||
|
|||
func InitNacosClient() { |
|||
sc := []constant.ServerConfig{ |
|||
*constant.NewServerConfig("1.92.109.79", 30848), |
|||
} |
|||
cc := constant.ClientConfig{ |
|||
NamespaceId: "dev", |
|||
TimeoutMs: 5000, |
|||
} |
|||
func() { |
|||
client, err := clients.NewNamingClient( |
|||
vo.NacosClientParam{ |
|||
ServerConfigs: sc, |
|||
ClientConfig: &cc, |
|||
}, |
|||
) |
|||
if err != nil { |
|||
fmt.Println(err) |
|||
panic(err) |
|||
} |
|||
r := nacos.New(client) |
|||
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) |
|||
}() |
|||
// 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.SMS_CLIENT = api.NewSmsClient(conn)
|
|||
// }()
|
|||
|
|||
} |
@ -0,0 +1,53 @@ |
|||
package internal |
|||
|
|||
import ( |
|||
"log" |
|||
"os" |
|||
"time" |
|||
|
|||
"shop-api/global" |
|||
|
|||
"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 |
|||
} |
@ -0,0 +1,34 @@ |
|||
package internal |
|||
|
|||
import ( |
|||
"fmt" |
|||
|
|||
"shop-api/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...) |
|||
} |
|||
} |
@ -0,0 +1,25 @@ |
|||
package initialize |
|||
|
|||
import ( |
|||
"fmt" |
|||
|
|||
"shop-api/global" |
|||
"shop-api/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 |
|||
} |
@ -0,0 +1,61 @@ |
|||
package initialize |
|||
|
|||
import ( |
|||
"fmt" |
|||
"strconv" |
|||
"strings" |
|||
"time" |
|||
|
|||
"shop-api/global" |
|||
"shop-api/service" |
|||
"shop-api/utils" |
|||
|
|||
"github.com/go-redis/redis" |
|||
"go.uber.org/zap" |
|||
) |
|||
|
|||
func Redis() { |
|||
redisCfg := global.MG_CONFIG.Redis |
|||
client := redis.NewClient(&redis.Options{ |
|||
Addr: redisCfg.Addr, |
|||
Password: redisCfg.Password, // no password set
|
|||
DB: redisCfg.DB, // use default DB
|
|||
}) |
|||
pong, err := client.Ping().Result() |
|||
if err != nil { |
|||
global.MG_LOG.Error("redis connect ping failed, err:", zap.Any("err", err)) |
|||
} else { |
|||
global.MG_LOG.Info("redis connect ping response:", zap.String("pong", pong)) |
|||
global.MG_REDIS = client |
|||
} |
|||
// 开启过期消息订阅
|
|||
go PubsunChannel(client) |
|||
} |
|||
|
|||
func PubsunChannel(client *redis.Client) { |
|||
pubsub := client.Subscribe("__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": |
|||
fmt.Println(key) |
|||
case "orderBack": |
|||
// 订单超时
|
|||
err, result := utils.RedisSetNX(key[0]+":"+key[0]+"-"+key[1], "used", 10*time.Second) |
|||
if result && err == nil { |
|||
go service.UserOrderBack(key[1]) |
|||
} |
|||
case "orderConfirm": |
|||
// 订单确认
|
|||
err, result := utils.RedisSetNX(key[0]+":"+key[0]+"-"+key[1], "used", 10*time.Second) |
|||
if result && err == nil { |
|||
go service.UserOrderConfirm(key[1]) |
|||
} |
|||
default: |
|||
// 默认处理
|
|||
} |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,42 @@ |
|||
package initialize |
|||
|
|||
import ( |
|||
"net/http" |
|||
|
|||
_ "shop-api/docs" |
|||
"shop-api/global" |
|||
"shop-api/middleware" |
|||
"shop-api/router" |
|||
"shop-api/router/customer" |
|||
globalr "shop-api/router/global" |
|||
|
|||
"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)) |
|||
// 客户端
|
|||
PrivateGroup1 := Router.Group("") |
|||
{ |
|||
router.InitBaseRouter(PrivateGroup1) // 基础路由
|
|||
customer.InitInfluencerOrderRouterNoAuth(PrivateGroup1) // 订单回调地址
|
|||
} |
|||
PrivateGroup1.Use(middleware.JWTAuth()) |
|||
{ |
|||
customer.InitInfluencerUserRouter(PrivateGroup1) // 用户
|
|||
customer.InitInfluencerOrderRouter(PrivateGroup1) // 订单
|
|||
customer.InitCustomerGoodsRouter(PrivateGroup1) // 商品
|
|||
globalr.InitGlobalRouter(PrivateGroup1) //地址
|
|||
} |
|||
return Router |
|||
} |
@ -0,0 +1,24 @@ |
|||
package initialize |
|||
|
|||
import ( |
|||
"fmt" |
|||
|
|||
"shop-api/config" |
|||
"shop-api/global" |
|||
"shop-api/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) |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,22 @@ |
|||
package initialize |
|||
|
|||
import "shop-api/utils" |
|||
|
|||
func init() { |
|||
_ = utils.RegisterRule("PageVerify", |
|||
utils.Rules{ |
|||
"Page": {utils.NotEmpty()}, |
|||
"PageSize": {utils.NotEmpty()}, |
|||
}, |
|||
) |
|||
_ = utils.RegisterRule("IdVerify", |
|||
utils.Rules{ |
|||
"Id": {utils.NotEmpty()}, |
|||
}, |
|||
) |
|||
_ = utils.RegisterRule("AuthorityIdVerify", |
|||
utils.Rules{ |
|||
"AuthorityId": {utils.NotEmpty()}, |
|||
}, |
|||
) |
|||
} |
@ -0,0 +1,36 @@ |
|||
package main |
|||
|
|||
import ( |
|||
"shop-api/core" |
|||
"shop-api/global" |
|||
"shop-api/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() |
|||
} |
@ -0,0 +1,26 @@ |
|||
package middleware |
|||
|
|||
import ( |
|||
"github.com/gin-gonic/gin" |
|||
"net/http" |
|||
) |
|||
|
|||
// 处理跨域请求,支持options访问
|
|||
func Cors() gin.HandlerFunc { |
|||
return func(c *gin.Context) { |
|||
method := c.Request.Method |
|||
origin := c.Request.Header.Get("Origin") |
|||
c.Header("Access-Control-Allow-Origin", origin) |
|||
c.Header("Access-Control-Allow-Headers", "Content-Type,AccessToken,X-CSRF-Token, Authorization, Token,X-Token,X-User-Id,X-Requested-With,X_Requested_With") |
|||
c.Header("Access-Control-Allow-Methods", "POST, GET, OPTIONS,DELETE,PUT") |
|||
c.Header("Access-Control-Expose-Headers", "Content-Length, Access-Control-Allow-Origin, Access-Control-Allow-Headers, Content-Type") |
|||
c.Header("Access-Control-Allow-Credentials", "true") |
|||
|
|||
// 放行所有OPTIONS方法
|
|||
if method == "OPTIONS" { |
|||
c.AbortWithStatus(http.StatusNoContent) |
|||
} |
|||
// 处理请求
|
|||
c.Next() |
|||
} |
|||
} |
@ -0,0 +1,62 @@ |
|||
package middleware |
|||
|
|||
import ( |
|||
"net" |
|||
"net/http" |
|||
"net/http/httputil" |
|||
"os" |
|||
"runtime/debug" |
|||
"strings" |
|||
|
|||
"shop-api/global" |
|||
|
|||
"github.com/gin-gonic/gin" |
|||
"go.uber.org/zap" |
|||
) |
|||
|
|||
// GinRecovery recover掉项目可能出现的panic,并使用zap记录相关日志
|
|||
func GinRecovery(stack bool) gin.HandlerFunc { |
|||
return func(c *gin.Context) { |
|||
defer func() { |
|||
if err := recover(); err != nil { |
|||
// Check for a broken connection, as it is not really a
|
|||
// condition that warrants a panic stack trace.
|
|||
var brokenPipe bool |
|||
if ne, ok := err.(*net.OpError); ok { |
|||
if se, ok := ne.Err.(*os.SyscallError); ok { |
|||
if strings.Contains(strings.ToLower(se.Error()), "broken pipe") || strings.Contains(strings.ToLower(se.Error()), "connection reset by peer") { |
|||
brokenPipe = true |
|||
} |
|||
} |
|||
} |
|||
|
|||
httpRequest, _ := httputil.DumpRequest(c.Request, false) |
|||
if brokenPipe { |
|||
global.MG_LOG.Error(c.Request.URL.Path, |
|||
zap.Any("error", err), |
|||
zap.String("request", string(httpRequest)), |
|||
) |
|||
// If the connection is dead, we can't write a status to it.
|
|||
_ = c.Error(err.(error)) // nolint: errcheck
|
|||
c.Abort() |
|||
return |
|||
} |
|||
|
|||
if stack { |
|||
global.MG_LOG.Error("[Recovery from panic]", |
|||
zap.Any("error", err), |
|||
zap.String("request", string(httpRequest)), |
|||
zap.String("stack", string(debug.Stack())), |
|||
) |
|||
} else { |
|||
global.MG_LOG.Error("[Recovery from panic]", |
|||
zap.Any("error", err), |
|||
zap.String("request", string(httpRequest)), |
|||
) |
|||
} |
|||
c.AbortWithStatus(http.StatusInternalServerError) |
|||
} |
|||
}() |
|||
c.Next() |
|||
} |
|||
} |
@ -0,0 +1,139 @@ |
|||
package middleware |
|||
|
|||
import ( |
|||
"errors" |
|||
"strconv" |
|||
"time" |
|||
|
|||
"shop-api/global" |
|||
"shop-api/model" |
|||
"shop-api/model/request" |
|||
"shop-api/model/response" |
|||
"shop-api/service" |
|||
|
|||
"github.com/dgrijalva/jwt-go" |
|||
"github.com/gin-gonic/gin" |
|||
"go.uber.org/zap" |
|||
) |
|||
|
|||
func JWTAuth() gin.HandlerFunc { |
|||
return func(c *gin.Context) { |
|||
// 我们这里jwt鉴权取头部信息 Authorization 登录时回返回token信息 这里前端需要把token存储到cookie或者本地localStorage中 不过需要跟后端协商过期时间 可以约定刷新令牌或者重新登录
|
|||
|
|||
token := c.Request.Header.Get("x-token") |
|||
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() |
|||
} |
|||
} |
|||
|
|||
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
|
|||
//}
|
@ -0,0 +1,23 @@ |
|||
package middleware |
|||
|
|||
import ( |
|||
"shop-api/global" |
|||
"shop-api/model/response" |
|||
|
|||
"github.com/gin-gonic/gin" |
|||
) |
|||
|
|||
// 处理跨域请求,支持options访问
|
|||
func NeedInit() gin.HandlerFunc { |
|||
return func(c *gin.Context) { |
|||
if global.MG_DB == nil { |
|||
response.OkWithDetailed(gin.H{ |
|||
"needInit": true, |
|||
}, "前往初始化数据库", c) |
|||
c.Abort() |
|||
} else { |
|||
c.Next() |
|||
} |
|||
// 处理请求
|
|||
} |
|||
} |
@ -0,0 +1,17 @@ |
|||
package model |
|||
|
|||
import "shop-api/global" |
|||
|
|||
type Account struct { |
|||
global.MG_MODEL |
|||
UserID string `gorm:"size:50;index" json:"userID"` // 用户id
|
|||
AccountName string `gorm:"size:50" json:"accountName"` // 户名
|
|||
IDCard string `gorm:"size:30" json:"idCard"` // 身份证
|
|||
Phone string `gorm:"size:20" json:"phone"` // 手机号
|
|||
PayPalName string `gorm:"size:50" json:"payPalName"` // paypal账号
|
|||
Platform string `gorm:"size:50" json:"platform"` // 平台 saller(买家端) / customer(客户端) / influencer(网红端)
|
|||
} |
|||
|
|||
func (Account) TableName() string { |
|||
return "account" |
|||
} |
@ -0,0 +1,22 @@ |
|||
package model |
|||
|
|||
import "shop-api/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" |
|||
} |
@ -0,0 +1,21 @@ |
|||
// 自动生成模板Application
|
|||
package model |
|||
|
|||
import "shop-api/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" |
|||
} |
@ -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:"-"` //上级/下级
|
|||
} |
@ -0,0 +1,32 @@ |
|||
package model |
|||
|
|||
import ( |
|||
"shop-api/global" |
|||
) |
|||
|
|||
type Bill struct { |
|||
global.MG_MODEL |
|||
Platform string `gorm:"size:50" json:"platform"` // 平台 seller(买家端) / customer(客户端) / influencer(网红端)
|
|||
UserID string `gorm:"size:50;index" json:"userID"` // 用户id
|
|||
Type string `gorm:"size:1;default:1" json:"type"` // 类型 1-佣金 2-订单 3-提现
|
|||
Title string `gorm:"size:255" json:"title"` // 账单标题
|
|||
OrderID string `gorm:"size:50" json:"order_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-已取消付款
|
|||
Remark string `gorm:"size:50" json:"remark"` // 备注
|
|||
TransactionId string `gorm:"size:50" json:"transaction_id"` // 交易编号
|
|||
} |
|||
type BillView struct { |
|||
OrderID string `json:"order_id"` // 订单编号
|
|||
TransactionId string `json:"transaction_id"` // 交易编号
|
|||
} |
|||
|
|||
func (Bill) TableName() string { |
|||
return "bill" |
|||
} |
|||
func (BillView) TableName() string { |
|||
return "bill" |
|||
} |
@ -0,0 +1,13 @@ |
|||
package model |
|||
|
|||
import "shop-api/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" |
|||
} |
@ -0,0 +1,13 @@ |
|||
package model |
|||
|
|||
import "shop-api/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" |
|||
} |
@ -0,0 +1,18 @@ |
|||
package model |
|||
|
|||
import "shop-api/global" |
|||
|
|||
type Courier struct { |
|||
global.MG_MODEL |
|||
Name string `gorm:"column:name;default:;NOT NULL"` |
|||
Code string `gorm:"column:code;default:;NOT NULL"` |
|||
CountryIso2 string `gorm:"column:country_iso2;default:;NOT NULL"` |
|||
Phone string `gorm:"column:phone;default:;NOT NULL"` |
|||
Url string `gorm:"column:url;default:;NOT NULL"` |
|||
Type string `gorm:"column:type;default:;NOT NULL"` |
|||
Logo string `gorm:"column:logo;default:;NOT NULL"` |
|||
} |
|||
|
|||
func (c *Courier) TableName() string { |
|||
return "courier" |
|||
} |
@ -0,0 +1,44 @@ |
|||
package model |
|||
|
|||
import "shop-api/global" |
|||
|
|||
type SysDictType struct { //数据字典分类
|
|||
global.BASE_ID |
|||
PID int `gorm:"" json:"pid"` //父ID
|
|||
Code string `gorm:"UNIQUE;size:20" json:"code"` //编码
|
|||
Name string `gorm:"size:20" json:"name"` //名称
|
|||
Type string `gorm:"size:10" json:"type"` //类型
|
|||
Status string `gorm:"size:1" json:"status"` //可用状态 1正常 0删除
|
|||
Desc string `gorm:"size:30" json:"desc"` //描述
|
|||
IsFixed int `gorm:"type:tinyint(1)" json:"isFixed"` //0默认为不固定 1固定
|
|||
//DynamicField string `gorm:"type:varchar(255)" json:"dynamic_field"` //动态字段编码
|
|||
|
|||
global.TIME_MODEL |
|||
} |
|||
|
|||
type SysDictData struct { //数据字典取值
|
|||
global.BASE_ID |
|||
TypeCode string `gorm:"size:20" json:"typeCode"` //编码
|
|||
Sort int `gorm:"" json:"sort"` //排序
|
|||
Label string `gorm:"size:30" json:"label"` //标签
|
|||
Value string `gorm:"size:10" json:"value"` //值
|
|||
IsDefault int `gorm:"type:tinyint(1)" json:"isDefault"` //是否为默认值 1是 0否
|
|||
Desc string `gorm:"size:50" json:"desc"` //描述
|
|||
Status string `gorm:"size:1" json:"status"` //可用状态 1正常 0删除
|
|||
|
|||
global.TIME_MODEL |
|||
} |
|||
|
|||
type SysDictDataView struct { |
|||
Label string `json:"label"` //标签
|
|||
Value string `json:"value"` //值
|
|||
IsDefault int `json:"isDefault"` //是否为默认值 1是 0否
|
|||
} |
|||
|
|||
func (SysDictType) TableName() string { |
|||
return "sys_dict_type" |
|||
} |
|||
|
|||
func (SysDictData) TableName() string { |
|||
return "sys_dict_data" |
|||
} |
@ -0,0 +1,26 @@ |
|||
package model |
|||
|
|||
import "shop-api/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" |
|||
} |
@ -0,0 +1,14 @@ |
|||
package model |
|||
|
|||
import "shop-api/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" |
|||
} |
@ -0,0 +1,13 @@ |
|||
package model |
|||
|
|||
import "shop-api/global" |
|||
|
|||
type Internationalization struct { |
|||
global.MG_MODEL |
|||
Ch string `gorm:"size:50" json:"ch"` |
|||
En string `gorm:"size:200" json:"en"` |
|||
} |
|||
|
|||
func (Internationalization) TableName() string { |
|||
return "internationalization" |
|||
} |
@ -0,0 +1,65 @@ |
|||
package model |
|||
|
|||
import ( |
|||
"time" |
|||
|
|||
"shop-api/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:已结束
|
|||
global.MG_MODEL |
|||
} |
|||
|
|||
type MissionDetail struct { |
|||
Title string `json:"title"` // 标题
|
|||
GoodsId uint `json:"-"` |
|||
GoodsStatus int `json:"goods_status"` // 关联商品状态 1:正常 2:已下架
|
|||
Goods TbGoodsView `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:"-" 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"` //订单数
|
|||
global.MG_MODEL |
|||
} |
|||
|
|||
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"` |
|||
} |
|||
|
|||
func (Mission) TableName() string { |
|||
return "mission" |
|||
} |
|||
|
|||
func (MissionDetail) TableName() string { |
|||
return "mission" |
|||
} |
@ -0,0 +1,40 @@ |
|||
package model |
|||
|
|||
import ( |
|||
"shop-api/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"` //任务推广过期时间
|
|||
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"` // 在途佣金
|
|||
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"` // 推广链接
|
|||
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"` // 发布作品
|
|||
} |
|||
|
|||
func (MissionClaim) TableName() string { |
|||
return "mission_claim" |
|||
} |
|||
|
|||
func (MissionClaimDetail) TableName() string { |
|||
return "mission_claim" |
|||
} |
@ -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" |
|||
} |
@ -0,0 +1,41 @@ |
|||
package model |
|||
|
|||
import ( |
|||
"time" |
|||
|
|||
"shop-api/global" |
|||
) |
|||
|
|||
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:"" json:"sendTime"` // 发货时间
|
|||
Courier string `gorm:"size:50" json:"courier"` // 快递公司
|
|||
CourierUrl string `gorm:"size:255" json:"courier_url"` // 快递查询地址
|
|||
CourierNumber string `gorm:"size:50" json:"courierNumber"` // 快递单号
|
|||
ConfirmTime *time.Time `gorm:"" json:"confirmTime"` // 收货时间
|
|||
TrackId uint `json:"track_id"` // track表id
|
|||
} |
|||
|
|||
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"` // 快递查询地址
|
|||
} |
|||
|
|||
func (MissionClaimOrder) TableName() string { |
|||
return "mission_claim_order" |
|||
} |
|||
|
|||
func (MissionClaimOrderInfo) TableName() string { |
|||
return "mission_claim_order" |
|||
} |
@ -0,0 +1,17 @@ |
|||
package model |
|||
|
|||
import "shop-api/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" |
|||
} |
@ -0,0 +1,15 @@ |
|||
package model |
|||
|
|||
import "shop-api/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:Pinterest 3:tk 4:Twitter 5:Facebook 6:Reddit
|
|||
Homepage string `gorm:"size:255" json:"homepage"` // 作品主页地址
|
|||
Image string `json:"image"` // 作品凭证截图
|
|||
} |
|||
|
|||
func (MissionClaimWorks) TableName() string { |
|||
return "mission_claim_works" |
|||
} |
@ -0,0 +1,76 @@ |
|||
package model |
|||
|
|||
import ( |
|||
"time" |
|||
|
|||
"shop-api/global" |
|||
) |
|||
|
|||
// todo 添加购买所在平台字段
|
|||
|
|||
type Order struct { |
|||
global.MG_MODEL |
|||
Platform string `gorm:"size:10" json:"platform"` // 购买平台
|
|||
StoreNo string `gorm:"size:60" json:"store_no"` // 店铺编号
|
|||
OrderID string `gorm:"size:50;index" json:"orderID"` // 订单号
|
|||
PaypalID string `gorm:"size:50" json:"paypalID"` // paypal订单号
|
|||
CaptureID string `gorm:"size:50" json:"captureID"` // paypal收款确认id
|
|||
Code string `gorm:"size:20" json:"code"` // 网红领取任务码
|
|||
UserID string `gorm:"size:50;index" json:"userID"` // 用户id
|
|||
CommodID uint `gorm:"size:50;index" json:"commodID"` // 商品id
|
|||
SkuNo string `gorm:"type:varchar(60);" json:"sku_no"` // 商品规格编号
|
|||
SkuID int `gorm:"type:int(10);" json:"sku_id"` // 商品规格编号
|
|||
Type int `gorm:"type:int(1);default:1" json:"type"` // 类型 1-普通订单 2-预售订单
|
|||
Price float64 `gorm:"type:decimal(10,2)" json:"price"` // 商品价格
|
|||
Number int `gorm:"type:int(10)" json:"number"` // 数量
|
|||
PaidPrice float64 `gorm:"type:decimal(10,2)" json:"paidPrice"` // 实付价格
|
|||
Status int `gorm:"type:int(1)" json:"status"` // 订单状态 1-待付款 2-待发货 3-已发货 4-已完成 5-已取消
|
|||
ExpressStatus int `gorm:"type:int(1)" json:"express_status"` // 物流状态 1:已签收
|
|||
PayMode int `gorm:"type:int(1)" json:"payMode"` // 支付方式 1-paypal
|
|||
PayTime *time.Time `gorm:"" json:"payTime"` // 付款时间
|
|||
SendTime *time.Time `gorm:"" json:"sendTime"` // 发货时间
|
|||
ExpressTime *time.Time `gorm:"" json:"express_time"` // 已签收时间
|
|||
ConfirmTime *time.Time `gorm:"" json:"confirmTime"` // 收货时间
|
|||
} |
|||
|
|||
type OrderList struct { |
|||
Order |
|||
NextCountdown int64 `gorm:"-" json:"next_countdown"` // 下阶段倒计时
|
|||
Goods OrderGoodsDetail `gorm:"-" json:"goods"` // 商品信息
|
|||
PostSale PostSale `gorm:"-" json:"postSale"` // 售后信息
|
|||
} |
|||
|
|||
type OrderDetail struct { |
|||
Order |
|||
NextCountdown int64 `gorm:"-" json:"next_countdown"` // 下阶段倒计时
|
|||
Goods OrderGoodsDetail `gorm:"-" json:"goods"` // 商品信息
|
|||
Address OrderAddress `gorm:"-" json:"address"` // 地址
|
|||
Deliver OrderDeliver `gorm:"-" json:"deliver"` // 发货信息
|
|||
SellerUser SellerUserDesc `gorm:"-" json:"seller"` // 卖家信息
|
|||
Store SellerStoreInfo `gorm:"-" json:"store"` // 店铺信息
|
|||
Bill BillView `gorm:"-" json:"bill"` // 交易信息
|
|||
Chain Chain `gorm:"-" json:"chain"` // 区块链
|
|||
PostSale PostSale `gorm:"-" json:"postSale"` // 售后信息
|
|||
} |
|||
|
|||
type OrderTotal struct { |
|||
Status2 int `json:"status2"` // 待发货
|
|||
Status3 int `json:"status3"` // 已发货
|
|||
Status4 int `json:"status4"` // 已收货
|
|||
} |
|||
|
|||
type Chain struct { |
|||
Address string `json:"address"` // 合约地址
|
|||
} |
|||
|
|||
func (Order) TableName() string { |
|||
return "order" |
|||
} |
|||
|
|||
func (OrderList) TableName() string { |
|||
return "order" |
|||
} |
|||
|
|||
func (OrderDetail) TableName() string { |
|||
return "order" |
|||
} |
@ -0,0 +1,13 @@ |
|||
package model |
|||
|
|||
// 记录订单中的收货地址
|
|||
type OrderAddress struct { |
|||
Address |
|||
OrderID string `gorm:"size:50" json:"orderID"` |
|||
AddressId uint `gorm:"" json:"address_id"` // 用户地址id
|
|||
Platform string `gorm:"size:50" json:"platform"` //平台 saller(买家端) / customer(客户端) / influencer(网红端)
|
|||
} |
|||
|
|||
func (OrderAddress) TableName() string { |
|||
return "order_address" |
|||
} |
@ -0,0 +1,27 @@ |
|||
package model |
|||
|
|||
import "shop-api/global" |
|||
|
|||
type OrderDeliver struct { |
|||
global.MG_MODEL |
|||
OrderID string `gorm:"size:50" json:"orderID"` // 订单号
|
|||
CourierNumber string `gorm:"size:50" json:"courierNumber"` // 快递单号
|
|||
Courier string `gorm:"size:50" json:"courier"` // 快递公司
|
|||
CourierLink string `gorm:"size:255" json:"courierLink"` // 快递链接
|
|||
TrackId uint `json:"track_id"` // track表id
|
|||
} |
|||
|
|||
type OrderDeliverDesc struct { |
|||
OrderID string `gorm:"size:50" json:"orderID"` // 订单号
|
|||
CourierNumber string `gorm:"size:50" json:"courierNumber"` // 快递单号
|
|||
Courier string `gorm:"size:50" json:"courier"` // 快递公司
|
|||
CourierLink string `gorm:"size:255" json:"courierLink"` // 快递链接
|
|||
} |
|||
|
|||
type PutDeliver struct { |
|||
Data []OrderDeliverDesc `json:"data"` |
|||
} |
|||
|
|||
func (OrderDeliver) TableName() string { |
|||
return "order_deliver" |
|||
} |
@ -0,0 +1,26 @@ |
|||
package model |
|||
|
|||
import "shop-api/global" |
|||
|
|||
type OrderGoods struct { |
|||
global.MG_MODEL |
|||
OrderID string `gorm:"size:50" json:"orderID"` // 订单id
|
|||
SpuNo string `gorm:"type:varchar(60);" json:"spu_no"` // 商品编号
|
|||
SkuNo string `gorm:"type:varchar(60);" json:"sku_no"` // 商品规格编号
|
|||
Specs string `gorm:"type:text;" json:"specs"` // 规格
|
|||
TbGoodsBase |
|||
} |
|||
|
|||
type OrderGoodsDetail struct { |
|||
OrderGoods |
|||
Attributes []TbAttributeWithValues `gorm:"-" json:"attributes"` // 规格详情
|
|||
GoodsSpecs []TbOrderGoodsSpecsDetail `gorm:"-" json:"goods_specs"` // 规格
|
|||
} |
|||
|
|||
func (OrderGoods) TableName() string { |
|||
return "order_goods" |
|||
} |
|||
|
|||
func (OrderGoodsDetail) TableName() string { |
|||
return "order_goods" |
|||
} |
@ -0,0 +1,28 @@ |
|||
package model |
|||
|
|||
import "shop-api/global" |
|||
|
|||
type OrderGoodsSpecs struct { |
|||
global.MG_MODEL |
|||
TbGoodsSpecsBase |
|||
OrderID string `gorm:"size:50" json:"orderID"` // 订单id
|
|||
OrderGoodsId uint `json:"orderGoodsId"` //
|
|||
} |
|||
|
|||
type TbOrderGoodsSpecsDetail struct { |
|||
GoodsId uint `json:"goods_id"` |
|||
Specs string `json:"specs"` // 规格
|
|||
SkuNo string `json:"sku_no"` // 商品编码
|
|||
Price float64 `json:"price"` // 价格
|
|||
Image string `json:"image"` // 规格图片url
|
|||
GoodsNo string `json:"goods_no"` // 商品编号
|
|||
Code string `json:"code"` // attribute定位标识
|
|||
OrderGoodsId uint `json:"orderGoodsId"` //
|
|||
} |
|||
|
|||
func (OrderGoodsSpecs) TableName() string { |
|||
return "order_goods_specs" |
|||
} |
|||
func (TbOrderGoodsSpecsDetail) TableName() string { |
|||
return "order_goods_specs" |
|||
} |
@ -0,0 +1,42 @@ |
|||
package model |
|||
|
|||
import ( |
|||
"shop-api/global" |
|||
"time" |
|||
) |
|||
|
|||
type OrderPostSale struct { // 订单售后记录
|
|||
global.MG_MODEL |
|||
Type int `gorm:"type:tinyint(1)" json:"type"` // 售后类型 1:仅退款
|
|||
OrderID string `gorm:"size:50" json:"orderId"` // 订单号
|
|||
StoreNo string `gorm:"size:60" json:"store_no"` // 店铺编号
|
|||
UserID string `gorm:"size:50" json:"userId"` // 用户id
|
|||
Amount float64 `gorm:"type:decimal(10,2)" json:"amount"` // 退款金额
|
|||
Reason string `gorm:"size:1" json:"reason"` // 退款原因
|
|||
Images string `gorm:"size:255" json:"images"` // 图片
|
|||
Videos string `gorm:"size:255" json:"videos"` // 视频
|
|||
Status int `gorm:"type:tinyint(1)" json:"status"` // 处理状态 1:已提交 2:已处理 3:已拒绝 4:已撤回
|
|||
Remark string `gorm:"size:255" json:"remark"` // 原因
|
|||
ExamineTime *time.Time `gorm:"" json:"examine_time"` // 审核时间
|
|||
RefundStatus int `gorm:"type:tinyint(1)" json:"refundStatus"` // 退款状态 1:退款中 2:退款成功 3:退款失败
|
|||
RefundTime *time.Time `gorm:"" json:"refund_time"` // 退款时间
|
|||
} |
|||
|
|||
type PostSale struct { |
|||
ID uint `json:"id"` // id
|
|||
OrderID string `json:"orderId"` // 订单id
|
|||
Status int `json:"status"` // 处理状态 1:已提交 2:已处理 3:已拒绝 4:已撤回
|
|||
Remark string `json:"remark"` // 审核原因
|
|||
ExamineTime *time.Time `json:"examine_time"` // 审核时间
|
|||
RefundStatus int `json:"refundStatus"` // 退款状态 1:退款中 2:退款成功 3:退款失败
|
|||
RefundTime *time.Time `json:"refund_time"` // 退款时间
|
|||
CreatedAt *time.Time `json:"created_at"` // 创建时间
|
|||
} |
|||
|
|||
func (OrderPostSale) TableName() string { |
|||
return "order_post_sale" |
|||
} |
|||
|
|||
func (PostSale) TableName() string { |
|||
return "order_post_sale" |
|||
} |
@ -0,0 +1,21 @@ |
|||
package model |
|||
|
|||
type PaypalWebhookDetail struct { |
|||
ID string `json:"id"` |
|||
EventVersion string `json:"event_version"` |
|||
CreateTime string `json:"create_time"` |
|||
ResourceType string `json:"resource_type"` //checkout-order-订单付款 capture-付款确认 payouts-提现 refund-退款
|
|||
EventType string `json:"event_type"` |
|||
Summary string `json:"summary"` |
|||
Resource struct { |
|||
BatchHeader struct { |
|||
BatchStatus string `json:"batch_status"` //SUCCESS-成功 DENIED-拒绝 FAILED-失败
|
|||
SenderBatchHeader struct { |
|||
SenderBatchID string `json:"sender_batch_id"` |
|||
} `json:"sender_batch_header"` |
|||
} `json:"batch_header"` |
|||
CreateTime string `json:"create_time"` |
|||
ID string `json:"id"` |
|||
Status string `json:"status"` //COMPLETED-完成 APPROVED-用户已付款? PENDING-等待
|
|||
} `json:"resource"` |
|||
} |
@ -0,0 +1,67 @@ |
|||
// 自动生成模板Provider
|
|||
package model |
|||
|
|||
import "shop-api/global" |
|||
|
|||
// 如果含有time.Time 请自行import time包
|
|||
type Provider struct { |
|||
global.MG_MODEL |
|||
Owner string `gorm:"size:50;comment:用户所属" json:"owner" ` // 用户所属
|
|||
Name string `gorm:"size:50;comment:提供者名称" json:"name" ` // 提供者名称
|
|||
Category string `gorm:"size:50;comment:提供者分类" json:"category" ` // 提供者分类 1-社交 2-支付 3-媒体 4-其他
|
|||
Code string `gorm:"size:50;comment:提供者代码" json:"code" ` // 提供者代码 google facebook twitter tiktok
|
|||
Logo string `gorm:"size:50;comment:提供者logo" json:"logo" ` // 提供者logo
|
|||
ClientID string `gorm:"size:50;comment:客户端ID" json:"client_id" ` // 客户端ID
|
|||
ClientSecret string `gorm:"size:50;comment:客户端密钥" json:"client_secret" ` // 客户端密钥
|
|||
Scope string `gorm:"size:50;comment:作用域" json:"scope" ` // 作用域
|
|||
TokenType string `gorm:"size:50;comment:令牌类型" json:"token_type" ` // 令牌类型 Bearer urlencoded
|
|||
RedirectURI string `gorm:"size:50;comment:重定向URI" json:"redirect_uri" ` // 重定向URI
|
|||
RedirectURIByAnd string `gorm:"size:50;comment:重定向URI" json:"redirect_uri_by_and" ` // 重定向URI(安卓)
|
|||
RedirectURIByIos string `gorm:"size:50;comment:重定向URI" json:"redirect_uri_by_ios" ` // 重定向URI(IOS)
|
|||
AuthURI string `gorm:"size:50;comment:认证URI" json:"auth_uri" ` // 认证URI
|
|||
TokenURI string `gorm:"size:50;comment:令牌URI" json:"token_uri" ` // 令牌URI
|
|||
TokenCheckURI string `gorm:"size:50;comment:令牌校验URI" json:"token_check_uri" ` // 令牌校验URI
|
|||
UserInfoURI string `gorm:"size:50;comment:用户信息URI" json:"user_info_uri" ` // 用户信息URI
|
|||
} |
|||
|
|||
type ClentProvider struct { |
|||
Web []Provider `json:"web"` |
|||
Android []Provider `json:"android"` |
|||
Ios []Provider `json:"ios"` |
|||
} |
|||
|
|||
type ProviderSimple struct { |
|||
Name string `gorm:"size:50;comment:提供者名称" json:"name" ` // 提供者名称
|
|||
Code string `gorm:"size:50;comment:提供者代码" json:"code" ` // 提供者代码 google facebook twitter tiktok
|
|||
Logo string `gorm:"size:50;comment:提供者logo" json:"logo" ` // 提供者logo
|
|||
} |
|||
|
|||
type ProviderUser struct { |
|||
UserID string `gorm:"size:50;comment:用户ID" json:"user_id" ` // 用户ID
|
|||
NickName string `gorm:"size:50;comment:昵称" json:"nick_name" ` // 昵称
|
|||
Avatar string `gorm:"size:50;comment:头像" json:"avatar" ` // 头像
|
|||
Email string `gorm:"size:50;comment:邮箱" json:"email" ` // 邮箱
|
|||
Phone string `gorm:"size:50;comment:手机号" json:"phone" ` // 手机号
|
|||
} |
|||
|
|||
type FacebookUserInfo struct { |
|||
UnionId string `json:"id"` |
|||
UserName string `json:"name"` |
|||
Email string `json:"email"` |
|||
Picture struct { |
|||
Data struct { |
|||
URL string `json:"url"` |
|||
} `json:"data"` |
|||
} `json:"picture"` |
|||
} |
|||
|
|||
type TiktokUser struct { |
|||
OpenID string `json:"open_id"` |
|||
UnionID string `json:"union_id"` |
|||
AvatarURL string `json:"avatar_url"` |
|||
DisplayName string `json:"display_name"` |
|||
} |
|||
|
|||
func (Provider) TableName() string { |
|||
return "provider" |
|||
} |
@ -0,0 +1,29 @@ |
|||
package request |
|||
|
|||
type AddAccount struct { |
|||
UserID string `gorm:"size:50;index" json:"userID"` //用户id
|
|||
AccountName string `gorm:"size:50" json:"accountName"` //户名
|
|||
IDCard string `gorm:"size:30" json:"idCard"` //身份证
|
|||
Phone string `gorm:"size:20" json:"phone"` //手机号
|
|||
PayPalName string `gorm:"size:50" json:"payPalName"` //paypal账号
|
|||
Code string `json:"code"` |
|||
Platform string `gorm:"size:50" json:"platform"` //平台 saller(买家端) / customer(客户端) / influencer(网红端)
|
|||
} |
|||
|
|||
type DeleteAccount struct { |
|||
ID uint `json:"id" form:"id"` //主键
|
|||
Phone string `json:"phone"` //手机号
|
|||
Code string `json:"code"` //验证码
|
|||
} |
|||
|
|||
type SearchCommission struct { |
|||
Receipt int `json:"receipt" form:"receipt"` //是否已到账 1-是 2-否
|
|||
PageInfo |
|||
} |
|||
|
|||
type SearchWithdrawal struct { |
|||
Status int `json:"status"` //类型 1-支出 2-收入
|
|||
PageInfo |
|||
} |
|||
|
|||
|
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue