Merge branch 'dev' of http://gitlab.fjmaimaimai.com/mmm-go-pp/partner01 into 3-project-init-order
正在显示
68 个修改的文件
包含
2260 行增加
和
34 行删除
@@ -19,9 +19,9 @@ metadata: | @@ -19,9 +19,9 @@ metadata: | ||
19 | - method: sendSmsCode | 19 | - method: sendSmsCode |
20 | route: | 20 | route: |
21 | post: /sendSmsCode | 21 | post: /sendSmsCode |
22 | - - method: rovoke | 22 | + - method: revoke |
23 | route: | 23 | route: |
24 | - post: /rovoke | 24 | + post: /revoke |
25 | - method: changePassword | 25 | - method: changePassword |
26 | route: | 26 | route: |
27 | post: /changePhonePassword | 27 | post: /changePhonePassword |
@@ -25,6 +25,6 @@ metadata: | @@ -25,6 +25,6 @@ metadata: | ||
25 | - method: convertUserStatus | 25 | - method: convertUserStatus |
26 | route: | 26 | route: |
27 | post: /convertUserStatus | 27 | post: /convertUserStatus |
28 | - - method: setPermisson | 28 | + - method: setPermission |
29 | route: | 29 | route: |
30 | - post: /setPermisson | ||
30 | + post: /setPermission |
@@ -11,17 +11,14 @@ metadata: | @@ -11,17 +11,14 @@ metadata: | ||
11 | primitive: string | 11 | primitive: string |
12 | result: | 12 | result: |
13 | - name: refreshToken | 13 | - name: refreshToken |
14 | - description: Attribute描述 | 14 | + description: 刷新码 |
15 | type: | 15 | type: |
16 | primitive: string | 16 | primitive: string |
17 | - name: accessToken | 17 | - name: accessToken |
18 | - description: Attribute描述 | 18 | + description: accessToken |
19 | type: | 19 | type: |
20 | primitive: string | 20 | primitive: string |
21 | - name: expiresIn | 21 | - name: expiresIn |
22 | - description: Attribute描述 | ||
23 | - type: | ||
24 | - primitive: string | ||
25 | - - name: auth | 22 | + description: 过期时间 |
26 | type: | 23 | type: |
27 | - schema: auth | 24 | + primitive: int64 |
@@ -6,22 +6,19 @@ metadata: | @@ -6,22 +6,19 @@ metadata: | ||
6 | description: 更新授权令牌accessToken | 6 | description: 更新授权令牌accessToken |
7 | payload: | 7 | payload: |
8 | - name: refreshToken | 8 | - name: refreshToken |
9 | - description: Attribute描述 | 9 | + description: refreshToken |
10 | type: | 10 | type: |
11 | primitive: string | 11 | primitive: string |
12 | result: | 12 | result: |
13 | - name: refreshToken | 13 | - name: refreshToken |
14 | - description: Attribute描述 | 14 | + description: refreshToken |
15 | type: | 15 | type: |
16 | primitive: string | 16 | primitive: string |
17 | - name: accessToken | 17 | - name: accessToken |
18 | - description: Attribute描述 | 18 | + description: accessToken |
19 | type: | 19 | type: |
20 | primitive: string | 20 | primitive: string |
21 | - name: expiresIn | 21 | - name: expiresIn |
22 | - description: Attribute描述 | 22 | + description: 过期时间 |
23 | type: | 23 | type: |
24 | - primitive: string | ||
25 | - - name: auth | ||
26 | - type: | ||
27 | - schema: auth | 24 | + primitive: int64 |
Dockerfile
0 → 100644
1 | +FROM golang:latest | ||
2 | +MAINTAINER mmm-go-pp <> | ||
3 | +ENV APP_DIR $GOPATH/src/partner01 | ||
4 | +RUN mkdir -p $APP_DIR | ||
5 | +WORKDIR $APP_DIR/ | ||
6 | +COPY ./pkg pkg | ||
7 | +COPY ./conf conf | ||
8 | +COPY ./go.mod go.mod | ||
9 | +COPY ./go.sum go.sum | ||
10 | +COPY ./main.go main.go | ||
11 | +RUN ["ln","-sf","/usr/share/zoneinfo/Asia/Shanghai","/etc/localtime"] | ||
12 | +ENV GO111MODULE on | ||
13 | +ENV GOPROXY https://goproxy.io | ||
14 | +RUN ["go","mod","tidy"] | ||
15 | +RUN ["ls"] | ||
16 | +RUN ["go","build"] | ||
17 | +ENTRYPOINT ["./partner01"] |
deploy/k8s/dev/install.sh
0 → 100644
1 | +#!/bin/bash | ||
2 | +export PATH=/root/local/bin:$PATH | ||
3 | +kubectl -n <replace-your-k8s-namespace> get pods | grep -q partner01 | ||
4 | +if [ "$?" == "1" ];then | ||
5 | + kubectl create -f /tmp/dev/partner01/partner01.yaml --record | ||
6 | + kubectl -n <replace-your-k8s-namespace> get svc | grep -q partner01 | ||
7 | + if [ "$?" == "0" ];then | ||
8 | + echo "partner01 service install success!" | ||
9 | + else | ||
10 | + echo "partner01 service install fail!" | ||
11 | + fi | ||
12 | + kubectl -n <replace-your-k8s-namespace> get pods | grep -q partner01 | ||
13 | + if [ "$?" == "0" ];then | ||
14 | + echo "partner01 deployment install success!" | ||
15 | + else | ||
16 | + echo "partner01 deployment install fail!" | ||
17 | + fi | ||
18 | +else | ||
19 | + kubectl delete -f /tmp/dev/partner01/partner01.yaml | ||
20 | + kubectl -n <replace-your-k8s-namespace> get svc | grep -q partner01 | ||
21 | + while [ "$?" == "0" ] | ||
22 | + do | ||
23 | + kubectl -n <replace-your-k8s-namespace> get svc | grep -q partner01 | ||
24 | + done | ||
25 | + kubectl -n <replace-your-k8s-namespace> get pods | grep -q partner01 | ||
26 | + while [ "$?" == "0" ] | ||
27 | + do | ||
28 | + kubectl -n <replace-your-k8s-namespace> get pods | grep -q partner01 | ||
29 | + done | ||
30 | + kubectl create -f /tmp/dev/partner01/partner01.yaml --record | ||
31 | + kubectl -n <replace-your-k8s-namespace> get svc | grep -q partner01 | ||
32 | + if [ "$?" == "0" ];then | ||
33 | + echo "partner01 service update success!" | ||
34 | + else | ||
35 | + echo "partner01 service update fail!" | ||
36 | + fi | ||
37 | + kubectl -n <replace-your-k8s-namespace> get pods | grep -q partner01 | ||
38 | + if [ "$?" == "0" ];then | ||
39 | + echo "partner01 deployment update success!" | ||
40 | + else | ||
41 | + echo "partner01 deployment update fail!" | ||
42 | + fi | ||
43 | +fi |
deploy/k8s/dev/partner01.yaml
0 → 100644
1 | +apiVersion: v1 | ||
2 | +kind: Service | ||
3 | +metadata: | ||
4 | + name: partner01 | ||
5 | + namespace: <replace-your-k8s-namespace> | ||
6 | + labels: | ||
7 | + k8s-app: partner01 | ||
8 | +spec: | ||
9 | + ports: | ||
10 | + - name: "http" | ||
11 | + port: 80 | ||
12 | + targetPort: 8082 | ||
13 | + selector: | ||
14 | + k8s-app: partner01 | ||
15 | +--- | ||
16 | +apiVersion: extensions/v1beta1 | ||
17 | +kind: Deployment | ||
18 | +metadata: | ||
19 | + name: partner01 | ||
20 | + namespace: <replace-your-k8s-namespace> | ||
21 | + labels: | ||
22 | + k8s-app: partner01 | ||
23 | +spec: | ||
24 | + replicas: 1 | ||
25 | + template: | ||
26 | + metadata: | ||
27 | + labels: | ||
28 | + k8s-app: partner01 | ||
29 | + spec: | ||
30 | + affinity: | ||
31 | + nodeAffinity: | ||
32 | + preferredDuringSchedulingIgnoredDuringExecution: | ||
33 | + - preference: {} | ||
34 | + weight: 100 | ||
35 | + requiredDuringSchedulingIgnoredDuringExecution: | ||
36 | + nodeSelectorTerms: | ||
37 | + - matchExpressions: | ||
38 | + - key: kubernetes.io/hostname | ||
39 | + operator: In | ||
40 | + values: | ||
41 | + - cn-hangzhou.i-bp1djh1xn7taumbue1ze | ||
42 | + - cn-hangzhou.i-bp1djh1xn7taumbue1zd | ||
43 | + - cn-hangzhou.i-bp1euf5u1ph9kbhtndhb | ||
44 | + - cn-hangzhou.i-bp1hyp5oips9cdwxxgxy | ||
45 | + containers: | ||
46 | + - name: partner01 | ||
47 | + image: 192.168.0.243:5000/mmm/partner01:dev | ||
48 | + imagePullPolicy: Always | ||
49 | + ports: | ||
50 | + - containerPort: 8082 | ||
51 | + volumeMounts: | ||
52 | + - mountPath: /opt/logs | ||
53 | + name: accesslogs | ||
54 | + env: | ||
55 | + - name: LOG_LEVEL | ||
56 | + value: "debug" | ||
57 | + - name: ERROR_BASE_CODE | ||
58 | + value: "1" | ||
59 | + - name: ERROR_BASE_CODE_MULTIPLE | ||
60 | + value: "1000" | ||
61 | + volumes: | ||
62 | + - name: accesslogs | ||
63 | + emptyDir: {} |
go.mod
0 → 100644
1 | +module gitlab.fjmaimaimai.com/mmm-go-pp/partner01 | ||
2 | + | ||
3 | +go 1.16 | ||
4 | + | ||
5 | +require ( | ||
6 | + github.com/ajg/form v1.5.1 // indirect | ||
7 | + github.com/beego/beego/v2 v2.0.1 | ||
8 | + github.com/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072 // indirect | ||
9 | + github.com/fatih/structs v1.1.0 // indirect | ||
10 | + github.com/gavv/httpexpect v2.0.0+incompatible | ||
11 | + github.com/go-pg/pg/v10 v10.9.0 | ||
12 | + github.com/google/go-querystring v1.1.0 // indirect | ||
13 | + github.com/gorilla/websocket v1.4.2 // indirect | ||
14 | + github.com/imkira/go-interpol v1.1.0 // indirect | ||
15 | + github.com/linmadan/egglib-go v0.0.0-20210313060205-8b5e456b11f7 | ||
16 | + github.com/mattn/go-colorable v0.1.8 // indirect | ||
17 | + github.com/moul/http2curl v1.0.0 // indirect | ||
18 | + github.com/onsi/ginkgo v1.15.2 | ||
19 | + github.com/onsi/gomega v1.11.0 | ||
20 | + github.com/sergi/go-diff v1.2.0 // indirect | ||
21 | + github.com/smartystreets/goconvey v1.6.4 // indirect | ||
22 | + github.com/valyala/fasthttp v1.23.0 // indirect | ||
23 | + github.com/xeipuuv/gojsonschema v1.2.0 // indirect | ||
24 | + github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0 // indirect | ||
25 | + github.com/yudai/gojsondiff v1.0.0 // indirect | ||
26 | + github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 // indirect | ||
27 | + github.com/yudai/pp v2.0.1+incompatible // indirect | ||
28 | +) |
go.sum
0 → 100644
1 | +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= | ||
2 | +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= | ||
3 | +github.com/DataDog/zstd v1.3.6-0.20190409195224-796139022798/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= | ||
4 | +github.com/Knetic/govaluate v3.0.0+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= | ||
5 | +github.com/OwnLocal/goes v1.0.0/go.mod h1:8rIFjBGTue3lCU0wplczcUgt9Gxgrkkrw7etMIcn8TM= | ||
6 | +github.com/Shopify/sarama v1.23.1/go.mod h1:XLH1GYJnLVE0XCr6KdJGVJRTwY30moWNJ4sERjXX6fs= | ||
7 | +github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= | ||
8 | +github.com/ajg/form v1.5.1 h1:t9c7v8JUKu/XxOGBU0yjNpaMloxGEJhUkqFRq0ibGeU= | ||
9 | +github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= | ||
10 | +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= | ||
11 | +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= | ||
12 | +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= | ||
13 | +github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= | ||
14 | +github.com/alicebob/gopher-json v0.0.0-20180125190556-5a6b3ba71ee6/go.mod h1:SGnFV6hVsYE877CKEZ6tDNTjaSXYUk6QqoIK6PrAtcc= | ||
15 | +github.com/alicebob/miniredis v2.5.0+incompatible/go.mod h1:8HZjEj4yU0dwhYHky+DxYx+6BMjkBbe5ONFIF1MXffk= | ||
16 | +github.com/andybalholm/brotli v1.0.1 h1:KqhlKozYbRtJvsPrrEeXcO+N2l6NYT5A2QAFmSULpEc= | ||
17 | +github.com/andybalholm/brotli v1.0.1/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y= | ||
18 | +github.com/astaxie/beego v1.12.0/go.mod h1:fysx+LZNZKnvh4GED/xND7jWtjCR6HzydR2Hh2Im57o= | ||
19 | +github.com/beego/beego/v2 v2.0.1 h1:07a7Z0Ok5vbqyqh+q53sDPl9LdhKh0ZDy3gbyGrhFnE= | ||
20 | +github.com/beego/beego/v2 v2.0.1/go.mod h1:8zyHi1FnWO1mZLwTn62aKRIZF/aIKvkCBB2JYs+eqQI= | ||
21 | +github.com/beego/goyaml2 v0.0.0-20130207012346-5545475820dd/go.mod h1:1b+Y/CofkYwXMUU0OhQqGvsY2Bvgr4j6jfT699wyZKQ= | ||
22 | +github.com/beego/x2j v0.0.0-20131220205130-a0352aadc542/go.mod h1:kSeGC/p1AbBiEp5kat81+DSQrZenVBZXklMLaELspWU= | ||
23 | +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= | ||
24 | +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= | ||
25 | +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= | ||
26 | +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= | ||
27 | +github.com/bradfitz/gomemcache v0.0.0-20180710155616-bc664df96737/go.mod h1:PmM6Mmwb0LSuEubjR8N7PtNe1KxZLtOUHtbeikc5h60= | ||
28 | +github.com/casbin/casbin v1.7.0/go.mod h1:c67qKN6Oum3UF5Q1+BByfFxkwKvhwW57ITjqwtzR1KE= | ||
29 | +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= | ||
30 | +github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= | ||
31 | +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= | ||
32 | +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= | ||
33 | +github.com/cloudflare/golz4 v0.0.0-20150217214814-ef862a3cdc58/go.mod h1:EOBUe0h4xcZ5GoxqC5SDxFQ8gwyZPKQoEzownBlhI80= | ||
34 | +github.com/coreos/etcd v3.3.25+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= | ||
35 | +github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= | ||
36 | +github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= | ||
37 | +github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= | ||
38 | +github.com/couchbase/go-couchbase v0.0.0-20181122212707-3e9b6e1258bb/go.mod h1:TWI8EKQMs5u5jLKW/tsb9VwauIrMIxQG1r5fMsswK5U= | ||
39 | +github.com/couchbase/go-couchbase v0.0.0-20200519150804-63f3cdb75e0d/go.mod h1:TWI8EKQMs5u5jLKW/tsb9VwauIrMIxQG1r5fMsswK5U= | ||
40 | +github.com/couchbase/gomemcached v0.0.0-20181122193126-5125a94a666c/go.mod h1:srVSlQLB8iXBVXHgnqemxUXqN6FCvClgCMPCsjBDR7c= | ||
41 | +github.com/couchbase/gomemcached v0.0.0-20200526233749-ec430f949808/go.mod h1:srVSlQLB8iXBVXHgnqemxUXqN6FCvClgCMPCsjBDR7c= | ||
42 | +github.com/couchbase/goutils v0.0.0-20180530154633-e865a1461c8a/go.mod h1:BQwMFlJzDjFDG3DJUdU0KORxn88UlsOULuxLExMh3Hs= | ||
43 | +github.com/cupcake/rdb v0.0.0-20161107195141-43ba34106c76/go.mod h1:vYwsqCOLxGiisLwp9rITslkFNpZD5rz43tf41QFkTWY= | ||
44 | +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= | ||
45 | +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= | ||
46 | +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= | ||
47 | +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= | ||
48 | +github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= | ||
49 | +github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= | ||
50 | +github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= | ||
51 | +github.com/edsrzf/mmap-go v0.0.0-20170320065105-0bce6a688712/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= | ||
52 | +github.com/elastic/go-elasticsearch/v6 v6.8.5/go.mod h1:UwaDJsD3rWLM5rKNFzv9hgox93HoX8utj1kxD9aFUcI= | ||
53 | +github.com/elazarl/go-bindata-assetfs v1.0.0 h1:G/bYguwHIzWq9ZoyUQqrjTmJbbYn3j3CKKpKinvZLFk= | ||
54 | +github.com/elazarl/go-bindata-assetfs v1.0.0/go.mod h1:v+YaWX3bdea5J/mo8dSETolEo7R71Vk1u8bnjau5yw4= | ||
55 | +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= | ||
56 | +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= | ||
57 | +github.com/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072 h1:DddqAaWDpywytcG8w/qoQ5sAN8X12d3Z3koB0C3Rxsc= | ||
58 | +github.com/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072/go.mod h1:duJ4Jxv5lDcvg4QuQr0oowTf7dz4/CR8NtyCooz9HL8= | ||
59 | +github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo= | ||
60 | +github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= | ||
61 | +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= | ||
62 | +github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= | ||
63 | +github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= | ||
64 | +github.com/gavv/httpexpect v2.0.0+incompatible h1:1X9kcRshkSKEjNJJxX9Y9mQ5BRfbxU5kORdjhlA1yX8= | ||
65 | +github.com/gavv/httpexpect v2.0.0+incompatible/go.mod h1:x+9tiU1YnrOvnB725RkpoLv1M62hOWzwo5OXotisrKc= | ||
66 | +github.com/glendc/gopher-json v0.0.0-20170414221815-dc4743023d0c/go.mod h1:Gja1A+xZ9BoviGJNA2E9vFkPjjsl+CoJxSXiQM1UXtw= | ||
67 | +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= | ||
68 | +github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= | ||
69 | +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= | ||
70 | +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= | ||
71 | +github.com/go-pg/pg/v10 v10.7.7/go.mod h1:d0w17Xw5x2DtbD/UgB9rnZg3FAck3eDHXff0Srrzuuk= | ||
72 | +github.com/go-pg/pg/v10 v10.9.0 h1:mNIxE7H7/5fHOniVrLgUXNoIgHiJXXvhiNY+PxqtV6k= | ||
73 | +github.com/go-pg/pg/v10 v10.9.0/go.mod h1:rgmTPgHgl5EN2CNKKoMwC7QT62t8BqsdpEkUQuiZMQs= | ||
74 | +github.com/go-pg/zerochecker v0.2.0 h1:pp7f72c3DobMWOb2ErtZsnrPaSvHd2W4o9//8HtF4mU= | ||
75 | +github.com/go-pg/zerochecker v0.2.0/go.mod h1:NJZ4wKL0NmTtz0GKCoJ8kym6Xn/EQzXRl2OnAe7MmDo= | ||
76 | +github.com/go-redis/redis v6.14.2+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA= | ||
77 | +github.com/go-redis/redis/v7 v7.4.0/go.mod h1:JDNMw23GTyLNC4GZu9njt15ctBQVn7xjRfnwdHj/Dcg= | ||
78 | +github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= | ||
79 | +github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= | ||
80 | +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= | ||
81 | +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= | ||
82 | +github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= | ||
83 | +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= | ||
84 | +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= | ||
85 | +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= | ||
86 | +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= | ||
87 | +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= | ||
88 | +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= | ||
89 | +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= | ||
90 | +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= | ||
91 | +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= | ||
92 | +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= | ||
93 | +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= | ||
94 | +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= | ||
95 | +github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM= | ||
96 | +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= | ||
97 | +github.com/golang/snappy v0.0.0-20170215233205-553a64147049/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= | ||
98 | +github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= | ||
99 | +github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= | ||
100 | +github.com/gomodule/redigo v2.0.0+incompatible/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= | ||
101 | +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= | ||
102 | +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= | ||
103 | +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= | ||
104 | +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= | ||
105 | +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= | ||
106 | +github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= | ||
107 | +github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= | ||
108 | +github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= | ||
109 | +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= | ||
110 | +github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= | ||
111 | +github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= | ||
112 | +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= | ||
113 | +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= | ||
114 | +github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= | ||
115 | +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= | ||
116 | +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= | ||
117 | +github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= | ||
118 | +github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= | ||
119 | +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= | ||
120 | +github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= | ||
121 | +github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= | ||
122 | +github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= | ||
123 | +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= | ||
124 | +github.com/imkira/go-interpol v1.1.0 h1:KIiKr0VSG2CUW1hl1jpiyuzuJeKUUpC8iM1AIE7N1Vk= | ||
125 | +github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA= | ||
126 | +github.com/jcmturner/gofork v0.0.0-20190328161633-dc7c13fece03/go.mod h1:MK8+TM0La+2rjBD4jE12Kj1pCCxK7d2LK/UM3ncEo0o= | ||
127 | +github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E= | ||
128 | +github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= | ||
129 | +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= | ||
130 | +github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= | ||
131 | +github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= | ||
132 | +github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= | ||
133 | +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= | ||
134 | +github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= | ||
135 | +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= | ||
136 | +github.com/klauspost/compress v1.11.8 h1:difgzQsp5mdAz9v8lm3P/I+EpDKMU/6uTMw1y1FObuo= | ||
137 | +github.com/klauspost/compress v1.11.8/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= | ||
138 | +github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk= | ||
139 | +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= | ||
140 | +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= | ||
141 | +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= | ||
142 | +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= | ||
143 | +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= | ||
144 | +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= | ||
145 | +github.com/ledisdb/ledisdb v0.0.0-20200510135210-d35789ec47e6/go.mod h1:n931TsDuKuq+uX4v1fulaMbA/7ZLLhjc85h7chZGBCQ= | ||
146 | +github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= | ||
147 | +github.com/linmadan/egglib-go v0.0.0-20210313060205-8b5e456b11f7 h1:FgprAjWC4BtDccFwMNnw3lRMQC2jCw1nR2CRNNkDE8w= | ||
148 | +github.com/linmadan/egglib-go v0.0.0-20210313060205-8b5e456b11f7/go.mod h1:XWcVSL/TctSbOvDM73VAeWE/pevgi8lCuzk9gu/yYV4= | ||
149 | +github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8= | ||
150 | +github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= | ||
151 | +github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= | ||
152 | +github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= | ||
153 | +github.com/mattn/go-sqlite3 v1.10.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= | ||
154 | +github.com/mattn/go-sqlite3 v2.0.3+incompatible/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= | ||
155 | +github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= | ||
156 | +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= | ||
157 | +github.com/mitchellh/mapstructure v1.3.3 h1:SzB1nHZ2Xi+17FP0zVQBHIZqvwRN9408fJO8h+eeNA8= | ||
158 | +github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= | ||
159 | +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= | ||
160 | +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= | ||
161 | +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= | ||
162 | +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= | ||
163 | +github.com/moul/http2curl v1.0.0 h1:dRMWoAtb+ePxMlLkrCbAqh4TlPHXvoGUSQ323/9Zahs= | ||
164 | +github.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ= | ||
165 | +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= | ||
166 | +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= | ||
167 | +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= | ||
168 | +github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= | ||
169 | +github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= | ||
170 | +github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= | ||
171 | +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= | ||
172 | +github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= | ||
173 | +github.com/onsi/ginkgo v1.12.0/go.mod h1:oUhWkIvk5aDxtKvDDuw8gItl8pKl42LzjC9KZE0HfGg= | ||
174 | +github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= | ||
175 | +github.com/onsi/ginkgo v1.14.2/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= | ||
176 | +github.com/onsi/ginkgo v1.15.2 h1:l77YT15o814C2qVL47NOyjV/6RbaP7kKdrvZnxQ3Org= | ||
177 | +github.com/onsi/ginkgo v1.15.2/go.mod h1:Dd6YFfwBW84ETqqtL0CPyPXillHgY6XhQH3uuCCTr/o= | ||
178 | +github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= | ||
179 | +github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= | ||
180 | +github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= | ||
181 | +github.com/onsi/gomega v1.10.3/go.mod h1:V9xEwhxec5O8UDM77eCW8vLymOMltsqPVYWrpDsH8xc= | ||
182 | +github.com/onsi/gomega v1.11.0 h1:+CqWgvj0OZycCaqclBD1pxKHAU+tOkHmQIWvDHq2aug= | ||
183 | +github.com/onsi/gomega v1.11.0/go.mod h1:azGKhqFUon9Vuj0YmTfLSmx0FUwqXYSTl5re8lQLTUg= | ||
184 | +github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= | ||
185 | +github.com/pelletier/go-toml v1.0.1/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= | ||
186 | +github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= | ||
187 | +github.com/pelletier/go-toml v1.8.1/go.mod h1:T2/BmBdy8dvIRq1a/8aqjN41wvWlN4lrapLU/GW4pbc= | ||
188 | +github.com/peterh/liner v1.0.1-0.20171122030339-3681c2a91233/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= | ||
189 | +github.com/pierrec/lz4 v0.0.0-20190327172049-315a67e90e41/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= | ||
190 | +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= | ||
191 | +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= | ||
192 | +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= | ||
193 | +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= | ||
194 | +github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= | ||
195 | +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= | ||
196 | +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= | ||
197 | +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= | ||
198 | +github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= | ||
199 | +github.com/prometheus/client_golang v1.7.0 h1:wCi7urQOGBsYcQROHqpUUX4ct84xp40t9R9JX0FuA/U= | ||
200 | +github.com/prometheus/client_golang v1.7.0/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= | ||
201 | +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= | ||
202 | +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= | ||
203 | +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= | ||
204 | +github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= | ||
205 | +github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= | ||
206 | +github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= | ||
207 | +github.com/prometheus/common v0.10.0 h1:RyRA7RzGXQZiW+tGMr7sxa85G1z0yOpM1qq5c8lNawc= | ||
208 | +github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= | ||
209 | +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= | ||
210 | +github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= | ||
211 | +github.com/prometheus/procfs v0.1.3 h1:F0+tqvhOksq22sc6iCHF5WGlWjdwj92p0udFh1VFBS8= | ||
212 | +github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= | ||
213 | +github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= | ||
214 | +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= | ||
215 | +github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= | ||
216 | +github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= | ||
217 | +github.com/shiena/ansicolor v0.0.0-20151119151921-a422bbe96644 h1:X+yvsM2yrEktyI+b2qND5gpH8YhURn0k8OCaeRnkINo= | ||
218 | +github.com/shiena/ansicolor v0.0.0-20151119151921-a422bbe96644/go.mod h1:nkxAfR/5quYxwPZhyDxgasBMnRtBZd0FCEpawpjMUFg= | ||
219 | +github.com/siddontang/go v0.0.0-20170517070808-cb568a3e5cc0/go.mod h1:3yhqj7WBBfRhbBlzyOC3gUxftwsU0u8gqevxwIHQpMw= | ||
220 | +github.com/siddontang/go v0.0.0-20180604090527-bdc77568d726/go.mod h1:3yhqj7WBBfRhbBlzyOC3gUxftwsU0u8gqevxwIHQpMw= | ||
221 | +github.com/siddontang/goredis v0.0.0-20150324035039-760763f78400/go.mod h1:DDcKzU3qCuvj/tPnimWSsZZzvk9qvkvrIL5naVBPh5s= | ||
222 | +github.com/siddontang/ledisdb v0.0.0-20181029004158-becf5f38d373/go.mod h1:mF1DpOSOUiJRMR+FDqaqu3EBqrybQtrDDszLUZ6oxPg= | ||
223 | +github.com/siddontang/rdb v0.0.0-20150307021120-fc89ed2e418d/go.mod h1:AMEsy7v5z92TR1JKMkLLoaOQk++LVnOKL3ScbJ8GNGA= | ||
224 | +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= | ||
225 | +github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4= | ||
226 | +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= | ||
227 | +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= | ||
228 | +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= | ||
229 | +github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= | ||
230 | +github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= | ||
231 | +github.com/ssdb/gossdb v0.0.0-20180723034631-88f6b59b84ec/go.mod h1:QBvMkMya+gXctz3kmljlUCu/yB3GZ6oee+dUozsezQE= | ||
232 | +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= | ||
233 | +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= | ||
234 | +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= | ||
235 | +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= | ||
236 | +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= | ||
237 | +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= | ||
238 | +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= | ||
239 | +github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= | ||
240 | +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= | ||
241 | +github.com/syndtr/goleveldb v0.0.0-20160425020131-cfa635847112/go.mod h1:Z4AUp2Km+PwemOoO/VB5AOx9XSsIItzFjoJlOSiYmn0= | ||
242 | +github.com/syndtr/goleveldb v0.0.0-20181127023241-353a9fca669c/go.mod h1:Z4AUp2Km+PwemOoO/VB5AOx9XSsIItzFjoJlOSiYmn0= | ||
243 | +github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc h1:9lRDQMhESg+zvGYmW5DyG0UqvY96Bu5QYsTLvCHdrgo= | ||
244 | +github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc/go.mod h1:bciPuU6GHm1iF1pBvUfxfsH0Wmnc2VbpgvbI9ZWuIRs= | ||
245 | +github.com/ugorji/go v0.0.0-20171122102828-84cb69a8af83/go.mod h1:hnLbHMwcvSihnDhEfx2/BzKp2xb0Y+ErdfYcrs9tkJQ= | ||
246 | +github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= | ||
247 | +github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= | ||
248 | +github.com/valyala/fasthttp v1.23.0 h1:0ufwSD9BhWa6f8HWdmdq4FHQ23peRo3Ng/Qs8m5NcFs= | ||
249 | +github.com/valyala/fasthttp v1.23.0/go.mod h1:0mw2RjXGOzxf4NL2jni3gUQ7LfjjUSiG5sskOUUSEpU= | ||
250 | +github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= | ||
251 | +github.com/vmihailenco/bufpool v0.1.11 h1:gOq2WmBrq0i2yW5QJ16ykccQ4wH9UyEsgLm6czKAd94= | ||
252 | +github.com/vmihailenco/bufpool v0.1.11/go.mod h1:AFf/MOy3l2CFTKbxwt0mp2MwnqjNEs5H/UxrkA5jxTQ= | ||
253 | +github.com/vmihailenco/msgpack/v5 v5.2.0/go.mod h1:fEM7KuHcnm0GvDCztRpw9hV0PuoO2ciTismP6vjggcM= | ||
254 | +github.com/vmihailenco/msgpack/v5 v5.3.0 h1:8G3at/kelmBKeHY6d6cKnGsYO3BLn+uubitdOtOhyNI= | ||
255 | +github.com/vmihailenco/msgpack/v5 v5.3.0/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc= | ||
256 | +github.com/vmihailenco/tagparser v0.1.2 h1:gnjoVuB/kljJ5wICEEOpx98oXMWPLj22G67Vbd1qPqc= | ||
257 | +github.com/vmihailenco/tagparser v0.1.2/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= | ||
258 | +github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= | ||
259 | +github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= | ||
260 | +github.com/wendal/errors v0.0.0-20130201093226-f66c77a7882b/go.mod h1:Q12BUT7DqIlHRmgv3RskH+UCM/4eqVMgI0EMmlSpAXc= | ||
261 | +github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I= | ||
262 | +github.com/xdg/stringprep v1.0.0/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y= | ||
263 | +github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f h1:J9EGpcZtP0E/raorCMxlFGSTBrsSlaDGf3jU/qvAE2c= | ||
264 | +github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= | ||
265 | +github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0= | ||
266 | +github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= | ||
267 | +github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74= | ||
268 | +github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= | ||
269 | +github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0 h1:6fRhSjgLCkTD3JnJxvaJ4Sj+TYblw757bqYgZaOq5ZY= | ||
270 | +github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0/go.mod h1:/LWChgwKmvncFJFHJ7Gvn9wZArjbV5/FppcK2fKk/tI= | ||
271 | +github.com/yudai/gojsondiff v1.0.0 h1:27cbfqXLVEJ1o8I6v3y9lg8Ydm53EKqHXAOMxEGlCOA= | ||
272 | +github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= | ||
273 | +github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 h1:BHyfKlQyqbsFN5p3IfnEUduWvb9is428/nNb5L3U01M= | ||
274 | +github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= | ||
275 | +github.com/yudai/pp v2.0.1+incompatible h1:Q4//iY4pNF6yPLZIigmvcl7k/bPgrcTPIFIcmawg5bI= | ||
276 | +github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc= | ||
277 | +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= | ||
278 | +github.com/yuin/gopher-lua v0.0.0-20171031051903-609c9cd26973/go.mod h1:aEV29XrmTYFr3CiRxZeGHpkvbwq+prZduBqMaascyCU= | ||
279 | +go.etcd.io/etcd v3.3.25+incompatible/go.mod h1:yaeTdrJi5lOmYerz05bd8+V7KubZs8YSFZfzsF9A6aI= | ||
280 | +go.opentelemetry.io/otel v0.17.0/go.mod h1:Oqtdxmf7UtEvL037ohlgnaYa1h7GtMh0NcSd9eqkC9s= | ||
281 | +go.opentelemetry.io/otel v0.19.0 h1:Lenfy7QHRXPZVsw/12CWpxX6d/JkrX8wrx2vO8G80Ng= | ||
282 | +go.opentelemetry.io/otel v0.19.0/go.mod h1:j9bF567N9EfomkSidSfmMwIwIBuP37AMAIzVW85OxSg= | ||
283 | +go.opentelemetry.io/otel/metric v0.17.0/go.mod h1:hUz9lH1rNXyEwWAhIWCMFWKhYtpASgSnObJFnU26dJ0= | ||
284 | +go.opentelemetry.io/otel/metric v0.19.0 h1:dtZ1Ju44gkJkYvo+3qGqVXmf88tc+a42edOywypengg= | ||
285 | +go.opentelemetry.io/otel/metric v0.19.0/go.mod h1:8f9fglJPRnXuskQmKpnad31lcLJ2VmNNqIsx/uIwBSc= | ||
286 | +go.opentelemetry.io/otel/oteltest v0.17.0/go.mod h1:JT/LGFxPwpN+nlsTiinSYjdIx3hZIGqHCpChcIZmdoE= | ||
287 | +go.opentelemetry.io/otel/oteltest v0.19.0 h1:YVfA0ByROYqTwOxqHVZYZExzEpfZor+MU1rU+ip2v9Q= | ||
288 | +go.opentelemetry.io/otel/oteltest v0.19.0/go.mod h1:tI4yxwh8U21v7JD6R3BcA/2+RBoTKFexE/PJ/nSO7IA= | ||
289 | +go.opentelemetry.io/otel/trace v0.17.0/go.mod h1:bIujpqg6ZL6xUTubIUgziI1jSaUPthmabA/ygf/6Cfg= | ||
290 | +go.opentelemetry.io/otel/trace v0.19.0 h1:1ucYlenXIDA1OlHVLDZKX0ObXV5RLaq06DtUKz5e5zc= | ||
291 | +go.opentelemetry.io/otel/trace v0.19.0/go.mod h1:4IXiNextNOpPnRlI4ryK69mn5iC84bjBWZQA5DXz/qg= | ||
292 | +go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= | ||
293 | +go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= | ||
294 | +go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= | ||
295 | +go.uber.org/zap v1.15.0/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc= | ||
296 | +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= | ||
297 | +golang.org/x/crypto v0.0.0-20180910181607-0e37d006457b/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= | ||
298 | +golang.org/x/crypto v0.0.0-20181127143415-eb0de9b17e85/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= | ||
299 | +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= | ||
300 | +golang.org/x/crypto v0.0.0-20190404164418-38d8ce5564a5/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= | ||
301 | +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= | ||
302 | +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= | ||
303 | +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= | ||
304 | +golang.org/x/crypto v0.0.0-20210218145215-b8e89b74b9df/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= | ||
305 | +golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= | ||
306 | +golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2 h1:It14KIkyBFYkHkwZ7k45minvA9aorojkyjGk9KJ5B/w= | ||
307 | +golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= | ||
308 | +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= | ||
309 | +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= | ||
310 | +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= | ||
311 | +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= | ||
312 | +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= | ||
313 | +golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= | ||
314 | +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= | ||
315 | +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= | ||
316 | +golang.org/x/mod v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4= | ||
317 | +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= | ||
318 | +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= | ||
319 | +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= | ||
320 | +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= | ||
321 | +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= | ||
322 | +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= | ||
323 | +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= | ||
324 | +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= | ||
325 | +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= | ||
326 | +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= | ||
327 | +golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= | ||
328 | +golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= | ||
329 | +golang.org/x/net v0.0.0-20201006153459-a7d1128ccaa0/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= | ||
330 | +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= | ||
331 | +golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= | ||
332 | +golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= | ||
333 | +golang.org/x/net v0.0.0-20210226101413-39120d07d75e/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= | ||
334 | +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110 h1:qWPm9rbaAMKs8Bq/9LRpbMqxWRVUAQwMI9fVrssnTfw= | ||
335 | +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= | ||
336 | +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= | ||
337 | +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= | ||
338 | +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= | ||
339 | +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= | ||
340 | +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= | ||
341 | +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= | ||
342 | +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= | ||
343 | +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= | ||
344 | +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= | ||
345 | +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= | ||
346 | +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= | ||
347 | +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= | ||
348 | +golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= | ||
349 | +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= | ||
350 | +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= | ||
351 | +golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= | ||
352 | +golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= | ||
353 | +golang.org/x/sys v0.0.0-20191010194322-b09406accb47/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= | ||
354 | +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= | ||
355 | +golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= | ||
356 | +golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= | ||
357 | +golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= | ||
358 | +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= | ||
359 | +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= | ||
360 | +golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= | ||
361 | +golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= | ||
362 | +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= | ||
363 | +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= | ||
364 | +golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= | ||
365 | +golang.org/x/sys v0.0.0-20210218155724-8ebf48af031b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= | ||
366 | +golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= | ||
367 | +golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4 h1:EZ2mChiOa8udjfp6rRmswTbtZN/QzUQp4ptM4rnjHvc= | ||
368 | +golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= | ||
369 | +golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= | ||
370 | +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= | ||
371 | +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= | ||
372 | +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= | ||
373 | +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= | ||
374 | +golang.org/x/text v0.3.5 h1:i6eZZ+zk0SOf0xgBpEpPD18qWcJda6q1sxt3S0kzyUQ= | ||
375 | +golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= | ||
376 | +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= | ||
377 | +golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= | ||
378 | +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= | ||
379 | +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= | ||
380 | +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= | ||
381 | +golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= | ||
382 | +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= | ||
383 | +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= | ||
384 | +golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= | ||
385 | +golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= | ||
386 | +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= | ||
387 | +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= | ||
388 | +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= | ||
389 | +golang.org/x/tools v0.0.0-20201211185031-d93e913c1a58/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= | ||
390 | +golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e h1:4nW4NLDYnU28ojHaHO8OVxFHk/aQ33U01a9cjED+pzE= | ||
391 | +golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= | ||
392 | +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= | ||
393 | +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= | ||
394 | +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= | ||
395 | +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= | ||
396 | +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= | ||
397 | +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= | ||
398 | +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= | ||
399 | +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= | ||
400 | +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= | ||
401 | +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= | ||
402 | +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= | ||
403 | +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= | ||
404 | +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= | ||
405 | +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= | ||
406 | +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= | ||
407 | +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= | ||
408 | +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= | ||
409 | +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= | ||
410 | +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= | ||
411 | +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= | ||
412 | +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= | ||
413 | +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= | ||
414 | +google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= | ||
415 | +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= | ||
416 | +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= | ||
417 | +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= | ||
418 | +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= | ||
419 | +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= | ||
420 | +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= | ||
421 | +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= | ||
422 | +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= | ||
423 | +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= | ||
424 | +gopkg.in/jcmturner/aescts.v1 v1.0.1/go.mod h1:nsR8qBOg+OucoIW+WMhB3GspUQXq9XorLnQb9XtvcOo= | ||
425 | +gopkg.in/jcmturner/dnsutils.v1 v1.0.1/go.mod h1:m3v+5svpVOhtFAP/wSz+yzh4Mc0Fg7eRhxkJMWSIz9Q= | ||
426 | +gopkg.in/jcmturner/goidentity.v3 v3.0.0/go.mod h1:oG2kH0IvSYNIu80dVAyu/yoefjq1mNfM5bm88whjWx4= | ||
427 | +gopkg.in/jcmturner/gokrb5.v7 v7.2.3/go.mod h1:l8VISx+WGYp+Fp7KRbsiUuXTTOnxIc3Tuvyavf11/WM= | ||
428 | +gopkg.in/jcmturner/rpc.v1 v1.1.0/go.mod h1:YIdkC4XfD6GXbzje11McwsDuOlZQSb9W4vfLvuNnlv8= | ||
429 | +gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= | ||
430 | +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= | ||
431 | +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= | ||
432 | +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= | ||
433 | +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= | ||
434 | +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= | ||
435 | +gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= | ||
436 | +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= | ||
437 | +gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= | ||
438 | +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= | ||
439 | +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= | ||
440 | +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= | ||
441 | +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= | ||
442 | +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= | ||
443 | +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= | ||
444 | +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= | ||
445 | +honnef.co/go/tools v0.0.1-2020.1.5/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= | ||
446 | +mellium.im/sasl v0.2.1 h1:nspKSRg7/SyO0cRGY71OkfHab8tf9kCts6a6oTDut0w= | ||
447 | +mellium.im/sasl v0.2.1/go.mod h1:ROaEDLQNuf9vjKqE1SrAfnsobm2YKXT1gnN1uDp1PjQ= |
main.go
0 → 100644
pkg/application/factory/domain_service.go
0 → 100644
1 | +package factory |
pkg/application/factory/repository.go
0 → 100644
1 | +package factory | ||
2 | + | ||
3 | +import ( | ||
4 | + "github.com/linmadan/egglib-go/transaction/pg" | ||
5 | + "gitlab.fjmaimaimai.com/mmm-go-pp/partner01/pkg/domain" | ||
6 | + "gitlab.fjmaimaimai.com/mmm-go-pp/partner01/pkg/infrastructure/repository" | ||
7 | +) | ||
8 | + | ||
9 | +func CreatePartnerCategoryRepository(options map[string]interface{}) (domain.PartnerCategoryRepository, error) { | ||
10 | + var transactionContext *pg.TransactionContext | ||
11 | + if value, ok := options["transactionContext"]; ok { | ||
12 | + transactionContext = value.(*pg.TransactionContext) | ||
13 | + } | ||
14 | + return repository.NewPartnerCategoryRepository(transactionContext) | ||
15 | +} | ||
16 | + | ||
17 | +func CreatePermissionRepository(options map[string]interface{}) (domain.PermissionRepository, error) { | ||
18 | + var transactionContext *pg.TransactionContext | ||
19 | + if value, ok := options["transactionContext"]; ok { | ||
20 | + transactionContext = value.(*pg.TransactionContext) | ||
21 | + } | ||
22 | + return repository.NewPermissionRepository(transactionContext) | ||
23 | +} | ||
24 | + | ||
25 | +func CreateUserAuthRepository(options map[string]interface{}) (domain.UserAuthRepository, error) { | ||
26 | + var transactionContext *pg.TransactionContext | ||
27 | + if value, ok := options["transactionContext"]; ok { | ||
28 | + transactionContext = value.(*pg.TransactionContext) | ||
29 | + } | ||
30 | + return repository.NewUserAuthRepository(transactionContext) | ||
31 | +} |
pkg/application/factory/transaction.go
0 → 100644
1 | +package factory | ||
2 | + | ||
3 | +import ( | ||
4 | + "github.com/linmadan/egglib-go/core/application" | ||
5 | + pG "github.com/linmadan/egglib-go/transaction/pg" | ||
6 | + "gitlab.fjmaimaimai.com/mmm-go-pp/partner01/pkg/infrastructure/pg" | ||
7 | +) | ||
8 | + | ||
9 | +func CreateTransactionContext(options map[string]interface{}) (application.TransactionContext, error) { | ||
10 | + return pG.NewPGTransactionContext(pg.DB), nil | ||
11 | +} |
1 | +package command | ||
2 | + | ||
3 | +import ( | ||
4 | + "fmt" | ||
5 | + | ||
6 | + "github.com/beego/beego/v2/core/validation" | ||
7 | +) | ||
8 | + | ||
9 | +type CreatePartnerCommand struct { | ||
10 | +} | ||
11 | + | ||
12 | +func (createPartnerCommand *CreatePartnerCommand) Valid(validation *validation.Validation) { | ||
13 | + validation.SetError("CustomValid", "未实现的自定义认证") | ||
14 | +} | ||
15 | + | ||
16 | +func (createPartnerCommand *CreatePartnerCommand) ValidateCommand() error { | ||
17 | + valid := validation.Validation{} | ||
18 | + b, err := valid.Valid(createPartnerCommand) | ||
19 | + if err != nil { | ||
20 | + return err | ||
21 | + } | ||
22 | + if !b { | ||
23 | + for _, validErr := range valid.Errors { | ||
24 | + return fmt.Errorf("%s %s", validErr.Key, validErr.Message) | ||
25 | + } | ||
26 | + } | ||
27 | + return nil | ||
28 | +} |
1 | +package command | ||
2 | + | ||
3 | +import ( | ||
4 | + "fmt" | ||
5 | + | ||
6 | + "github.com/beego/beego/v2/core/validation" | ||
7 | +) | ||
8 | + | ||
9 | +type RemovePartnerCommand struct { | ||
10 | + // 合伙人id | ||
11 | + PartnerId int64 `json:"partnerId" valid:"Required"` | ||
12 | +} | ||
13 | + | ||
14 | +func (removePartnerCommand *RemovePartnerCommand) Valid(validation *validation.Validation) { | ||
15 | + validation.SetError("CustomValid", "未实现的自定义认证") | ||
16 | +} | ||
17 | + | ||
18 | +func (removePartnerCommand *RemovePartnerCommand) ValidateCommand() error { | ||
19 | + valid := validation.Validation{} | ||
20 | + b, err := valid.Valid(removePartnerCommand) | ||
21 | + if err != nil { | ||
22 | + return err | ||
23 | + } | ||
24 | + if !b { | ||
25 | + for _, validErr := range valid.Errors { | ||
26 | + return fmt.Errorf("%s %s", validErr.Key, validErr.Message) | ||
27 | + } | ||
28 | + } | ||
29 | + return nil | ||
30 | +} |
1 | +package command | ||
2 | + | ||
3 | +import ( | ||
4 | + "fmt" | ||
5 | + | ||
6 | + "github.com/beego/beego/v2/core/validation" | ||
7 | +) | ||
8 | + | ||
9 | +type UpdatePartnerCommand struct { | ||
10 | + // 合伙人id | ||
11 | + PartnerId int64 `json:"partnerId" valid:"Required"` | ||
12 | +} | ||
13 | + | ||
14 | +func (updatePartnerCommand *UpdatePartnerCommand) Valid(validation *validation.Validation) { | ||
15 | + validation.SetError("CustomValid", "未实现的自定义认证") | ||
16 | +} | ||
17 | + | ||
18 | +func (updatePartnerCommand *UpdatePartnerCommand) ValidateCommand() error { | ||
19 | + valid := validation.Validation{} | ||
20 | + b, err := valid.Valid(updatePartnerCommand) | ||
21 | + if err != nil { | ||
22 | + return err | ||
23 | + } | ||
24 | + if !b { | ||
25 | + for _, validErr := range valid.Errors { | ||
26 | + return fmt.Errorf("%s %s", validErr.Key, validErr.Message) | ||
27 | + } | ||
28 | + } | ||
29 | + return nil | ||
30 | +} |
pkg/application/partner/query/get_partner.go
0 → 100644
1 | +package query | ||
2 | + | ||
3 | +import ( | ||
4 | + "fmt" | ||
5 | + | ||
6 | + "github.com/beego/beego/v2/core/validation" | ||
7 | +) | ||
8 | + | ||
9 | +type GetPartnerQuery struct { | ||
10 | + // 合伙人id | ||
11 | + PartnerId int64 `json:"partnerId" valid:"Required"` | ||
12 | +} | ||
13 | + | ||
14 | +func (getPartnerQuery *GetPartnerQuery) Valid(validation *validation.Validation) { | ||
15 | + validation.SetError("CustomValid", "未实现的自定义认证") | ||
16 | +} | ||
17 | + | ||
18 | +func (getPartnerQuery *GetPartnerQuery) ValidateQuery() error { | ||
19 | + valid := validation.Validation{} | ||
20 | + b, err := valid.Valid(getPartnerQuery) | ||
21 | + if err != nil { | ||
22 | + return err | ||
23 | + } | ||
24 | + if !b { | ||
25 | + for _, validErr := range valid.Errors { | ||
26 | + return fmt.Errorf("%s %s", validErr.Key, validErr.Message) | ||
27 | + } | ||
28 | + } | ||
29 | + return nil | ||
30 | +} |
1 | +package query | ||
2 | + | ||
3 | +import ( | ||
4 | + "fmt" | ||
5 | + | ||
6 | + "github.com/beego/beego/v2/core/validation" | ||
7 | +) | ||
8 | + | ||
9 | +type ListPartnerQuery struct { | ||
10 | + // 查询偏离量 | ||
11 | + Offset int `json:"offset" valid:"Required"` | ||
12 | + // 查询限制 | ||
13 | + Limit int `json:"limit" valid:"Required"` | ||
14 | +} | ||
15 | + | ||
16 | +func (listPartnerQuery *ListPartnerQuery) Valid(validation *validation.Validation) { | ||
17 | + validation.SetError("CustomValid", "未实现的自定义认证") | ||
18 | +} | ||
19 | + | ||
20 | +func (listPartnerQuery *ListPartnerQuery) ValidateQuery() error { | ||
21 | + valid := validation.Validation{} | ||
22 | + b, err := valid.Valid(listPartnerQuery) | ||
23 | + if err != nil { | ||
24 | + return err | ||
25 | + } | ||
26 | + if !b { | ||
27 | + for _, validErr := range valid.Errors { | ||
28 | + return fmt.Errorf("%s %s", validErr.Key, validErr.Message) | ||
29 | + } | ||
30 | + } | ||
31 | + return nil | ||
32 | +} |
1 | +package query | ||
2 | + | ||
3 | +import ( | ||
4 | + "fmt" | ||
5 | + | ||
6 | + "github.com/beego/beego/v2/core/validation" | ||
7 | +) | ||
8 | + | ||
9 | +type PartnerCategoriesQuery struct { | ||
10 | +} | ||
11 | + | ||
12 | +func (partnerCategoriesQuery *PartnerCategoriesQuery) Valid(validation *validation.Validation) { | ||
13 | + | ||
14 | +} | ||
15 | + | ||
16 | +func (partnerCategoriesQuery *PartnerCategoriesQuery) ValidateQuery() error { | ||
17 | + valid := validation.Validation{} | ||
18 | + b, err := valid.Valid(partnerCategoriesQuery) | ||
19 | + if err != nil { | ||
20 | + return err | ||
21 | + } | ||
22 | + if !b { | ||
23 | + for _, validErr := range valid.Errors { | ||
24 | + return fmt.Errorf("%s %s", validErr.Key, validErr.Message) | ||
25 | + } | ||
26 | + } | ||
27 | + return nil | ||
28 | +} |
pkg/application/partner/service/partner.go
0 → 100644
1 | +package service | ||
2 | + | ||
3 | +import ( | ||
4 | + "github.com/linmadan/egglib-go/core/application" | ||
5 | + //"github.com/linmadan/egglib-go/utils/tool_funs" | ||
6 | + "gitlab.fjmaimaimai.com/mmm-go-pp/partner01/pkg/application/factory" | ||
7 | + //"gitlab.fjmaimaimai.com/mmm-go-pp/partner01/pkg/application/partner/command" | ||
8 | + "gitlab.fjmaimaimai.com/mmm-go-pp/partner01/pkg/application/partner/query" | ||
9 | + //"gitlab.fjmaimaimai.com/mmm-go-pp/partner01/pkg/domain" | ||
10 | +) | ||
11 | + | ||
12 | +// 合伙人服务 | ||
13 | +type PartnerService struct { | ||
14 | +} | ||
15 | + | ||
16 | +//// 创建合伙人增删改查 | ||
17 | +//func (partnerService *PartnerService) CreatePartner(createPartnerCommand *command.CreatePartnerCommand) (interface{}, error) { | ||
18 | +// if err := createPartnerCommand.ValidateCommand(); err != nil { | ||
19 | +// return nil, application.ThrowError(application.ARG_ERROR, err.Error()) | ||
20 | +// } | ||
21 | +// transactionContext, err := factory.CreateTransactionContext(nil) | ||
22 | +// if err != nil { | ||
23 | +// return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) | ||
24 | +// } | ||
25 | +// if err := transactionContext.StartTransaction(); err != nil { | ||
26 | +// return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) | ||
27 | +// } | ||
28 | +// defer func() { | ||
29 | +// transactionContext.RollbackTransaction() | ||
30 | +// }() | ||
31 | +// newPartner := &domain.Partner{} | ||
32 | +// var partnerRepository partner.PartnerRepository | ||
33 | +// if value, err := factory.CreatePartnerRepository(map[string]interface{}{ | ||
34 | +// "transactionContext": transactionContext, | ||
35 | +// }); err != nil { | ||
36 | +// return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) | ||
37 | +// } else { | ||
38 | +// partnerRepository = value | ||
39 | +// } | ||
40 | +// if partner, err := partnerRepository.Save(newPartner); err != nil { | ||
41 | +// return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) | ||
42 | +// } else { | ||
43 | +// if err := transactionContext.CommitTransaction(); err != nil { | ||
44 | +// return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) | ||
45 | +// } | ||
46 | +// return partner, nil | ||
47 | +// } | ||
48 | +//} | ||
49 | +// | ||
50 | +//// 返回合伙人增删改查 | ||
51 | +//func (partnerService *PartnerService) GetPartner(getPartnerQuery *query.GetPartnerQuery) (interface{}, error) { | ||
52 | +// if err := getPartnerQuery.ValidateQuery(); err != nil { | ||
53 | +// return nil, application.ThrowError(application.ARG_ERROR, err.Error()) | ||
54 | +// } | ||
55 | +// transactionContext, err := factory.CreateTransactionContext(nil) | ||
56 | +// if err != nil { | ||
57 | +// return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) | ||
58 | +// } | ||
59 | +// if err := transactionContext.StartTransaction(); err != nil { | ||
60 | +// return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) | ||
61 | +// } | ||
62 | +// defer func() { | ||
63 | +// transactionContext.RollbackTransaction() | ||
64 | +// }() | ||
65 | +// var partnerRepository partner.PartnerRepository | ||
66 | +// if value, err := factory.CreatePartnerRepository(map[string]interface{}{ | ||
67 | +// "transactionContext": transactionContext, | ||
68 | +// }); err != nil { | ||
69 | +// return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) | ||
70 | +// } else { | ||
71 | +// partnerRepository = value | ||
72 | +// } | ||
73 | +// partner, err := partnerRepository.FindOne(map[string]interface{}{"partnerId": getPartnerQuery.PartnerId}) | ||
74 | +// if err != nil { | ||
75 | +// return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) | ||
76 | +// } | ||
77 | +// if partner == nil { | ||
78 | +// return nil, application.ThrowError(application.RES_NO_FIND_ERROR, fmt.Sprintf("%s", string(getPartnerQuery.PartnerId))) | ||
79 | +// } else { | ||
80 | +// if err := transactionContext.CommitTransaction(); err != nil { | ||
81 | +// return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) | ||
82 | +// } | ||
83 | +// return partner, nil | ||
84 | +// } | ||
85 | +//} | ||
86 | +// | ||
87 | +//// 返回合伙人增删改查列表 | ||
88 | +//func (partnerService *PartnerService) ListPartner(listPartnerQuery *query.ListPartnerQuery) (interface{}, error) { | ||
89 | +// if err := listPartnerQuery.ValidateQuery(); err != nil { | ||
90 | +// return nil, application.ThrowError(application.ARG_ERROR, err.Error()) | ||
91 | +// } | ||
92 | +// transactionContext, err := factory.CreateTransactionContext(nil) | ||
93 | +// if err != nil { | ||
94 | +// return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) | ||
95 | +// } | ||
96 | +// if err := transactionContext.StartTransaction(); err != nil { | ||
97 | +// return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) | ||
98 | +// } | ||
99 | +// defer func() { | ||
100 | +// transactionContext.RollbackTransaction() | ||
101 | +// }() | ||
102 | +// var partnerRepository partner.PartnerRepository | ||
103 | +// if value, err := factory.CreatePartnerRepository(map[string]interface{}{ | ||
104 | +// "transactionContext": transactionContext, | ||
105 | +// }); err != nil { | ||
106 | +// return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) | ||
107 | +// } else { | ||
108 | +// partnerRepository = value | ||
109 | +// } | ||
110 | +// if count, partners, err := partnerRepository.Find(tool_funs.SimpleStructToMap(listPartnerQuery)); err != nil { | ||
111 | +// return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) | ||
112 | +// } else { | ||
113 | +// if err := transactionContext.CommitTransaction(); err != nil { | ||
114 | +// return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) | ||
115 | +// } | ||
116 | +// return map[string]interface{}{ | ||
117 | +// "count": count, | ||
118 | +// "partners": partners, | ||
119 | +// }, nil | ||
120 | +// } | ||
121 | +//} | ||
122 | + | ||
123 | +// 合伙人分类列表 | ||
124 | +func (partnerService *PartnerService) PartnerCategories(partnerCategoriesQuery *query.PartnerCategoriesQuery) (interface{}, error) { | ||
125 | + if err := partnerCategoriesQuery.ValidateQuery(); err != nil { | ||
126 | + return nil, application.ThrowError(application.ARG_ERROR, err.Error()) | ||
127 | + } | ||
128 | + transactionContext, err := factory.CreateTransactionContext(nil) | ||
129 | + if err != nil { | ||
130 | + return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) | ||
131 | + } | ||
132 | + if err := transactionContext.StartTransaction(); err != nil { | ||
133 | + return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) | ||
134 | + } | ||
135 | + defer func() { | ||
136 | + transactionContext.RollbackTransaction() | ||
137 | + }() | ||
138 | + PartnerCategoryRepository, err := factory.CreatePartnerCategoryRepository(map[string]interface{}{"transactionContext": transactionContext}) | ||
139 | + if err != nil { | ||
140 | + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) | ||
141 | + } | ||
142 | + total, categories, err := PartnerCategoryRepository.Find(map[string]interface{}{}) | ||
143 | + if err != nil { | ||
144 | + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) | ||
145 | + } | ||
146 | + if err := transactionContext.CommitTransaction(); err != nil { | ||
147 | + return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) | ||
148 | + } | ||
149 | + return map[string]interface{}{"total": total, "categories": categories}, nil | ||
150 | +} | ||
151 | + | ||
152 | +//// 移除合伙人增删改查 | ||
153 | +//func (partnerService *PartnerService) RemovePartner(removePartnerCommand *command.RemovePartnerCommand) (interface{}, error) { | ||
154 | +// if err := removePartnerCommand.ValidateCommand(); err != nil { | ||
155 | +// return nil, application.ThrowError(application.ARG_ERROR, err.Error()) | ||
156 | +// } | ||
157 | +// transactionContext, err := factory.CreateTransactionContext(nil) | ||
158 | +// if err != nil { | ||
159 | +// return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) | ||
160 | +// } | ||
161 | +// if err := transactionContext.StartTransaction(); err != nil { | ||
162 | +// return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) | ||
163 | +// } | ||
164 | +// defer func() { | ||
165 | +// transactionContext.RollbackTransaction() | ||
166 | +// }() | ||
167 | +// var partnerRepository partner.PartnerRepository | ||
168 | +// if value, err := factory.CreatePartnerRepository(map[string]interface{}{ | ||
169 | +// "transactionContext": transactionContext, | ||
170 | +// }); err != nil { | ||
171 | +// return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) | ||
172 | +// } else { | ||
173 | +// partnerRepository = value | ||
174 | +// } | ||
175 | +// partner, err := partnerRepository.FindOne(map[string]interface{}{"partnerId": removePartnerCommand.PartnerId}) | ||
176 | +// if err != nil { | ||
177 | +// return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) | ||
178 | +// } | ||
179 | +// if partner == nil { | ||
180 | +// return nil, application.ThrowError(application.RES_NO_FIND_ERROR, fmt.Sprintf("%s", string(removePartnerCommand.PartnerId))) | ||
181 | +// } | ||
182 | +// if partner, err := partnerRepository.Remove(partner); err != nil { | ||
183 | +// return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) | ||
184 | +// } else { | ||
185 | +// if err := transactionContext.CommitTransaction(); err != nil { | ||
186 | +// return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) | ||
187 | +// } | ||
188 | +// return partner, nil | ||
189 | +// } | ||
190 | +//} | ||
191 | +// | ||
192 | +//// 更新合伙人增删改查 | ||
193 | +//func (partnerService *PartnerService) UpdatePartner(updatePartnerCommand *command.UpdatePartnerCommand) (interface{}, error) { | ||
194 | +// if err := updatePartnerCommand.ValidateCommand(); err != nil { | ||
195 | +// return nil, application.ThrowError(application.ARG_ERROR, err.Error()) | ||
196 | +// } | ||
197 | +// transactionContext, err := factory.CreateTransactionContext(nil) | ||
198 | +// if err != nil { | ||
199 | +// return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) | ||
200 | +// } | ||
201 | +// if err := transactionContext.StartTransaction(); err != nil { | ||
202 | +// return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) | ||
203 | +// } | ||
204 | +// defer func() { | ||
205 | +// transactionContext.RollbackTransaction() | ||
206 | +// }() | ||
207 | +// var partnerRepository partner.PartnerRepository | ||
208 | +// if value, err := factory.CreatePartnerRepository(map[string]interface{}{ | ||
209 | +// "transactionContext": transactionContext, | ||
210 | +// }); err != nil { | ||
211 | +// return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) | ||
212 | +// } else { | ||
213 | +// partnerRepository = value | ||
214 | +// } | ||
215 | +// partner, err := partnerRepository.FindOne(map[string]interface{}{"partnerId": updatePartnerCommand.PartnerId}) | ||
216 | +// if err != nil { | ||
217 | +// return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) | ||
218 | +// } | ||
219 | +// if partner == nil { | ||
220 | +// return nil, application.ThrowError(application.RES_NO_FIND_ERROR, fmt.Sprintf("%s", string(updatePartnerCommand.PartnerId))) | ||
221 | +// } | ||
222 | +// if err := partner.Update(tool_funs.SimpleStructToMap(updatePartnerCommand)); err != nil { | ||
223 | +// return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error()) | ||
224 | +// } | ||
225 | +// if partner, err := partnerRepository.Save(partner); err != nil { | ||
226 | +// return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) | ||
227 | +// } else { | ||
228 | +// if err := transactionContext.CommitTransaction(); err != nil { | ||
229 | +// return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) | ||
230 | +// } | ||
231 | +// return partner, nil | ||
232 | +// } | ||
233 | +//} | ||
234 | + | ||
235 | +func NewPartnerService(options map[string]interface{}) *PartnerService { | ||
236 | + newPartnerService := &PartnerService{} | ||
237 | + return newPartnerService | ||
238 | +} |
pkg/application/permission/query/menus.go
0 → 100644
1 | +package query | ||
2 | + | ||
3 | +import ( | ||
4 | + "fmt" | ||
5 | + | ||
6 | + "github.com/beego/beego/v2/core/validation" | ||
7 | +) | ||
8 | + | ||
9 | +type MenusQuery struct { | ||
10 | + // 用户id | ||
11 | + UserId int64 `json:"userId"` | ||
12 | +} | ||
13 | + | ||
14 | +func (menusQuery *MenusQuery) Valid(validation *validation.Validation) { | ||
15 | + | ||
16 | +} | ||
17 | + | ||
18 | +func (menusQuery *MenusQuery) ValidateQuery() error { | ||
19 | + valid := validation.Validation{} | ||
20 | + b, err := valid.Valid(menusQuery) | ||
21 | + if err != nil { | ||
22 | + return err | ||
23 | + } | ||
24 | + if !b { | ||
25 | + for _, validErr := range valid.Errors { | ||
26 | + return fmt.Errorf("%s %s", validErr.Key, validErr.Message) | ||
27 | + } | ||
28 | + } | ||
29 | + return nil | ||
30 | +} |
1 | +package service | ||
2 | + | ||
3 | +import ( | ||
4 | + "github.com/linmadan/egglib-go/core/application" | ||
5 | + "gitlab.fjmaimaimai.com/mmm-go-pp/partner01/pkg/application/factory" | ||
6 | + "gitlab.fjmaimaimai.com/mmm-go-pp/partner01/pkg/application/permission/query" | ||
7 | +) | ||
8 | + | ||
9 | +// 权限服务 | ||
10 | +type PermissionService struct { | ||
11 | +} | ||
12 | + | ||
13 | +// 根据当前用户返回权限列表 | ||
14 | +func (permissionService *PermissionService) Menus(menusQuery *query.MenusQuery) (interface{}, error) { | ||
15 | + if err := menusQuery.ValidateQuery(); err != nil { | ||
16 | + return nil, application.ThrowError(application.ARG_ERROR, err.Error()) | ||
17 | + } | ||
18 | + transactionContext, err := factory.CreateTransactionContext(nil) | ||
19 | + if err != nil { | ||
20 | + return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) | ||
21 | + } | ||
22 | + if err := transactionContext.StartTransaction(); err != nil { | ||
23 | + return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) | ||
24 | + } | ||
25 | + defer func() { | ||
26 | + transactionContext.RollbackTransaction() | ||
27 | + }() | ||
28 | + | ||
29 | + PermissionRepository, err := factory.CreatePermissionRepository(map[string]interface{}{"transactionContext": transactionContext}) | ||
30 | + if err != nil { | ||
31 | + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) | ||
32 | + } | ||
33 | + total, permissions, err := PermissionRepository.Find(map[string]interface{}{}) | ||
34 | + if err != nil { | ||
35 | + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) | ||
36 | + } | ||
37 | + if err := transactionContext.CommitTransaction(); err != nil { | ||
38 | + return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) | ||
39 | + } | ||
40 | + return map[string]interface{}{"total": total, "permissions": permissions}, nil | ||
41 | +} | ||
42 | + | ||
43 | +func NewPermissionService(options map[string]interface{}) *PermissionService { | ||
44 | + newPermissionService := &PermissionService{} | ||
45 | + return newPermissionService | ||
46 | +} |
pkg/constant/common.go
0 → 100644
pkg/constant/postgresql.go
0 → 100644
1 | +package constant | ||
2 | + | ||
3 | +import "os" | ||
4 | + | ||
5 | +var POSTGRESQL_DB_NAME = "partner01" | ||
6 | +var POSTGRESQL_USER = "postgres" | ||
7 | +var POSTGRESQL_PASSWORD = "123456" | ||
8 | +var POSTGRESQL_HOST = "127.0.0.1" | ||
9 | +var POSTGRESQL_PORT = "5432" | ||
10 | +var DISABLE_CREATE_TABLE = false | ||
11 | +var DISABLE_SQL_GENERATE_PRINT = false | ||
12 | + | ||
13 | +func init() { | ||
14 | + if os.Getenv("POSTGRESQL_DB_NAME") != "" { | ||
15 | + POSTGRESQL_DB_NAME = os.Getenv("POSTGRESQL_DB_NAME") | ||
16 | + } | ||
17 | + if os.Getenv("POSTGRESQL_USER") != "" { | ||
18 | + POSTGRESQL_USER = os.Getenv("POSTGRESQL_USER") | ||
19 | + } | ||
20 | + if os.Getenv("POSTGRESQL_PASSWORD") != "" { | ||
21 | + POSTGRESQL_PASSWORD = os.Getenv("POSTGRESQL_PASSWORD") | ||
22 | + } | ||
23 | + if os.Getenv("POSTGRESQL_HOST") != "" { | ||
24 | + POSTGRESQL_HOST = os.Getenv("POSTGRESQL_HOST") | ||
25 | + } | ||
26 | + if os.Getenv("POSTGRESQL_PORT") != "" { | ||
27 | + POSTGRESQL_PORT = os.Getenv("POSTGRESQL_PORT") | ||
28 | + } | ||
29 | + if os.Getenv("DISABLE_CREATE_TABLE") != "" { | ||
30 | + DISABLE_CREATE_TABLE = true | ||
31 | + } | ||
32 | + if os.Getenv("DISABLE_SQL_GENERATE_PRINT") != "" { | ||
33 | + DISABLE_SQL_GENERATE_PRINT = true | ||
34 | + } | ||
35 | +} |
pkg/domain/buyer_info.go
0 → 100644
pkg/domain/dividend.go
0 → 100644
1 | +package domain | ||
2 | + | ||
3 | +// 分红值对象 | ||
4 | +type Dividend struct { | ||
5 | + // 计划分红 | ||
6 | + PlanBonus float64 `json:"planBonus"` | ||
7 | + // 调整后分红 | ||
8 | + UseBonus float64 `json:"useBonus"` | ||
9 | + // 已收分红 | ||
10 | + BonusHas float64 `json:"bonusHas"` | ||
11 | + // 未收分红 | ||
12 | + BonusNot float64 `json:"bonusNot"` | ||
13 | + // 分红支出 | ||
14 | + BonusExpense float64 `json:"bonusExpense"` | ||
15 | + // 分红状态(1:待支付 2:已支付) | ||
16 | + BonusStatus int `json:"bonusStatus"` | ||
17 | + // 合伙人分红比例 | ||
18 | + PartnerBonusPercent float64 `json:"partnerBonusPercent"` | ||
19 | + // 业务员抽成比例 | ||
20 | + SalesmanBonusPercent float64 `json:"salesmanBonusPercent"` | ||
21 | + // 业务员抽成 | ||
22 | + SalesmanBonus float64 `json:"salesmanBonus"` | ||
23 | +} |
pkg/domain/order_detail.go
0 → 100644
1 | +package domain | ||
2 | + | ||
3 | +// 订单详情实体 | ||
4 | +type OrderDetail struct { | ||
5 | + // 订单详情id | ||
6 | + OrderDetailId int64 `json:"orderDetailId"` | ||
7 | + // 订单编号 | ||
8 | + OrderNo string `json:"orderNo"` | ||
9 | + // 订单数量 | ||
10 | + OrderNum int `json:"orderNum"` | ||
11 | + // 订单总金额 | ||
12 | + TotalPrice float64 `json:"totalPrice"` | ||
13 | + // 调整后订单数量 | ||
14 | + AdjustedNum int `json:"adjustedNum"` | ||
15 | + // 调整后订单总金额 | ||
16 | + AdjustedTotalPrice float64 `json:"adjustedTotalPrice"` | ||
17 | +} |
pkg/domain/partner_category.go
0 → 100644
1 | +package domain | ||
2 | + | ||
3 | +// 合伙人类别 (实体) | ||
4 | +type PartnerCategory struct { | ||
5 | + // 合伙人类别id | ||
6 | + PartnerCategoryId int `json:"partnerCategoryId"` | ||
7 | + // 合伙人类别编码 | ||
8 | + PartnerCategoryCode string `json:"partnerCategoryCode"` | ||
9 | + // 合伙人类别名称 | ||
10 | + PartnerCategoryName string `json:"partnerCategoryName"` | ||
11 | +} | ||
12 | + | ||
13 | +type PartnerCategoryRepository interface { | ||
14 | + Save(partnerCategory *PartnerCategory) (*PartnerCategory, error) | ||
15 | + Remove(partnerCategory *PartnerCategory) (*PartnerCategory, error) | ||
16 | + FindOne(queryOptions map[string]interface{}) (*PartnerCategory, error) | ||
17 | + Find(queryOptions map[string]interface{}) (int64, []*PartnerCategory, error) | ||
18 | +} | ||
19 | + | ||
20 | +func (partnerCategory *PartnerCategory) Identify() interface{} { | ||
21 | + if partnerCategory.PartnerCategoryId == 0 { | ||
22 | + return nil | ||
23 | + } | ||
24 | + return partnerCategory.PartnerCategoryId | ||
25 | +} | ||
26 | + | ||
27 | +func (partnerCategory *PartnerCategory) Update(data map[string]interface{}) error { | ||
28 | + if partnerCategoryId, ok := data["partnerCategoryId"]; ok { | ||
29 | + partnerCategory.PartnerCategoryId = partnerCategoryId.(int) | ||
30 | + } | ||
31 | + if partnerCategoryCode, ok := data["partnerCategoryCode"]; ok { | ||
32 | + partnerCategory.PartnerCategoryCode = partnerCategoryCode.(string) | ||
33 | + } | ||
34 | + if partnerCategoryName, ok := data["partnerCategoryName"]; ok { | ||
35 | + partnerCategory.PartnerCategoryName = partnerCategoryName.(string) | ||
36 | + } | ||
37 | + return nil | ||
38 | +} |
pkg/domain/partner_info.go
0 → 100644
1 | +package domain | ||
2 | + | ||
3 | +import "time" | ||
4 | + | ||
5 | +// 合伙人信息 | ||
6 | +type PartnerInfo struct { | ||
7 | + // 合伙人账号 | ||
8 | + PartnerAccount string `json:"partnerAccount"` | ||
9 | + // 合伙人姓名 | ||
10 | + PartnerName string `json:"partnerName"` | ||
11 | + // 订单区域信息 | ||
12 | + RegionInfo *RegionInfo `json:"regionInfo"` | ||
13 | + // 状态 1正常 2禁用 | ||
14 | + Status int64 `json:"status"` | ||
15 | + // 合伙时间 | ||
16 | + CooperateTime time.Time `json:"cooperateTime"` | ||
17 | + // 业务员 | ||
18 | + Salesmans []*Salesman `json:"salesmans"` | ||
19 | + // 合伙人类型 | ||
20 | + PartnerCategorys []*PartnerCategory `json:"partnerCategorys"` | ||
21 | +} |
pkg/domain/permission.go
0 → 100644
1 | +package domain | ||
2 | + | ||
3 | +// 权限 | ||
4 | +type Permission struct { | ||
5 | + // 权限id | ||
6 | + PermissionId int `json:"permissionId"` | ||
7 | + // 公司名称 | ||
8 | + Name string `json:"name"` | ||
9 | + // 权限编码 | ||
10 | + Code string `json:"code"` | ||
11 | + // 父级id | ||
12 | + ParentId int `json:"parentId"` | ||
13 | + // 排序 | ||
14 | + Sort int `json:"sort"` | ||
15 | + // 图标 | ||
16 | + Icon string `json:"icon"` | ||
17 | +} | ||
18 | + | ||
19 | +type PermissionRepository interface { | ||
20 | + Save(permission *Permission) (*Permission, error) | ||
21 | + Remove(permission *Permission) (*Permission, error) | ||
22 | + FindOne(queryOptions map[string]interface{}) (*Permission, error) | ||
23 | + Find(queryOptions map[string]interface{}) (int64, []*Permission, error) | ||
24 | +} | ||
25 | + | ||
26 | +func (permission *Permission) Identify() interface{} { | ||
27 | + if permission.PermissionId == 0 { | ||
28 | + return nil | ||
29 | + } | ||
30 | + return permission.PermissionId | ||
31 | +} | ||
32 | + | ||
33 | +func (permission *Permission) Update(data map[string]interface{}) error { | ||
34 | + if permissionId, ok := data["permissionId"]; ok { | ||
35 | + permission.PermissionId = permissionId.(int) | ||
36 | + } | ||
37 | + if name, ok := data["name"]; ok { | ||
38 | + permission.Name = name.(string) | ||
39 | + } | ||
40 | + if code, ok := data["code"]; ok { | ||
41 | + permission.Code = code.(string) | ||
42 | + } | ||
43 | + if parentId, ok := data["parentId"]; ok { | ||
44 | + permission.ParentId = parentId.(int) | ||
45 | + } | ||
46 | + if sort, ok := data["sort"]; ok { | ||
47 | + permission.Sort = sort.(int) | ||
48 | + } | ||
49 | + if icon, ok := data["icon"]; ok { | ||
50 | + permission.Icon = icon.(string) | ||
51 | + } | ||
52 | + return nil | ||
53 | +} |
pkg/domain/phone_auth.go
0 → 100644
pkg/domain/region_info.go
0 → 100644
pkg/domain/salesman.go
0 → 100644
pkg/domain/user_auth.go
0 → 100644
1 | +package domain | ||
2 | + | ||
3 | +import "time" | ||
4 | + | ||
5 | +// 用户认证实体 | ||
6 | +type UserAuth struct { | ||
7 | + // 用户认证编号 | ||
8 | + UserAuthId int64 `json:"userAuthId"` | ||
9 | + // 用户id列表 | ||
10 | + Users []int64 `json:"users"` | ||
11 | + // 手机认证 | ||
12 | + PhoneAuth *PhoneAuth `json:"phoneAuth"` | ||
13 | + // 创建时间 | ||
14 | + CreateAt time.Time `json:"createAt"` | ||
15 | + // 更新时间 | ||
16 | + UpdateAt time.Time `json:"updateAt"` | ||
17 | +} | ||
18 | + | ||
19 | +type UserAuthRepository interface { | ||
20 | + Save(userAuth *UserAuth) (*UserAuth, error) | ||
21 | + Remove(userAuth *UserAuth) (*UserAuth, error) | ||
22 | + FindOne(queryOptions map[string]interface{}) (*UserAuth, error) | ||
23 | + Find(queryOptions map[string]interface{}) (int64, []*UserAuth, error) | ||
24 | +} | ||
25 | + | ||
26 | +func (userAuth *UserAuth) Identify() interface{} { | ||
27 | + if userAuth.UserAuthId == 0 { | ||
28 | + return nil | ||
29 | + } | ||
30 | + return userAuth.UserAuthId | ||
31 | +} | ||
32 | + | ||
33 | +func (userAuth *UserAuth) Update(data map[string]interface{}) error { | ||
34 | + if userAuthId, ok := data["userAuthId"]; ok { | ||
35 | + userAuth.UserAuthId = userAuthId.(int64) | ||
36 | + } | ||
37 | + if users, ok := data["users"]; ok { | ||
38 | + userAuth.Users = users.([]int64) | ||
39 | + } | ||
40 | + if phone, ok := data["phone"]; ok { | ||
41 | + userAuth.PhoneAuth.Phone = phone.(string) | ||
42 | + } | ||
43 | + if password, ok := data["password"]; ok { | ||
44 | + userAuth.PhoneAuth.Password = password.(string) | ||
45 | + } | ||
46 | + if createAt, ok := data["createAt"]; ok { | ||
47 | + userAuth.CreateAt = createAt.(time.Time) | ||
48 | + } | ||
49 | + if updateAt, ok := data["updateAt"]; ok { | ||
50 | + userAuth.UpdateAt = updateAt.(time.Time) | ||
51 | + } | ||
52 | + return nil | ||
53 | +} |
pkg/infrastructure/pg/init.go
0 → 100644
1 | +package pg | ||
2 | + | ||
3 | +import ( | ||
4 | + "fmt" | ||
5 | + "github.com/go-pg/pg/v10" | ||
6 | + "github.com/go-pg/pg/v10/orm" | ||
7 | + "gitlab.fjmaimaimai.com/mmm-go-pp/partner01/pkg/constant" | ||
8 | + "gitlab.fjmaimaimai.com/mmm-go-pp/partner01/pkg/infrastructure/pg/models" | ||
9 | + | ||
10 | + //_ "gitlab.fjmaimaimai.com/mmm-go-pp/partner01/pkg/infrastructure/pg/models" | ||
11 | + "github.com/linmadan/egglib-go/persistent/pg/hooks" | ||
12 | +) | ||
13 | + | ||
14 | +var DB *pg.DB | ||
15 | + | ||
16 | +func init() { | ||
17 | + DB = pg.Connect(&pg.Options{ | ||
18 | + User: constant.POSTGRESQL_USER, | ||
19 | + Password: constant.POSTGRESQL_PASSWORD, | ||
20 | + Database: constant.POSTGRESQL_DB_NAME, | ||
21 | + Addr: fmt.Sprintf("%s:%s", constant.POSTGRESQL_HOST, constant.POSTGRESQL_PORT), | ||
22 | + }) | ||
23 | + if !constant.DISABLE_SQL_GENERATE_PRINT { | ||
24 | + DB.AddQueryHook(hooks.SqlGeneratePrintHook{}) | ||
25 | + } | ||
26 | + if !constant.DISABLE_CREATE_TABLE { | ||
27 | + for _, model := range []interface{}{ | ||
28 | + (*models.Permission)(nil), | ||
29 | + (*models.PartnerCategory)(nil), | ||
30 | + (*models.UserAuth)(nil), | ||
31 | + } { | ||
32 | + err := DB.Model(model).CreateTable(&orm.CreateTableOptions{ | ||
33 | + Temp: false, | ||
34 | + IfNotExists: true, | ||
35 | + FKConstraints: true, | ||
36 | + }) | ||
37 | + if err != nil { | ||
38 | + panic(err) | ||
39 | + } | ||
40 | + } | ||
41 | + } | ||
42 | +} |
pkg/infrastructure/pg/models/permission.go
0 → 100644
pkg/infrastructure/pg/models/user_auth.go
0 → 100644
1 | +package models | ||
2 | + | ||
3 | +import ( | ||
4 | + "gitlab.fjmaimaimai.com/mmm-go-pp/partner01/pkg/domain" | ||
5 | + "time" | ||
6 | +) | ||
7 | + | ||
8 | +type UserAuth struct { | ||
9 | + tableName string `pg:"user_auth"` | ||
10 | + // 用户认证编号 | ||
11 | + UserAuthId int64 | ||
12 | + // 用户id列表 | ||
13 | + Users []int64 `pg:",array"` | ||
14 | + // 手机认证 | ||
15 | + PhoneAuth *domain.PhoneAuth | ||
16 | + // 创建时间 | ||
17 | + CreateAt time.Time | ||
18 | + // 更新时间 | ||
19 | + UpdateAt time.Time | ||
20 | +} |
1 | +package transform | ||
2 | + | ||
3 | +import ( | ||
4 | + "gitlab.fjmaimaimai.com/mmm-go-pp/partner01/pkg/domain" | ||
5 | + "gitlab.fjmaimaimai.com/mmm-go-pp/partner01/pkg/infrastructure/pg/models" | ||
6 | +) | ||
7 | + | ||
8 | +func TransformToPartnerCategoryDomainModelFromPgModels(partnerCategoryModel *models.PartnerCategory) (*domain.PartnerCategory, error) { | ||
9 | + return &domain.PartnerCategory{ | ||
10 | + PartnerCategoryId: partnerCategoryModel.PartnerCategoryId, | ||
11 | + PartnerCategoryCode: partnerCategoryModel.PartnerCategoryCode, | ||
12 | + PartnerCategoryName: partnerCategoryModel.PartnerCategoryName, | ||
13 | + }, nil | ||
14 | +} |
1 | +package transform | ||
2 | + | ||
3 | +import ( | ||
4 | + "gitlab.fjmaimaimai.com/mmm-go-pp/partner01/pkg/domain" | ||
5 | + "gitlab.fjmaimaimai.com/mmm-go-pp/partner01/pkg/infrastructure/pg/models" | ||
6 | +) | ||
7 | + | ||
8 | +func TransformToPermissionDomainModelFromPgModels(permissionModel *models.Permission) (*domain.Permission, error) { | ||
9 | + return &domain.Permission{ | ||
10 | + PermissionId: permissionModel.PermissionId, | ||
11 | + Name: permissionModel.Name, | ||
12 | + Code: permissionModel.Code, | ||
13 | + ParentId: permissionModel.ParentId, | ||
14 | + Sort: permissionModel.Sort, | ||
15 | + Icon: permissionModel.Icon, | ||
16 | + }, nil | ||
17 | +} |
pkg/infrastructure/pg/transform/user_auth.go
0 → 100644
1 | +package transform | ||
2 | + | ||
3 | +import ( | ||
4 | + "gitlab.fjmaimaimai.com/mmm-go-pp/partner01/pkg/domain" | ||
5 | + "gitlab.fjmaimaimai.com/mmm-go-pp/partner01/pkg/infrastructure/pg/models" | ||
6 | +) | ||
7 | + | ||
8 | +func TransformToUserAuthDomainModelFromPgModels(userAuthModel *models.UserAuth) (*domain.UserAuth, error) { | ||
9 | + return &domain.UserAuth{ | ||
10 | + UserAuthId: userAuthModel.UserAuthId, | ||
11 | + Users: userAuthModel.Users, | ||
12 | + PhoneAuth: userAuthModel.PhoneAuth, | ||
13 | + CreateAt: userAuthModel.CreateAt, | ||
14 | + UpdateAt: userAuthModel.UpdateAt, | ||
15 | + }, nil | ||
16 | +} |
1 | +package repository | ||
2 | + | ||
3 | +import ( | ||
4 | + "fmt" | ||
5 | + "github.com/go-pg/pg/v10" | ||
6 | + | ||
7 | + "github.com/linmadan/egglib-go/persistent/pg/sqlbuilder" | ||
8 | + pgTransaction "github.com/linmadan/egglib-go/transaction/pg" | ||
9 | + "github.com/linmadan/egglib-go/utils/snowflake" | ||
10 | + "gitlab.fjmaimaimai.com/mmm-go-pp/partner01/pkg/domain" | ||
11 | + "gitlab.fjmaimaimai.com/mmm-go-pp/partner01/pkg/infrastructure/pg/models" | ||
12 | + "gitlab.fjmaimaimai.com/mmm-go-pp/partner01/pkg/infrastructure/pg/transform" | ||
13 | +) | ||
14 | + | ||
15 | +type PartnerCategoryRepository struct { | ||
16 | + transactionContext *pgTransaction.TransactionContext | ||
17 | +} | ||
18 | + | ||
19 | +func (repository *PartnerCategoryRepository) nextIdentify() (int64, error) { | ||
20 | + IdWorker, err := snowflake.NewIdWorker(1) | ||
21 | + if err != nil { | ||
22 | + return 0, err | ||
23 | + } | ||
24 | + id, err := IdWorker.NextId() | ||
25 | + return id, err | ||
26 | +} | ||
27 | +func (repository *PartnerCategoryRepository) Save(partnerCategory *domain.PartnerCategory) (*domain.PartnerCategory, error) { | ||
28 | + sqlBuildFields := []string{ | ||
29 | + "partner_category_id", | ||
30 | + "partner_category_code", | ||
31 | + "partner_category_name", | ||
32 | + } | ||
33 | + insertFieldsSnippet := sqlbuilder.SqlFieldsSnippet(sqlBuildFields) | ||
34 | + insertPlaceHoldersSnippet := sqlbuilder.SqlPlaceHoldersSnippet(sqlBuildFields) | ||
35 | + returningFieldsSnippet := sqlbuilder.SqlFieldsSnippet(sqlBuildFields) | ||
36 | + updateFields := sqlbuilder.RemoveSqlFields(sqlBuildFields, "partnerCategory_id") | ||
37 | + updateFieldsSnippet := sqlbuilder.SqlUpdateFieldsSnippet(updateFields) | ||
38 | + tx := repository.transactionContext.PgTx | ||
39 | + if partnerCategory.Identify() == nil { | ||
40 | + partnerCategoryId, err := repository.nextIdentify() | ||
41 | + if err != nil { | ||
42 | + return partnerCategory, err | ||
43 | + } else { | ||
44 | + partnerCategory.PartnerCategoryId = int(partnerCategoryId) | ||
45 | + } | ||
46 | + if _, err := tx.QueryOne( | ||
47 | + pg.Scan( | ||
48 | + &partnerCategory.PartnerCategoryId, | ||
49 | + &partnerCategory.PartnerCategoryCode, | ||
50 | + &partnerCategory.PartnerCategoryName, | ||
51 | + ), | ||
52 | + fmt.Sprintf("INSERT INTO partner_categorys (%s) VALUES (%s) RETURNING %s", insertFieldsSnippet, insertPlaceHoldersSnippet, returningFieldsSnippet), | ||
53 | + partnerCategory.PartnerCategoryId, | ||
54 | + partnerCategory.PartnerCategoryCode, | ||
55 | + partnerCategory.PartnerCategoryName, | ||
56 | + ); err != nil { | ||
57 | + return partnerCategory, err | ||
58 | + } | ||
59 | + } else { | ||
60 | + if _, err := tx.QueryOne( | ||
61 | + pg.Scan( | ||
62 | + &partnerCategory.PartnerCategoryId, | ||
63 | + &partnerCategory.PartnerCategoryCode, | ||
64 | + &partnerCategory.PartnerCategoryName, | ||
65 | + ), | ||
66 | + fmt.Sprintf("UPDATE partner_categorys SET %s WHERE partner_category_id=? RETURNING %s", updateFieldsSnippet, returningFieldsSnippet), | ||
67 | + partnerCategory.PartnerCategoryId, | ||
68 | + partnerCategory.PartnerCategoryCode, | ||
69 | + partnerCategory.PartnerCategoryName, | ||
70 | + partnerCategory.Identify(), | ||
71 | + ); err != nil { | ||
72 | + return partnerCategory, err | ||
73 | + } | ||
74 | + } | ||
75 | + return partnerCategory, nil | ||
76 | +} | ||
77 | +func (repository *PartnerCategoryRepository) Remove(partnerCategory *domain.PartnerCategory) (*domain.PartnerCategory, error) { | ||
78 | + tx := repository.transactionContext.PgTx | ||
79 | + partnerCategoryModel := new(models.PartnerCategory) | ||
80 | + partnerCategoryModel.PartnerCategoryId = partnerCategory.Identify().(int) | ||
81 | + if _, err := tx.Model(partnerCategoryModel).WherePK().Delete(); err != nil { | ||
82 | + return partnerCategory, err | ||
83 | + } | ||
84 | + return partnerCategory, nil | ||
85 | +} | ||
86 | +func (repository *PartnerCategoryRepository) FindOne(queryOptions map[string]interface{}) (*domain.PartnerCategory, error) { | ||
87 | + tx := repository.transactionContext.PgTx | ||
88 | + partnerCategoryModel := new(models.PartnerCategory) | ||
89 | + query := sqlbuilder.BuildQuery(tx.Model(partnerCategoryModel), queryOptions) | ||
90 | + query.SetWhereByQueryOption("partner_category.partner_category_id = ?", "partnerCategoryId") | ||
91 | + if err := query.First(); err != nil { | ||
92 | + if err.Error() == "pg: no rows in result set" { | ||
93 | + return nil, fmt.Errorf("没有此资源") | ||
94 | + } else { | ||
95 | + return nil, err | ||
96 | + } | ||
97 | + } | ||
98 | + if partnerCategoryModel.PartnerCategoryId == 0 { | ||
99 | + return nil, nil | ||
100 | + } else { | ||
101 | + return transform.TransformToPartnerCategoryDomainModelFromPgModels(partnerCategoryModel) | ||
102 | + } | ||
103 | +} | ||
104 | +func (repository *PartnerCategoryRepository) Find(queryOptions map[string]interface{}) (int64, []*domain.PartnerCategory, error) { | ||
105 | + tx := repository.transactionContext.PgTx | ||
106 | + var partnerCategoryModels []*models.PartnerCategory | ||
107 | + partnerCategorys := make([]*domain.PartnerCategory, 0) | ||
108 | + query := sqlbuilder.BuildQuery(tx.Model(&partnerCategoryModels), queryOptions) | ||
109 | + query.SetOffsetAndLimit(20) | ||
110 | + query.SetOrderDirect("partner_category_id", "DESC") | ||
111 | + if count, err := query.SelectAndCount(); err != nil { | ||
112 | + return 0, partnerCategorys, err | ||
113 | + } else { | ||
114 | + for _, partnerCategoryModel := range partnerCategoryModels { | ||
115 | + if partnerCategory, err := transform.TransformToPartnerCategoryDomainModelFromPgModels(partnerCategoryModel); err != nil { | ||
116 | + return 0, partnerCategorys, err | ||
117 | + } else { | ||
118 | + partnerCategorys = append(partnerCategorys, partnerCategory) | ||
119 | + } | ||
120 | + } | ||
121 | + return int64(count), partnerCategorys, nil | ||
122 | + } | ||
123 | +} | ||
124 | +func NewPartnerCategoryRepository(transactionContext *pgTransaction.TransactionContext) (*PartnerCategoryRepository, error) { | ||
125 | + if transactionContext == nil { | ||
126 | + return nil, fmt.Errorf("transactionContext参数不能为nil") | ||
127 | + } else { | ||
128 | + return &PartnerCategoryRepository{ | ||
129 | + transactionContext: transactionContext, | ||
130 | + }, nil | ||
131 | + } | ||
132 | +} |
1 | +package repository | ||
2 | + | ||
3 | +import ( | ||
4 | + "fmt" | ||
5 | + "github.com/go-pg/pg/v10" | ||
6 | + | ||
7 | + "github.com/linmadan/egglib-go/persistent/pg/sqlbuilder" | ||
8 | + pgTransaction "github.com/linmadan/egglib-go/transaction/pg" | ||
9 | + "github.com/linmadan/egglib-go/utils/snowflake" | ||
10 | + "gitlab.fjmaimaimai.com/mmm-go-pp/partner01/pkg/domain" | ||
11 | + "gitlab.fjmaimaimai.com/mmm-go-pp/partner01/pkg/infrastructure/pg/models" | ||
12 | + "gitlab.fjmaimaimai.com/mmm-go-pp/partner01/pkg/infrastructure/pg/transform" | ||
13 | +) | ||
14 | + | ||
15 | +type PermissionRepository struct { | ||
16 | + transactionContext *pgTransaction.TransactionContext | ||
17 | +} | ||
18 | + | ||
19 | +func (repository *PermissionRepository) nextIdentify() (int64, error) { | ||
20 | + IdWorker, err := snowflake.NewIdWorker(1) | ||
21 | + if err != nil { | ||
22 | + return 0, err | ||
23 | + } | ||
24 | + id, err := IdWorker.NextId() | ||
25 | + return id, err | ||
26 | +} | ||
27 | +func (repository *PermissionRepository) Save(permission *domain.Permission) (*domain.Permission, error) { | ||
28 | + sqlBuildFields := []string{ | ||
29 | + "permission_id", | ||
30 | + "name", | ||
31 | + "code", | ||
32 | + "parent_id", | ||
33 | + "sort", | ||
34 | + "icon", | ||
35 | + } | ||
36 | + insertFieldsSnippet := sqlbuilder.SqlFieldsSnippet(sqlBuildFields) | ||
37 | + insertPlaceHoldersSnippet := sqlbuilder.SqlPlaceHoldersSnippet(sqlBuildFields) | ||
38 | + returningFieldsSnippet := sqlbuilder.SqlFieldsSnippet(sqlBuildFields) | ||
39 | + updateFields := sqlbuilder.RemoveSqlFields(sqlBuildFields, "permission_id") | ||
40 | + updateFieldsSnippet := sqlbuilder.SqlUpdateFieldsSnippet(updateFields) | ||
41 | + tx := repository.transactionContext.PgTx | ||
42 | + if permission.Identify() == nil { | ||
43 | + permissionId, err := repository.nextIdentify() | ||
44 | + if err != nil { | ||
45 | + return permission, err | ||
46 | + } else { | ||
47 | + permission.PermissionId = int(permissionId) | ||
48 | + } | ||
49 | + if _, err := tx.QueryOne( | ||
50 | + pg.Scan( | ||
51 | + &permission.PermissionId, | ||
52 | + &permission.Name, | ||
53 | + &permission.Code, | ||
54 | + &permission.ParentId, | ||
55 | + &permission.Sort, | ||
56 | + &permission.Icon, | ||
57 | + ), | ||
58 | + fmt.Sprintf("INSERT INTO permissions (%s) VALUES (%s) RETURNING %s", insertFieldsSnippet, insertPlaceHoldersSnippet, returningFieldsSnippet), | ||
59 | + permission.PermissionId, | ||
60 | + permission.Name, | ||
61 | + permission.Code, | ||
62 | + permission.ParentId, | ||
63 | + permission.Sort, | ||
64 | + permission.Icon, | ||
65 | + ); err != nil { | ||
66 | + return permission, err | ||
67 | + } | ||
68 | + } else { | ||
69 | + if _, err := tx.QueryOne( | ||
70 | + pg.Scan( | ||
71 | + &permission.PermissionId, | ||
72 | + &permission.Name, | ||
73 | + &permission.Code, | ||
74 | + &permission.ParentId, | ||
75 | + &permission.Sort, | ||
76 | + &permission.Icon, | ||
77 | + ), | ||
78 | + fmt.Sprintf("UPDATE permissions SET %s WHERE permission_id=? RETURNING %s", updateFieldsSnippet, returningFieldsSnippet), | ||
79 | + permission.PermissionId, | ||
80 | + permission.Name, | ||
81 | + permission.Code, | ||
82 | + permission.ParentId, | ||
83 | + permission.Sort, | ||
84 | + permission.Icon, | ||
85 | + permission.Identify(), | ||
86 | + ); err != nil { | ||
87 | + return permission, err | ||
88 | + } | ||
89 | + } | ||
90 | + return permission, nil | ||
91 | +} | ||
92 | +func (repository *PermissionRepository) Remove(permission *domain.Permission) (*domain.Permission, error) { | ||
93 | + tx := repository.transactionContext.PgTx | ||
94 | + permissionModel := new(models.Permission) | ||
95 | + permissionModel.PermissionId = permission.Identify().(int) | ||
96 | + if _, err := tx.Model(permissionModel).WherePK().Delete(); err != nil { | ||
97 | + return permission, err | ||
98 | + } | ||
99 | + return permission, nil | ||
100 | +} | ||
101 | +func (repository *PermissionRepository) FindOne(queryOptions map[string]interface{}) (*domain.Permission, error) { | ||
102 | + tx := repository.transactionContext.PgTx | ||
103 | + permissionModel := new(models.Permission) | ||
104 | + query := sqlbuilder.BuildQuery(tx.Model(permissionModel), queryOptions) | ||
105 | + query.SetWhereByQueryOption("permission.permission_id = ?", "permissionId") | ||
106 | + if err := query.First(); err != nil { | ||
107 | + if err.Error() == "pg: no rows in result set" { | ||
108 | + return nil, fmt.Errorf("没有此资源") | ||
109 | + } else { | ||
110 | + return nil, err | ||
111 | + } | ||
112 | + } | ||
113 | + if permissionModel.PermissionId == 0 { | ||
114 | + return nil, nil | ||
115 | + } else { | ||
116 | + return transform.TransformToPermissionDomainModelFromPgModels(permissionModel) | ||
117 | + } | ||
118 | +} | ||
119 | +func (repository *PermissionRepository) Find(queryOptions map[string]interface{}) (int64, []*domain.Permission, error) { | ||
120 | + tx := repository.transactionContext.PgTx | ||
121 | + var permissionModels []*models.Permission | ||
122 | + permissions := make([]*domain.Permission, 0) | ||
123 | + query := sqlbuilder.BuildQuery(tx.Model(&permissionModels), queryOptions) | ||
124 | + query.SetOffsetAndLimit(20) | ||
125 | + query.SetOrderDirect("permission_id", "DESC") | ||
126 | + if count, err := query.SelectAndCount(); err != nil { | ||
127 | + return 0, permissions, err | ||
128 | + } else { | ||
129 | + for _, permissionModel := range permissionModels { | ||
130 | + if permission, err := transform.TransformToPermissionDomainModelFromPgModels(permissionModel); err != nil { | ||
131 | + return 0, permissions, err | ||
132 | + } else { | ||
133 | + permissions = append(permissions, permission) | ||
134 | + } | ||
135 | + } | ||
136 | + return int64(count), permissions, nil | ||
137 | + } | ||
138 | +} | ||
139 | +func NewPermissionRepository(transactionContext *pgTransaction.TransactionContext) (*PermissionRepository, error) { | ||
140 | + if transactionContext == nil { | ||
141 | + return nil, fmt.Errorf("transactionContext参数不能为nil") | ||
142 | + } else { | ||
143 | + return &PermissionRepository{ | ||
144 | + transactionContext: transactionContext, | ||
145 | + }, nil | ||
146 | + } | ||
147 | +} |
1 | +package repository | ||
2 | + | ||
3 | +import ( | ||
4 | + "fmt" | ||
5 | + "github.com/go-pg/pg/v10" | ||
6 | + | ||
7 | + "github.com/linmadan/egglib-go/persistent/pg/sqlbuilder" | ||
8 | + pgTransaction "github.com/linmadan/egglib-go/transaction/pg" | ||
9 | + "github.com/linmadan/egglib-go/utils/snowflake" | ||
10 | + "gitlab.fjmaimaimai.com/mmm-go-pp/partner01/pkg/domain" | ||
11 | + "gitlab.fjmaimaimai.com/mmm-go-pp/partner01/pkg/infrastructure/pg/models" | ||
12 | + "gitlab.fjmaimaimai.com/mmm-go-pp/partner01/pkg/infrastructure/pg/transform" | ||
13 | +) | ||
14 | + | ||
15 | +type UserAuthRepository struct { | ||
16 | + transactionContext *pgTransaction.TransactionContext | ||
17 | +} | ||
18 | + | ||
19 | +func (repository *UserAuthRepository) nextIdentify() (int64, error) { | ||
20 | + IdWorker, err := snowflake.NewIdWorker(1) | ||
21 | + if err != nil { | ||
22 | + return 0, err | ||
23 | + } | ||
24 | + id, err := IdWorker.NextId() | ||
25 | + return id, err | ||
26 | +} | ||
27 | +func (repository *UserAuthRepository) Save(userAuth *domain.UserAuth) (*domain.UserAuth, error) { | ||
28 | + sqlBuildFields := []string{ | ||
29 | + "user_auth_id", | ||
30 | + "users", | ||
31 | + "phone_auth", | ||
32 | + "create_at", | ||
33 | + "update_at", | ||
34 | + } | ||
35 | + insertFieldsSnippet := sqlbuilder.SqlFieldsSnippet(sqlBuildFields) | ||
36 | + insertPlaceHoldersSnippet := sqlbuilder.SqlPlaceHoldersSnippet(sqlBuildFields) | ||
37 | + returningFieldsSnippet := sqlbuilder.SqlFieldsSnippet(sqlBuildFields) | ||
38 | + updateFields := sqlbuilder.RemoveSqlFields(sqlBuildFields, "userAuth_id") | ||
39 | + updateFieldsSnippet := sqlbuilder.SqlUpdateFieldsSnippet(updateFields) | ||
40 | + tx := repository.transactionContext.PgTx | ||
41 | + if userAuth.Identify() == nil { | ||
42 | + userAuthId, err := repository.nextIdentify() | ||
43 | + if err != nil { | ||
44 | + return userAuth, err | ||
45 | + } else { | ||
46 | + userAuth.UserAuthId = userAuthId | ||
47 | + } | ||
48 | + if _, err := tx.QueryOne( | ||
49 | + pg.Scan( | ||
50 | + &userAuth.UserAuthId, | ||
51 | + pg.Array(&userAuth.Users), | ||
52 | + &userAuth.PhoneAuth, | ||
53 | + &userAuth.CreateAt, | ||
54 | + &userAuth.UpdateAt, | ||
55 | + ), | ||
56 | + fmt.Sprintf("INSERT INTO user_auths (%s) VALUES (%s) RETURNING %s", insertFieldsSnippet, insertPlaceHoldersSnippet, returningFieldsSnippet), | ||
57 | + userAuth.UserAuthId, | ||
58 | + pg.Array(userAuth.Users), | ||
59 | + userAuth.PhoneAuth, | ||
60 | + userAuth.CreateAt, | ||
61 | + userAuth.UpdateAt, | ||
62 | + ); err != nil { | ||
63 | + return userAuth, err | ||
64 | + } | ||
65 | + } else { | ||
66 | + if _, err := tx.QueryOne( | ||
67 | + pg.Scan( | ||
68 | + &userAuth.UserAuthId, | ||
69 | + pg.Array(&userAuth.Users), | ||
70 | + &userAuth.PhoneAuth, | ||
71 | + &userAuth.CreateAt, | ||
72 | + &userAuth.UpdateAt, | ||
73 | + ), | ||
74 | + fmt.Sprintf("UPDATE user_auths SET %s WHERE user_auth_id=? RETURNING %s", updateFieldsSnippet, returningFieldsSnippet), | ||
75 | + userAuth.UserAuthId, | ||
76 | + pg.Array(userAuth.Users), | ||
77 | + userAuth.PhoneAuth, | ||
78 | + userAuth.CreateAt, | ||
79 | + userAuth.UpdateAt, | ||
80 | + userAuth.Identify(), | ||
81 | + ); err != nil { | ||
82 | + return userAuth, err | ||
83 | + } | ||
84 | + } | ||
85 | + return userAuth, nil | ||
86 | +} | ||
87 | +func (repository *UserAuthRepository) Remove(userAuth *domain.UserAuth) (*domain.UserAuth, error) { | ||
88 | + tx := repository.transactionContext.PgTx | ||
89 | + userAuthModel := new(models.UserAuth) | ||
90 | + userAuthModel.UserAuthId = userAuth.Identify().(int64) | ||
91 | + if _, err := tx.Model(userAuthModel).WherePK().Delete(); err != nil { | ||
92 | + return userAuth, err | ||
93 | + } | ||
94 | + return userAuth, nil | ||
95 | +} | ||
96 | +func (repository *UserAuthRepository) FindOne(queryOptions map[string]interface{}) (*domain.UserAuth, error) { | ||
97 | + tx := repository.transactionContext.PgTx | ||
98 | + userAuthModel := new(models.UserAuth) | ||
99 | + query := sqlbuilder.BuildQuery(tx.Model(userAuthModel), queryOptions) | ||
100 | + query.SetWhereByQueryOption("user_auth.user_auth_id = ?", "userAuthId") | ||
101 | + if err := query.First(); err != nil { | ||
102 | + if err.Error() == "pg: no rows in result set" { | ||
103 | + return nil, fmt.Errorf("没有此资源") | ||
104 | + } else { | ||
105 | + return nil, err | ||
106 | + } | ||
107 | + } | ||
108 | + if userAuthModel.UserAuthId == 0 { | ||
109 | + return nil, nil | ||
110 | + } else { | ||
111 | + return transform.TransformToUserAuthDomainModelFromPgModels(userAuthModel) | ||
112 | + } | ||
113 | +} | ||
114 | +func (repository *UserAuthRepository) Find(queryOptions map[string]interface{}) (int64, []*domain.UserAuth, error) { | ||
115 | + tx := repository.transactionContext.PgTx | ||
116 | + var userAuthModels []*models.UserAuth | ||
117 | + userAuths := make([]*domain.UserAuth, 0) | ||
118 | + query := sqlbuilder.BuildQuery(tx.Model(&userAuthModels), queryOptions) | ||
119 | + query.SetOffsetAndLimit(20) | ||
120 | + query.SetOrderDirect("user_auth_id", "DESC") | ||
121 | + if count, err := query.SelectAndCount(); err != nil { | ||
122 | + return 0, userAuths, err | ||
123 | + } else { | ||
124 | + for _, userAuthModel := range userAuthModels { | ||
125 | + if userAuth, err := transform.TransformToUserAuthDomainModelFromPgModels(userAuthModel); err != nil { | ||
126 | + return 0, userAuths, err | ||
127 | + } else { | ||
128 | + userAuths = append(userAuths, userAuth) | ||
129 | + } | ||
130 | + } | ||
131 | + return int64(count), userAuths, nil | ||
132 | + } | ||
133 | +} | ||
134 | +func NewUserAuthRepository(transactionContext *pgTransaction.TransactionContext) (*UserAuthRepository, error) { | ||
135 | + if transactionContext == nil { | ||
136 | + return nil, fmt.Errorf("transactionContext参数不能为nil") | ||
137 | + } else { | ||
138 | + return &UserAuthRepository{ | ||
139 | + transactionContext: transactionContext, | ||
140 | + }, nil | ||
141 | + } | ||
142 | +} |
pkg/log/logger.go
0 → 100644
1 | +package log | ||
2 | + | ||
3 | +import ( | ||
4 | + "github.com/linmadan/egglib-go/log" | ||
5 | + "github.com/linmadan/egglib-go/log/logrus" | ||
6 | + "gitlab.fjmaimaimai.com/mmm-go-pp/partner01/pkg/constant" | ||
7 | +) | ||
8 | + | ||
9 | +var Logger log.Logger | ||
10 | + | ||
11 | +func init() { | ||
12 | + Logger = logrus.NewLogrusLogger() | ||
13 | + Logger.SetServiceName(constant.SERVICE_NAME) | ||
14 | + Logger.SetLevel(constant.LOG_LEVEL) | ||
15 | +} |
pkg/port/beego/beego.go
0 → 100644
1 | +package beego | ||
2 | + | ||
3 | +import ( | ||
4 | + "github.com/beego/beego/v2/server/web" | ||
5 | + "github.com/linmadan/egglib-go/web/beego/filters" | ||
6 | + "os" | ||
7 | + "strconv" | ||
8 | + | ||
9 | + . "gitlab.fjmaimaimai.com/mmm-go-pp/partner01/pkg/log" | ||
10 | + _ "gitlab.fjmaimaimai.com/mmm-go-pp/partner01/pkg/port/beego/routers" | ||
11 | +) | ||
12 | + | ||
13 | +func init() { | ||
14 | + web.BConfig.AppName = "partner01" | ||
15 | + web.BConfig.CopyRequestBody = true | ||
16 | + web.BConfig.RunMode = "dev" | ||
17 | + web.BConfig.Listen.HTTPPort = 8080 | ||
18 | + web.BConfig.Listen.EnableAdmin = false | ||
19 | + web.BConfig.WebConfig.CommentRouterPath = "/pkg/port/beego" | ||
20 | + if os.Getenv("RUN_MODE") != "" { | ||
21 | + web.BConfig.RunMode = os.Getenv("RUN_MODE") | ||
22 | + } | ||
23 | + if os.Getenv("HTTP_PORT") != "" { | ||
24 | + portStr := os.Getenv("HTTP_PORT") | ||
25 | + if port, err := strconv.Atoi(portStr); err == nil { | ||
26 | + web.BConfig.Listen.HTTPPort = port | ||
27 | + } | ||
28 | + } | ||
29 | + web.InsertFilter("/*", web.BeforeExec, filters.AllowCors()) | ||
30 | + web.InsertFilter("/*", web.BeforeExec, filters.CreateRequstLogFilter(Logger)) | ||
31 | + web.InsertFilter("/*", web.AfterExec, filters.CreateResponseLogFilter(Logger), web.WithReturnOnOutput(false)) | ||
32 | +} |
1 | +package controllers | ||
2 | + | ||
3 | +import ( | ||
4 | + "github.com/linmadan/egglib-go/web/beego" | ||
5 | + "gitlab.fjmaimaimai.com/mmm-go-pp/partner01/pkg/application/partner/query" | ||
6 | + "gitlab.fjmaimaimai.com/mmm-go-pp/partner01/pkg/application/partner/service" | ||
7 | +) | ||
8 | + | ||
9 | +type PartnerController struct { | ||
10 | + beego.BaseController | ||
11 | +} | ||
12 | + | ||
13 | +func (controller *PartnerController) PartnerCategories() { | ||
14 | + partnerService := service.NewPartnerService(nil) | ||
15 | + partnerCategoriesQuery := &query.PartnerCategoriesQuery{} | ||
16 | + data, err := partnerService.PartnerCategories(partnerCategoriesQuery) | ||
17 | + controller.Response(data, err) | ||
18 | +} |
1 | +package controllers | ||
2 | + | ||
3 | +import ( | ||
4 | + "github.com/linmadan/egglib-go/web/beego" | ||
5 | + "gitlab.fjmaimaimai.com/mmm-go-pp/partner01/pkg/application/permission/query" | ||
6 | + "gitlab.fjmaimaimai.com/mmm-go-pp/partner01/pkg/application/permission/service" | ||
7 | +) | ||
8 | + | ||
9 | +type PermissionController struct { | ||
10 | + beego.BaseController | ||
11 | +} | ||
12 | + | ||
13 | +func (controller *PermissionController) Menus() { | ||
14 | + permissionService := service.NewPermissionService(nil) | ||
15 | + menusQuery := &query.MenusQuery{} | ||
16 | + data, err := permissionService.Menus(menusQuery) | ||
17 | + controller.Response(data, err) | ||
18 | +} |
pkg/port/beego/routers/partner_router.go
0 → 100644
pkg/port/beego/routers/permission_router.go
0 → 100644
1 | +package partner | ||
2 | + | ||
3 | +import ( | ||
4 | + "github.com/go-pg/pg/v10" | ||
5 | + "net/http" | ||
6 | + | ||
7 | + "github.com/gavv/httpexpect" | ||
8 | + . "github.com/onsi/ginkgo" | ||
9 | + . "github.com/onsi/gomega" | ||
10 | + pG "gitlab.fjmaimaimai.com/mmm-go-pp/partner01/pkg/infrastructure/pg" | ||
11 | +) | ||
12 | + | ||
13 | +var _ = Describe("合伙人分类列表", func() { | ||
14 | + var id int64 | ||
15 | + BeforeEach(func() { | ||
16 | + _, err := pG.DB.QueryOne( | ||
17 | + pg.Scan(&id), | ||
18 | + "INSERT INTO partner_category (partner_category_id,partner_category_code,partner_category_name) VALUES (?,?,?) RETURNING partner_category_id", | ||
19 | + 1000, "testPartnerCategoryCode", "testPartnerCategoryName") | ||
20 | + Expect(err).NotTo(HaveOccurred()) | ||
21 | + }) | ||
22 | + Describe("合伙人分类列表", func() { | ||
23 | + Context("", func() { | ||
24 | + It("", func() { | ||
25 | + httpExpect := httpexpect.New(GinkgoT(), server.URL) | ||
26 | + httpExpect.GET("/partners/categories"). | ||
27 | + Expect(). | ||
28 | + Status(http.StatusOK). | ||
29 | + JSON(). | ||
30 | + Object(). | ||
31 | + ContainsKey("code").ValueEqual("code", 0). | ||
32 | + ContainsKey("msg").ValueEqual("msg", "ok"). | ||
33 | + ContainsKey("data").Value("data").Object() | ||
34 | + }) | ||
35 | + }) | ||
36 | + }) | ||
37 | + AfterEach(func() { | ||
38 | + _, err := pG.DB.Exec("DELETE FROM partner_category WHERE partner_category_id = 1000") | ||
39 | + Expect(err).NotTo(HaveOccurred()) | ||
40 | + }) | ||
41 | +}) |
1 | +package partner | ||
2 | + | ||
3 | +import ( | ||
4 | + "net/http" | ||
5 | + "net/http/httptest" | ||
6 | + "testing" | ||
7 | + | ||
8 | + "github.com/beego/beego/v2/server/web" | ||
9 | + . "github.com/onsi/ginkgo" | ||
10 | + . "github.com/onsi/gomega" | ||
11 | + _ "gitlab.fjmaimaimai.com/mmm-go-pp/partner01/pkg/infrastructure/pg" | ||
12 | + _ "gitlab.fjmaimaimai.com/mmm-go-pp/partner01/pkg/port/beego" | ||
13 | +) | ||
14 | + | ||
15 | +func TestPartner(t *testing.T) { | ||
16 | + RegisterFailHandler(Fail) | ||
17 | + RunSpecs(t, "Beego Port Partner Correlations Test Case Suite") | ||
18 | +} | ||
19 | + | ||
20 | +var handler http.Handler | ||
21 | +var server *httptest.Server | ||
22 | + | ||
23 | +var _ = BeforeSuite(func() { | ||
24 | + handler = web.BeeApp.Handlers | ||
25 | + server = httptest.NewServer(handler) | ||
26 | +}) | ||
27 | + | ||
28 | +var _ = AfterSuite(func() { | ||
29 | + server.Close() | ||
30 | +}) |
1 | +package permission | ||
2 | + | ||
3 | +import ( | ||
4 | + "github.com/go-pg/pg/v10" | ||
5 | + "net/http" | ||
6 | + | ||
7 | + "github.com/gavv/httpexpect" | ||
8 | + . "github.com/onsi/ginkgo" | ||
9 | + . "github.com/onsi/gomega" | ||
10 | + pG "gitlab.fjmaimaimai.com/mmm-go-pp/partner01/pkg/infrastructure/pg" | ||
11 | +) | ||
12 | + | ||
13 | +var _ = Describe("根据当前用户返回权限列表", func() { | ||
14 | + var permissionId int64 | ||
15 | + BeforeEach(func() { | ||
16 | + _, err := pG.DB.QueryOne( | ||
17 | + pg.Scan(&permissionId), | ||
18 | + "INSERT INTO permissions (permission_id,name,code,parent_id,sort,icon) VALUES (?,?,?,?,?,?) RETURNING permission_id", | ||
19 | + 1000, "testPermission", "testPermissionCode", 0, 1, "testPermissionIcon") | ||
20 | + Expect(err).NotTo(HaveOccurred()) | ||
21 | + }) | ||
22 | + Describe("根据当前用户返回权限列表", func() { | ||
23 | + Context("", func() { | ||
24 | + It("", func() { | ||
25 | + httpExpect := httpexpect.New(GinkgoT(), server.URL) | ||
26 | + httpExpect.GET("/permission/menus"). | ||
27 | + Expect(). | ||
28 | + Status(http.StatusOK). | ||
29 | + JSON(). | ||
30 | + Object(). | ||
31 | + ContainsKey("code").ValueEqual("code", 0). | ||
32 | + ContainsKey("msg").ValueEqual("msg", "ok"). | ||
33 | + ContainsKey("data").Value("data").Object().ValueNotEqual("total", 0) | ||
34 | + }) | ||
35 | + }) | ||
36 | + }) | ||
37 | + AfterEach(func() { | ||
38 | + _, err := pG.DB.Exec("DELETE FROM permissions WHERE permission_id = 1000") | ||
39 | + Expect(err).NotTo(HaveOccurred()) | ||
40 | + }) | ||
41 | +}) |
1 | +package permission | ||
2 | + | ||
3 | +import ( | ||
4 | + "net/http" | ||
5 | + "net/http/httptest" | ||
6 | + "testing" | ||
7 | + | ||
8 | + "github.com/beego/beego/v2/server/web" | ||
9 | + . "github.com/onsi/ginkgo" | ||
10 | + . "github.com/onsi/gomega" | ||
11 | + _ "gitlab.fjmaimaimai.com/mmm-go-pp/partner01/pkg/infrastructure/pg" | ||
12 | + _ "gitlab.fjmaimaimai.com/mmm-go-pp/partner01/pkg/port/beego" | ||
13 | +) | ||
14 | + | ||
15 | +func TestPermission(t *testing.T) { | ||
16 | + RegisterFailHandler(Fail) | ||
17 | + RunSpecs(t, "Beego Port Permission Correlations Test Case Suite") | ||
18 | +} | ||
19 | + | ||
20 | +var handler http.Handler | ||
21 | +var server *httptest.Server | ||
22 | + | ||
23 | +var _ = BeforeSuite(func() { | ||
24 | + handler = web.BeeApp.Handlers | ||
25 | + server = httptest.NewServer(handler) | ||
26 | +}) | ||
27 | + | ||
28 | +var _ = AfterSuite(func() { | ||
29 | + server.Close() | ||
30 | +}) |
-
请 注册 或 登录 后发表评论