Compare commits
49 Commits
7f9822e81f
...
92dfbc48b6
Author | SHA1 | Date | |
---|---|---|---|
|
92dfbc48b6 | ||
|
27a21b9b86 | ||
d2b0bc0d63 | |||
|
8a18f75b2b | ||
|
4b3dd79963 | ||
|
ed49c8a1cc | ||
|
0e395f6730 | ||
|
7b7733e244 | ||
|
7ccdfe6cb3 | ||
|
fda56a4690 | ||
|
6f76dd871e | ||
|
42ccd8ec4a | ||
|
217ae99df0 | ||
|
b74d07ece4 | ||
|
a1d185a4bd | ||
|
0307657120 | ||
|
2e4d0485ac | ||
|
306a8db668 | ||
|
90e03feeda | ||
|
6ba25481df | ||
|
8011895c88 | ||
|
b7b43438b5 | ||
|
886d733808 | ||
11096c8613 | |||
|
323d4ef494 | ||
|
edeadc1075 | ||
|
11ba0c6687 | ||
|
a579700de6 | ||
|
7f60aac217 | ||
|
81806f4bed | ||
|
a7d63bd629 | ||
|
8f755b2c89 | ||
0a40e582a7 | |||
ed11846ac2 | |||
|
75d55a1636 | ||
cf4df74b8e | |||
|
14fb2a69b4 | ||
|
90f845c2fa | ||
|
9426d56f21 | ||
|
db30a0ed31 | ||
33bdbb4a94 | |||
2e7e41e8fc | |||
86130f0b1b | |||
65fbb16b5f | |||
|
8de89af014 | ||
|
5b8bd16642 | ||
|
4f70291bf3 | ||
|
b231112030 | ||
|
ed1125c6dd |
11
.drone.yml
11
.drone.yml
@ -20,6 +20,11 @@ steps:
|
||||
- name: build
|
||||
image: testhub.szjixun.cn:9043/public/golang:1.20-alpine
|
||||
pull: if-not-exists
|
||||
network:
|
||||
mode: bridge
|
||||
options:
|
||||
com.docker.network.bridge.host_binding_ipv4: "172.16.100.22"
|
||||
com.docker.network.bridge.name: "dnmp_default"
|
||||
environment:
|
||||
GOPROXY: "https://goproxy.cn,direct"
|
||||
GOPATH: /go
|
||||
@ -29,7 +34,7 @@ steps:
|
||||
path: /go/pkg
|
||||
commands:
|
||||
- cp DockerfileTest Dockerfile
|
||||
- CGO_ENABLED=0 go build -ldflags "-s -w" -o oa-meeting-server ./cmd
|
||||
- CGO_ENABLED=0 go build -ldflags "-s -w" -o chain-dci-server ./cmd
|
||||
- name: publish
|
||||
image: testhub.szjixun.cn:9043/public/plugins/docker
|
||||
pull: if-not-exists
|
||||
@ -55,7 +60,7 @@ steps:
|
||||
settings:
|
||||
debug: true
|
||||
build_number: ${DRONE_BUILD_NUMBER}
|
||||
kuboard_accessKey: i685rr3fr6dy.4zt5jbh6t4kxyxj8zt6dih6cdc4zbjwz
|
||||
kuboard_accessKey: p7by8secijpm.bipdt88e55c8me4szah2njpr5kie2yed
|
||||
namespace: "chain-server"
|
||||
deployment_name: "chain-dci-server"
|
||||
dashboard: kuboard
|
||||
@ -84,7 +89,7 @@ steps:
|
||||
status: [ failure, success ]
|
||||
branch: dev
|
||||
network:
|
||||
subnet: dnmp_default
|
||||
subnet: 172.18.0.0/16
|
||||
trigger:
|
||||
branch:
|
||||
- dev
|
||||
|
6
.idea/golinter.xml
Normal file
6
.idea/golinter.xml
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="GoLinterSettings">
|
||||
<option name="checkGoLinterExe" value="false" />
|
||||
</component>
|
||||
</project>
|
@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="SwUserDefinedSpecifications">
|
||||
<option name="specTypeByUrl">
|
||||
<map />
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
22
DockerfileProd
Normal file
22
DockerfileProd
Normal file
@ -0,0 +1,22 @@
|
||||
FROM testhub.szjixun.cn:9043/public/golang:1.20-alpine AS builder
|
||||
|
||||
LABEL stage=gobuilder
|
||||
ENV CGO_ENABLED 0
|
||||
ENV GOPROXY https://goproxy.cn,direct
|
||||
WORKDIR /build
|
||||
COPY chain-dci-server /app/chain-dci-server
|
||||
|
||||
#FROM 172.16.100.99:9006/alpine
|
||||
#RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
|
||||
#RUN apk update --no-cache
|
||||
#RUN apk add --no-cache ca-certificates
|
||||
#RUN apk add --no-cache tzdata
|
||||
FROM testhub.szjixun.cn:9043/public/self-alpine
|
||||
COPY ./conf /app/conf
|
||||
|
||||
ENV TZ Asia/Shanghai
|
||||
ENV MODE_ENV prod
|
||||
WORKDIR /app
|
||||
COPY --from=builder /app/chain-dci-server .
|
||||
EXPOSE 20117
|
||||
CMD ["/app/chain-dci-server"]
|
@ -18,5 +18,5 @@ ENV TZ Asia/Shanghai
|
||||
ENV MODE_ENV k8stest
|
||||
WORKDIR /app
|
||||
COPY --from=builder /app/chain-dci-server .
|
||||
EXPOSE 20117
|
||||
EXPOSE 20118
|
||||
CMD ["/app/chain-dci-server"]
|
||||
|
12
README.md
12
README.md
@ -15,3 +15,15 @@ https://cdns.fontree.cn/fonchain-main/test/image/0/chain-dci/file/24bfa6de-cf39-
|
||||
#数字版权登记流程
|
||||
https://cdns.fontree.cn/fonchain-main/test/image/0/chain-dci/file/b2b9ebf8-5e8a-4697-af11-c07f788a6f77.png
|
||||
```
|
||||
|
||||
```text
|
||||
1,不需要的参数就不设置
|
||||
2,文件像素要求是 下限400*400,上限5000*5000
|
||||
```
|
||||
|
||||
|
||||
### protot文件编译指令
|
||||
|
||||
```shell
|
||||
protoc --proto_path=. --proto_path=D:/go_workspace/src --go_out=./pb --govalidators_out=./pb --go-triple_out=./pb ./pb/dci.proto
|
||||
```
|
23
cmd/app.go
23
cmd/app.go
@ -5,26 +5,23 @@ import (
|
||||
"chain-dci/internal/controller"
|
||||
_ "chain-dci/internal/handler"
|
||||
"chain-dci/pkg/app"
|
||||
common "chain-dci/pkg/init"
|
||||
//common "chain-dci/pkg/init"
|
||||
"chain-dci/pkg/tracing"
|
||||
"dubbo.apache.org/dubbo-go/v3/config"
|
||||
_ "dubbo.apache.org/dubbo-go/v3/filter/tps/strategy"
|
||||
_ "dubbo.apache.org/dubbo-go/v3/imports"
|
||||
bccrClient "github.com/antchain-openapi-sdk-go/bccr/client"
|
||||
"github.com/bwmarrin/snowflake"
|
||||
antCloud "github.com/huyi-cn/antcloud-golang-sdk"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
func NewApp(Lg *zap.Logger, JaegerTracer *tracing.JaegerProvider, AntClient *antCloud.Client, BccrClient *bccrClient.Client, SfNode *snowflake.Node) *app.App {
|
||||
func NewApp(Lg *zap.Logger, JaegerTracer *tracing.JaegerProvider, BccrClient *bccrClient.Client, SfNode *snowflake.Node) *app.App {
|
||||
return &app.App{
|
||||
Lg: Lg,
|
||||
//RedisClient: RedisClient,
|
||||
Lg: Lg,
|
||||
JaegerTracer: JaegerTracer,
|
||||
AntClient: AntClient,
|
||||
BccrClient: BccrClient,
|
||||
SfNode: SfNode,
|
||||
//RtcClient: RtcClient,
|
||||
//DciDB: DciDB,
|
||||
}
|
||||
}
|
||||
|
||||
@ -35,9 +32,19 @@ func main() {
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
//l, err := net.Listen("tcp", ":8883")
|
||||
//if err != nil {
|
||||
// fmt.Printf("failed to listen: %v", err)
|
||||
// return
|
||||
//}
|
||||
|
||||
//s := grpc.NewServer() // 创建gRPC服务器
|
||||
//dci.RegisterDciServer(s, &controller.DciProvider{}) // 在gRPC服务端注册服务
|
||||
// 启动服务
|
||||
//err = s.Serve(l)
|
||||
//注册服务
|
||||
config.SetProviderService(&controller.DciProvider{})
|
||||
common.Init()
|
||||
if err = config.Load(); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
@ -5,7 +5,6 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"chain-dci/pkg/ant"
|
||||
"chain-dci/pkg/app"
|
||||
"chain-dci/pkg/bccr"
|
||||
"chain-dci/pkg/logger"
|
||||
@ -15,6 +14,6 @@ import (
|
||||
)
|
||||
|
||||
func InitApp() (*app.App, error) {
|
||||
wire.Build(logger.Provider, tracing.Provider, ant.Provider, bccr.Provider, snowf.Provider, NewApp)
|
||||
wire.Build(logger.Provider, tracing.Provider, bccr.Provider, snowf.Provider, NewApp)
|
||||
return &app.App{}, nil
|
||||
}
|
||||
|
@ -7,7 +7,6 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"chain-dci/pkg/ant"
|
||||
"chain-dci/pkg/app"
|
||||
"chain-dci/pkg/bccr"
|
||||
"chain-dci/pkg/logger"
|
||||
@ -16,6 +15,7 @@ import (
|
||||
)
|
||||
|
||||
import (
|
||||
_ "chain-dci/internal/handler"
|
||||
_ "dubbo.apache.org/dubbo-go/v3/filter/tps/strategy"
|
||||
_ "dubbo.apache.org/dubbo-go/v3/imports"
|
||||
)
|
||||
@ -25,9 +25,8 @@ import (
|
||||
func InitApp() (*app.App, error) {
|
||||
zapLogger := logger.ZapInit()
|
||||
jaegerProvider := tracing.NewTracing()
|
||||
client := ant.NewAntClient()
|
||||
clientClient := bccr.NewBccrClient()
|
||||
client := bccr.NewBccrClient()
|
||||
node := snowf.NewSf()
|
||||
appApp := NewApp(zapLogger, jaegerProvider, client, clientClient, node)
|
||||
appApp := NewApp(zapLogger, jaegerProvider, client, node)
|
||||
return appApp, nil
|
||||
}
|
||||
|
@ -1,12 +1,12 @@
|
||||
system:
|
||||
mode: dev #正式 prod #测试 test #开发 dev
|
||||
config_source: config
|
||||
#oaMeeting:
|
||||
# host: 127.0.0.1
|
||||
# port: 3306
|
||||
# user: dyb
|
||||
# password: rootdyb
|
||||
# db_name: "oa-meeting"
|
||||
chainDci:
|
||||
host: 172.16.100.99
|
||||
port: 9007
|
||||
user: artuser
|
||||
password: C250PflXIWv2SQm8
|
||||
db_name: "chain_dci"
|
||||
antCloud:
|
||||
access_key: "ACsK4CQqzj5rGSKf"
|
||||
access_key_secret: "SJmH5eATWY26tJrVg8QyHaBGbLNCbj7y"
|
||||
@ -14,7 +14,7 @@ antCloud:
|
||||
Bccr:
|
||||
access_key_id: "ACsK4CQqzj5rGSKf"
|
||||
access_key_secret: "SJmH5eATWY26tJrVg8QyHaBGbLNCbj7y"
|
||||
end_point: "https://openapi-sit.antchain.antgroup.com/gateway.do"
|
||||
end_point: "openapi-sit.antchain.antgroup.com"
|
||||
#aliYunRtc:
|
||||
# appid: "aeztom27"
|
||||
# app_key: "76c62466cbd77d7a3606660a15861d1e"
|
||||
@ -30,7 +30,7 @@ zapLog:
|
||||
max_backups: 30
|
||||
snowflake:
|
||||
node_num: 4
|
||||
start_time: "2023-05-31"
|
||||
start_time: "2023-11-27"
|
||||
jaeger:
|
||||
addr: "127.0.0.1:6831"
|
||||
open: false
|
||||
|
@ -8,7 +8,7 @@ dubbo:
|
||||
demoZK:
|
||||
protocol: zookeeper
|
||||
timeout: 10s
|
||||
address: 127.0.0.1:2181
|
||||
address: 172.16.100.93:2181
|
||||
protocols:
|
||||
triple: #triple
|
||||
name: tri
|
||||
@ -16,7 +16,7 @@ dubbo:
|
||||
provider:
|
||||
filter: tracing
|
||||
services:
|
||||
MeetingProvider:
|
||||
DciProvider:
|
||||
interface: com.fontree.microservices.chain.dci
|
||||
retries: 0
|
||||
filter: tps,tracing
|
||||
|
@ -1,34 +1,30 @@
|
||||
system:
|
||||
mode: dev #正式 prod #测试 test #开发 dev
|
||||
config_source: configmap
|
||||
#oaMeeting:
|
||||
# host: ${mysql.host|localhost}
|
||||
# port: ${mysql.port|3306}
|
||||
# user: ${mysql.user}
|
||||
# password: ${mysql.password}
|
||||
# db_name: ${oa-meeting.mysql.db_name}
|
||||
#aliYunRtc:
|
||||
# appid: ${aliyun-rtc.appid}
|
||||
# app_key: ${aliyun-rtc.app_key}
|
||||
# config_source: configmap
|
||||
chainDci:
|
||||
host: 172.16.100.99
|
||||
port: 9007
|
||||
user: artuser
|
||||
password: C250PflXIWv2SQm8
|
||||
db_name: "chain_dci"
|
||||
Bccr:
|
||||
access_key_id: "ACsK4CQqzj5rGSKf"
|
||||
access_key_secret: "SJmH5eATWY26tJrVg8QyHaBGbLNCbj7y"
|
||||
end_point: "openapi.antchain.antgroup.com" # 正式的 endpoint
|
||||
# end_point: "openapi-sit.antchain.antgroup.com" # 测试式的 endpoint
|
||||
#redis:
|
||||
# db: ${oa-meeting.redis.db}
|
||||
# addr: ${redis.addr}
|
||||
# password: ${redis.password}
|
||||
zapLog:
|
||||
level: "info"
|
||||
filename: "logs/oa-meeting.log"
|
||||
max_size: ${zap.max_size}
|
||||
max_age: ${zap.max_age}
|
||||
max_backups: ${zap.max_backups}
|
||||
filename: "logs/chain-dci.log"
|
||||
max_size: 5
|
||||
max_age: 30
|
||||
max_backups: 30
|
||||
snowflake:
|
||||
node_num: ${oa-meeting.snowflake.node_num}
|
||||
start_time: "2023-05-31"
|
||||
node_num: 4
|
||||
start_time: "2023-11-27"
|
||||
jaeger:
|
||||
addr: ${jaeger.host}
|
||||
open: ${oa-meeting.jaeger_open}
|
||||
#rabbitmq:
|
||||
# user: ${rabbitmq.user}
|
||||
# password: ${rabbitmq.password}
|
||||
# host: ${rabbitmq.host}
|
||||
# port: ${rabbitmq.port}
|
||||
# vhost: ${oa-meeting.rabbitmq.vhost}
|
||||
addr: "127.0.0.1:6831"
|
||||
open: false
|
||||
|
@ -12,11 +12,11 @@ dubbo:
|
||||
protocols:
|
||||
triple: #triple
|
||||
name: tri
|
||||
port: 20117
|
||||
port: 20201
|
||||
provider:
|
||||
filter: tracing
|
||||
services:
|
||||
MeetingProvider:
|
||||
DciProvider:
|
||||
interface: com.fontree.microservices.chain.dci
|
||||
retries: 0
|
||||
filter: tps,tracing
|
||||
|
29
conf/prod/config.yaml
Normal file
29
conf/prod/config.yaml
Normal file
@ -0,0 +1,29 @@
|
||||
system:
|
||||
mode: prod #正式 prod #测试 test #开发 dev
|
||||
# config_source: configmap
|
||||
Bccr:
|
||||
access_key_id: "ACsK4CQqzj5rGSKf"
|
||||
access_key_secret: "SJmH5eATWY26tJrVg8QyHaBGbLNCbj7y"
|
||||
end_point: "openapi.antchain.antgroup.com"
|
||||
#redis:
|
||||
# db: ${oa-meeting.redis.db}
|
||||
# addr: ${redis.addr}
|
||||
# password: ${redis.password}
|
||||
zapLog:
|
||||
level: "info"
|
||||
filename: "logs/chain-dci.log"
|
||||
max_size: 5
|
||||
max_age: 30
|
||||
max_backups: 30
|
||||
snowflake:
|
||||
node_num: 4
|
||||
start_time: "2023-11-27"
|
||||
jaeger:
|
||||
addr: "127.0.0.1:6831"
|
||||
open: false
|
||||
#rabbitmq:
|
||||
# user: ${rabbitmq.user}
|
||||
# password: ${rabbitmq.password}
|
||||
# host: ${rabbitmq.host}
|
||||
# port: ${rabbitmq.port}
|
||||
# vhost: ${oa-meeting.rabbitmq.vhost}
|
68
conf/prod/dubbogo.yaml
Normal file
68
conf/prod/dubbogo.yaml
Normal file
@ -0,0 +1,68 @@
|
||||
dubbo:
|
||||
metrics:
|
||||
enable: true # default is true
|
||||
path: /metrics # default is /metrics
|
||||
port: 9092 # default is 9090
|
||||
namespace: dubboDci # default is dubbo 作为数据上报 metrics 的前缀
|
||||
registries:
|
||||
demoZK:
|
||||
protocol: zookeeper
|
||||
timeout: 10s
|
||||
address: 172.16.100.93:2181
|
||||
protocols:
|
||||
triple: #triple
|
||||
name: tri
|
||||
port: 20201
|
||||
provider:
|
||||
filter: tracing
|
||||
services:
|
||||
DciProvider:
|
||||
interface: com.fontree.microservices.chain.dci
|
||||
retries: 0
|
||||
filter: tps,tracing
|
||||
tps.limiter: method-service
|
||||
tps.limit.strategy: fixedWindow
|
||||
tps.limit.rejected.handler: DefaultValueHandler
|
||||
tps.limit.interval: 1000 # 间隔时间
|
||||
tps.limit.rate: 30 # 间隔时间内次数
|
||||
warmup: 100 #预热时间
|
||||
logger:
|
||||
zap-config:
|
||||
level: info # 日志级别
|
||||
development: false
|
||||
disableCaller: false
|
||||
disableStacktrace: false
|
||||
encoding: "json"
|
||||
# zap encoder 配置
|
||||
encoderConfig:
|
||||
messageKey: "message"
|
||||
levelKey: "level"
|
||||
timeKey: "time"
|
||||
nameKey: "logger"
|
||||
callerKey: "caller"
|
||||
stacktraceKey: "stacktrace"
|
||||
lineEnding: ""
|
||||
levelEncoder: "capitalColor"
|
||||
timeEncoder: "iso8601"
|
||||
durationEncoder: "seconds"
|
||||
callerEncoder: "short"
|
||||
nameEncoder: ""
|
||||
EncodeTime: zapcore.TimeEncoderOfLayout("2006-01-02 15:04:05.000"),
|
||||
EncodeDuration: zapcore.SecondsDurationEncoder,
|
||||
outputPaths:
|
||||
- "stderr"
|
||||
errorOutputPaths:
|
||||
- "stderr"
|
||||
lumberjack-config:
|
||||
# 写日志的文件名称
|
||||
filename: "runtime/logs/chain-dci.log"
|
||||
# 每个日志文件长度的最大大小,单位是 MiB。默认 100MiB
|
||||
maxSize: 5
|
||||
# 日志保留的最大天数(只保留最近多少天的日志)
|
||||
maxAge: 30
|
||||
# 只保留最近多少个日志文件,用于控制程序总日志的大小
|
||||
maxBackups: 30
|
||||
# 是否使用本地时间,默认使用 UTC 时间
|
||||
localTime: true
|
||||
# 是否压缩日志文件,压缩方法 gzip
|
||||
compress: false
|
@ -1,22 +1,22 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: oa-meeting-server
|
||||
name: chain-dci-server
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: oa-meeting-server
|
||||
app: chain-dci-server
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: oa-meeting-server
|
||||
app: chain-dci-server
|
||||
spec:
|
||||
containers:
|
||||
- name: oa-meeting-server
|
||||
image: testhub.szjixun.cn:9043/k8stest/oa-meeting-server:latest
|
||||
- name: chain-dci-server
|
||||
image: testhub.szjixun.cn:9043/k8stest/chain-dci-server:latest
|
||||
ports:
|
||||
- containerPort: 20006
|
||||
- containerPort: 20201
|
||||
volumeMounts:
|
||||
- name: logs
|
||||
mountPath: /app/logs
|
||||
@ -35,24 +35,24 @@ spec:
|
||||
- name: logs
|
||||
nfs:
|
||||
server: node0
|
||||
path: /mnt/storage/erp/oa-meeting-server/logs
|
||||
path: /mnt/storage/erp/chain-dci-server/logs
|
||||
- name: runtime
|
||||
nfs:
|
||||
server: node0
|
||||
path: /mnt/storage/erp/oa-meeting-server/runtime
|
||||
path: /mnt/storage/erp/chain-dci-server/runtime
|
||||
---
|
||||
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: oa-meeting-server
|
||||
name: chain-dci-server
|
||||
spec:
|
||||
type: NodePort
|
||||
selector:
|
||||
app: oa-meeting-server
|
||||
app: chain-dci-server
|
||||
ports:
|
||||
- name: http
|
||||
protocol: TCP
|
||||
nodePort: 20117
|
||||
targetPort: 20117
|
||||
port: 20117
|
||||
nodePort: 20201
|
||||
targetPort: 20201
|
||||
port: 20201
|
17
go.mod
17
go.mod
@ -3,18 +3,18 @@ module chain-dci
|
||||
go 1.20
|
||||
|
||||
require (
|
||||
dubbo.apache.org/dubbo-go/v3 v3.0.2
|
||||
dubbo.apache.org/dubbo-go/v3 v3.0.5
|
||||
github.com/alibabacloud-go/tea v1.2.1
|
||||
github.com/antchain-openapi-sdk-go/bccr v1.17.65
|
||||
github.com/bwmarrin/snowflake v0.3.0
|
||||
github.com/dubbogo/gost v1.13.2
|
||||
github.com/dubbogo/grpc-go v1.42.10
|
||||
github.com/dubbogo/triple v1.2.2-rc3
|
||||
github.com/dubbogo/triple v1.2.2-rc2
|
||||
github.com/gin-gonic/gin v1.9.1
|
||||
github.com/go-redis/redis v6.15.9+incompatible
|
||||
github.com/golang/protobuf v1.5.3
|
||||
github.com/google/wire v0.5.0
|
||||
github.com/huyi-cn/antcloud-golang-sdk v1.0.2
|
||||
github.com/jinzhu/copier v0.3.5
|
||||
github.com/mwitkow/go-proto-validators v0.3.2
|
||||
github.com/natefinch/lumberjack v2.0.0+incompatible
|
||||
github.com/opentracing/opentracing-go v1.2.0
|
||||
github.com/spf13/viper v1.17.0
|
||||
@ -26,6 +26,8 @@ require (
|
||||
gorm.io/gorm v1.25.5
|
||||
)
|
||||
|
||||
require github.com/go-errors/errors v1.0.1 // indirect
|
||||
|
||||
require (
|
||||
cloud.google.com/go/compute v1.23.0 // indirect
|
||||
cloud.google.com/go/compute/metadata v0.2.3 // indirect
|
||||
@ -58,6 +60,7 @@ require (
|
||||
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
|
||||
github.com/dlclark/regexp2 v1.7.0 // indirect
|
||||
github.com/dubbogo/go-zookeeper v1.0.4-0.20211212162352-f9d2183d89d5 // indirect
|
||||
github.com/dubbogo/gost v1.13.2 // indirect
|
||||
github.com/dustin/go-humanize v1.0.1 // indirect
|
||||
github.com/emicklei/go-restful/v3 v3.10.1 // indirect
|
||||
github.com/envoyproxy/go-control-plane v0.11.1 // indirect
|
||||
@ -66,7 +69,6 @@ require (
|
||||
github.com/gabriel-vasile/mimetype v1.4.2 // indirect
|
||||
github.com/gin-contrib/sse v0.1.0 // indirect
|
||||
github.com/go-co-op/gocron v1.9.0 // indirect
|
||||
github.com/go-errors/errors v1.0.1 // indirect
|
||||
github.com/go-kit/log v0.2.0 // indirect
|
||||
github.com/go-logfmt/logfmt v0.5.1 // indirect
|
||||
github.com/go-logr/logr v1.2.3 // indirect
|
||||
@ -89,7 +91,6 @@ require (
|
||||
github.com/hashicorp/go-multierror v1.1.1 // indirect
|
||||
github.com/hashicorp/hcl v1.0.0 // indirect
|
||||
github.com/hashicorp/vault/sdk v0.7.0 // indirect
|
||||
github.com/jinzhu/copier v0.3.5 // indirect
|
||||
github.com/jinzhu/inflection v1.0.0 // indirect
|
||||
github.com/jinzhu/now v1.1.5 // indirect
|
||||
github.com/jmespath/go-jmespath v0.4.0 // indirect
|
||||
@ -111,6 +112,7 @@ require (
|
||||
github.com/modern-go/reflect2 v1.0.2 // indirect
|
||||
github.com/mschoch/smat v0.2.0 // indirect
|
||||
github.com/nacos-group/nacos-sdk-go v1.1.4 // indirect
|
||||
github.com/oliveagle/jsonpath v0.0.0-20180606110733-2e52cf6e6852 // indirect
|
||||
github.com/pelletier/go-toml v1.9.3 // indirect
|
||||
github.com/pelletier/go-toml/v2 v2.1.0 // indirect
|
||||
github.com/pierrec/lz4 v2.5.2+incompatible // indirect
|
||||
@ -125,7 +127,7 @@ require (
|
||||
github.com/robfig/cron/v3 v3.0.1 // indirect
|
||||
github.com/sagikazarmark/locafero v0.3.0 // indirect
|
||||
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
|
||||
github.com/satori/go.uuid v1.2.1-0.20181028125025-b2ce2384e17b // indirect
|
||||
github.com/satori/go.uuid v1.2.0 // indirect
|
||||
github.com/shirou/gopsutil/v3 v3.22.2 // indirect
|
||||
github.com/sourcegraph/conc v0.3.0 // indirect
|
||||
github.com/spaolacci/murmur3 v1.1.0 // indirect
|
||||
@ -139,7 +141,6 @@ require (
|
||||
github.com/uber/jaeger-lib v2.4.1+incompatible // indirect
|
||||
github.com/ugorji/go/codec v1.2.11 // indirect
|
||||
github.com/yusufpapurcu/wmi v1.2.2 // indirect
|
||||
github.com/zouyx/agollo/v3 v3.4.5 // indirect
|
||||
go.etcd.io/etcd/api/v3 v3.5.9 // indirect
|
||||
go.etcd.io/etcd/client/pkg/v3 v3.5.9 // indirect
|
||||
go.etcd.io/etcd/client/v3 v3.5.9 // indirect
|
||||
|
68
go.sum
68
go.sum
@ -43,8 +43,8 @@ cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3f
|
||||
contrib.go.opencensus.io/exporter/prometheus v0.4.1 h1:oObVeKo2NxpdF/fIfrPsNj6K0Prg0R0mHM+uANlYMiM=
|
||||
contrib.go.opencensus.io/exporter/prometheus v0.4.1/go.mod h1:t9wvfitlUjGXG2IXAZsuFq26mDGid/JwCEXp+gTG/9U=
|
||||
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
|
||||
dubbo.apache.org/dubbo-go/v3 v3.0.2 h1:+WuMFN6RSjXHT41QS1Xi5tFfaPuczIVoeQuKq7pISYI=
|
||||
dubbo.apache.org/dubbo-go/v3 v3.0.2/go.mod h1:bODgByAf72kzG/5YIfZIODXx81pY3gaAdIQ8B4mN/Yk=
|
||||
dubbo.apache.org/dubbo-go/v3 v3.0.5 h1:14GKXcCJ4/Z5l3KQiQJ7xDoUNlZs0uo5OMi41ykNn+o=
|
||||
dubbo.apache.org/dubbo-go/v3 v3.0.5/go.mod h1:87jr5U/NZGMkzGLsmbwXTxVh8h2MnaGOjHj/aHwf0ZM=
|
||||
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=
|
||||
@ -53,7 +53,6 @@ github.com/HdrHistogram/hdrhistogram-go v1.1.2 h1:5IcZpTvzydCQeHzK4Ef/D5rrSqwxob
|
||||
github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo=
|
||||
github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0=
|
||||
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
|
||||
github.com/RoaringBitmap/roaring v1.1.0/go.mod h1:icnadbWcNyfEHlYdr+tDlOTih1Bf/h+rzPpv4sbomAA=
|
||||
github.com/RoaringBitmap/roaring v1.2.3 h1:yqreLINqIrX22ErkKI0vY47/ivtJr6n+kMhVOVmhWBY=
|
||||
github.com/RoaringBitmap/roaring v1.2.3/go.mod h1:plvDsJQpxOC5bw8LRteu/MLWHsHez/3y6cubLI4/1yE=
|
||||
github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo=
|
||||
@ -97,12 +96,13 @@ github.com/antchain-openapi-sdk-go/antchain-util v0.0.7/go.mod h1:pi99Uu97pcsfyU
|
||||
github.com/antchain-openapi-sdk-go/bccr v1.17.65 h1:fHhZKkdc+VXIL1zLiOJUwj+H0CFC0W5yxTWZa/XYUhE=
|
||||
github.com/antchain-openapi-sdk-go/bccr v1.17.65/go.mod h1:DDiROzBPAnhmbVfV1aXyxftMutYeLpdZKAfCZfv/P/I=
|
||||
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
|
||||
github.com/apache/dubbo-getty v1.4.8/go.mod h1:cPJlbcHUTNTpiboMQjMHhE9XBni11LiBiG8FdrDuVzk=
|
||||
github.com/apache/dubbo-getty v1.4.9-0.20221022181821-4dc6252ce98c/go.mod h1:6qmrqBSPGs3B35zwEuGhEYNVsx1nfGT/xzV2yOt2amM=
|
||||
github.com/apache/dubbo-getty v1.4.9 h1:Y8l1EYJqIc7BnmyfYtvG4H4Nmu4v7P1uS31fFQGdJzM=
|
||||
github.com/apache/dubbo-getty v1.4.9/go.mod h1:6qmrqBSPGs3B35zwEuGhEYNVsx1nfGT/xzV2yOt2amM=
|
||||
github.com/apache/dubbo-go-hessian2 v1.9.1/go.mod h1:xQUjE7F8PX49nm80kChFvepA/AvqAZ0oh/UaB6+6pBE=
|
||||
github.com/apache/dubbo-go-hessian2 v1.9.3/go.mod h1:xQUjE7F8PX49nm80kChFvepA/AvqAZ0oh/UaB6+6pBE=
|
||||
github.com/apache/dubbo-go-hessian2 v1.11.0/go.mod h1:7rEw9guWABQa6Aqb8HeZcsYPHsOS7XT1qtJvkmI6c5w=
|
||||
github.com/apache/dubbo-go-hessian2 v1.11.4/go.mod h1:QP9Tc0w/B/mDopjusebo/c7GgEfl6Lz8jeuFg8JA6yw=
|
||||
github.com/apache/dubbo-go-hessian2 v1.11.5/go.mod h1:QP9Tc0w/B/mDopjusebo/c7GgEfl6Lz8jeuFg8JA6yw=
|
||||
github.com/apache/dubbo-go-hessian2 v1.12.2 h1:2/56JRPng2lnLziJF3fqmSgsg28Yt1a5YZ5RX+jHDGs=
|
||||
github.com/apache/dubbo-go-hessian2 v1.12.2/go.mod h1:QP9Tc0w/B/mDopjusebo/c7GgEfl6Lz8jeuFg8JA6yw=
|
||||
github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ=
|
||||
@ -214,8 +214,6 @@ github.com/dubbogo/go-zookeeper v1.0.4-0.20211212162352-f9d2183d89d5 h1:XoR8SSVz
|
||||
github.com/dubbogo/go-zookeeper v1.0.4-0.20211212162352-f9d2183d89d5/go.mod h1:fn6n2CAEer3novYgk9ULLwAjuV8/g4DdC2ENwRb6E+c=
|
||||
github.com/dubbogo/gost v1.9.0/go.mod h1:pPTjVyoJan3aPxBPNUX0ADkXjPibLo+/Ib0/fADXSG8=
|
||||
github.com/dubbogo/gost v1.11.18/go.mod h1:vIcP9rqz2KsXHPjsAwIUtfJIJjppQLQDcYaZTy/61jI=
|
||||
github.com/dubbogo/gost v1.11.23/go.mod h1:PhJ8+qZJx+Txjx1KthNPuVkCvUca0jRLgKWj/noGgeI=
|
||||
github.com/dubbogo/gost v1.11.25/go.mod h1:iovrPhv0hyakhQGVr4jwiECBL9HXNuBY4VV3HWK5pM0=
|
||||
github.com/dubbogo/gost v1.12.6-0.20220824084206-300e27e9e524/go.mod h1:0YHTGJtjHiYlWtVEkZnyrvhr7rR+23GczNaJrgc2v38=
|
||||
github.com/dubbogo/gost v1.13.1/go.mod h1:9HMXBv+WBMRWhF3SklpqDjkS/01AKWm2SrVdz/A0xJI=
|
||||
github.com/dubbogo/gost v1.13.2 h1:z4dczJ5KYu9CAbHWevzTVI/7a7vGQ1vECfmzKHacov0=
|
||||
@ -226,9 +224,8 @@ github.com/dubbogo/grpc-go v1.42.10/go.mod h1:JMkPt1mIHL96GAFeYsMoMjew6f1ROKycik
|
||||
github.com/dubbogo/jsonparser v1.0.1/go.mod h1:tYAtpctvSP/tWw4MeelsowSPgXQRVHHWbqL6ynps8jU=
|
||||
github.com/dubbogo/net v0.0.4/go.mod h1:1CGOnM7X3he+qgGNqjeADuE5vKZQx/eMSeUkpU3ujIc=
|
||||
github.com/dubbogo/triple v1.0.9/go.mod h1:1t9me4j4CTvNDcsMZy6/OGarbRyAUSY0tFXGXHCp7Iw=
|
||||
github.com/dubbogo/triple v1.1.8/go.mod h1:9pgEahtmsY/avYJp3dzUQE8CMMVe1NtGBmUhfICKLJk=
|
||||
github.com/dubbogo/triple v1.2.2-rc3 h1:9rxLqru35MmJkypCHJMiZb1VzwH+zmbPBend9Cq+VOI=
|
||||
github.com/dubbogo/triple v1.2.2-rc3/go.mod h1:9pgEahtmsY/avYJp3dzUQE8CMMVe1NtGBmUhfICKLJk=
|
||||
github.com/dubbogo/triple v1.2.2-rc2 h1:2AaLd+uKwnNnR3qOIXTNPU/OHk77qIDNGMX3GstEtaY=
|
||||
github.com/dubbogo/triple v1.2.2-rc2/go.mod h1:8qprF2uJX82IE5hjiIuswp416sEr0oL/+bb7IjiizYs=
|
||||
github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
|
||||
github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
|
||||
github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY=
|
||||
@ -237,7 +234,6 @@ github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5m
|
||||
github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU=
|
||||
github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I=
|
||||
github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M=
|
||||
github.com/emicklei/go-restful/v3 v3.7.4/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc=
|
||||
github.com/emicklei/go-restful/v3 v3.10.1 h1:rc42Y5YTp7Am7CS630D7JmhRjq4UlEUuEKfrDac4bSQ=
|
||||
github.com/emicklei/go-restful/v3 v3.10.1/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc=
|
||||
github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g=
|
||||
@ -272,7 +268,6 @@ github.com/frankban/quicktest v1.10.0/go.mod h1:ui7WezCLWMWxVWr1GETZY3smRy0G4KWq
|
||||
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.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
|
||||
github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU=
|
||||
github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY=
|
||||
github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw=
|
||||
github.com/gabriel-vasile/mimetype v1.4.2 h1:w5qFW6JKBz9Y393Y4q372O9A7cUSequkh1Q7OhCmWKU=
|
||||
@ -341,6 +336,7 @@ github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFG
|
||||
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
|
||||
github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
|
||||
github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4=
|
||||
github.com/gogo/protobuf v1.3.0/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o=
|
||||
github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o=
|
||||
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
|
||||
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
|
||||
@ -362,7 +358,6 @@ github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt
|
||||
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/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4=
|
||||
github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8=
|
||||
github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc=
|
||||
github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs=
|
||||
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
@ -412,6 +407,7 @@ github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
|
||||
github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE=
|
||||
github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
|
||||
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||
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=
|
||||
@ -478,14 +474,14 @@ github.com/hashicorp/go-hclog v0.14.1/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39
|
||||
github.com/hashicorp/go-hclog v0.16.2/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ=
|
||||
github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60=
|
||||
github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60=
|
||||
github.com/hashicorp/go-kms-wrapping/entropy v0.1.0/go.mod h1:d1g9WGtAunDNpek8jUIEJnBlbgKS1N2Q61QkHiZyR1g=
|
||||
github.com/hashicorp/go-kms-wrapping/entropy/v2 v2.0.0/go.mod h1:xvb32K2keAc+R8DSFG2IwDcydK9DBQE+fGA5fsw6hSk=
|
||||
github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM=
|
||||
github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk=
|
||||
github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA=
|
||||
github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo=
|
||||
github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM=
|
||||
github.com/hashicorp/go-plugin v1.0.1/go.mod h1:++UyYGoz3o5w9ZzAdZxtQKrWWP+iqPBn3cQptSMzBuY=
|
||||
github.com/hashicorp/go-plugin v1.4.3/go.mod h1:5fGEH17QVwTTcR0zV7yhDPLLmFX9YSZ38b18Udy6vYQ=
|
||||
github.com/hashicorp/go-plugin v1.4.5/go.mod h1:viDMjcLJuDui6pXb8U4HVfb8AamCWhHGUjr2IrTF67s=
|
||||
github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs=
|
||||
github.com/hashicorp/go-retryablehttp v0.5.4/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs=
|
||||
github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU=
|
||||
@ -494,9 +490,11 @@ github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR3
|
||||
github.com/hashicorp/go-secure-stdlib/base62 v0.1.1/go.mod h1:EdWO6czbmthiwZ3/PUsDV+UD1D5IRU4ActiaWGwt0Yw=
|
||||
github.com/hashicorp/go-secure-stdlib/mlock v0.1.1/go.mod h1:zq93CJChV6L9QTfGKtfBxKqD7BqqXx5O04A/ns2p5+I=
|
||||
github.com/hashicorp/go-secure-stdlib/parseutil v0.1.1/go.mod h1:QmrqtbKuxxSWTN3ETMPuB+VtEiBJ/A9XhoYGv8E1uD8=
|
||||
github.com/hashicorp/go-secure-stdlib/parseutil v0.1.6/go.mod h1:QmrqtbKuxxSWTN3ETMPuB+VtEiBJ/A9XhoYGv8E1uD8=
|
||||
github.com/hashicorp/go-secure-stdlib/password v0.1.1/go.mod h1:9hH302QllNwu1o2TGYtSk8I8kTAN0ca1EHpwhm5Mmzo=
|
||||
github.com/hashicorp/go-secure-stdlib/strutil v0.1.1/go.mod h1:gKOamz3EwoIoJq7mlMIRBpVTAUn8qPCrEclOKKWhD3U=
|
||||
github.com/hashicorp/go-secure-stdlib/tlsutil v0.1.1/go.mod h1:l8slYwnJA26yBz+ErHpp2IRCLr0vuOMGBORIz4rRiAs=
|
||||
github.com/hashicorp/go-secure-stdlib/strutil v0.1.2/go.mod h1:Gou2R9+il93BqX25LAKCLuM+y9U2T4hlwvT1yprcna4=
|
||||
github.com/hashicorp/go-secure-stdlib/tlsutil v0.1.2/go.mod h1:l8slYwnJA26yBz+ErHpp2IRCLr0vuOMGBORIz4rRiAs=
|
||||
github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU=
|
||||
github.com/hashicorp/go-sockaddr v1.0.2/go.mod h1:rB4wwRAUzs07qva3c5SdrY/NEtAUjGlgmH/UkBUC97A=
|
||||
github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4=
|
||||
@ -520,7 +518,6 @@ github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/J
|
||||
github.com/hashicorp/serf v0.9.6/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4=
|
||||
github.com/hashicorp/vault/api v1.0.4/go.mod h1:gDcqh3WGcR1cpF5AJz/B1UFheUEneMoIospckxBxk6Q=
|
||||
github.com/hashicorp/vault/sdk v0.1.13/go.mod h1:B+hVj7TpuQY1Y/GPbCpffmgd+tSEwvhkWnjtSYCaS2M=
|
||||
github.com/hashicorp/vault/sdk v0.3.0/go.mod h1:aZ3fNuL5VNydQk8GcLJ2TV8YCRVvyaakYkhZRoVuhj0=
|
||||
github.com/hashicorp/vault/sdk v0.7.0 h1:2pQRO40R1etpKkia5fb4kjrdYMx3BHklPxl1pxpxDHg=
|
||||
github.com/hashicorp/vault/sdk v0.7.0/go.mod h1:KyfArJkhooyba7gYCKSq8v66QdqJmnbAxtV/OX1+JTs=
|
||||
github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM=
|
||||
@ -530,8 +527,6 @@ github.com/hjson/hjson-go/v4 v4.0.0/go.mod h1:KaYt3bTw3zhBjYqnXkYywcYctk0A2nxeEF
|
||||
github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=
|
||||
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
|
||||
github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg=
|
||||
github.com/huyi-cn/antcloud-golang-sdk v1.0.2 h1:9LWOaG4BVkTJG6UXVkgIC86gb79JgxhLzDESc/dE/Og=
|
||||
github.com/huyi-cn/antcloud-golang-sdk v1.0.2/go.mod h1:WLHs8CyrDngvmEV7oZxaAsQU3h/REfKv9mCuRxzNTQ4=
|
||||
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/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
|
||||
@ -583,7 +578,6 @@ github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+o
|
||||
github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
|
||||
github.com/klauspost/cpuid/v2 v2.2.4 h1:acbojRNwl3o09bUq+yDCtZFc1aiwaAAxtcn8YkZXnvk=
|
||||
github.com/klauspost/cpuid/v2 v2.2.4/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY=
|
||||
github.com/knadh/koanf v1.4.1/go.mod h1:1cfH5223ZeZUOs8FU2UdTmaNfHpqgtjV0+NHjRO43gs=
|
||||
github.com/knadh/koanf v1.5.0 h1:q2TSd/3Pyc/5yP9ldIrSdIz26MCcyNQzW0pEAugLPNs=
|
||||
github.com/knadh/koanf v1.5.0/go.mod h1:Hgyjp4y8v44hpZtPzs7JZfRAW5AhN7KfZcwv1RYggDs=
|
||||
github.com/koding/multiconfig v0.0.0-20171124222453-69c27309b2d7/go.mod h1:Y2SaZf2Rzd0pXkLVhLlCiAXFCLSXAIbTKDivVgff/AM=
|
||||
@ -612,7 +606,6 @@ github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ
|
||||
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I=
|
||||
github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ=
|
||||
github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
|
||||
github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60=
|
||||
github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY=
|
||||
github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0=
|
||||
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
|
||||
@ -654,7 +647,6 @@ github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0Qu
|
||||
github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
|
||||
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
|
||||
github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
|
||||
github.com/mitchellh/mapstructure v1.4.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
|
||||
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
|
||||
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
|
||||
github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw=
|
||||
@ -672,8 +664,9 @@ github.com/mschoch/smat v0.2.0 h1:8imxQsjDm8yFEAVBe7azKmKSgzSkZXDuKkSq9374khM=
|
||||
github.com/mschoch/smat v0.2.0/go.mod h1:kc9mz7DoBKqDyiRL7VZN8KvXQMWeTaVnttLRXOlotKw=
|
||||
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
|
||||
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
|
||||
github.com/mwitkow/go-proto-validators v0.3.2 h1:qRlmpTzm2pstMKKzTdvwPCF5QfBNURSlAgN/R+qbKos=
|
||||
github.com/mwitkow/go-proto-validators v0.3.2/go.mod h1:ej0Qp0qMgHN/KtDyUt+Q1/tA7a5VarXUOUxD+oeD30w=
|
||||
github.com/nacos-group/nacos-sdk-go v1.0.8/go.mod h1:hlAPn3UdzlxIlSILAyOXKxjFSvDJ9oLzTJ9hLAK1KzA=
|
||||
github.com/nacos-group/nacos-sdk-go v1.1.1/go.mod h1:UHOtQNQY/qpk2dhg6gDq8u5+/CEIc3+lWmrmxEzX0/g=
|
||||
github.com/nacos-group/nacos-sdk-go v1.1.3/go.mod h1:cBv9wy5iObs7khOqov1ERFQrCuTR4ILpgaiaVMxEmGI=
|
||||
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=
|
||||
@ -693,6 +686,8 @@ github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtb
|
||||
github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA=
|
||||
github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U=
|
||||
github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo=
|
||||
github.com/oliveagle/jsonpath v0.0.0-20180606110733-2e52cf6e6852 h1:Yl0tPBa8QPjGmesFh1D0rDy+q1Twx6FyU7VWHi8wZbI=
|
||||
github.com/oliveagle/jsonpath v0.0.0-20180606110733-2e52cf6e6852/go.mod h1:eqOVx5Vwu4gd2mmMZvVZsgIqNSaW3xxRThUJ0k/TPk4=
|
||||
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=
|
||||
@ -733,7 +728,6 @@ github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6J
|
||||
github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=
|
||||
github.com/polarismesh/polaris-go v1.1.0/go.mod h1:tquawfjEKp1W3ffNJQSzhfditjjoZ7tvhOCElN7Efzs=
|
||||
github.com/polarismesh/polaris-go v1.3.0 h1:KZKX//ow4OPPoS5+s7h07ptprg+2AcNVGrN6WakC9QM=
|
||||
github.com/polarismesh/polaris-go v1.3.0/go.mod h1:HsN0ierETIujHpmnnYJ3qkwQw4QGAECuHvBZTDaw1tI=
|
||||
github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI=
|
||||
@ -809,9 +803,8 @@ github.com/sagikazarmark/locafero v0.3.0/go.mod h1:w+v7UsPNFwzF1cHuOajOOzoq4U7v/
|
||||
github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE=
|
||||
github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ=
|
||||
github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E=
|
||||
github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww=
|
||||
github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
|
||||
github.com/satori/go.uuid v1.2.1-0.20181028125025-b2ce2384e17b h1:gQZ0qzfKHQIybLANtM3mBXNUtOfsCFXeTsnBqCsx1KM=
|
||||
github.com/satori/go.uuid v1.2.1-0.20181028125025-b2ce2384e17b/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
|
||||
github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc=
|
||||
github.com/shirou/gopsutil v3.20.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA=
|
||||
github.com/shirou/gopsutil/v3 v3.21.6/go.mod h1:JfVbDpIBLVzT8oKbvMg9P3wEIMDDpVn+LwHTKj0ST88=
|
||||
@ -838,7 +831,6 @@ github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasO
|
||||
github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI=
|
||||
github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
|
||||
github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ=
|
||||
github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk=
|
||||
github.com/spf13/afero v1.10.0 h1:EaGW2JJh15aKOejeuJ+wpFSHnbd7GE6Wvp3TsNhb6LY=
|
||||
github.com/spf13/afero v1.10.0/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ=
|
||||
github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
|
||||
@ -852,7 +844,6 @@ github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnIn
|
||||
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.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg=
|
||||
github.com/spf13/viper v1.7.1/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg=
|
||||
github.com/spf13/viper v1.17.0 h1:I5txKw7MJasPL/BrfkbA0Jyo/oELqVmux4pR/UxOMfI=
|
||||
github.com/spf13/viper v1.17.0/go.mod h1:BmMMMLQXSbcHK6KAOiFLz0l5JHrU89OdIRHvsk0+yVI=
|
||||
github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw=
|
||||
@ -881,8 +872,6 @@ github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69
|
||||
github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8=
|
||||
github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU=
|
||||
github.com/tebeka/strftime v0.1.3/go.mod h1:7wJm3dZlpr4l/oVK0t1HYIc4rMzQ2XJlOMIUJUJH6XQ=
|
||||
github.com/tevid/gohamcrest v1.1.1 h1:ou+xSqlIw1xfGTg1uq1nif/htZ2S3EzRqLm2BP+tYU0=
|
||||
github.com/tevid/gohamcrest v1.1.1/go.mod h1:3UvtWlqm8j5JbwYZh80D/PVBt0mJ1eJiYgZMibh0H/k=
|
||||
github.com/tklauser/go-sysconf v0.3.6/go.mod h1:MkWzOF4RMCshBAMXuhXJs64Rte09mITnppBXY/rYEFI=
|
||||
github.com/tklauser/go-sysconf v0.3.9/go.mod h1:11DU/5sG7UexIrp/O6g35hrWzu0JxlwQ3LSFUzyeuhs=
|
||||
github.com/tklauser/go-sysconf v0.3.10 h1:IJ1AZGZRWbY8T5Vfk04D9WOA5WSejdflXxP03OUqALw=
|
||||
@ -900,7 +889,6 @@ github.com/toolkits/concurrent v0.0.0-20150624120057-a4371d70e3e3/go.mod h1:QDlp
|
||||
github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM=
|
||||
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/uber/jaeger-client-go v2.29.1+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk=
|
||||
github.com/uber/jaeger-client-go v2.30.0+incompatible h1:D6wyKGCecFaSRUpo8lCVbaOOb6ThwMmTEbhRwtKR97o=
|
||||
github.com/uber/jaeger-client-go v2.30.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk=
|
||||
github.com/uber/jaeger-lib v2.4.1+incompatible h1:td4jdvLcExb4cBISKIpHuGoVXh+dVKhn2Um6rjCsSsg=
|
||||
@ -922,8 +910,6 @@ github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1
|
||||
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
|
||||
github.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPRg=
|
||||
github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
|
||||
github.com/zouyx/agollo/v3 v3.4.5 h1:7YCxzY9ZYaH9TuVUBvmI6Tk0mwMggikah+cfbYogcHQ=
|
||||
github.com/zouyx/agollo/v3 v3.4.5/go.mod h1:LJr3kDmm23QSW+F1Ol4TMHDa7HvJvscMdVxJ2IpUTVc=
|
||||
go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
|
||||
go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
|
||||
go.etcd.io/bbolt v1.3.5 h1:XAzx9gjCb0Rxj7EoqcClPD1d5ZBxZJk0jbuoPHenBt0=
|
||||
@ -932,15 +918,18 @@ go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738 h1:VcrIfasaLFkyjk6KNlXQSzO+B0
|
||||
go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg=
|
||||
go.etcd.io/etcd/api/v3 v3.5.0-alpha.0/go.mod h1:mPcW6aZJukV6Aa81LSKpBjQXTWlXB5r74ymPoSWa3Sw=
|
||||
go.etcd.io/etcd/api/v3 v3.5.4/go.mod h1:5GB2vv4A4AOn3yk7MftYGHkUfGtDHnEraIjym4dYz5A=
|
||||
go.etcd.io/etcd/api/v3 v3.5.7/go.mod h1:9qew1gCdDDLu+VwmeG+iFpL+QlpHTo7iubavdVDgCAA=
|
||||
go.etcd.io/etcd/api/v3 v3.5.9 h1:4wSsluwyTbGGmyjJktOf3wFQoTBIURXHnq9n/G/JQHs=
|
||||
go.etcd.io/etcd/api/v3 v3.5.9/go.mod h1:uyAal843mC8uUVSLWz6eHa/d971iDGnCRpmKd2Z+X8k=
|
||||
go.etcd.io/etcd/client/pkg/v3 v3.5.4/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g=
|
||||
go.etcd.io/etcd/client/pkg/v3 v3.5.7/go.mod h1:o0Abi1MK86iad3YrWhgUsbGx1pmTS+hrORWc2CamuhY=
|
||||
go.etcd.io/etcd/client/pkg/v3 v3.5.9 h1:oidDC4+YEuSIQbsR94rY9gur91UPL6DnxDCIYd2IGsE=
|
||||
go.etcd.io/etcd/client/pkg/v3 v3.5.9/go.mod h1:y+CzeSmkMpWN2Jyu1npecjB9BBnABxGM4pN8cGuJeL4=
|
||||
go.etcd.io/etcd/client/v2 v2.305.0-alpha.0/go.mod h1:kdV+xzCJ3luEBSIeQyB/OEKkWKd8Zkux4sbDeANrosU=
|
||||
go.etcd.io/etcd/client/v2 v2.305.9 h1:YZ2OLi0OvR0H75AcgSUajjd5uqKDKocQUqROTG11jIo=
|
||||
go.etcd.io/etcd/client/v3 v3.5.0-alpha.0/go.mod h1:wKt7jgDgf/OfKiYmCq5WFGxOFAkVMLxiiXgLDFhECr8=
|
||||
go.etcd.io/etcd/client/v3 v3.5.4/go.mod h1:ZaRkVgBZC+L+dLCjTcF1hRXpgZXQPOvnA/Ak/gq3kiY=
|
||||
go.etcd.io/etcd/client/v3 v3.5.7/go.mod h1:sOWmj9DZUMyAngS7QQwCyAXXAL6WhgTOPLNS/NabQgw=
|
||||
go.etcd.io/etcd/client/v3 v3.5.9 h1:r5xghnU7CwbUxD/fbUtRyJGaYNfDun8sp/gTr1hew6E=
|
||||
go.etcd.io/etcd/client/v3 v3.5.9/go.mod h1:i/Eo5LrZ5IKqpbtpPDuaUnDOUv471oDg8cjQaUr2MbA=
|
||||
go.etcd.io/etcd/pkg/v3 v3.5.0-alpha.0 h1:3yLUEC0nFCxw/RArImOyRUI4OAFbg4PFpBbAhSNzKNY=
|
||||
@ -960,10 +949,8 @@ go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk=
|
||||
go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E=
|
||||
go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0=
|
||||
go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo=
|
||||
go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk=
|
||||
go.opentelemetry.io/otel v1.11.0 h1:kfToEGMDq6TrVrJ9Vht84Y8y9enykSZzDDZglV0kIEk=
|
||||
go.opentelemetry.io/otel v1.11.0/go.mod h1:H2KtuEphyMvlhZ+F7tg9GRhAOe60moNx61Ex+WmiKkk=
|
||||
go.opentelemetry.io/otel/trace v1.7.0/go.mod h1:fzLSB9nqR2eXzxPXb2JW9IKE+ScyXA48yyE4TNvoHqU=
|
||||
go.opentelemetry.io/otel/trace v1.11.0 h1:20U/Vj42SX+mASlXLmSGBg6jpI1jQtv682lZtTAOVFI=
|
||||
go.opentelemetry.io/otel/trace v1.11.0/go.mod h1:nyYjis9jy0gytE9LXGU+/m1sHTKbRY0fX0hulNNDP1U=
|
||||
go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI=
|
||||
@ -975,13 +962,13 @@ go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
|
||||
go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
|
||||
go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ=
|
||||
go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0=
|
||||
go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ=
|
||||
go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ=
|
||||
go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk=
|
||||
go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
|
||||
go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4=
|
||||
go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU=
|
||||
go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU=
|
||||
go.uber.org/multierr v1.8.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak=
|
||||
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=
|
||||
@ -990,7 +977,6 @@ go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM=
|
||||
go.uber.org/zap v1.15.0/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc=
|
||||
go.uber.org/zap v1.16.0/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ=
|
||||
go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo=
|
||||
go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI=
|
||||
go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw=
|
||||
go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo=
|
||||
go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so=
|
||||
@ -1108,7 +1094,6 @@ golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v
|
||||
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
|
||||
golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8=
|
||||
golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20210917221730-978cfadd31cf/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20211029224645-99673261e6eb/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20211105192438-b53810dc28af/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
@ -1227,12 +1212,10 @@ golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBc
|
||||
golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210816074244-15123e1e1f71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20211106132015-ebca88c72f68/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20211117180635-dee7805ff2e1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220111092808-5a964db01320/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/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-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
@ -1260,6 +1243,7 @@ golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.5/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.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
|
||||
golang.org/x/text v0.10.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
|
||||
@ -1462,11 +1446,10 @@ google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAG
|
||||
google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM=
|
||||
google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34=
|
||||
google.golang.org/grpc v1.41.0/go.mod h1:U3l9uK9J0sini8mHphKoXyaqDA/8VyGnDee1zzIUK6k=
|
||||
google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU=
|
||||
google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk=
|
||||
google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk=
|
||||
google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk=
|
||||
google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk=
|
||||
google.golang.org/grpc v1.51.0/go.mod h1:wgNDFcnuBGmxLKI/qn4T+m5BtEBYXJPvibbUPsAIPww=
|
||||
google.golang.org/grpc v1.58.2 h1:SXUpjxeVF3FKrTYQI4f4KvbGD5u2xccdYdurwowix5I=
|
||||
google.golang.org/grpc v1.58.2/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0=
|
||||
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
|
||||
@ -1483,6 +1466,7 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0
|
||||
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||
google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||
google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
||||
google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
||||
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/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
|
||||
|
@ -20,7 +20,7 @@ type DciProvider struct {
|
||||
func (d *DciProvider) GetUploadUrl(_ context.Context, req *dci.GetUploadUrlRequest) (res *dci.GetUploadUrlResponse, err error) {
|
||||
res = new(dci.GetUploadUrlResponse)
|
||||
if req.FileName == "" {
|
||||
return res, errCommon.ReturnError(errors.New(msg.ErrrFileIsEmpty), msg.ErrrFileIsEmpty, "未获取到相关文件 :")
|
||||
return res, errCommon.ReturnError(errors.New(msg.ErrFileIsEmpty), msg.ErrFileIsEmpty, "未获取到相关文件 :")
|
||||
}
|
||||
|
||||
res, err = d.file.Upload(req)
|
||||
|
23
internal/dao/file.go
Normal file
23
internal/dao/file.go
Normal file
@ -0,0 +1,23 @@
|
||||
package dao
|
||||
|
||||
import (
|
||||
"chain-dci/internal/model"
|
||||
"chain-dci/pkg/app"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
func CreateFileInfo(tx *gorm.DB, info *model.FileInfo) error {
|
||||
if tx == nil {
|
||||
tx = app.ModuleClients.DciDB
|
||||
}
|
||||
err := tx.Model(&model.FileInfo{}).Create(&info).Error
|
||||
return err
|
||||
}
|
||||
|
||||
func UpdateFileInfo(tx *gorm.DB, info *model.FileInfo) error {
|
||||
if tx == nil {
|
||||
tx = app.ModuleClients.DciDB
|
||||
}
|
||||
err := tx.Model(&model.FileInfo{}).Where("id =?", info.Model.ID).Updates(&info).Error
|
||||
return err
|
||||
}
|
@ -31,13 +31,11 @@ type IDci interface {
|
||||
type Dci struct {
|
||||
}
|
||||
|
||||
func createToken(appID, appKey, channelId, userID, nonce string, timestamp int64) (token string, err error) {
|
||||
func createToken(timestamp int64, keyword ...string) (token string, err error) {
|
||||
var b bytes.Buffer
|
||||
b.WriteString(appID)
|
||||
b.WriteString(appKey)
|
||||
b.WriteString(channelId)
|
||||
b.WriteString(userID)
|
||||
b.WriteString(nonce)
|
||||
for i := 0; i < len(keyword); i++ {
|
||||
b.WriteString(keyword[i])
|
||||
}
|
||||
b.WriteString(fmt.Sprint(timestamp))
|
||||
h := sha256.New()
|
||||
|
||||
|
@ -3,8 +3,12 @@ package logic
|
||||
import (
|
||||
"chain-dci/pb/dci"
|
||||
"chain-dci/pkg/app"
|
||||
errCommon "chain-dci/pkg/err"
|
||||
"chain-dci/pkg/msg"
|
||||
"fmt"
|
||||
bccrClient "github.com/antchain-openapi-sdk-go/bccr/client"
|
||||
"github.com/jinzhu/copier"
|
||||
"time"
|
||||
)
|
||||
|
||||
type IDciRegistration interface {
|
||||
@ -22,119 +26,180 @@ type DciRegistration struct {
|
||||
|
||||
// CreateDciRegistration 发起数登申请
|
||||
func (r *DciRegistration) CreateDciRegistration(req *dci.CreateDciRegistrationRequest) (res *dci.CreateDciRegistrationResponse, err error) {
|
||||
errCommon.NoReturnInfo(req, "发起数登申请 参数信息: ")
|
||||
|
||||
res = new(dci.CreateDciRegistrationResponse)
|
||||
|
||||
createDciRegistrationRequest := new(bccrClient.CreateDciRegistrationRequest)
|
||||
_ = copier.CopyWithOption(&createDciRegistrationRequest, req, copier.Option{DeepCopy: true})
|
||||
_ = copier.CopyWithOption(&createDciRegistrationRequest, req, copier.Option{DeepCopy: false})
|
||||
fmt.Printf("req : %+v\n", req)
|
||||
fmt.Println("======================================================= ============== ===========00")
|
||||
fmt.Printf("createDciRegistrationRequest : %+v\n", createDciRegistrationRequest)
|
||||
|
||||
clientToken, err := createToken(time.Now().UnixMilli(), req.DciContentId, app.ModuleClients.SfNode.Generate().Base64())
|
||||
if err != nil {
|
||||
return nil, errCommon.ReturnError(err, msg.ErrCreateClientToken, "创建clientToken 失败: ")
|
||||
}
|
||||
createDciRegistrationRequest.SetClientToken(clientToken)
|
||||
|
||||
createDciPreregistrationResponse, err := app.ModuleClients.BccrClient.CreateDciRegistration(createDciRegistrationRequest)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
return nil, errCommon.ReturnError(err, msg.ErrCreateDciRegistration, "发起数登申请 失败: ")
|
||||
}
|
||||
|
||||
_ = copier.CopyWithOption(&res, createDciPreregistrationResponse, copier.Option{DeepCopy: true})
|
||||
errCommon.NoReturnInfo(createDciPreregistrationResponse, "发起数登申请 成功: ")
|
||||
|
||||
_ = copier.CopyWithOption(&res, createDciPreregistrationResponse, copier.Option{DeepCopy: false})
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// QueryDciRegistration 查询数登申请
|
||||
func (r *DciRegistration) QueryDciRegistration(req *dci.QueryDciRegistrationRequest) (res *dci.QueryDciRegistrationResponse, err error) {
|
||||
errCommon.NoReturnInfo(req, "查询数登申请 参数信息: ")
|
||||
|
||||
res = new(dci.QueryDciRegistrationResponse)
|
||||
|
||||
queryDciRegistrationRequest := new(bccrClient.QueryDciRegistrationRequest)
|
||||
_ = copier.CopyWithOption(&queryDciRegistrationRequest, req, copier.Option{DeepCopy: true})
|
||||
_ = copier.CopyWithOption(&queryDciRegistrationRequest, req, copier.Option{DeepCopy: false})
|
||||
|
||||
queryDciRegistrationResponse, err := app.ModuleClients.BccrClient.QueryDciRegistration(queryDciRegistrationRequest)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
return nil, errCommon.ReturnError(err, msg.ErrQueryDciRegistration, "查询数登申请 失败: ")
|
||||
}
|
||||
|
||||
_ = copier.CopyWithOption(&res, queryDciRegistrationResponse, copier.Option{DeepCopy: true})
|
||||
errCommon.NoReturnInfo(queryDciRegistrationResponse, "查询数登申请 成功: ")
|
||||
|
||||
_ = copier.CopyWithOption(&res, queryDciRegistrationResponse, copier.Option{DeepCopy: false})
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// GetDciPayUrl 数登支付链接获取
|
||||
func (r *DciRegistration) GetDciPayUrl(req *dci.GetDciPayUrlRequest) (res *dci.GetDciPayUrlResponse, err error) {
|
||||
errCommon.NoReturnInfo(req, "数登支付链接获取 参数信息: ")
|
||||
|
||||
res = new(dci.GetDciPayUrlResponse)
|
||||
|
||||
getDciPayUrlRequest := new(bccrClient.GetDciPayurlRequest)
|
||||
_ = copier.CopyWithOption(&getDciPayUrlRequest, req, copier.Option{DeepCopy: true})
|
||||
_ = copier.CopyWithOption(&getDciPayUrlRequest, req, copier.Option{DeepCopy: false})
|
||||
|
||||
clientToken, err := createToken(time.Now().UnixMilli(), req.DigitalRegisterId, app.ModuleClients.SfNode.Generate().Base64())
|
||||
if err != nil {
|
||||
return nil, errCommon.ReturnError(err, msg.ErrCreateClientToken, "创建clientToken 失败: ")
|
||||
}
|
||||
getDciPayUrlRequest.SetClientToken(clientToken)
|
||||
|
||||
getDciPayUrlResponse, err := app.ModuleClients.BccrClient.GetDciPayurl(getDciPayUrlRequest)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
return nil, errCommon.ReturnError(err, msg.ErrGetDciPayurl, "数登支付链接获取 失败: ")
|
||||
}
|
||||
|
||||
_ = copier.CopyWithOption(&res, getDciPayUrlResponse, copier.Option{DeepCopy: true})
|
||||
errCommon.NoReturnInfo(getDciPayUrlResponse, "数登支付链接获取 成功: ")
|
||||
|
||||
_ = copier.CopyWithOption(&res, getDciPayUrlResponse, copier.Option{DeepCopy: false})
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// QueryDciPay 数登支付查询
|
||||
func (r *DciRegistration) QueryDciPay(req *dci.QueryDciPayRequest) (res *dci.QueryDciPayResponse, err error) {
|
||||
errCommon.NoReturnInfo(req, "数登支付查询 参数信息: ")
|
||||
|
||||
res = new(dci.QueryDciPayResponse)
|
||||
|
||||
queryDciPayRequest := new(bccrClient.QueryDciPayRequest)
|
||||
_ = copier.CopyWithOption(&queryDciPayRequest, req, copier.Option{DeepCopy: true})
|
||||
_ = copier.CopyWithOption(&queryDciPayRequest, req, copier.Option{DeepCopy: false})
|
||||
|
||||
queryDciPayResponse, err := app.ModuleClients.BccrClient.QueryDciPay(queryDciPayRequest)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
return nil, errCommon.ReturnError(err, msg.ErrQueryDciPay, "数登支付查询 失败: ")
|
||||
}
|
||||
|
||||
_ = copier.CopyWithOption(&res, queryDciPayResponse, copier.Option{DeepCopy: true})
|
||||
errCommon.NoReturnInfo(queryDciPayResponse, "数登支付查询 成功: ")
|
||||
|
||||
_ = copier.CopyWithOption(&res, queryDciPayResponse, copier.Option{DeepCopy: false})
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// GetDciRegistrationcert 获取数登证书下载
|
||||
func (r *DciRegistration) GetDciRegistrationcert(req *dci.GetDciRegistrationcertRequest) (res *dci.GetDciRegistrationcertResponse, err error) {
|
||||
errCommon.NoReturnInfo(req, "获取数登证书下载 参数信息: ")
|
||||
|
||||
res = new(dci.GetDciRegistrationcertResponse)
|
||||
|
||||
getDciRegistrationcertRequest := new(bccrClient.GetDciRegistrationcertRequest)
|
||||
_ = copier.CopyWithOption(&getDciRegistrationcertRequest, req, copier.Option{DeepCopy: true})
|
||||
_ = copier.CopyWithOption(&getDciRegistrationcertRequest, req, copier.Option{DeepCopy: false})
|
||||
|
||||
clientToken, err := createToken(time.Now().UnixMilli(), req.DigitalRegisterId, app.ModuleClients.SfNode.Generate().Base64())
|
||||
if err != nil {
|
||||
return nil, errCommon.ReturnError(err, msg.ErrCreateClientToken, "创建clientToken 失败: ")
|
||||
}
|
||||
getDciRegistrationcertRequest.SetClientToken(clientToken)
|
||||
|
||||
getDciRegistrationcertResponse, err := app.ModuleClients.BccrClient.GetDciRegistrationcert(getDciRegistrationcertRequest)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
return nil, errCommon.ReturnError(err, msg.ErrGetDciRegistrationcert, "获取数登证书下载 失败: ")
|
||||
}
|
||||
|
||||
_ = copier.CopyWithOption(&res, getDciRegistrationcertResponse, copier.Option{DeepCopy: true})
|
||||
errCommon.NoReturnInfo(getDciRegistrationcertResponse, "获取数登证书下载 成功: ")
|
||||
|
||||
_ = copier.CopyWithOption(&res, getDciRegistrationcertResponse, copier.Option{DeepCopy: false})
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// RetryDciRegistration 补正申请
|
||||
func (r *DciRegistration) RetryDciRegistration(req *dci.RetryDciRegistrationRequest) (res *dci.RetryDciRegistrationResponse, err error) {
|
||||
errCommon.NoReturnInfo(req, "补正申请 参数信息: ")
|
||||
|
||||
res = new(dci.RetryDciRegistrationResponse)
|
||||
|
||||
retryDciRegistrationRequest := new(bccrClient.RetryDciRegistrationRequest)
|
||||
_ = copier.CopyWithOption(&retryDciRegistrationRequest, req, copier.Option{DeepCopy: true})
|
||||
_ = copier.CopyWithOption(&retryDciRegistrationRequest, req, copier.Option{DeepCopy: false})
|
||||
|
||||
clientToken, err := createToken(time.Now().UnixMilli(), req.DigitalRegisterId, req.DciContentId, app.ModuleClients.SfNode.Generate().Base64())
|
||||
if err != nil {
|
||||
return nil, errCommon.ReturnError(err, msg.ErrCreateClientToken, "创建clientToken 失败: ")
|
||||
}
|
||||
retryDciRegistrationRequest.SetClientToken(clientToken)
|
||||
|
||||
retryDciRegistrationResponse, err := app.ModuleClients.BccrClient.RetryDciRegistration(retryDciRegistrationRequest)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
return nil, errCommon.ReturnError(err, msg.ErrRetryDciRegistration, "补正申请 失败: ")
|
||||
}
|
||||
|
||||
_ = copier.CopyWithOption(&res, retryDciRegistrationResponse, copier.Option{DeepCopy: true})
|
||||
errCommon.NoReturnInfo(retryDciRegistrationResponse, "补正申请 成功: ")
|
||||
|
||||
_ = copier.CopyWithOption(&res, retryDciRegistrationResponse, copier.Option{DeepCopy: false})
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// CloseDciRegistration 数登停止申请
|
||||
func (r *DciRegistration) CloseDciRegistration(req *dci.CloseDciRegistrationRequest) (res *dci.CloseDciRegistrationResponse, err error) {
|
||||
errCommon.NoReturnInfo(req, "数登停止申请 参数信息: ")
|
||||
|
||||
res = new(dci.CloseDciRegistrationResponse)
|
||||
|
||||
closeDciRegistrationRequest := new(bccrClient.CloseDciRegistrationRequest)
|
||||
_ = copier.CopyWithOption(&closeDciRegistrationRequest, req, copier.Option{DeepCopy: true})
|
||||
_ = copier.CopyWithOption(&closeDciRegistrationRequest, req, copier.Option{DeepCopy: false})
|
||||
|
||||
clientToken, err := createToken(time.Now().UnixMilli(), req.DigitalRegisterId, req.Name, req.MobileNo, app.ModuleClients.SfNode.Generate().Base64())
|
||||
if err != nil {
|
||||
return nil, errCommon.ReturnError(err, msg.ErrCreateClientToken, "创建clientToken 失败: ")
|
||||
}
|
||||
closeDciRegistrationRequest.SetClientToken(clientToken)
|
||||
|
||||
closeDciRegistrationResponse, err := app.ModuleClients.BccrClient.CloseDciRegistration(closeDciRegistrationRequest)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
return nil, errCommon.ReturnError(err, msg.ErrCloseDciRegistration, "数登停止申请 失败: ")
|
||||
}
|
||||
|
||||
_ = copier.CopyWithOption(&res, closeDciRegistrationResponse, copier.Option{DeepCopy: true})
|
||||
errCommon.NoReturnInfo(closeDciRegistrationResponse, "数登停止申请 成功: ")
|
||||
|
||||
_ = copier.CopyWithOption(&res, closeDciRegistrationResponse, copier.Option{DeepCopy: false})
|
||||
|
||||
return
|
||||
}
|
||||
|
@ -3,8 +3,11 @@ package logic
|
||||
import (
|
||||
"chain-dci/pb/dci"
|
||||
"chain-dci/pkg/app"
|
||||
errCommon "chain-dci/pkg/err"
|
||||
"chain-dci/pkg/msg"
|
||||
bccrClient "github.com/antchain-openapi-sdk-go/bccr/client"
|
||||
"github.com/jinzhu/copier"
|
||||
"time"
|
||||
)
|
||||
|
||||
type IDciUser interface {
|
||||
@ -18,51 +21,75 @@ type DciUser struct {
|
||||
|
||||
// AddDciUser 著作权人 申领 DCI信息
|
||||
func (u *DciUser) AddDciUser(req *dci.AddDciUserRequest) (res *dci.AddDciUserResponse, err error) {
|
||||
errCommon.NoReturnInfo(req, "著作权人 申领 DCI信息 参数信息: ")
|
||||
|
||||
res = new(dci.AddDciUserResponse)
|
||||
|
||||
addDciUserRequest := new(bccrClient.AddDciUserRequest)
|
||||
_ = copier.CopyWithOption(&addDciUserRequest, req, copier.Option{DeepCopy: true})
|
||||
_ = copier.CopyWithOption(&addDciUserRequest, req, copier.Option{DeepCopy: false})
|
||||
|
||||
clientToken, err := createToken(time.Now().UnixMilli(), req.CertName, req.CertificateNumber, req.Phone, app.ModuleClients.SfNode.Generate().Base64())
|
||||
if err != nil {
|
||||
return nil, errCommon.ReturnError(err, msg.ErrCreateClientToken, "创建clientToken 失败: ")
|
||||
}
|
||||
addDciUserRequest.SetClientToken(clientToken)
|
||||
|
||||
addDciUserResponse, err := app.ModuleClients.BccrClient.AddDciUser(addDciUserRequest)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
return nil, errCommon.ReturnError(err, msg.ErrAddDciUser, "著作权人 申领 DCI信息 失败: ")
|
||||
}
|
||||
|
||||
_ = copier.CopyWithOption(&res, addDciUserResponse, copier.Option{DeepCopy: true})
|
||||
errCommon.NoReturnInfo(addDciUserResponse, "著作权人 申领 DCI信息 成功: ")
|
||||
|
||||
_ = copier.CopyWithOption(&res, addDciUserResponse, copier.Option{DeepCopy: false})
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// UpdateDciUser 著作权人 更新 DCI信息
|
||||
func (u *DciUser) UpdateDciUser(req *dci.UpdateDciUserRequest) (res *dci.UpdateDciUserResponse, err error) {
|
||||
errCommon.NoReturnInfo(req, "著作权人 更新 DCI信息 参数信息: ")
|
||||
|
||||
res = new(dci.UpdateDciUserResponse)
|
||||
|
||||
updateDciUserRequest := new(bccrClient.UpdateDciUserRequest)
|
||||
_ = copier.CopyWithOption(&updateDciUserRequest, req, copier.Option{DeepCopy: true})
|
||||
_ = copier.CopyWithOption(&updateDciUserRequest, req, copier.Option{DeepCopy: false})
|
||||
|
||||
clientToken, err := createToken(time.Now().UnixMilli(), req.DciUserId, req.CertFrontFileId, req.CertBackFileId, req.Phone, app.ModuleClients.SfNode.Generate().Base64())
|
||||
if err != nil {
|
||||
return nil, errCommon.ReturnError(err, msg.ErrCreateClientToken, "创建clientToken 失败: ")
|
||||
}
|
||||
updateDciUserRequest.SetClientToken(clientToken)
|
||||
|
||||
updateDciUserResponse, err := app.ModuleClients.BccrClient.UpdateDciUser(updateDciUserRequest)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
return nil, errCommon.ReturnError(err, msg.ErrUpdateDciUser, "著作权人 更新 DCI信息 失败: ")
|
||||
}
|
||||
|
||||
_ = copier.CopyWithOption(&res, updateDciUserResponse, copier.Option{DeepCopy: true})
|
||||
errCommon.NoReturnInfo(updateDciUserResponse, "著作权人 更新 DCI信息 成功: ")
|
||||
|
||||
_ = copier.CopyWithOption(&res, updateDciUserResponse, copier.Option{DeepCopy: false})
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// QueryDciUser 著作权人 查询 DCI信息
|
||||
func (u *DciUser) QueryDciUser(req *dci.QueryDciUserRequest) (res *dci.QueryDciUserResponse, err error) {
|
||||
errCommon.NoReturnInfo(req, "著作权人 查询 DCI信息 参数信息: ")
|
||||
|
||||
res = new(dci.QueryDciUserResponse)
|
||||
|
||||
queryDciUserRequest := new(bccrClient.QueryDciUserRequest)
|
||||
_ = copier.CopyWithOption(&queryDciUserRequest, req, copier.Option{DeepCopy: true})
|
||||
_ = copier.CopyWithOption(&queryDciUserRequest, req, copier.Option{DeepCopy: false})
|
||||
|
||||
queryDciUserResponse, err := app.ModuleClients.BccrClient.QueryDciUser(queryDciUserRequest)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
return nil, errCommon.ReturnError(err, msg.ErrQueryDciUser, "著作权人 查询 DCI信息 失败: ")
|
||||
}
|
||||
|
||||
_ = copier.CopyWithOption(&res, queryDciUserResponse, copier.Option{DeepCopy: true})
|
||||
errCommon.NoReturnInfo(queryDciUserResponse, "著作权人 查询 DCI信息 成功: ")
|
||||
|
||||
_ = copier.CopyWithOption(&res, queryDciUserResponse, copier.Option{DeepCopy: false})
|
||||
|
||||
return
|
||||
}
|
||||
|
@ -3,8 +3,11 @@ package logic
|
||||
import (
|
||||
"chain-dci/pb/dci"
|
||||
"chain-dci/pkg/app"
|
||||
errCommon "chain-dci/pkg/err"
|
||||
"chain-dci/pkg/msg"
|
||||
bccrClient "github.com/antchain-openapi-sdk-go/bccr/client"
|
||||
"github.com/jinzhu/copier"
|
||||
"time"
|
||||
)
|
||||
|
||||
type IDciWork interface {
|
||||
@ -17,34 +20,48 @@ type DciWork struct {
|
||||
|
||||
// CreateDciPreregistration 作品 申领 DCI
|
||||
func (w *DciWork) CreateDciPreregistration(req *dci.CreateDciPreregistrationRequest) (res *dci.CreateDciPreregistrationResponse, err error) {
|
||||
errCommon.NoReturnInfo(req, "作品 申领 DCI 参数信息: ")
|
||||
|
||||
res = new(dci.CreateDciPreregistrationResponse)
|
||||
|
||||
createDciPreregistrationRequest := new(bccrClient.CreateDciPreregistrationRequest)
|
||||
_ = copier.CopyWithOption(&createDciPreregistrationRequest, req, copier.Option{DeepCopy: true})
|
||||
_ = copier.CopyWithOption(&createDciPreregistrationRequest, req, copier.Option{DeepCopy: false})
|
||||
|
||||
clientToken, err := createToken(time.Now().UnixMilli(), req.DciUserId, req.WorkName, req.AuthorName, req.WorkFileId, app.ModuleClients.SfNode.Generate().Base64())
|
||||
if err != nil {
|
||||
return nil, errCommon.ReturnError(err, msg.ErrCreateClientToken, "创建clientToken 失败: ")
|
||||
}
|
||||
createDciPreregistrationRequest.SetClientToken(clientToken)
|
||||
|
||||
createDciPreregistrationResponse, err := app.ModuleClients.BccrClient.CreateDciPreregistration(createDciPreregistrationRequest)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
return nil, errCommon.ReturnError(err, msg.ErrCreateDciPreregistration, "作品 申领 DCI 失败: ")
|
||||
}
|
||||
|
||||
_ = copier.CopyWithOption(&res, createDciPreregistrationResponse, copier.Option{DeepCopy: true})
|
||||
errCommon.NoReturnInfo(createDciPreregistrationResponse, "作品 申领 DCI 成功: ")
|
||||
|
||||
_ = copier.CopyWithOption(&res, createDciPreregistrationResponse, copier.Option{DeepCopy: false})
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// QueryDciPreregistration 作品 查询 DCI
|
||||
func (w *DciWork) QueryDciPreregistration(req *dci.QueryDciPreregistrationRequest) (res *dci.QueryDciPreregistrationResponse, err error) {
|
||||
errCommon.NoReturnInfo(req, "作品 查询 DCI 参数信息: ")
|
||||
|
||||
res = new(dci.QueryDciPreregistrationResponse)
|
||||
|
||||
queryDciPreregistrationRequest := new(bccrClient.QueryDciPreregistrationRequest)
|
||||
_ = copier.CopyWithOption(&queryDciPreregistrationRequest, req, copier.Option{DeepCopy: true})
|
||||
_ = copier.CopyWithOption(&queryDciPreregistrationRequest, req, copier.Option{DeepCopy: false})
|
||||
|
||||
queryDciPreregistrationResponse, err := app.ModuleClients.BccrClient.QueryDciPreregistration(queryDciPreregistrationRequest)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
return nil, errCommon.ReturnError(err, msg.ErrQueryDciPreregistration, "作品 查询 DCI 失败: ")
|
||||
}
|
||||
|
||||
_ = copier.CopyWithOption(&res, queryDciPreregistrationResponse, copier.Option{DeepCopy: true})
|
||||
errCommon.NoReturnInfo(queryDciPreregistrationResponse, "作品 查询 DCI 成功: ")
|
||||
|
||||
_ = copier.CopyWithOption(&res, queryDciPreregistrationResponse, copier.Option{DeepCopy: false})
|
||||
|
||||
return
|
||||
}
|
||||
|
@ -4,12 +4,15 @@ import (
|
||||
"chain-dci/pb/dci"
|
||||
"chain-dci/pkg/app"
|
||||
errCommon "chain-dci/pkg/err"
|
||||
"chain-dci/pkg/msg"
|
||||
"chain-dci/pkg/utils"
|
||||
"encoding/base64"
|
||||
"github.com/alibabacloud-go/tea/tea"
|
||||
"errors"
|
||||
"fmt"
|
||||
bccrClient "github.com/antchain-openapi-sdk-go/bccr/client"
|
||||
"github.com/jinzhu/copier"
|
||||
"strings"
|
||||
"time"
|
||||
"unicode"
|
||||
)
|
||||
|
||||
@ -32,6 +35,7 @@ func GetUploadUrl(req *bccrClient.GetUploadurlRequest) (result *bccrClient.GetUp
|
||||
errCommon.NoReturnError(err, "调用 蚂蚁链获取 oss url 错误:")
|
||||
return
|
||||
}
|
||||
errCommon.NoReturnInfo(req, "获取 DCI GetUploadurl 返回结果:")
|
||||
return
|
||||
}
|
||||
|
||||
@ -42,6 +46,18 @@ func GetUploadUrl(req *bccrClient.GetUploadurlRequest) (result *bccrClient.GetUp
|
||||
*/
|
||||
func (f *File) Upload(req *dci.GetUploadUrlRequest) (res *dci.GetUploadUrlResponse, err error) {
|
||||
|
||||
fmt.Println("+++++++++++++++ GetUploadUrlRequest =================")
|
||||
fmt.Printf("GetUploadUrlRequest is : %+v\n", req)
|
||||
fmt.Println("+++++++++++++++ GetUploadUrlRequest =================")
|
||||
|
||||
errCommon.NoReturnInfo(req, "上传文件 参数记录:")
|
||||
|
||||
/*// 记录 上传的文件
|
||||
//nil := app.ModuleClients.DciDB.Begin()
|
||||
fileInfo := new(model.FileInfo)
|
||||
fileInfo.FileUrl = req.FileName
|
||||
_ = dao.CreateFileInfo(nil, fileInfo)*/
|
||||
|
||||
isChinese := false
|
||||
|
||||
getUploadUrlRequest := new(bccrClient.GetUploadurlRequest)
|
||||
@ -49,8 +65,10 @@ func (f *File) Upload(req *dci.GetUploadUrlRequest) (res *dci.GetUploadUrlRespon
|
||||
var fileName string
|
||||
// 拆分 文件名 和 文件链接
|
||||
fileArr := strings.Split(req.FileName, "/")
|
||||
fileNameWithSuffix := strings.Split(fileArr[len(fileArr)-1], ".")
|
||||
fileName = fileNameWithSuffix[0]
|
||||
fileName = fileArr[len(fileArr)-1]
|
||||
fmt.Println("+++++++++++++++ no encode fileName =================")
|
||||
fmt.Println("no encode fileName is :", fileArr[len(fileArr)-1])
|
||||
fmt.Println("+++++++++++++++ no encode fileName =================")
|
||||
|
||||
// 如果文件名包含 中文 则需要对 fileName 进行 utf-8 字符集进行 URL编码
|
||||
for _, c := range fileName {
|
||||
@ -60,26 +78,66 @@ func (f *File) Upload(req *dci.GetUploadUrlRequest) (res *dci.GetUploadUrlRespon
|
||||
}
|
||||
|
||||
if isChinese {
|
||||
getUploadUrlRequest.SetFileName(base64.URLEncoding.EncodeToString([]byte(fileName)))
|
||||
} else {
|
||||
getUploadUrlRequest.SetFileName(fileName)
|
||||
fileName = base64.URLEncoding.EncodeToString([]byte(fileName))
|
||||
}
|
||||
getUploadUrlRequest.SetFileName(fileName)
|
||||
|
||||
clientToken, err := createToken(time.Now().UnixMilli(), fileName, app.ModuleClients.SfNode.Generate().Base64())
|
||||
if err != nil {
|
||||
return nil, errCommon.ReturnError(err, msg.ErrCreateClientToken, "创建clientToken 失败: ")
|
||||
}
|
||||
getUploadUrlRequest.SetClientToken(clientToken)
|
||||
fmt.Println("+++++++++++++++ encode fileName =================")
|
||||
fmt.Println("encode fileName is :", fileName)
|
||||
fmt.Println("+++++++++++++++ encode fileName =================")
|
||||
|
||||
getUploadUrlResponse := GetUploadUrl(getUploadUrlRequest)
|
||||
//res = serializer.UploadUrlResponseToRpc(getUploadUrlResponse)
|
||||
res = new(dci.GetUploadUrlResponse)
|
||||
_ = copier.CopyWithOption(&res, getUploadUrlResponse, copier.Option{DeepCopy: true})
|
||||
_ = copier.CopyWithOption(&res, getUploadUrlResponse, copier.Option{DeepCopy: false})
|
||||
|
||||
if tea.ToString(getUploadUrlResponse.ResultCode) != "OK" {
|
||||
return res, errCommon.ReturnError(err, err.Error(), "获取授权访问OSS链接 错误:")
|
||||
}
|
||||
if tea.ToString(getUploadUrlResponse.Url) == "" || tea.ToString(getUploadUrlResponse.FileId) == "" {
|
||||
return res, errCommon.ReturnError(err, err.Error(), "获取授权访问OSS链接 错误:")
|
||||
fmt.Println("+++++++++++++++ GetUploadUrl =================")
|
||||
fmt.Printf("GetUploadUrl is : %+v\n", res)
|
||||
fmt.Println("+++++++++++++++ GetUploadUrl =================")
|
||||
|
||||
fmt.Println("====== =========== =================== 1 ===============")
|
||||
if res.ResultCode != "OK" {
|
||||
/* fileInfo.ReqMsgId = res.ReqMsgId
|
||||
fileInfo.ResultCode = res.ResultCode
|
||||
fileInfo.ResultMsg = res.ResultMsg
|
||||
fileInfo.Url = res.Url
|
||||
fileInfo.FileId = res.FileId
|
||||
err = dao.UpdateFileInfo(nil, fileInfo)*/
|
||||
errCommon.NoReturnError(errors.New(res.ResultMsg), "获取授权访问OSS链接 错误:")
|
||||
return res, nil
|
||||
}
|
||||
|
||||
code, result := utils.PutFromFileUrlWithStream(tea.ToString(res.Url), fileName, req.FileName)
|
||||
fmt.Println("====== =========== =================== 2 ===============")
|
||||
if res.Url == "" || res.FileId == "" {
|
||||
/*fileInfo.ReqMsgId = res.ReqMsgId
|
||||
fileInfo.ResultCode = res.ResultCode
|
||||
fileInfo.ResultMsg = res.ResultMsg
|
||||
fileInfo.Url = res.Url
|
||||
fileInfo.FileId = res.FileId
|
||||
_ = dao.UpdateFileInfo(nil, fileInfo)*/
|
||||
errCommon.NoReturnError(errors.New(res.ResultMsg), "获取授权访问OSS链接 错误:")
|
||||
return res, nil
|
||||
}
|
||||
|
||||
fmt.Println("====== =========== =================== 3 ===============")
|
||||
code, result := utils.PutFromFileUrlWithStream(res.Url, fileName, req.FileName)
|
||||
if code != 200 {
|
||||
return res, errCommon.ReturnError(err, result, "上传文件 错误:")
|
||||
err = errCommon.ReturnError(errors.New(result), result, "上传文件 错误:")
|
||||
//fileInfo.IsUpload = 3 // 上传失败
|
||||
} else {
|
||||
errCommon.NoReturnInfo(result, "上传文件 最终结果:")
|
||||
//fileInfo.IsUpload = 2 // 上传成功
|
||||
}
|
||||
return
|
||||
/*fileInfo.ReqMsgId = res.ReqMsgId
|
||||
fileInfo.ResultCode = res.ResultCode
|
||||
fileInfo.ResultMsg = res.ResultMsg
|
||||
fileInfo.Url = res.Url
|
||||
fileInfo.FileId = res.FileId
|
||||
_ = dao.UpdateFileInfo(nil, fileInfo)*/
|
||||
|
||||
return res, err
|
||||
}
|
||||
|
25
internal/model/file.go
Normal file
25
internal/model/file.go
Normal file
@ -0,0 +1,25 @@
|
||||
package model
|
||||
|
||||
import "gorm.io/gorm"
|
||||
|
||||
type FileInfo struct {
|
||||
gorm.Model
|
||||
// 请求唯一ID,用于链路跟踪和问题排查
|
||||
ReqMsgId string `json:"req_msg_id,omitempty" gorm:"req_msg_id"`
|
||||
// 结果码,一般OK表示调用成功
|
||||
ResultCode string `json:"result_code,omitempty" gorm:"result_code"`
|
||||
// 异常信息的文本描述
|
||||
ResultMsg string `json:"result_msg,omitempty" gorm:"result_msg"`
|
||||
// 授权访问oss链接
|
||||
Url string `json:"url,omitempty" gorm:"column:url;type:varchar(4096)"`
|
||||
// OSS 文件id
|
||||
FileId string `json:"file_id,omitempty" gorm:"file_id"`
|
||||
// 文件链接
|
||||
FileUrl string `json:"file_url,omitempty" gorm:"column:file_url;type:varchar(4096)"`
|
||||
// 真实文件是否上传
|
||||
IsUpload int `json:"is_upload" gorm:"column:is_upload;type:int;default:1"`
|
||||
}
|
||||
|
||||
func (f *FileInfo) GetTableName() string {
|
||||
return "file_info"
|
||||
}
|
@ -1 +0,0 @@
|
||||
package model
|
@ -1 +0,0 @@
|
||||
package serializer
|
@ -1,17 +0,0 @@
|
||||
package serializer
|
||||
|
||||
import (
|
||||
"chain-dci/pb/dci"
|
||||
"github.com/alibabacloud-go/tea/tea"
|
||||
bccrClient "github.com/antchain-openapi-sdk-go/bccr/client"
|
||||
)
|
||||
|
||||
func UploadUrlResponseToRpc(in *bccrClient.GetUploadurlResponse) (out *dci.GetUploadUrlResponse) {
|
||||
out = new(dci.GetUploadUrlResponse)
|
||||
out.ReqMsgId = tea.ToString(in.ReqMsgId)
|
||||
out.ResultMsg = tea.ToString(in.ResultMsg)
|
||||
out.ResultCode = tea.ToString(in.ResultCode)
|
||||
out.Url = tea.ToString(in.Url)
|
||||
out.FileId = tea.ToString(in.FileId)
|
||||
return
|
||||
}
|
178
logs/chain-dci.log
Normal file
178
logs/chain-dci.log
Normal file
File diff suppressed because one or more lines are too long
22
pb/dci.proto
22
pb/dci.proto
@ -58,7 +58,7 @@ message AddDciUserRequest {
|
||||
string legalPersonCertNo = 8 [json_name = "legalPersonCertNo"];
|
||||
string phone = 9 [json_name = "phone",(validator.field) = {string_not_empty: true,human_error:"手机号不能为空"}];
|
||||
string areaType = 10 [json_name = "areaType",(validator.field) = {string_not_empty: true,human_error:"所属地区不能为空"}];
|
||||
string clientToken = 11 [json_name = "clientToken",(validator.field) = {string_not_empty: true,human_error:"客户端token不能为空"}];
|
||||
string clientToken = 11 [json_name = "clientToken"];
|
||||
}
|
||||
|
||||
message AddDciUserResponse {
|
||||
@ -75,7 +75,7 @@ message UpdateDciUserRequest {
|
||||
string certFrontFileId = 2 [json_name = "certFrontFileId",(validator.field) = {string_not_empty: true,human_error:"证件正面文件路径不能为空"}];
|
||||
string certBackFileId = 3 [json_name = "certBackFileId"];
|
||||
string phone = 4 [json_name = "phone"];
|
||||
string clientToken = 5 [json_name = "clientToken",(validator.field) = {string_not_empty: true,human_error:"客户端token不能为空"}];
|
||||
string clientToken = 5 [json_name = "clientToken"];
|
||||
}
|
||||
|
||||
message UpdateDciUserResponse {
|
||||
@ -121,7 +121,7 @@ message CreateDciPreregistrationRequest {
|
||||
DciRightInfo rightInfo = 11 [json_name = "rightInfo",(validator.field) = {string_not_empty: true,human_error:"权利信息不能为空"}];
|
||||
string preRegistrationTrueWill = 12 [json_name = "preRegistrationTrueWill",(validator.field) = {string_not_empty: true,human_error:"真实意愿表达信息不能为空"}];
|
||||
repeated string copyrightOwnerIds = 13 [json_name = "copyrightOwnerIds",(validator.field) = {string_not_empty: true,human_error:"著作权人用户id列表不能为空"}];
|
||||
string clientToken = 14 [json_name = "clientToken",(validator.field) = {string_not_empty: true,human_error:"客户端token不能为空"}];
|
||||
string clientToken = 14 [json_name = "clientToken"];
|
||||
}
|
||||
|
||||
message DciCreationInfo {
|
||||
@ -131,9 +131,9 @@ message DciCreationInfo {
|
||||
}
|
||||
|
||||
message DciPublicationInfo {
|
||||
string creationNature = 1 [json_name = "creationNature",(validator.field) = {string_not_empty: true,human_error:"作品发表状态不能为空"}];
|
||||
string creationCompletionDate = 2 [json_name = "creationCompletionDate",(validator.field) = {string_not_empty: true,human_error:"首次发表日期不能为空"}];
|
||||
string creationCompletionCode = 3 [json_name = "creationCompletionCode",(validator.field) = {string_not_empty: true,human_error:"首次发表地点地区编码不能为空"}];
|
||||
string publicationStatus = 1 [json_name = "publicationStatus",(validator.field) = {string_not_empty: true,human_error:"作品发表状态不能为空"}];
|
||||
string firstPublicationDate = 2 [json_name = "firstPublicationDate",(validator.field) = {string_not_empty: true,human_error:"首次发表日期不能为空"}];
|
||||
string firstPublicationCode = 3 [json_name = "firstPublicationCode",(validator.field) = {string_not_empty: true,human_error:"首次发表地点地区编码不能为空"}];
|
||||
}
|
||||
|
||||
message DciRightInfo {
|
||||
@ -189,7 +189,7 @@ message CreateDciRegistrationRequest {
|
||||
DciExplanationInfo explanationInfo = 2 [json_name = "explanationInfo",(validator.field) = {string_not_empty: true,human_error:"作品创作说明不能为空"}];
|
||||
InvoiceInfo invoiceInfo = 3 [json_name = "invoiceInfo",(validator.field) = {string_not_empty: true,human_error:"发票信息不能为空"}];
|
||||
AdditionalFileInfo additionalFileInfo = 4 [json_name = "additionalFileInfo"];
|
||||
string clientToken = 5 [json_name = "clientToken",(validator.field) = {string_not_empty: true,human_error:"客户端token不能为空"}];
|
||||
string clientToken = 5 [json_name = "clientToken"];
|
||||
}
|
||||
|
||||
message DciExplanationInfo {
|
||||
@ -252,7 +252,7 @@ message QueryDciRegistrationResponse {
|
||||
// 数登 数登支付链接获取
|
||||
message GetDciPayUrlRequest {
|
||||
string digitalRegisterId = 1 [json_name = "digitalRegisterId",(validator.field) = {string_not_empty: true,human_error:"数登申请ID不能为空"}];
|
||||
string clientToken = 2 [json_name = "clientToken",(validator.field) = {string_not_empty: true,human_error:"客户端token不能为空"}];
|
||||
string clientToken = 2 [json_name = "clientToken"];
|
||||
}
|
||||
|
||||
message GetDciPayUrlResponse {
|
||||
@ -277,7 +277,7 @@ message QueryDciPayResponse {
|
||||
// 数登 获取数登证书下载
|
||||
message GetDciRegistrationcertRequest {
|
||||
string digitalRegisterId = 1 [json_name = "digitalRegisterId",(validator.field) = {string_not_empty: true,human_error:"数登申请ID不能为空"}];
|
||||
string clientToken = 2 [json_name = "clientToken",(validator.field) = {string_not_empty: true,human_error:"客户端token不能为空"}];
|
||||
string clientToken = 2 [json_name = "clientToken"];
|
||||
}
|
||||
|
||||
message GetDciRegistrationcertResponse {
|
||||
@ -296,7 +296,7 @@ message RetryDciRegistrationRequest {
|
||||
string dciContentId = 2 [json_name = "dciContentId"];
|
||||
DciExplanationInfo explanationInfo = 3 [json_name = "explanationInfo"];
|
||||
AdditionalFileInfo additionalFileInfo = 4 [json_name = "additionalFileInfo"];
|
||||
string clientToken = 5 [json_name = "clientToken",(validator.field) = {string_not_empty: true,human_error:"客户端token不能为空"}];
|
||||
string clientToken = 5 [json_name = "clientToken"];
|
||||
}
|
||||
|
||||
message RetryDciRegistrationResponse {
|
||||
@ -310,7 +310,7 @@ message CloseDciRegistrationRequest {
|
||||
string digitalRegisterId = 1 [json_name = "digitalRegisterId",(validator.field) = {string_not_empty: true,human_error:"数登申请ID不能为空"}];
|
||||
string name = 2 [json_name = "name",(validator.field) = {string_not_empty: true,length_lt: 41,human_error:"退费人名称不能为空"}];
|
||||
string mobileNo = 3 [json_name = "mobileNo",(validator.field) = {string_not_empty: true,human_error:"联系手机号不能为空"}];
|
||||
string clientToken = 5 [json_name = "clientToken",(validator.field) = {string_not_empty: true,human_error:"客户端token不能为空"}];
|
||||
string clientToken = 5 [json_name = "clientToken"];
|
||||
}
|
||||
|
||||
|
||||
|
1218
pb/dci/dci.pb.go
1218
pb/dci/dci.pb.go
File diff suppressed because it is too large
Load Diff
@ -45,9 +45,6 @@ func (this *AddDciUserRequest) Validate() error {
|
||||
if this.AreaType == "" {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("AreaType", fmt.Errorf(`所属地区不能为空`))
|
||||
}
|
||||
if this.ClientToken == "" {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("ClientToken", fmt.Errorf(`客户端token不能为空`))
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *AddDciUserResponse) Validate() error {
|
||||
@ -60,9 +57,6 @@ func (this *UpdateDciUserRequest) Validate() error {
|
||||
if this.CertFrontFileId == "" {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("CertFrontFileId", fmt.Errorf(`证件正面文件路径不能为空`))
|
||||
}
|
||||
if this.ClientToken == "" {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("ClientToken", fmt.Errorf(`客户端token不能为空`))
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *UpdateDciUserResponse) Validate() error {
|
||||
@ -131,9 +125,6 @@ func (this *CreateDciPreregistrationRequest) Validate() error {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("CopyrightOwnerIds", fmt.Errorf(`著作权人用户id列表不能为空`))
|
||||
}
|
||||
}
|
||||
if this.ClientToken == "" {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("ClientToken", fmt.Errorf(`客户端token不能为空`))
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *DciCreationInfo) Validate() error {
|
||||
@ -149,14 +140,14 @@ func (this *DciCreationInfo) Validate() error {
|
||||
return nil
|
||||
}
|
||||
func (this *DciPublicationInfo) Validate() error {
|
||||
if this.CreationNature == "" {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("CreationNature", fmt.Errorf(`作品发表状态不能为空`))
|
||||
if this.PublicationStatus == "" {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("PublicationStatus", fmt.Errorf(`作品发表状态不能为空`))
|
||||
}
|
||||
if this.CreationCompletionDate == "" {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("CreationCompletionDate", fmt.Errorf(`首次发表日期不能为空`))
|
||||
if this.FirstPublicationDate == "" {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("FirstPublicationDate", fmt.Errorf(`首次发表日期不能为空`))
|
||||
}
|
||||
if this.CreationCompletionCode == "" {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("CreationCompletionCode", fmt.Errorf(`首次发表地点地区编码不能为空`))
|
||||
if this.FirstPublicationCode == "" {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("FirstPublicationCode", fmt.Errorf(`首次发表地点地区编码不能为空`))
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@ -203,9 +194,6 @@ func (this *CreateDciRegistrationRequest) Validate() error {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("AdditionalFileInfo", err)
|
||||
}
|
||||
}
|
||||
if this.ClientToken == "" {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("ClientToken", fmt.Errorf(`客户端token不能为空`))
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *DciExplanationInfo) Validate() error {
|
||||
@ -257,9 +245,6 @@ func (this *GetDciPayUrlRequest) Validate() error {
|
||||
if this.DigitalRegisterId == "" {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("DigitalRegisterId", fmt.Errorf(`数登申请ID不能为空`))
|
||||
}
|
||||
if this.ClientToken == "" {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("ClientToken", fmt.Errorf(`客户端token不能为空`))
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *GetDciPayUrlResponse) Validate() error {
|
||||
@ -278,9 +263,6 @@ func (this *GetDciRegistrationcertRequest) Validate() error {
|
||||
if this.DigitalRegisterId == "" {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("DigitalRegisterId", fmt.Errorf(`数登申请ID不能为空`))
|
||||
}
|
||||
if this.ClientToken == "" {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("ClientToken", fmt.Errorf(`客户端token不能为空`))
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *GetDciRegistrationcertResponse) Validate() error {
|
||||
@ -300,9 +282,6 @@ func (this *RetryDciRegistrationRequest) Validate() error {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("AdditionalFileInfo", err)
|
||||
}
|
||||
}
|
||||
if this.ClientToken == "" {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("ClientToken", fmt.Errorf(`客户端token不能为空`))
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *RetryDciRegistrationResponse) Validate() error {
|
||||
@ -321,9 +300,6 @@ func (this *CloseDciRegistrationRequest) Validate() error {
|
||||
if this.MobileNo == "" {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("MobileNo", fmt.Errorf(`联系手机号不能为空`))
|
||||
}
|
||||
if this.ClientToken == "" {
|
||||
return github_com_mwitkow_go_proto_validators.FieldError("ClientToken", fmt.Errorf(`客户端token不能为空`))
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (this *CloseDciRegistrationResponse) Validate() error {
|
||||
|
545
pb/grpc/dci_grpc.pb.go
Normal file
545
pb/grpc/dci_grpc.pb.go
Normal file
@ -0,0 +1,545 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.2.0
|
||||
// - protoc v3.21.4
|
||||
// source: pb/dci.proto
|
||||
|
||||
package grpc
|
||||
|
||||
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
|
||||
|
||||
// DciClient is the client API for Dci 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 DciClient interface {
|
||||
// 通用接口 用于文件上传
|
||||
GetUploadUrl(ctx context.Context, in *GetUploadUrlRequest, opts ...grpc.CallOption) (*GetUploadUrlResponse, error)
|
||||
// dci user
|
||||
AddDciUser(ctx context.Context, in *AddDciUserRequest, opts ...grpc.CallOption) (*AddDciUserResponse, error)
|
||||
UpdateDciUser(ctx context.Context, in *UpdateDciUserRequest, opts ...grpc.CallOption) (*UpdateDciUserResponse, error)
|
||||
QueryDciUser(ctx context.Context, in *QueryDciUserRequest, opts ...grpc.CallOption) (*QueryDciUserResponse, error)
|
||||
// dci work
|
||||
CreateDciPreregistration(ctx context.Context, in *CreateDciPreregistrationRequest, opts ...grpc.CallOption) (*CreateDciPreregistrationResponse, error)
|
||||
QueryDciPreregistration(ctx context.Context, in *QueryDciPreregistrationRequest, opts ...grpc.CallOption) (*QueryDciPreregistrationResponse, error)
|
||||
// 数登
|
||||
CreateDciRegistration(ctx context.Context, in *CreateDciRegistrationRequest, opts ...grpc.CallOption) (*CreateDciRegistrationResponse, error)
|
||||
QueryDciRegistration(ctx context.Context, in *QueryDciRegistrationRequest, opts ...grpc.CallOption) (*QueryDciRegistrationResponse, error)
|
||||
GetDciPayUrl(ctx context.Context, in *GetDciPayUrlRequest, opts ...grpc.CallOption) (*GetDciPayUrlResponse, error)
|
||||
QueryDciPay(ctx context.Context, in *QueryDciPayRequest, opts ...grpc.CallOption) (*QueryDciPayResponse, error)
|
||||
GetDciRegistrationcert(ctx context.Context, in *GetDciRegistrationcertRequest, opts ...grpc.CallOption) (*GetDciRegistrationcertResponse, error)
|
||||
RetryDciRegistration(ctx context.Context, in *RetryDciRegistrationRequest, opts ...grpc.CallOption) (*RetryDciRegistrationResponse, error)
|
||||
CloseDciRegistration(ctx context.Context, in *CloseDciRegistrationRequest, opts ...grpc.CallOption) (*CloseDciRegistrationResponse, error)
|
||||
}
|
||||
|
||||
type dciClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewDciClient(cc grpc.ClientConnInterface) DciClient {
|
||||
return &dciClient{cc}
|
||||
}
|
||||
|
||||
func (c *dciClient) GetUploadUrl(ctx context.Context, in *GetUploadUrlRequest, opts ...grpc.CallOption) (*GetUploadUrlResponse, error) {
|
||||
out := new(GetUploadUrlResponse)
|
||||
err := c.cc.Invoke(ctx, "/dci.Dci/GetUploadUrl", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *dciClient) AddDciUser(ctx context.Context, in *AddDciUserRequest, opts ...grpc.CallOption) (*AddDciUserResponse, error) {
|
||||
out := new(AddDciUserResponse)
|
||||
err := c.cc.Invoke(ctx, "/dci.Dci/AddDciUser", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *dciClient) UpdateDciUser(ctx context.Context, in *UpdateDciUserRequest, opts ...grpc.CallOption) (*UpdateDciUserResponse, error) {
|
||||
out := new(UpdateDciUserResponse)
|
||||
err := c.cc.Invoke(ctx, "/dci.Dci/UpdateDciUser", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *dciClient) QueryDciUser(ctx context.Context, in *QueryDciUserRequest, opts ...grpc.CallOption) (*QueryDciUserResponse, error) {
|
||||
out := new(QueryDciUserResponse)
|
||||
err := c.cc.Invoke(ctx, "/dci.Dci/QueryDciUser", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *dciClient) CreateDciPreregistration(ctx context.Context, in *CreateDciPreregistrationRequest, opts ...grpc.CallOption) (*CreateDciPreregistrationResponse, error) {
|
||||
out := new(CreateDciPreregistrationResponse)
|
||||
err := c.cc.Invoke(ctx, "/dci.Dci/CreateDciPreregistration", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *dciClient) QueryDciPreregistration(ctx context.Context, in *QueryDciPreregistrationRequest, opts ...grpc.CallOption) (*QueryDciPreregistrationResponse, error) {
|
||||
out := new(QueryDciPreregistrationResponse)
|
||||
err := c.cc.Invoke(ctx, "/dci.Dci/QueryDciPreregistration", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *dciClient) CreateDciRegistration(ctx context.Context, in *CreateDciRegistrationRequest, opts ...grpc.CallOption) (*CreateDciRegistrationResponse, error) {
|
||||
out := new(CreateDciRegistrationResponse)
|
||||
err := c.cc.Invoke(ctx, "/dci.Dci/CreateDciRegistration", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *dciClient) QueryDciRegistration(ctx context.Context, in *QueryDciRegistrationRequest, opts ...grpc.CallOption) (*QueryDciRegistrationResponse, error) {
|
||||
out := new(QueryDciRegistrationResponse)
|
||||
err := c.cc.Invoke(ctx, "/dci.Dci/QueryDciRegistration", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *dciClient) GetDciPayUrl(ctx context.Context, in *GetDciPayUrlRequest, opts ...grpc.CallOption) (*GetDciPayUrlResponse, error) {
|
||||
out := new(GetDciPayUrlResponse)
|
||||
err := c.cc.Invoke(ctx, "/dci.Dci/GetDciPayUrl", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *dciClient) QueryDciPay(ctx context.Context, in *QueryDciPayRequest, opts ...grpc.CallOption) (*QueryDciPayResponse, error) {
|
||||
out := new(QueryDciPayResponse)
|
||||
err := c.cc.Invoke(ctx, "/dci.Dci/QueryDciPay", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *dciClient) GetDciRegistrationcert(ctx context.Context, in *GetDciRegistrationcertRequest, opts ...grpc.CallOption) (*GetDciRegistrationcertResponse, error) {
|
||||
out := new(GetDciRegistrationcertResponse)
|
||||
err := c.cc.Invoke(ctx, "/dci.Dci/GetDciRegistrationcert", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *dciClient) RetryDciRegistration(ctx context.Context, in *RetryDciRegistrationRequest, opts ...grpc.CallOption) (*RetryDciRegistrationResponse, error) {
|
||||
out := new(RetryDciRegistrationResponse)
|
||||
err := c.cc.Invoke(ctx, "/dci.Dci/RetryDciRegistration", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *dciClient) CloseDciRegistration(ctx context.Context, in *CloseDciRegistrationRequest, opts ...grpc.CallOption) (*CloseDciRegistrationResponse, error) {
|
||||
out := new(CloseDciRegistrationResponse)
|
||||
err := c.cc.Invoke(ctx, "/dci.Dci/CloseDciRegistration", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// DciServer is the server API for Dci service.
|
||||
// All implementations must embed UnimplementedDciServer
|
||||
// for forward compatibility
|
||||
type DciServer interface {
|
||||
// 通用接口 用于文件上传
|
||||
GetUploadUrl(context.Context, *GetUploadUrlRequest) (*GetUploadUrlResponse, error)
|
||||
// dci user
|
||||
AddDciUser(context.Context, *AddDciUserRequest) (*AddDciUserResponse, error)
|
||||
UpdateDciUser(context.Context, *UpdateDciUserRequest) (*UpdateDciUserResponse, error)
|
||||
QueryDciUser(context.Context, *QueryDciUserRequest) (*QueryDciUserResponse, error)
|
||||
// dci work
|
||||
CreateDciPreregistration(context.Context, *CreateDciPreregistrationRequest) (*CreateDciPreregistrationResponse, error)
|
||||
QueryDciPreregistration(context.Context, *QueryDciPreregistrationRequest) (*QueryDciPreregistrationResponse, error)
|
||||
// 数登
|
||||
CreateDciRegistration(context.Context, *CreateDciRegistrationRequest) (*CreateDciRegistrationResponse, error)
|
||||
QueryDciRegistration(context.Context, *QueryDciRegistrationRequest) (*QueryDciRegistrationResponse, error)
|
||||
GetDciPayUrl(context.Context, *GetDciPayUrlRequest) (*GetDciPayUrlResponse, error)
|
||||
QueryDciPay(context.Context, *QueryDciPayRequest) (*QueryDciPayResponse, error)
|
||||
GetDciRegistrationcert(context.Context, *GetDciRegistrationcertRequest) (*GetDciRegistrationcertResponse, error)
|
||||
RetryDciRegistration(context.Context, *RetryDciRegistrationRequest) (*RetryDciRegistrationResponse, error)
|
||||
CloseDciRegistration(context.Context, *CloseDciRegistrationRequest) (*CloseDciRegistrationResponse, error)
|
||||
mustEmbedUnimplementedDciServer()
|
||||
}
|
||||
|
||||
// UnimplementedDciServer must be embedded to have forward compatible implementations.
|
||||
type UnimplementedDciServer struct {
|
||||
}
|
||||
|
||||
func (UnimplementedDciServer) GetUploadUrl(context.Context, *GetUploadUrlRequest) (*GetUploadUrlResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetUploadUrl not implemented")
|
||||
}
|
||||
func (UnimplementedDciServer) AddDciUser(context.Context, *AddDciUserRequest) (*AddDciUserResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method AddDciUser not implemented")
|
||||
}
|
||||
func (UnimplementedDciServer) UpdateDciUser(context.Context, *UpdateDciUserRequest) (*UpdateDciUserResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateDciUser not implemented")
|
||||
}
|
||||
func (UnimplementedDciServer) QueryDciUser(context.Context, *QueryDciUserRequest) (*QueryDciUserResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method QueryDciUser not implemented")
|
||||
}
|
||||
func (UnimplementedDciServer) CreateDciPreregistration(context.Context, *CreateDciPreregistrationRequest) (*CreateDciPreregistrationResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CreateDciPreregistration not implemented")
|
||||
}
|
||||
func (UnimplementedDciServer) QueryDciPreregistration(context.Context, *QueryDciPreregistrationRequest) (*QueryDciPreregistrationResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method QueryDciPreregistration not implemented")
|
||||
}
|
||||
func (UnimplementedDciServer) CreateDciRegistration(context.Context, *CreateDciRegistrationRequest) (*CreateDciRegistrationResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CreateDciRegistration not implemented")
|
||||
}
|
||||
func (UnimplementedDciServer) QueryDciRegistration(context.Context, *QueryDciRegistrationRequest) (*QueryDciRegistrationResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method QueryDciRegistration not implemented")
|
||||
}
|
||||
func (UnimplementedDciServer) GetDciPayUrl(context.Context, *GetDciPayUrlRequest) (*GetDciPayUrlResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetDciPayUrl not implemented")
|
||||
}
|
||||
func (UnimplementedDciServer) QueryDciPay(context.Context, *QueryDciPayRequest) (*QueryDciPayResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method QueryDciPay not implemented")
|
||||
}
|
||||
func (UnimplementedDciServer) GetDciRegistrationcert(context.Context, *GetDciRegistrationcertRequest) (*GetDciRegistrationcertResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetDciRegistrationcert not implemented")
|
||||
}
|
||||
func (UnimplementedDciServer) RetryDciRegistration(context.Context, *RetryDciRegistrationRequest) (*RetryDciRegistrationResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method RetryDciRegistration not implemented")
|
||||
}
|
||||
func (UnimplementedDciServer) CloseDciRegistration(context.Context, *CloseDciRegistrationRequest) (*CloseDciRegistrationResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CloseDciRegistration not implemented")
|
||||
}
|
||||
func (UnimplementedDciServer) mustEmbedUnimplementedDciServer() {}
|
||||
|
||||
// UnsafeDciServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to DciServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeDciServer interface {
|
||||
mustEmbedUnimplementedDciServer()
|
||||
}
|
||||
|
||||
func RegisterDciServer(s grpc.ServiceRegistrar, srv DciServer) {
|
||||
s.RegisterService(&Dci_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _Dci_GetUploadUrl_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetUploadUrlRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DciServer).GetUploadUrl(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/dci.Dci/GetUploadUrl",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DciServer).GetUploadUrl(ctx, req.(*GetUploadUrlRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Dci_AddDciUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(AddDciUserRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DciServer).AddDciUser(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/dci.Dci/AddDciUser",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DciServer).AddDciUser(ctx, req.(*AddDciUserRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Dci_UpdateDciUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(UpdateDciUserRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DciServer).UpdateDciUser(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/dci.Dci/UpdateDciUser",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DciServer).UpdateDciUser(ctx, req.(*UpdateDciUserRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Dci_QueryDciUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(QueryDciUserRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DciServer).QueryDciUser(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/dci.Dci/QueryDciUser",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DciServer).QueryDciUser(ctx, req.(*QueryDciUserRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Dci_CreateDciPreregistration_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CreateDciPreregistrationRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DciServer).CreateDciPreregistration(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/dci.Dci/CreateDciPreregistration",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DciServer).CreateDciPreregistration(ctx, req.(*CreateDciPreregistrationRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Dci_QueryDciPreregistration_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(QueryDciPreregistrationRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DciServer).QueryDciPreregistration(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/dci.Dci/QueryDciPreregistration",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DciServer).QueryDciPreregistration(ctx, req.(*QueryDciPreregistrationRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Dci_CreateDciRegistration_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CreateDciRegistrationRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DciServer).CreateDciRegistration(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/dci.Dci/CreateDciRegistration",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DciServer).CreateDciRegistration(ctx, req.(*CreateDciRegistrationRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Dci_QueryDciRegistration_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(QueryDciRegistrationRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DciServer).QueryDciRegistration(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/dci.Dci/QueryDciRegistration",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DciServer).QueryDciRegistration(ctx, req.(*QueryDciRegistrationRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Dci_GetDciPayUrl_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetDciPayUrlRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DciServer).GetDciPayUrl(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/dci.Dci/GetDciPayUrl",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DciServer).GetDciPayUrl(ctx, req.(*GetDciPayUrlRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Dci_QueryDciPay_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(QueryDciPayRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DciServer).QueryDciPay(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/dci.Dci/QueryDciPay",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DciServer).QueryDciPay(ctx, req.(*QueryDciPayRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Dci_GetDciRegistrationcert_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetDciRegistrationcertRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DciServer).GetDciRegistrationcert(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/dci.Dci/GetDciRegistrationcert",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DciServer).GetDciRegistrationcert(ctx, req.(*GetDciRegistrationcertRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Dci_RetryDciRegistration_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(RetryDciRegistrationRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DciServer).RetryDciRegistration(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/dci.Dci/RetryDciRegistration",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DciServer).RetryDciRegistration(ctx, req.(*RetryDciRegistrationRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Dci_CloseDciRegistration_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CloseDciRegistrationRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DciServer).CloseDciRegistration(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/dci.Dci/CloseDciRegistration",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DciServer).CloseDciRegistration(ctx, req.(*CloseDciRegistrationRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// Dci_ServiceDesc is the grpc.ServiceDesc for Dci service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var Dci_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "dci.Dci",
|
||||
HandlerType: (*DciServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "GetUploadUrl",
|
||||
Handler: _Dci_GetUploadUrl_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "AddDciUser",
|
||||
Handler: _Dci_AddDciUser_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UpdateDciUser",
|
||||
Handler: _Dci_UpdateDciUser_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "QueryDciUser",
|
||||
Handler: _Dci_QueryDciUser_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "CreateDciPreregistration",
|
||||
Handler: _Dci_CreateDciPreregistration_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "QueryDciPreregistration",
|
||||
Handler: _Dci_QueryDciPreregistration_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "CreateDciRegistration",
|
||||
Handler: _Dci_CreateDciRegistration_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "QueryDciRegistration",
|
||||
Handler: _Dci_QueryDciRegistration_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetDciPayUrl",
|
||||
Handler: _Dci_GetDciPayUrl_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "QueryDciPay",
|
||||
Handler: _Dci_QueryDciPay_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetDciRegistrationcert",
|
||||
Handler: _Dci_GetDciRegistrationcert_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "RetryDciRegistration",
|
||||
Handler: _Dci_RetryDciRegistration_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "CloseDciRegistration",
|
||||
Handler: _Dci_CloseDciRegistration_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "pb/dci.proto",
|
||||
}
|
@ -1,20 +0,0 @@
|
||||
package ant
|
||||
|
||||
import (
|
||||
dciConfig "chain-dci/config"
|
||||
"github.com/google/wire"
|
||||
antCloud "github.com/huyi-cn/antcloud-golang-sdk"
|
||||
)
|
||||
|
||||
var Provider = wire.NewSet(NewAntClient)
|
||||
|
||||
func NewAntClient() *antCloud.Client {
|
||||
// Endpoint 请参考 https://api.aliyun.com/product/rtc
|
||||
//bccrConfig := new(bccrClient.Config)
|
||||
//bccrConfig.SetEndpoint(dciConfig.Data.Dci.EndPoint)
|
||||
//bccrConfig.SetAccessKeyId(dciConfig.Data.Dci.AccessKey)
|
||||
//bccrConfig.SetAccessKeySecret(dciConfig.Data.Dci.AccessKeySecret)
|
||||
|
||||
client := antCloud.NewClient(dciConfig.Data.AntCloud.EndPoint, dciConfig.Data.AntCloud.AccessKey, dciConfig.Data.AntCloud.AccessKeySecret, nil)
|
||||
return client
|
||||
}
|
@ -4,7 +4,6 @@ import (
|
||||
"chain-dci/pkg/tracing"
|
||||
bccrClient "github.com/antchain-openapi-sdk-go/bccr/client"
|
||||
"github.com/bwmarrin/snowflake"
|
||||
antCloud "github.com/huyi-cn/antcloud-golang-sdk"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
@ -14,8 +13,7 @@ type App struct {
|
||||
Lg *zap.Logger
|
||||
//RedisClient *redis.Client
|
||||
JaegerTracer *tracing.JaegerProvider
|
||||
//DbMeeting *gorm.DB
|
||||
//DciDB *gorm.DB
|
||||
SfNode *snowflake.Node
|
||||
AntClient *antCloud.Client
|
||||
BccrClient *bccrClient.Client
|
||||
}
|
||||
|
@ -22,4 +22,3 @@ func NewBccrClient() *bccrClient.Client {
|
||||
}
|
||||
return client
|
||||
}
|
||||
|
||||
|
27
pkg/cache/redis.go
vendored
27
pkg/cache/redis.go
vendored
@ -1,27 +1,24 @@
|
||||
package cache
|
||||
|
||||
import (
|
||||
dciConfig "chain-dci/config"
|
||||
"github.com/dubbogo/gost/log/logger"
|
||||
"github.com/go-redis/redis"
|
||||
"github.com/google/wire"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
var RedisProvider = wire.NewSet(NewRedis)
|
||||
|
||||
// TODO 添加连接池
|
||||
func NewRedis() *redis.Client {
|
||||
redisDb, _ := strconv.Atoi(dciConfig.Data.Redis.DB)
|
||||
RedisClient := redis.NewClient(&redis.Options{
|
||||
Addr: dciConfig.Data.Redis.Addr,
|
||||
Password: dciConfig.Data.Redis.Password,
|
||||
DB: redisDb,
|
||||
})
|
||||
_, err := RedisClient.Ping().Result()
|
||||
if err != nil {
|
||||
logger.Errorf("connRedis err", err)
|
||||
panic(err)
|
||||
}
|
||||
return RedisClient
|
||||
//redisDb, _ := strconv.Atoi(dciConfig.Data.Redis.DB)
|
||||
//RedisClient := redis.NewClient(&redis.Options{
|
||||
// Addr: dciConfig.Data.Redis.Addr,
|
||||
// Password: dciConfig.Data.Redis.Password,
|
||||
// DB: redisDb,
|
||||
//})
|
||||
//_, err := RedisClient.Ping().Result()
|
||||
//if err != nil {
|
||||
// logger.Errorf("connRedis err", err)
|
||||
// panic(err)
|
||||
//}
|
||||
return nil
|
||||
}
|
||||
|
@ -2,17 +2,16 @@ package db
|
||||
|
||||
import (
|
||||
dciConfig "chain-dci/config"
|
||||
"github.com/google/wire"
|
||||
"gorm.io/gorm"
|
||||
"strings"
|
||||
)
|
||||
|
||||
var MeetingProvider = wire.NewSet(NewDci)
|
||||
//var DciProvider = wire.NewSet(NewDci)
|
||||
|
||||
func NewDci() *gorm.DB {
|
||||
connOaMeeting := strings.Join([]string{dciConfig.Data.ChainDci.User, ":", dciConfig.Data.ChainDci.Password,
|
||||
connDci := strings.Join([]string{dciConfig.Data.ChainDci.User, ":", dciConfig.Data.ChainDci.Password,
|
||||
"@tcp(", dciConfig.Data.ChainDci.Host, ":", dciConfig.Data.ChainDci.Port, ")/",
|
||||
dciConfig.Data.ChainDci.DbName, "?charset=utf8mb4&parseTime=true"}, "")
|
||||
DbOaMeeting := loadMysqlConn(connOaMeeting)
|
||||
return DbOaMeeting
|
||||
DciDB := loadMysqlConn(connDci)
|
||||
return DciDB
|
||||
}
|
||||
|
@ -1,6 +1,8 @@
|
||||
package db
|
||||
|
||||
import (
|
||||
"chain-dci/internal/model"
|
||||
"chain-dci/pkg/app"
|
||||
"github.com/gin-gonic/gin"
|
||||
"gorm.io/driver/mysql"
|
||||
"gorm.io/gorm"
|
||||
@ -37,12 +39,15 @@ func loadMysqlConn(conn string) *gorm.DB {
|
||||
sqlDB.SetMaxIdleConns(20) //设置连接池,空闲
|
||||
sqlDB.SetMaxOpenConns(100) //打开
|
||||
sqlDB.SetConnMaxLifetime(time.Second * 30)
|
||||
err = db.AutoMigrate(&model.FileInfo{})
|
||||
if err != nil {
|
||||
return nil
|
||||
}
|
||||
return db
|
||||
}
|
||||
|
||||
func DBMigration() {
|
||||
//addColumn(&model_account.Users{}, "action_code")
|
||||
|
||||
_ = app.ModuleClients.DciDB.AutoMigrate(&model.FileInfo{})
|
||||
}
|
||||
|
||||
func addColumn(dst interface{}, column string) {
|
||||
|
8
pkg/err/amendType.go
Normal file
8
pkg/err/amendType.go
Normal file
@ -0,0 +1,8 @@
|
||||
package err
|
||||
|
||||
var AmendType = map[string]string{
|
||||
"TOBE_AMEND": "待补正",
|
||||
"AMEND_CHECK_FAIL": "待补正审核不通过",
|
||||
"REPLACE_DCI": "需要替换DCI补正",
|
||||
"NO_NEED_REPLACE_DCI": "不需要替换DCI补正",
|
||||
}
|
1
pkg/err/areaCode.go
Normal file
1
pkg/err/areaCode.go
Normal file
@ -0,0 +1 @@
|
||||
package err
|
6
pkg/err/certType.go
Normal file
6
pkg/err/certType.go
Normal file
@ -0,0 +1,6 @@
|
||||
package err
|
||||
|
||||
var CertTypeMap = map[string]string{
|
||||
"IDENTITY_CARD": "身份证",
|
||||
"NATIONAL_LEGAL_MERGE": "统⼀社会信⽤代码",
|
||||
}
|
@ -26,3 +26,8 @@ func NoReturnError(err error, print string) {
|
||||
fmt.Printf(print+"%+v\n", err)
|
||||
}
|
||||
}
|
||||
|
||||
func NoReturnInfo(info interface{}, print string) {
|
||||
field := zap.Any("", info)
|
||||
app.ModuleClients.Lg.Info(print, field)
|
||||
}
|
||||
|
13
pkg/err/dciDigitalRegStatusEnum.go
Normal file
13
pkg/err/dciDigitalRegStatusEnum.go
Normal file
@ -0,0 +1,13 @@
|
||||
package err
|
||||
|
||||
var DciDigitalRegStatusEnum = map[string]string{
|
||||
"CHECK": "初审中",
|
||||
"CHECK_FAIL": "初审不通过",
|
||||
"PAY": "待支付",
|
||||
"REVIEW": "复审中",
|
||||
"TOBE_AMEND": "待补正",
|
||||
"AMEND_CHECK_FAIL": "待补正审核失败",
|
||||
"FINISH": "数登完成",
|
||||
"DISREGARD": "不予处理",
|
||||
"REGISTRATION_STOP": "申请停止",
|
||||
}
|
8
pkg/err/failDetail.go
Normal file
8
pkg/err/failDetail.go
Normal file
@ -0,0 +1,8 @@
|
||||
package err
|
||||
|
||||
var FailDetail = map[string]string{
|
||||
"CHECK_FAIL": "初审不通过",
|
||||
"TOBE_AMEND": "待补正",
|
||||
"AMEND_CHECK_FAIL": "待补正审核不通过",
|
||||
"DISREGARD": "不予受理",
|
||||
}
|
9
pkg/err/fileType.go
Normal file
9
pkg/err/fileType.go
Normal file
@ -0,0 +1,9 @@
|
||||
package err
|
||||
|
||||
var FileType = map[string]string{
|
||||
"TEXT": "文本(限制pdf类型)(限制文件大小10M)",
|
||||
"IMAGE": "图片(限制jpg、jpeg、png类型)(限制文件大小5M)(图片像素不低于400x400,不高于5000x5000)",
|
||||
"AUDIO": "音频(限制mp3、wav类型)(限制文件大小50M)",
|
||||
"VIDEO": "视频(限制mp4、avi、wmv类型)(限制文件大小200M)",
|
||||
"PDF_IMAGE": "系列图(限制pdf类型)(限制文件大小10M)(限制子图数量2-30)",
|
||||
}
|
8
pkg/err/fontCopyrightEnum.go
Normal file
8
pkg/err/fontCopyrightEnum.go
Normal file
@ -0,0 +1,8 @@
|
||||
package err
|
||||
|
||||
var FontCopyrightEnum = map[string]string{
|
||||
"NO_NEED": "不涉及字体版权",
|
||||
"FREE_FONT": "公共免费字体",
|
||||
"ORIGINAL_FONT": "原创字体",
|
||||
"AUTHORIZED_FONT": "商用字体已授权",
|
||||
}
|
6
pkg/err/invoiceTypeEnum.go
Normal file
6
pkg/err/invoiceTypeEnum.go
Normal file
@ -0,0 +1,6 @@
|
||||
package err
|
||||
|
||||
var InvoiceTypeEnum = map[string]string{
|
||||
"NORMAL": "普票",
|
||||
"SPECIAL": "专票",
|
||||
}
|
6
pkg/err/ownershipWay.go
Normal file
6
pkg/err/ownershipWay.go
Normal file
@ -0,0 +1,6 @@
|
||||
package err
|
||||
|
||||
var OwnershipWay = map[string]string{
|
||||
"PERSON": "个人作品",
|
||||
"ENTERPRISE": "法人作品",
|
||||
}
|
7
pkg/err/payStatus.go
Normal file
7
pkg/err/payStatus.go
Normal file
@ -0,0 +1,7 @@
|
||||
package err
|
||||
|
||||
var PayStatus = map[string]string{
|
||||
"PAY_SUCCESS": "支付成功",
|
||||
"PAY_FAIL": "支付失败",
|
||||
"UNPAID": "待支付",
|
||||
}
|
8
pkg/err/preRegistrationTrueWill.go
Normal file
8
pkg/err/preRegistrationTrueWill.go
Normal file
@ -0,0 +1,8 @@
|
||||
package err
|
||||
|
||||
var PreRegistrationTrueWill = map[string]string{
|
||||
"PASSWORD": "密码验证",
|
||||
"CONFIRM_SMS": "用户短信验证",
|
||||
"LIVE_SMS": "指纹或视频人脸验证",
|
||||
"CERTIFICATE": "电子签名验证",
|
||||
}
|
5
pkg/err/publicationStatus.go
Normal file
5
pkg/err/publicationStatus.go
Normal file
@ -0,0 +1,5 @@
|
||||
package err
|
||||
|
||||
var PublicationStatus = map[string]string{
|
||||
"PUBLISHED": "作品已发表",
|
||||
}
|
9
pkg/err/resultCode.go
Normal file
9
pkg/err/resultCode.go
Normal file
@ -0,0 +1,9 @@
|
||||
package err
|
||||
|
||||
var ResultCode = map[string]string{
|
||||
"OK": "正常返回",
|
||||
"BAD_REQUEST": "请求参数错误",
|
||||
"PERMISSION_ERROR": "权限错误",
|
||||
"BUSINESS_ERROR": "业务内容错误",
|
||||
"SERVER_ERROR": "服务器错误",
|
||||
}
|
66
pkg/err/resultMsg.go
Normal file
66
pkg/err/resultMsg.go
Normal file
@ -0,0 +1,66 @@
|
||||
package err
|
||||
|
||||
var ResultMsg = map[string]string{
|
||||
"PERMISSION_IS_NOT_EXIST": "权限未开通",
|
||||
"WORK_NAME_IS_NULL": "作品名称为空",
|
||||
"WORK_NAME_INVALID_LENGTH": "作品名称长度错误",
|
||||
"WORK_CATEGORY_INVALID": "作品类型错误",
|
||||
"WORK_FILE_ID_IS_NULL": "作品fileId为空",
|
||||
"WORK_FILE_NOT_EXIST": "作品文件不存在",
|
||||
"WORK_CREATION_INFO_IS_NULL": "作品创作信息为空",
|
||||
"WORK_CREATION_NATURE_INVALID": "作品创作性质错误",
|
||||
"WORK_CREATION_DATE_INVALID": "作品创作时间错误",
|
||||
"WORK_CREATION_CODE_IS_NULL": "作品创作地点为空",
|
||||
"WORK_PUBLICATION_INFO_IS_NULL": "作品发表信息为空",
|
||||
"WORK_PUBLICATION_STATUS_INVALID": "作品发表状态错误",
|
||||
"WORK_PUBLICATION_DATE_INVALID": "作品发表时间错误",
|
||||
"WORK_PUBLICATION_CODE_INVALID": "作品发表地点错误",
|
||||
"WORK_AUTHOR_NAME_IS_NULL": "作品作者名称为空",
|
||||
"WORK_RIGHT_INFO_IS_NULL": "作品权利信息为空",
|
||||
"WORK_RIGHT_SCOPE_INVALID": "作品权利范围错误",
|
||||
"WORK_RIGHT_OBTAIN_WAY_INVALID": "作品权利获取方式错误",
|
||||
"WORK_OWNERSHIP_WAY_INVALID": "作品权利归属方式错误",
|
||||
"PREREGISTRATION_TRUE_WILL_INVALID": "真实意愿表达错误",
|
||||
"ACCOUNT_BALANCE_STATUS_INVALID": "账号余额不足",
|
||||
"DCI_FILE_TYPE_INVALID": "dci文件类型错误",
|
||||
"DCI_COPYRIGHT_OWNER_ID_IS_NULL": "著作权人用户id为空",
|
||||
"DCI_COPYRIGHT_OWNER_ID_INVALID": "著作权人用户id无效",
|
||||
"DCI_CATEGORY_NOT_OPTIONAL": "DCI作品类型不可选",
|
||||
"DCI_FILE_SIZE_INVALID": "dci作品文件大小超限",
|
||||
"DCI_FILE_INVALID": "dci作品文件异常",
|
||||
"DCI_FILE_NAME_INVALID": "dci作品文件为空",
|
||||
"WORK_FILE_ID_INVALID": "dci作品文件id异常",
|
||||
"WORK_CREATION_CODE_INVALID": "作品创作地点无效",
|
||||
"CHANNEL_TERMINAL_INVALID": "渠道标签无效",
|
||||
"DCI_CONTENT_ALREADY_EXIST": "相同文件已发起过dci申领",
|
||||
"DCI_USER_ID_IS_NULL": "dci用户id为空",
|
||||
"DCI_USER_ID_INVALID": "dci用户id有误",
|
||||
"DCI_USER_CERT_FRONT_FILE_EMPTY": "dci证件正面文件入参为空",
|
||||
"DCI_USER_CERT_BACK_FILE_EMPTY": "dci证件背面文件入参为空",
|
||||
"DCI_USER_CERT_FRONT_FILE_NOT_EXIST": "dci证件正面文件不存在",
|
||||
"DCI_USER_CERT_BACK_FILE_NOT_EXIST": "dci用户证件背面文件不存在",
|
||||
"DCI_USER_PHONE_INVALID": "dci用户手机号无效",
|
||||
"DCI_USER_NAME_INVALID": "dci用户名错误",
|
||||
"DCI_USER_LEGAL_PERSON_CERT_NAME_EMPTY": "dci用户法人姓名无效",
|
||||
"DCI_USER_LEGAL_PERSON_CERT_TYPE_EMPTY": "dci用户法人证件类型无效",
|
||||
"DCI_USER_LEGAL_PERSON_CERT_NO_EMPTY": "dci用户法人证件号无效",
|
||||
"DCI_USER_LEGAL_PERSON_CERT_NO_INVALID": "dci用户法人证件号错误",
|
||||
"DCI_CERTIFICATE_START_TIME_INVALID": "dci证件开始时间错误",
|
||||
"DCI_CERTIFICATE_END_TIME_INVALID": "dci证件结束时间错误",
|
||||
"DCI_CERTIFICATE_FRONT_ID_INVALID": "dci证件正面文件d为空",
|
||||
"DCI_CERTIFICATE_FRONT_NOT_EXIST": "dci证件正面文件不存在",
|
||||
"DCI_CERTIFICATE_BACK_NOT_EXIST": "dci证件背面文件不存在",
|
||||
"DCI_IDENTITY_START_TIME_INVALID": "dci证件开始时间错误",
|
||||
"DCI_USER_AREA_INVALID": "dci用户所属地区错误,当前只支持CHINA_MAINLAND",
|
||||
"DCI_USER_ALREADY_EXIST": "已注册过dci用户",
|
||||
"DCI_CERTIFICATE_TYPE_INVALID": "dci证件类型错误",
|
||||
"DCI_CERTIFICATE_NUMBER_INVALID": "dci证件号错误",
|
||||
"DCI_CERTIFICATE_NUMBER_IS_NULL": "dci证件号为空",
|
||||
"DCI_USER_PHONE_IS_NULL": "dci用户手机号为空",
|
||||
"REPEAT_REQUEST_INTERCEPTION": "重复请求",
|
||||
"DCI_CONTENT_NOT_EXIST": "DCI作品不存在",
|
||||
"DCI_CONTENT_ID_INVALID": "dci申领id有误",
|
||||
"DCI_CONTENT_ID_IS_NULL": "dci申领id为空",
|
||||
"DCI_USER_NOT_EXIST": "dci用户不存在",
|
||||
"DCI_USER_NOT_MATCH": "dci用户不匹配",
|
||||
}
|
5
pkg/err/rightObtainWay.go
Normal file
5
pkg/err/rightObtainWay.go
Normal file
@ -0,0 +1,5 @@
|
||||
package err
|
||||
|
||||
var RightObtainWay = map[string]string{
|
||||
"ORIGINAL": "原创",
|
||||
}
|
5
pkg/err/rightScope.go
Normal file
5
pkg/err/rightScope.go
Normal file
@ -0,0 +1,5 @@
|
||||
package err
|
||||
|
||||
var RightScope = map[string]string{
|
||||
"ALL": "全选",
|
||||
}
|
6
pkg/err/userStatus.go
Normal file
6
pkg/err/userStatus.go
Normal file
@ -0,0 +1,6 @@
|
||||
package err
|
||||
|
||||
var UserStatus = map[string]string{
|
||||
"NORMAL": "正常",
|
||||
"DISABLE": "停用",
|
||||
}
|
19
pkg/err/workCategory.go
Normal file
19
pkg/err/workCategory.go
Normal file
@ -0,0 +1,19 @@
|
||||
package err
|
||||
|
||||
var WorkCategory = map[string]string{
|
||||
"WORD": "文字作品,支持文件类型TEXT",
|
||||
"ORAL": "口述作品,支持文件类型AUDIO",
|
||||
"MUSIC": "音乐作品,支持文件类型AUDIO",
|
||||
"DRAMA": "戏剧作品,支持文件类型TEXT",
|
||||
"QUYI": "曲艺作品,支持文件类型TEXT",
|
||||
"DANCE": "舞蹈作品,支持文件类型VIDEO",
|
||||
"ACRABATICS": "杂技作品,支持文件类型VIDEO",
|
||||
"ART": "美术作品,支持文件类型IMAGE",
|
||||
"ARCHITECTURE": "建筑作品,支持文件类型IMAGE",
|
||||
"PHOTOGRAPHY": "摄影作品,支持文件类型IMAGE",
|
||||
"MOVIE": "电影作品,支持文件类型VIDEO",
|
||||
"AUDIOVISUAL": "类似摄制电影方法创作作品,支持文件类型VIDEO",
|
||||
"DESIGN": "工程设计图、产品设计图,支持文件类型IMAGE",
|
||||
"DIAGRAM": "示意图,支持文件类型IMAGE",
|
||||
"MODEL": "模型,支持文件类型IMAGE",
|
||||
}
|
5
pkg/err/workCreationNature.go
Normal file
5
pkg/err/workCreationNature.go
Normal file
@ -0,0 +1,5 @@
|
||||
package err
|
||||
|
||||
var WorkCreationNature = map[string]string{
|
||||
"ORIGINAL": "原创",
|
||||
}
|
9
pkg/err/workStatus.go
Normal file
9
pkg/err/workStatus.go
Normal file
@ -0,0 +1,9 @@
|
||||
package err
|
||||
|
||||
var WorkStatus = map[string]string{
|
||||
"DCI_PRE_REG_AUDITING": "申领审核中",
|
||||
"DCI_PRE_REG_FINISH": "申领成功",
|
||||
"DCI_PRE_REG_FAIL": "申领失败",
|
||||
"DCI_PRE_REG_CANCEL": "dci撤销",
|
||||
"DCI_PRE_REG_TOBE_CONFIRM": "申领待确认,账户余额不足",
|
||||
}
|
@ -1,7 +1,5 @@
|
||||
package common
|
||||
|
||||
import "chain-dci/pkg/db"
|
||||
|
||||
func Init() {
|
||||
db.DBMigration()
|
||||
//db.DBMigration()
|
||||
}
|
||||
|
@ -1,5 +1,18 @@
|
||||
package msg
|
||||
|
||||
const (
|
||||
ErrrFileIsEmpty = "未获取到相关文件"
|
||||
ErrFileIsEmpty = "未获取到相关文件"
|
||||
ErrCreateClientToken = "创建clientToken失败"
|
||||
ErrAddDciUser = "著作权人申领DCI信息失败"
|
||||
ErrUpdateDciUser = "著作权人更新DCI信息失败"
|
||||
ErrQueryDciUser = "著作权人查询DCI信息失败"
|
||||
ErrCreateDciPreregistration = "作品申领DCI失败"
|
||||
ErrQueryDciPreregistration = "作品查询DCI失败"
|
||||
ErrCreateDciRegistration = "发起数登申请失败"
|
||||
ErrQueryDciRegistration = "查询数登申请失败"
|
||||
ErrGetDciPayurl = "数登支付链接获取失败"
|
||||
ErrQueryDciPay = "数登支付查询失败"
|
||||
ErrGetDciRegistrationcert = "获取数登证书下载失败"
|
||||
ErrRetryDciRegistration = "补正申请失败"
|
||||
ErrCloseDciRegistration = "数登停止申请失败"
|
||||
)
|
||||
|
@ -26,6 +26,11 @@ func NewSf() *snowflake.Node {
|
||||
}
|
||||
return node
|
||||
}
|
||||
func GenID() int64 {
|
||||
|
||||
func GenIDInt64() int64 {
|
||||
return app.ModuleClients.SfNode.Generate().Int64()
|
||||
}
|
||||
|
||||
func GetIDBase64() string {
|
||||
return app.ModuleClients.SfNode.Generate().Base64()
|
||||
}
|
||||
|
@ -2,7 +2,6 @@ package utils
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/base64"
|
||||
"fmt"
|
||||
"go.uber.org/zap"
|
||||
"io/ioutil"
|
||||
@ -55,19 +54,22 @@ func PutFromFileUrlWithStream(url, fileName, fileUrl string) (statusCode int, re
|
||||
|
||||
req, err := http.NewRequest("PUT", url, bytes.NewBuffer(fileBody))
|
||||
req.Header.Set("Content-Type", "application/octet-stream")
|
||||
req.Header.Set("x-oss-meta-rawfilename", base64.URLEncoding.EncodeToString([]byte(fileName)))
|
||||
req.Header.Set("x-oss-meta-rawfilename", fileName)
|
||||
client := &http.Client{}
|
||||
resp, err := client.Do(req)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
//panic(err)
|
||||
return 400, "执行文件上传失败"
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
statusCode = resp.StatusCode
|
||||
body, _ := ioutil.ReadAll(resp.Body)
|
||||
result = string(body)
|
||||
fmt.Println("put url:", url)
|
||||
fmt.Println("fileName :", fileName)
|
||||
fmt.Println("response Headers:", resp.Header)
|
||||
fmt.Println("response Body:", string(body))
|
||||
zap.L().Info("post", zap.Any("url", url), zap.Any("jsonStr", bytes.NewBuffer(fileBody).String()), zap.Any("result", result))
|
||||
//fmt.Println("response Body:", string(body))
|
||||
fmt.Println("response StatusCode:", statusCode)
|
||||
//zap.L().Info("post", zap.Any("url", url), zap.Any("jsonStr", bytes.NewBuffer(fileBody).String()), zap.Any("result", result))
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user