otto 2 years ago
commit
55175ed5e8
  1. 38
      .gitignore
  2. 29
      Dockerfile
  3. 59
      Jenkinsfile
  4. 21
      LICENSE
  5. 43
      Makefile
  6. 12
      README.md
  7. 40
      cmd/server/main.go
  8. 21
      cmd/server/wire.go
  9. 34
      cmd/server/wire_gen.go
  10. 19
      configs/config
  11. 42
      configs/config.yaml
  12. 85
      go.mod
  13. 521
      go.sum
  14. 8
      internal/biz/biz.go
  15. 167
      internal/biz/mike_hot_timer.go
  16. 41
      internal/biz/repo.go
  17. 1
      internal/data/README.md
  18. 63
      internal/data/data.go
  19. 31
      internal/data/init_value.go
  20. 15
      internal/data/model/auto.go
  21. 32
      internal/data/model/field.go
  22. 14
      internal/data/model/init_value.go
  23. 73
      internal/data/model/room_mike.go
  24. 74
      internal/data/model/transaction.go
  25. 304
      internal/data/room_mike.go
  26. 20
      internal/util/page.go
  27. 21
      internal/util/time.go
  28. 55
      internal/util/transform.go
  29. 20
      job.yaml
  30. 39
      openapi.yaml
  31. 258
      pkg/redis/redis.go
  32. 22
      pkg/server/gift/gift.go
  33. 50
      pkg/server/message/message.go
  34. 10
      pkg/server/server.go

38
.gitignore vendored

@ -0,0 +1,38 @@
# Reference https://github.com/github/gitignore/blob/master/Go.gitignore
# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib
# Test binary, built with `go test -c`
*.test
# Output of the go coverage tool, specifically when used with LiteIDE
*.out
# Dependency directories (remove the comment below to include it)
vendor/
# Go workspace file
go.work
# Compiled Object files, Static and Dynamic libs (Shared Objects)
*.o
*.a
*.so
# OS General
Thumbs.db
.DS_Store
# project
*.cert
*.key
*.log
bin/
# Develop tools
.vscode/
.idea/
*.swp

29
Dockerfile

@ -0,0 +1,29 @@
FROM golang:1.18 AS builder
ENV CGO_ENABLED 0
ENV GOOS linux
COPY . /src
WORKDIR /src
RUN export GIT_TERMINAL_PROMPT=1
RUN git config --global url."git.gz.internal.jumaiyx.cn:222".insteadof "https://git.gz.internal.jumaiyx.cn/"
RUN go env -w GOPROXY="https://goproxy.cn"
RUN go env -w GOINSECURE="git.gz.internal.jumaiyx.cn"
RUN go env -w GOPRIVATE="git.gz.internal.jumaiyx.cn/"
RUN go env -w GONOSUMDB="git.gz.internal.jumaiyx.cn/"
RUN go env -w GONOPROXY="git.gz.internal.jumaiyx.cn/"
RUN go env
RUN go mod tidy
RUN make build
FROM alpine
RUN apk update --no-cache && apk add --no-cache ca-certificates tzdata
ENV TZ Asia/Shanghai
WORKDIR /app
COPY --from=builder /src/bin/server /app/server
COPY --from=builder /src/configs /app/configs
#EXPOSE 9000
#ENTRYPOINT ["./server"]

59
Jenkinsfile vendored

@ -0,0 +1,59 @@
def buildService(serverName){
docker.withRegistry('https://registry.internal.jumaiyx.cn', 'docker-registry-internal-backend') {
def img = docker.build("jm/$serverName:${env.BUILD_ID}",".")
img.push()
}
}
pipeline {
agent any
environment {
// 服务名
SERVER_NAME = 'room'
// 镜像名称,对应K8S_FILE里面Deployment.containers的name
IMAGE_NAME = 'room'
// git路径
GIT_URL = 'http://git.gz.internal.jumaiyx.cn/jm/room.git'
// 分支
GIT_BRANCH = '*/master'
// kubectl执行文件
K8S_FILE = 'room-dev.yaml'
// k8s deployment名称,对应K8S_FILE里面Deployment的name
K8S_DEPLOYMENT = 'room-deployment'
}
stages {
stage('git代码拉取') {
steps {
checkout([$class: 'GitSCM', branches: [[name: "${env.GIT_BRANCH}"]], extensions: [], userRemoteConfigs: [[url: "${env.GIT_URL}"]]])
echo 'git代码拉取 成功'
}
}
stage('docker镜像打包') {
steps {
echo "镜像版本:${env.BUILD_ID}"
buildService("${env.SERVER_NAME}")
echo 'docker镜像打包'
}
}
stage('传入k8s-master') {
steps {
sshPublisher(publishers: [sshPublisherDesc(configName: 'k8s', transfers: [sshTransfer(cleanRemote: false, excludes: '', execCommand: '', execTimeout: 120000, flatten: false, makeEmptyDirs: false, noDefaultExcludes: false, patternSeparator: '[, ]+', remoteDirectory: '', remoteDirectorySDF: false, removePrefix: '', sourceFiles: "${env.K8S_FILE}")], usePromotionTimestamp: false, useWorkspaceInPromotion: false, verbose: false)])
echo '将yaml传入k8s-master'
}
}
stage('部署服务') {
steps {
sh "ssh root@192.168.1.156 kubectl apply -f /usr/local/k8s/${env.K8S_FILE}"
echo '部署服务'
}
}
stage('更新image') {
steps {
sh "ssh root@192.168.1.156 kubectl set image Deployment/${env.K8S_DEPLOYMENT} ${env.IMAGE_NAME}=registry.internal.jumaiyx.cn/jm/${env.SERVER_NAME}:${env.BUILD_ID} -n dev"
echo '部署服务'
}
}
}
}

21
LICENSE

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2020 go-kratos
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

43
Makefile

@ -0,0 +1,43 @@
GOHOSTOS:=$(shell go env GOHOSTOS)
GOPATH:=$(shell go env GOPATH)
VERSION=$(shell git describe --tags --always)
ifeq ($(GOHOSTOS), windows)
#the `find.exe` is different from `find` in bash/shell.
#to see https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/find.
#changed to use git-bash.exe to run find cli or other cli friendly, caused of every developer has a Git.
Git_Bash= $(subst cmd\,bin\bash.exe,$(dir $(shell where git)))
INTERNAL_PROTO_FILES=$(shell $(Git_Bash) -c "find internal -name *.proto")
API_PROTO_FILES=$(shell $(Git_Bash) -c "find api -name *.proto")
else
INTERNAL_PROTO_FILES=$(shell find internal -name *.proto)
API_PROTO_FILES=$(shell find api -name *.proto)
endif
.PHONY: build
# build
build:
mkdir -p bin/ && go build -ldflags "-X main.Version=$(VERSION)" -o ./bin ./...
run:
mkdir -p bin/ && go build -ldflags "-X main.Version=$(VERSION)" -o ./bin ./...
./bin/server
up:
go mod tidy
go get -u git.gz.internal.jumaiyx.cn/jm/jmproto@master
go get -u git.gz.internal.jumaiyx.cn/pkg/k8s-client
go get -u git.gz.internal.jumaiyx.cn/pkg/log
go get -u git.gz.internal.jumaiyx.cn/pkg/config
go get -u git.gz.internal.jumaiyx.cn/pkg/id-encode
.PHONY: generate
# generate
generate:
go mod tidy
go get github.com/google/wire/cmd/wire@latest
go generate ./...
wire:
cd ./cmd/src-room && wire

12
README.md

@ -0,0 +1,12 @@
## 房间麦克风热点计数
```sh
docker login -u devops-internal -p yVZUucBSMTJ8HDct https://registry.internal.jumaiyx.cn
docker build -t registry.internal.jumaiyx.cn/job/room-mike-hot-timer:latest .
docker tag registry.internal.jumaiyx.cn/job/room-mike-hot-timer:latest registry.internal.jumaiyx.cn/job/room-mike-hot-timer:v1.0.0
docker push registry.internal.jumaiyx.cn/job/room-mike-hot-timer:v1.0.0
```

40
cmd/server/main.go

@ -0,0 +1,40 @@
package main
import (
"flag"
"git.gz.internal.jumaiyx.cn/pkg/config"
idencode "git.gz.internal.jumaiyx.cn/pkg/id-encode"
"git.gz.internal.jumaiyx.cn/pkg/log"
"os"
)
var (
Name string
Version string
id, _ = os.Hostname()
)
func main() {
flag.Parse()
c, err := config.New().Conf("./configs/config.yaml")
if err != nil {
panic(err)
}
bc := c.Get()
l := log.NewLogger(c.Get().Log)
encoding, err := idencode.NewIDEncoding("uid", bc.IdEncode.Uid.Salt, int(bc.IdEncode.Uid.MinLength))
if err != nil {
panic(err)
}
app, cleanup, err := wireApp(bc.Data, encoding, l)
if err != nil {
panic(err)
}
defer cleanup()
app.Run()
// start and wait for stop signal
//if err = app.Run(); err != nil {
// panic(err)
//}
}

21
cmd/server/wire.go

@ -0,0 +1,21 @@
//go:build wireinject
// +build wireinject
// The build tag makes sure the stub is not built in the final build.
package main
import (
"git.gz.internal.jumaiyx.cn/jm/jmproto/conf"
"git.gz.internal.jumaiyx.cn/job/room-mike-hot-timer/internal/biz"
"git.gz.internal.jumaiyx.cn/job/room-mike-hot-timer/internal/data"
ser "git.gz.internal.jumaiyx.cn/job/room-mike-hot-timer/pkg/server"
idencode "git.gz.internal.jumaiyx.cn/pkg/id-encode"
"git.gz.internal.jumaiyx.cn/pkg/log"
"github.com/google/wire"
)
// wireApp init kratos application.
func wireApp(*conf.Data, idencode.IDEncoding, log.Logger) (*biz.MikeHotTimer, func(), error) {
panic(wire.Build(data.ProviderSet, biz.ProviderSet, ser.ProviderServerSet))
}

34
cmd/server/wire_gen.go

@ -0,0 +1,34 @@
// Code generated by Wire. DO NOT EDIT.
//go:generate go run github.com/google/wire/cmd/wire
//go:build !wireinject
// +build !wireinject
package main
import (
"git.gz.internal.jumaiyx.cn/jm/jmproto/conf"
"git.gz.internal.jumaiyx.cn/job/room-mike-hot-timer/internal/biz"
"git.gz.internal.jumaiyx.cn/job/room-mike-hot-timer/internal/data"
"git.gz.internal.jumaiyx.cn/job/room-mike-hot-timer/pkg/server/gift"
"git.gz.internal.jumaiyx.cn/job/room-mike-hot-timer/pkg/server/message"
"git.gz.internal.jumaiyx.cn/pkg/id-encode"
"git.gz.internal.jumaiyx.cn/pkg/log"
)
// Injectors from wire.go:
// wireApp init kratos application.
func wireApp(confData *conf.Data, idEncoding idencoding.IDEncoding, logger log.Logger) (*biz.MikeHotTimer, func(), error) {
dataData, cleanup, err := data.NewData(confData, logger)
if err != nil {
return nil, nil, err
}
roomMikeRepo := data.NewRoomMikeRepo(dataData, logger)
giftClient := gift.NewGiftClient(logger)
messageClient := message.NewMessageClient(logger)
mikeHotTimer := biz.NewMikeHotTimer(logger, roomMikeRepo, giftClient, messageClient, idEncoding)
return mikeHotTimer, func() {
cleanup()
}, nil
}

19
configs/config

@ -0,0 +1,19 @@
apiVersion: v1
clusters:
- cluster:
certificate-authority-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUN5RENDQWJDZ0F3SUJBZ0lCQURBTkJna3Foa2lHOXcwQkFRc0ZBREFWTVJNd0VRWURWUVFERXdwcmRXSmwKY201bGRHVnpNQjRYRFRJeU1Ea3lOekF4TXpRek9Wb1hEVE15TURreU5EQXhNelF6T1Zvd0ZURVRNQkVHQTFVRQpBeE1LYTNWaVpYSnVaWFJsY3pDQ0FTSXdEUVlKS29aSWh2Y05BUUVCQlFBRGdnRVBBRENDQVFvQ2dnRUJBS1VGClBZdjVCdlRYLzlXdjZhWU9vWmM5cUtnclVnQjRzZFBWYVVJMFFBRlV1cUhEeE1RMGdBc1RBL2xtUkxZL0NJRm8KS21pOHNYR1J4Wmh2Lytqd01iKzB6U0oxNzd5RVpGSmQyZlQ3QkRkRHdJVkdNRnVUYytUN2xnNzdLVXFENHBSMgp1Mm1hcmRuWGs3cmtzNUR0alg1QUdhdW45VWRiMmRrb3orYmc5aC9XWTB6NjczUysvcVBnUzBER1o3bUtUTm5zCjdQaXdYbDV2MFNqUDM0ejRNRjAxU0g1Y3RxQm12OUhUOERvL0pMRjlkNUVaaGtPWlBuL1RiTjZqSGRKenZqTzUKbjU4T1ZQQ3VKUGhrbm1VUE1pZDJISU1ncEdqMUN3NWJYQXdDZ0RmeVpuNG15WEJ6eU0wb0FSazBYbUd3QXpWegpkQ0g4d2ZGL2lPWi81SGpZaGswQ0F3RUFBYU1qTUNFd0RnWURWUjBQQVFIL0JBUURBZ0trTUE4R0ExVWRFd0VCCi93UUZNQU1CQWY4d0RRWUpLb1pJaHZjTkFRRUxCUUFEZ2dFQkFBRlJRZEdnaENaNUFqckFidjJOenUvUzJ2cXAKRGQ3Z3FJUytXYVdTVDNoUXRYTjl2UUpiN3dGWktJb3l6Y3hZOUtOeldjT3Z5V05UZnliK2Z4dFI3RHJpRDV6WApUWngyZWdZSlN3R3Y3T0hPU0VGVHpTSXBRTlBLNURhejZ4b0ZsUE85M1lyZ1o1VTd0bVlRN3FTOUZXV1VWR3hZCk42TFpjbEtrYTM4MEFZRzd2TlZZNFdacHZDVG9Ed2xsb2JMOE85WVdWdmp2TGw1TDAwL201MDNNZTViREEydVEKSjdPa1dENGtiL2Rob0paQjdaOWZId0tWaTgxYUkxNm9ERlAwbTR5YWQvckZBS3FHUlcxdVpLTXNYK29JL0ttVApVcHp0QStzSXhZZXlBK1VaSXJoN1NjSkZ3amVHdE1YUkJIM0RRUzRZc05SdHkxUnZjUnJXSk1uU3Z1MD0KLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo=
server: https://192.168.1.156:6443
name: kubernetes
contexts:
- context:
cluster: kubernetes
user: kubernetes-admin
name: kubernetes-admin@kubernetes
current-context: kubernetes-admin@kubernetes
kind: Config
preferences: {}
users:
- name: kubernetes-admin
user:
client-certificate-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUM4akNDQWRxZ0F3SUJBZ0lJTFV6blJtKzZqUkV3RFFZSktvWklodmNOQVFFTEJRQXdGVEVUTUJFR0ExVUUKQXhNS2EzVmlaWEp1WlhSbGN6QWVGdzB5TWpBNU1qY3dNVE0wTXpsYUZ3MHlNekE1TWpjd01UTTBOREJhTURReApGekFWQmdOVkJBb1REbk41YzNSbGJUcHRZWE4wWlhKek1Sa3dGd1lEVlFRREV4QnJkV0psY201bGRHVnpMV0ZrCmJXbHVNSUlCSWpBTkJna3Foa2lHOXcwQkFRRUZBQU9DQVE4QU1JSUJDZ0tDQVFFQTNYOFZrc2x3N3AxQUF3aG4KbW5nRHU3NWRUUUpXUm1EN014a3ZPN0ZiWFFXVTVHUDg3bHpEV2pMeUt2L1NqZTZ5a1VTTkE5Z21kTmRrOTY0RgpnYWpyRnRHSUZXVzM2NVFXeitRT25ZVWFHQk9VRHQ2VFloOWlSRXJIRjhsR3NRVW0vVi9NemttMXpkY284ZEtHCm5VbktDWDhyMW5yVm53UkRiRTE2VEozcFRhK2tXdmVHYlFoRW5PZHpBMkJFTDl3cWR4bUljNm1GMnFla0ZDVXoKMlF1cGtMR3JOMlBEVGd2YmdwcS9pbTdldUIyYXNLczE2RjByMElrMk83VHhoK2twZkQrazVTLzdUdTEyWGttVwpkNWIyZHlVMFlCZFZDRUJFV1JiK3ROU3oxQXlVdEZQbEkxRmdabWZaajdKRGFkYzlDMG9ML2hoOFA0UzU3NFlECnFjaEZxUUlEQVFBQm95Y3dKVEFPQmdOVkhROEJBZjhFQkFNQ0JhQXdFd1lEVlIwbEJBd3dDZ1lJS3dZQkJRVUgKQXdJd0RRWUpLb1pJaHZjTkFRRUxCUUFEZ2dFQkFJNVVaM2Fkb20vdFdRSDA4NERXeWZoRG0zVllJL0FoeDJ2dwozV0Z1S29KNFBsVzhQRDg4YkhLbDNOZTdrMktMa3diaitUUWFrQ3JQK21IY2k5UGVHRzNibjJ6Z3duSm5yekJzCkFTY01lTGh2TzVRbkV3Y0FqemJtYUg2SFVBUk8vQ1dwRjJma2hHQVV3SDlDZWQxN1RTZkRuVGUxKzRxaHkwaU8KSFEvMUs2YjFQVEFGQXhoY0k5NFp1Nzk2TEFObXhPWGpUeG5sSTVTa1Z6VGROTi9zUm40MnRMckEzeDRWWktrNApWNmE5Y3luZ3dvYzBXRmxNaU51aG1wOVo1VkNTOGpNT1E5dXljQnQvc09RcWpaYXhpMksrVUZsdFZNbk04cFNNCnZGaWtwbEorblFieVdPeWUwZkwzZ0YvQ1lERUxlOXEyeHlodGwrNyt0WUp3Sy9xWU5Ocz0KLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo=
client-key-data: LS0tLS1CRUdJTiBSU0EgUFJJVkFURSBLRVktLS0tLQpNSUlFb3dJQkFBS0NBUUVBM1g4VmtzbHc3cDFBQXdobm1uZ0R1NzVkVFFKV1JtRDdNeGt2TzdGYlhRV1U1R1A4CjdsekRXakx5S3YvU2plNnlrVVNOQTlnbWROZGs5NjRGZ2FqckZ0R0lGV1czNjVRV3orUU9uWVVhR0JPVUR0NlQKWWg5aVJFckhGOGxHc1FVbS9WL016a20xemRjbzhkS0duVW5LQ1g4cjFuclZud1JEYkUxNlRKM3BUYStrV3ZlRwpiUWhFbk9kekEyQkVMOXdxZHhtSWM2bUYycWVrRkNVejJRdXBrTEdyTjJQRFRndmJncHEvaW03ZXVCMmFzS3MxCjZGMHIwSWsyTzdUeGgra3BmRCtrNVMvN1R1MTJYa21XZDViMmR5VTBZQmRWQ0VCRVdSYit0TlN6MUF5VXRGUGwKSTFGZ1ptZlpqN0pEYWRjOUMwb0wvaGg4UDRTNTc0WURxY2hGcVFJREFRQUJBb0lCQUVhR1IxVTBoSnZGUC9OMwpRcDJoWnZicFZ3WEZIN2xLK2RDOFRSakJrT2llZFZqL0tUS3dJSmRncjFEWG9iQUZkNS9mWnRMNWlNMGRKQTNrCnYrWVg1YnFmUHFncGVoVXRVdElndURLWmhjUnl2MnE0bmM3WlZVMlBUYk1hS0VNRzgvSXJCYWdOT2pEdk9COC8KUEJOcXdrU2gxRkIzVGZ0U3ZURUh2bEFVMjRzYk1NVWo3SkNQRDRjTXhocEc5VlI3dG1ZdzFkQ2MwcXM3L0FHRQp4aTg2NyszdXdYc1c2cWVOaytWY0tNdjJ6N0lNZ2g4Wk9aZnMwMlBIU1VVeTFQN0RnR1ZxenhvWnV2MjV3SG90Cll1eGdIbWxwdXFFRDdJcVBTQ1pTbTNPYldlODRvN3d4eTBKWnpsNUJGL1REUWtEdjM4NWRJaFVndlR3KzhMNU8KV21nU0dRRUNnWUVBM2lQbEptcy9sbm9XbUdzVytHM3RaOU1DRWI0WVFkTnk3RVRtM29VeXp3K0I5TVlOMW0vdQp5RnE5UjlITEdkU1hoS1YyMVlKUTBTTGcxc255WVNKV3F6UXloanJEalMxb2gyV2ZOYnBZWXhUL2wyQW1EcEFYCm93YUgyU0xZRm9sSlVtVE1NZE1nWEp2Rk8rREtqeFN3MDYzeXEvTExGeVZLR3lPOXVnWEJaMkVDZ1lFQS8wSVIKWEVKZVFMUFl0Q0l1Q25YOS9JOXF1azBvVHR3NDliaUpyUUlVQlY4Skg4cWJOTy81SXNZY2tyOGNIOExIQzBQTwpRcEttYzIyWTV1MmJJYnNEbEZEckt0bGdQQWpOVTFOdFd0RU9tUFY1UlBxUDdzaGxEZk1qNmRWNTlzZ0dxVEdRCmtKU01oczE1ekJJcURPNVVNeFpZbTlrcUczSE1EQ0NCVlFJVXEwa0NnWUJtMWRFb0p2QUo5anp0bEczTzFmelkKV291VHNSL0RvV0tMVkI1WWx1cjloaDFRTmp1RHNNK211ckx6UTRDMVZZQkxMTnBGWHcyUXM0ZkloemFJbHYvdQpRN3k3L1FvNEdmUlE4Yzl4YlBHcjlMV1oyeTNqQWZ1ZlFjK3p5bmlrZml1T1ZCRmZZM0NRenAvUTUzQitLa0x0Cnk1SVMzZFA4eEF0NVl1TmE4WDBtSVFLQmdRQ2RBSkFaQlNGZi9yN05uVEJnY3M2MEo2cG55TW1BSitoSkN5WnoKYVpIUzgrOXl4SFhPaThQYlphdHhmMmJYQ2tEUFp2ZFk3MGErUEswTmJSdzhGUUZRbXF6ckFDVTNCOXJ5NDUraAplbkRXR0Racy9Rakd3QytYOHZNbUFvNHdBanhHbVJ2b01kWjFtN0RNbW1lTzZKQ1ZrNnNRd1BRclNVVk9PRGdVCmgyRWJNUUtCZ0RQamNEdjN6SjJJVjFrY01kbjNEMWVyQjBFR0I1M2NYeHFoa0pET3Rqd3RUV3V2dHNIYzI0R3gKNmFQODI1QllUV2NQNEJ6dEFIN1A5RkE2QmlBa0t3T3lrWFR5dDg2RTBUZUM5L3FtSW9EY255aHdReHVCZlB3UQo2bVhxeVFLZFBOTnVoKzlReDBEcGxHMTkzVTFid0pya3k3b3hKc0dackg1OUdGK3VTT3J0Ci0tLS0tRU5EIFJTQSBQUklWQVRFIEtFWS0tLS0tCg==

42
configs/config.yaml

@ -0,0 +1,42 @@
server:
name: room
http:
addr: 0.0.0.0:8000
timeout: 60
grpc:
addr: 0.0.0.0:9000
timeout: 60
data:
database:
source: "host=192.168.1.156 user=metachat password=metachat dbname=room port=15433 sslmode=disable TimeZone=Asia/Shanghai"
# source: postgresql://metachat:metachat@127.0.0.1:15432/room
redis:
addr: 192.168.1.156:16378
password: MM5ZsXL0
read_timeout: 1
write_timeout: 1
etcd:
host: "127.0.0.1:20000"
log:
level: "debug"
name: "room"
kafka:
addr:
- "127.0.0.1:9092"
amqp:
host: 192.168.1.156:5672
username: jm
password: jm123456
id_encode:
uid:
salt: "test"
min_length: 8
rtctoken:
app_id: 6eeb2e6be9a141d1b0db920f36a5a9f3
app_certificate: 80438856882e4563841d56f3cefeb763
privilege_expiration: 3600
token_expiration: 3600

85
go.mod

@ -0,0 +1,85 @@
module git.gz.internal.jumaiyx.cn/job/room-mike-hot-timer
go 1.18
require (
git.gz.internal.jumaiyx.cn/jm/jmproto v0.0.0-20221213021854-5d3d515213e5
git.gz.internal.jumaiyx.cn/pkg/config v0.0.0-20221014090146-8fd721834886
git.gz.internal.jumaiyx.cn/pkg/id-encode v0.0.0-20221018014421-fe47b648265b
git.gz.internal.jumaiyx.cn/pkg/k8s-client v0.0.0-20221122092706-e2ab9bcb4045
git.gz.internal.jumaiyx.cn/pkg/kubediscovery v0.0.0-20221212113033-2ab4a490102d
git.gz.internal.jumaiyx.cn/pkg/log v0.0.0-20221202070022-a18477baaad0
github.com/go-kratos/kratos/v2 v2.5.3
github.com/go-redis/redis/v8 v8.11.5
github.com/google/wire v0.5.0
github.com/jackc/pgx/v4 v4.17.2
github.com/pkg/errors v0.9.1
gorm.io/driver/postgres v1.4.5
gorm.io/gorm v1.24.2
k8s.io/apimachinery v0.26.0
)
require (
git.gz.internal.jumaiyx.cn/pkg/kafka v0.0.0-20221118023940-844d051e6449 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
github.com/emicklei/go-restful/v3 v3.10.1 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/go-logr/logr v1.2.3 // indirect
github.com/go-openapi/jsonpointer v0.19.5 // indirect
github.com/go-openapi/jsonreference v0.20.0 // indirect
github.com/go-openapi/swag v0.22.3 // indirect
github.com/go-playground/form/v4 v4.2.0 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/gnostic v0.6.9 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/gorilla/mux v1.8.0 // indirect
github.com/imdario/mergo v0.3.13 // indirect
github.com/jackc/chunkreader/v2 v2.0.1 // indirect
github.com/jackc/pgconn v1.13.0 // indirect
github.com/jackc/pgio v1.0.0 // indirect
github.com/jackc/pgpassfile v1.0.0 // indirect
github.com/jackc/pgproto3/v2 v2.3.1 // indirect
github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b // indirect
github.com/jackc/pgtype v1.12.0 // indirect
github.com/jinzhu/inflection v1.0.0 // indirect
github.com/jinzhu/now v1.1.4 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/klauspost/compress v1.15.13 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/pierrec/lz4/v4 v4.1.17 // indirect
github.com/segmentio/kafka-go v0.4.38 // indirect
github.com/speps/go-hashids/v2 v2.0.1 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/xdg/scram v1.0.5 // indirect
github.com/xdg/stringprep v1.0.3 // indirect
golang.org/x/crypto v0.4.0 // indirect
golang.org/x/net v0.4.0 // indirect
golang.org/x/oauth2 v0.3.0 // indirect
golang.org/x/sys v0.3.0 // indirect
golang.org/x/term v0.3.0 // indirect
golang.org/x/text v0.5.0 // indirect
golang.org/x/time v0.3.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20221109142239-94d6d90a7d66 // indirect
google.golang.org/grpc v1.50.1 // indirect
google.golang.org/protobuf v1.28.1 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/api v0.26.0 // indirect
k8s.io/client-go v0.26.0 // indirect
k8s.io/klog/v2 v2.80.1 // indirect
k8s.io/kube-openapi v0.0.0-20221207184640-f3cff1453715 // indirect
k8s.io/utils v0.0.0-20221128185143-99ec85e7a448 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
sigs.k8s.io/yaml v1.3.0 // indirect
)

521
go.sum

@ -0,0 +1,521 @@
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
git.gz.internal.jumaiyx.cn/jm/jmproto v0.0.0-20221213021854-5d3d515213e5 h1:acd6Pw+836Q7S4XdBVGb5P/pUmUT4Mk7jFkgimTHt7M=
git.gz.internal.jumaiyx.cn/jm/jmproto v0.0.0-20221213021854-5d3d515213e5/go.mod h1:xwPaX+a1FaeL3gX4bM8K5Ob0m+c0MqWkFFMyjM+SYY4=
git.gz.internal.jumaiyx.cn/pkg/config v0.0.0-20221014090146-8fd721834886 h1:LP4psj3ygJEKL6748ZQPNwYnYPmbo8dDwtwU08coRiw=
git.gz.internal.jumaiyx.cn/pkg/config v0.0.0-20221014090146-8fd721834886/go.mod h1:yEnzjNrnPNIr0Zq926QiJrbyReS+VZqX5bmkYhnSV7I=
git.gz.internal.jumaiyx.cn/pkg/id-encode v0.0.0-20221018014421-fe47b648265b h1:Bb+j4SrJMb00+QKQO1FcCDDOxzTnoBZCi2n0DrT39lE=
git.gz.internal.jumaiyx.cn/pkg/id-encode v0.0.0-20221018014421-fe47b648265b/go.mod h1:+1j9TQXFahHrK3TYJjXLuuDNCqKRscAWR2fD1ZhZE0c=
git.gz.internal.jumaiyx.cn/pkg/k8s-client v0.0.0-20221122092706-e2ab9bcb4045 h1:/XYERWPiBpGqYVEz57bfcMAHp97mWC+X4KF/f8YUqK0=
git.gz.internal.jumaiyx.cn/pkg/k8s-client v0.0.0-20221122092706-e2ab9bcb4045/go.mod h1:PjyxKfTWowQjJcim7h5DB+9pE7gI0U7BYx2z200hVyc=
git.gz.internal.jumaiyx.cn/pkg/kafka v0.0.0-20221118023940-844d051e6449 h1:kIzpUIKxa9yLZUfgYK+z3uBAzF0BCkauNxhlUEL5n+c=
git.gz.internal.jumaiyx.cn/pkg/kafka v0.0.0-20221118023940-844d051e6449/go.mod h1:rspqWOZacckvYwl1M6tikwkdsOlorUmt3CylJ3cGQV8=
git.gz.internal.jumaiyx.cn/pkg/kubediscovery v0.0.0-20221212113033-2ab4a490102d h1:MtxxE3RgBm4ka83AaPwusk/fEODs0QKvHPaq7BFx0+o=
git.gz.internal.jumaiyx.cn/pkg/kubediscovery v0.0.0-20221212113033-2ab4a490102d/go.mod h1:oc2Nm1tO4n09zn9u0KGlQzWzthO5WZ3PPq0CUMCYByg=
git.gz.internal.jumaiyx.cn/pkg/log v0.0.0-20221202070022-a18477baaad0 h1:7Yz+29XVCdNiVDMmTxFfSyGAPPmd29uvzGlQyys6A2o=
git.gz.internal.jumaiyx.cn/pkg/log v0.0.0-20221202070022-a18477baaad0/go.mod h1:YdetmKG6alLBxHYdDZOfAFv27+xy9bUACnDG029ift4=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030IGemrRc=
github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs=
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
github.com/StackExchange/wmi v1.2.1/go.mod h1:rcmrprowKIVzvc+NUiLncP2uuArMWLCbu9SBzvHz7e8=
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE=
github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI=
github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
github.com/cockroachdb/apd v1.1.0 h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I=
github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ=
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78=
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=
github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE=
github.com/emicklei/go-restful/v3 v3.9.0 h1:XwGDlfxEnQZzuopoqxwSEllNcCOM9DhhFyhFIIGKwxE=
github.com/emicklei/go-restful/v3 v3.9.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc=
github.com/emicklei/go-restful/v3 v3.10.1 h1:rc42Y5YTp7Am7CS630D7JmhRjq4UlEUuEKfrDac4bSQ=
github.com/emicklei/go-restful/v3 v3.10.1/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc=
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ=
github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE=
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/flowstack/go-jsonschema v0.1.1/go.mod h1:yL7fNggx1o8rm9RlgXv7hTBWxdBM0rVwpMwimd3F3N0=
github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI=
github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU=
github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY=
github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY=
github.com/go-kratos/aegis v0.1.2/go.mod h1:jYeSQ3Gesba478zEnujOiG5QdsyF3Xk/8owFUeKcHxw=
github.com/go-kratos/kratos/v2 v2.5.3 h1:v3F0fIFXh4HJgXprHKPGhRaobggolwPAbaBAjR+wC+Q=
github.com/go-kratos/kratos/v2 v2.5.3/go.mod h1:5acyLj4EgY428AJnZl2EwCrMV1OVlttQFBum+SghMiA=
github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A=
github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0=
github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
github.com/go-ole/go-ole v1.2.5/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=
github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg=
github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY=
github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg=
github.com/go-openapi/jsonreference v0.20.0 h1:MYlu0sBgChmCfJxxUKZ8g1cPWFOB37YSZqewK7OKeyA=
github.com/go-openapi/jsonreference v0.20.0/go.mod h1:Ag74Ico3lPc+zR+qjn4XBUmXymS4zJbYVCZmcgkasdo=
github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=
github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g=
github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14=
github.com/go-playground/assert/v2 v2.0.1 h1:MsBgLAaY856+nPRTKrp3/OZK38U/wa0CcBYNjji3q3A=
github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
github.com/go-playground/form/v4 v4.2.0 h1:N1wh+Goz61e6w66vo8vJkQt+uwZSoLz50kZPJWR8eic=
github.com/go-playground/form/v4 v4.2.0/go.mod h1:q1a2BY+AQUUzhl6xA/6hBetay6dEIhMHjgvJiGo6K7U=
github.com/go-redis/redis/v8 v8.11.5 h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC0oI=
github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq8Jd4h5lpwo=
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
github.com/gofrs/uuid v4.0.0+incompatible h1:1SD/1F5pU8p29ybwgQSwpQk+mwdRrXCYuPhW6m+TnJw=
github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
github.com/golang-jwt/jwt/v4 v4.4.1/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/google/gnostic v0.6.9 h1:ZK/5VhkoX835RikCHpSUJV9a+S3e1zLh59YnyWeBW+0=
github.com/google/gnostic v0.6.9/go.mod h1:Nm8234We1lq6iB9OmlgNv3nH91XLLVZHCDayfA3xq+E=
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE=
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0=
github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
github.com/google/subcommands v1.0.1/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk=
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/google/wire v0.5.0 h1:I7ELFeVBr3yfPIcc8+MWvrjk+3VjbcSzoXm3JVa+jD8=
github.com/google/wire v0.5.0/go.mod h1:ngWDr9Qvq3yZA10YrxfyGELY/AFWGVpy9c1LTRi1EoU=
github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI=
github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So=
github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw=
github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA=
github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk=
github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg=
github.com/jackc/chunkreader v1.0.0/go.mod h1:RT6O25fNZIuasFJRyZ4R/Y2BbhasbmZXF9QQ7T3kePo=
github.com/jackc/chunkreader/v2 v2.0.0/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk=
github.com/jackc/chunkreader/v2 v2.0.1 h1:i+RDz65UE+mmpjTfyz0MoVTnzeYxroil2G82ki7MGG8=
github.com/jackc/chunkreader/v2 v2.0.1/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk=
github.com/jackc/pgconn v0.0.0-20190420214824-7e0022ef6ba3/go.mod h1:jkELnwuX+w9qN5YIfX0fl88Ehu4XC3keFuOJJk9pcnA=
github.com/jackc/pgconn v0.0.0-20190824142844-760dd75542eb/go.mod h1:lLjNuW/+OfW9/pnVKPazfWOgNfH2aPem8YQ7ilXGvJE=
github.com/jackc/pgconn v0.0.0-20190831204454-2fabfa3c18b7/go.mod h1:ZJKsE/KZfsUgOEh9hBm+xYTstcNHg7UPMVJqRfQxq4s=
github.com/jackc/pgconn v1.8.0/go.mod h1:1C2Pb36bGIP9QHGBYCjnyhqu7Rv3sGshaQUvmfGIB/o=
github.com/jackc/pgconn v1.9.0/go.mod h1:YctiPyvzfU11JFxoXokUOOKQXQmDMoJL9vJzHH8/2JY=
github.com/jackc/pgconn v1.9.1-0.20210724152538-d89c8390a530/go.mod h1:4z2w8XhRbP1hYxkpTuBjTS3ne3J48K83+u0zoyvg2pI=
github.com/jackc/pgconn v1.13.0 h1:3L1XMNV2Zvca/8BYhzcRFS70Lr0WlDg16Di6SFGAbys=
github.com/jackc/pgconn v1.13.0/go.mod h1:AnowpAqO4CMIIJNZl2VJp+KrkAZciAkhEl0W0JIobpI=
github.com/jackc/pgio v1.0.0 h1:g12B9UwVnzGhueNavwioyEEpAmqMe1E/BN9ES+8ovkE=
github.com/jackc/pgio v1.0.0/go.mod h1:oP+2QK2wFfUWgr+gxjoBH9KGBb31Eio69xUb0w5bYf8=
github.com/jackc/pgmock v0.0.0-20190831213851-13a1b77aafa2/go.mod h1:fGZlG77KXmcq05nJLRkk0+p82V8B8Dw8KN2/V9c/OAE=
github.com/jackc/pgmock v0.0.0-20201204152224-4fe30f7445fd/go.mod h1:hrBW0Enj2AZTNpt/7Y5rr2xe/9Mn757Wtb2xeBzPv2c=
github.com/jackc/pgmock v0.0.0-20210724152146-4ad1a8207f65 h1:DadwsjnMwFjfWc9y5Wi/+Zz7xoE5ALHsRQlOctkOiHc=
github.com/jackc/pgmock v0.0.0-20210724152146-4ad1a8207f65/go.mod h1:5R2h2EEX+qri8jOWMbJCtaPWkrrNc7OHwsp2TCqp7ak=
github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM=
github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg=
github.com/jackc/pgproto3 v1.1.0/go.mod h1:eR5FA3leWg7p9aeAqi37XOTgTIbkABlvcPB3E5rlc78=
github.com/jackc/pgproto3/v2 v2.0.0-alpha1.0.20190420180111-c116219b62db/go.mod h1:bhq50y+xrl9n5mRYyCBFKkpRVTLYJVWeCc+mEAI3yXA=
github.com/jackc/pgproto3/v2 v2.0.0-alpha1.0.20190609003834-432c2951c711/go.mod h1:uH0AWtUmuShn0bcesswc4aBTWGvw0cAxIJp+6OB//Wg=
github.com/jackc/pgproto3/v2 v2.0.0-rc3/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM=
github.com/jackc/pgproto3/v2 v2.0.0-rc3.0.20190831210041-4c03ce451f29/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM=
github.com/jackc/pgproto3/v2 v2.0.6/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA=
github.com/jackc/pgproto3/v2 v2.1.1/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA=
github.com/jackc/pgproto3/v2 v2.3.1 h1:nwj7qwf0S+Q7ISFfBndqeLwSwxs+4DPsbRFjECT1Y4Y=
github.com/jackc/pgproto3/v2 v2.3.1/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA=
github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b h1:C8S2+VttkHFdOOCXJe+YGfa4vHYwlt4Zx+IVXQ97jYg=
github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b/go.mod h1:vsD4gTJCa9TptPL8sPkXrLZ+hDuNrZCnj29CQpr4X1E=
github.com/jackc/pgtype v0.0.0-20190421001408-4ed0de4755e0/go.mod h1:hdSHsc1V01CGwFsrv11mJRHWJ6aifDLfdV3aVjFF0zg=
github.com/jackc/pgtype v0.0.0-20190824184912-ab885b375b90/go.mod h1:KcahbBH1nCMSo2DXpzsoWOAfFkdEtEJpPbVLq8eE+mc=
github.com/jackc/pgtype v0.0.0-20190828014616-a8802b16cc59/go.mod h1:MWlu30kVJrUS8lot6TQqcg7mtthZ9T0EoIBFiJcmcyw=
github.com/jackc/pgtype v1.8.1-0.20210724151600-32e20a603178/go.mod h1:C516IlIV9NKqfsMCXTdChteoXmwgUceqaLfjg2e3NlM=
github.com/jackc/pgtype v1.12.0 h1:Dlq8Qvcch7kiehm8wPGIW0W3KsCCHJnRacKW0UM8n5w=
github.com/jackc/pgtype v1.12.0/go.mod h1:LUMuVrfsFfdKGLw+AFFVv6KtHOFMwRgDDzBt76IqCA4=
github.com/jackc/pgx/v4 v4.0.0-20190420224344-cc3461e65d96/go.mod h1:mdxmSJJuR08CZQyj1PVQBHy9XOp5p8/SHH6a0psbY9Y=
github.com/jackc/pgx/v4 v4.0.0-20190421002000-1b8f0016e912/go.mod h1:no/Y67Jkk/9WuGR0JG/JseM9irFbnEPbuWV2EELPNuM=
github.com/jackc/pgx/v4 v4.0.0-pre1.0.20190824185557-6972a5742186/go.mod h1:X+GQnOEnf1dqHGpw7JmHqHc1NxDoalibchSk9/RWuDc=
github.com/jackc/pgx/v4 v4.12.1-0.20210724153913-640aa07df17c/go.mod h1:1QD0+tgSXP7iUjYm9C1NxKhny7lq6ee99u/z+IHFcgs=
github.com/jackc/pgx/v4 v4.17.2 h1:0Ut0rpeKwvIVbMQ1KbMBU4h6wxehBI535LK6Flheh8E=
github.com/jackc/pgx/v4 v4.17.2/go.mod h1:lcxIZN44yMIrWI78a5CpucdD14hX0SBDbNRvjDBItsw=
github.com/jackc/puddle v0.0.0-20190413234325-e4ced69a3a2b/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
github.com/jackc/puddle v0.0.0-20190608224051-11cab39313c9/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
github.com/jackc/puddle v1.1.3/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
github.com/jackc/puddle v1.3.0/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E=
github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc=
github.com/jinzhu/now v1.1.4 h1:tHnRBy1i5F2Dh8BAFxqFzxKqqvezXrL2OW1TnX+Mlas=
github.com/jinzhu/now v1.1.4/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY=
github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y=
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/klauspost/compress v1.15.9/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU=
github.com/klauspost/compress v1.15.12 h1:YClS/PImqYbn+UILDnqxQCZ3RehC9N318SU3kElDUEM=
github.com/klauspost/compress v1.15.12/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM=
github.com/klauspost/compress v1.15.13 h1:NFn1Wr8cfnenSJSA46lLq4wHCcBzKTSjnBIexDMMOV0=
github.com/klauspost/compress v1.15.13/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM=
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pretty v0.2.0 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs=
github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
github.com/lib/pq v1.1.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
github.com/lib/pq v1.10.2 h1:AqzbZs4ZoCBp+GtejcpCpcxM3zlSMx29dXbUSeVtJb8=
github.com/lib/pq v1.10.2/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0=
github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ=
github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=
github.com/onsi/ginkgo/v2 v2.4.0 h1:+Ig9nvqgS5OBSACXNk15PLdp0U9XPYROt9CFzVdFGIs=
github.com/onsi/gomega v1.23.0 h1:/oxKu9c2HVap+F3PfKort2Hw5DEU+HGlW8n+tguWsys=
github.com/pierrec/lz4/v4 v4.1.15/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4=
github.com/pierrec/lz4/v4 v4.1.17 h1:kV4Ip+/hUBC+8T6+2EgburRtkE9ef4nbY3f4dFhGjMc=
github.com/pierrec/lz4/v4 v4.1.17/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ=
github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU=
github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc=
github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
github.com/segmentio/kafka-go v0.4.38 h1:iQdOBbUSdfuYlFpvjuALgj7N6DrdPA0HfB4AhREOdtg=
github.com/segmentio/kafka-go v0.4.38/go.mod h1:ikyuGon/60MN/vXFgykf7Zm8P5Be49gJU6vezwjnnhU=
github.com/shirou/gopsutil/v3 v3.21.8/go.mod h1:YWp/H8Qs5fVmf17v7JNZzA0mPJ+mS2e9JdiUF9LlKzQ=
github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4=
github.com/shopspring/decimal v1.2.0 h1:abSATXmQEYyShuxI4/vyW3tV1MrKAJzCZ/0zLUXYbsQ=
github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o=
github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q=
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
github.com/speps/go-hashids/v2 v2.0.1 h1:ViWOEqWES/pdOSq+C1SLVa8/Tnsd52XC34RY7lt7m4g=
github.com/speps/go-hashids/v2 v2.0.1/go.mod h1:47LKunwvDZki/uRVD6NImtyk712yFzIs3UF3KlHohGw=
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/tklauser/go-sysconf v0.3.9/go.mod h1:11DU/5sG7UexIrp/O6g35hrWzu0JxlwQ3LSFUzyeuhs=
github.com/tklauser/numcpus v0.3.0/go.mod h1:yFGUr7TUHQRAhyqBcEg0Ge34zDBAsIvJJcyE6boqnA8=
github.com/xdg/scram v1.0.5 h1:TuS0RFmt5Is5qm9Tm2SoD89OPqe4IRiFtyFY4iwWXsw=
github.com/xdg/scram v1.0.5/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I=
github.com/xdg/stringprep v1.0.3 h1:cmL5Enob4W83ti/ZHuZLuKD/xqJfus4fVPwE+/BDm+4=
github.com/xdg/stringprep v1.0.3/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y=
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU=
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ=
github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y=
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q=
go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk=
go.opentelemetry.io/otel/sdk v1.7.0/go.mod h1:uTEOTwaqIVuTGiJN7ii13Ibp75wJmYUDe374q6cZwUU=
go.opentelemetry.io/otel/trace v1.7.0/go.mod h1:fzLSB9nqR2eXzxPXb2JW9IKE+ScyXA48yyE4TNvoHqU=
go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI=
go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4=
go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU=
go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA=
go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20190411191339-88737f569e3a/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE=
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20201203163018-be400aefbc4c/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=
golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.3.0 h1:a06MkbcxBrEFc0w0QIZWXrH/9cCX6KJyWbBOIwAn+7A=
golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4=
golang.org/x/crypto v0.4.0 h1:UVQgzMY87xqpKNgb+kDsll2Igd33HszWHFLmpaRMq/8=
golang.org/x/crypto v0.4.0/go.mod h1:3quD/ATkf6oY+rnes5c3ExXTbLc8mueNue5/DoinL80=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc=
golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20220706163947-c90051bbdb60/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.3.1-0.20221206200815-1e63c2f08a10 h1:Frnccbp+ok2GkUS2tC84yAq/U9Vg+0sIO7aRL3T4Xnc=
golang.org/x/net v0.3.1-0.20221206200815-1e63c2f08a10/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE=
golang.org/x/net v0.4.0 h1:Q5QPcMlvfxFTAPV0+07Xz/MpK9NTXu2VDUuy0FeMfaU=
golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20221006150949-b44042a4b9c1 h1:3VPzK7eqH25j7GYw5w6g/GzNRc0/fYtrxz27z1gD4W0=
golang.org/x/oauth2 v0.0.0-20221006150949-b44042a4b9c1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg=
golang.org/x/oauth2 v0.3.0 h1:6l90koy8/LaBLmLu8jpHeHexzMwEita0zFfYlggy2F8=
golang.org/x/oauth2 v0.3.0/go.mod h1:rQrIauxkUhJ6CuwEXwymO2/eh4xz2ZWF1nBkcxS+tGk=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220513210516-0976fa681c29/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210816074244-15123e1e1f71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.3.0 h1:w8ZOecv6NaNa/zC8944JTU3vz4u6Lagfk4RPQxv92NQ=
golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.3.0 h1:qoo4akIqOcDME5bhc/NgxUdovd6BSS2uMsVjB56q1xI=
golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/text v0.5.0 h1:OLmvp0KP+FVG99Ct/qFiL/Fhk4zp4QQnZ7b2U+5piUM=
golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/time v0.0.0-20220922220347-f3bd1da661af h1:Yx9k8YCG3dvF87UAn2tu2HQLf2dt/eR1bXxpLMWeH+Y=
golang.org/x/time v0.0.0-20220922220347-f3bd1da661af/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4=
golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190422233926-fe54fb35175b/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190425163242-31fd60d6bfdc/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
golang.org/x/tools v0.0.0-20190823170909-c4a336ef6a2f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c=
google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4=
google.golang.org/genproto v0.0.0-20221109142239-94d6d90a7d66 h1:wx7sJ5GRBQLRcslTNcrTklsHhHevQvxgztW18txbbZM=
google.golang.org/genproto v0.0.0-20221109142239-94d6d90a7d66/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=
google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0=
google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34=
google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk=
google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk=
google.golang.org/grpc v1.50.1 h1:DS/BukOZWp8s6p4Dt/tOaJaTQyPyOoCcrjroHuCeLzY=
google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w=
google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
gopkg.in/inconshreveable/log15.v2 v2.0.0-20180818164646-67afb5ed74ec/go.mod h1:aPpfJ7XW+gOuirDoZ8gHhLh3kZ1B08FtV2bbmy7Jv3s=
gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=
gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gorm.io/driver/postgres v1.4.5 h1:mTeXTTtHAgnS9PgmhN2YeUbazYpLhUI1doLnw42XUZc=
gorm.io/driver/postgres v1.4.5/go.mod h1:GKNQYSJ14qvWkvPwXljMGehpKrhlDNsqYRr5HnYGncg=
gorm.io/gorm v1.24.1-0.20221019064659-5dd2bb482755/go.mod h1:DVrVomtaYTbqs7gB/x2uVvqnXzv0nqjB396B8cG4dBA=
gorm.io/gorm v1.24.2 h1:9wR6CFD+G8nOusLdvkZelOEhpJVwwHzpQOUM+REd6U0=
gorm.io/gorm v1.24.2/go.mod h1:DVrVomtaYTbqs7gB/x2uVvqnXzv0nqjB396B8cG4dBA=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
k8s.io/api v0.25.2 h1:v6G8RyFcwf0HR5jQGIAYlvtRNrxMJQG1xJzaSeVnIS8=
k8s.io/api v0.25.2/go.mod h1:qP1Rn4sCVFwx/xIhe+we2cwBLTXNcheRyYXwajonhy0=
k8s.io/api v0.26.0 h1:IpPlZnxBpV1xl7TGk/X6lFtpgjgntCg8PJ+qrPHAC7I=
k8s.io/api v0.26.0/go.mod h1:k6HDTaIFC8yn1i6pSClSqIwLABIcLV9l5Q4EcngKnQg=
k8s.io/apimachinery v0.26.0 h1:1feANjElT7MvPqp0JT6F3Ss6TWDwmcjLypwoPpEf7zg=
k8s.io/apimachinery v0.26.0/go.mod h1:tnPmbONNJ7ByJNz9+n9kMjNP8ON+1qoAIIC70lztu74=
k8s.io/client-go v0.25.2 h1:SUPp9p5CwM0yXGQrwYurw9LWz+YtMwhWd0GqOsSiefo=
k8s.io/client-go v0.25.2/go.mod h1:i7cNU7N+yGQmJkewcRD2+Vuj4iz7b30kI8OcL3horQ4=
k8s.io/client-go v0.26.0 h1:lT1D3OfO+wIi9UFolCrifbjUUgu7CpLca0AD8ghRLI8=
k8s.io/client-go v0.26.0/go.mod h1:I2Sh57A79EQsDmn7F7ASpmru1cceh3ocVT9KlX2jEZg=
k8s.io/klog/v2 v2.80.1 h1:atnLQ121W371wYYFawwYx1aEY2eUfs4l3J72wtgAwV4=
k8s.io/klog/v2 v2.80.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0=
k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 h1:+70TFaan3hfJzs+7VK2o+OGxg8HsuBr/5f6tVAjDu6E=
k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280/go.mod h1:+Axhij7bCpeqhklhUTe3xmOn6bWxolyZEeyaFpjGtl4=
k8s.io/kube-openapi v0.0.0-20221207184640-f3cff1453715 h1:tBEbstoM+K0FiBV5KGAKQ0kuvf54v/hwpldiJt69w1s=
k8s.io/kube-openapi v0.0.0-20221207184640-f3cff1453715/go.mod h1:+Axhij7bCpeqhklhUTe3xmOn6bWxolyZEeyaFpjGtl4=
k8s.io/utils v0.0.0-20221107191617-1a15be271d1d h1:0Smp/HP1OH4Rvhe+4B8nWGERtlqAGSftbSbbmm45oFs=
k8s.io/utils v0.0.0-20221107191617-1a15be271d1d/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
k8s.io/utils v0.0.0-20221128185143-99ec85e7a448 h1:KTgPnR10d5zhztWptI952TNtt/4u5h3IzDXkdIMuo2Y=
k8s.io/utils v0.0.0-20221128185143-99ec85e7a448/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 h1:iXTIw73aPyC+oRdyqqvVJuloN1p0AC/kzH07hu3NE+k=
sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0=
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo=
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0=
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE=
sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E=
sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo=
sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8=

8
internal/biz/biz.go

@ -0,0 +1,8 @@
package biz
import (
"github.com/google/wire"
)
// ProviderSet is biz providers.
var ProviderSet = wire.NewSet(NewMikeHotTimer)

167
internal/biz/mike_hot_timer.go

@ -0,0 +1,167 @@
package biz
import (
"context"
"fmt"
gv1 "git.gz.internal.jumaiyx.cn/jm/jmproto/gift/v1"
mv1 "git.gz.internal.jumaiyx.cn/jm/jmproto/message/v1"
"git.gz.internal.jumaiyx.cn/job/room-mike-hot-timer/internal/data/model"
idencode "git.gz.internal.jumaiyx.cn/pkg/id-encode"
"git.gz.internal.jumaiyx.cn/pkg/log"
"github.com/pkg/errors"
"time"
)
var (
waitErr = errors.New("wait 5s")
)
type MikeHotTimer struct {
log log.Logger
rmRepo RoomMikeRepo
gift gv1.GiftClient
message mv1.MessageClient
ide idencode.IDEncoding
}
func NewMikeHotTimer(log log.Logger,
rmRepo RoomMikeRepo,
gift gv1.GiftClient,
message mv1.MessageClient,
ide idencode.IDEncoding,
) *MikeHotTimer {
return &MikeHotTimer{
log: log,
rmRepo: rmRepo,
gift: gift,
message: message,
ide: ide,
}
}
func (mk *MikeHotTimer) Run() {
for {
err := mk.Handle()
if errors.Is(err, waitErr) {
fmt.Println("waiting")
time.Sleep(time.Second * 5)
}
}
}
func (mk *MikeHotTimer) Handle() error {
ctx := context.TODO()
// 获取需要推送的麦号
hot, err := mk.rmRepo.GetMikeHotPop(ctx)
if err != nil {
time.Sleep(time.Second * 5)
mk.log.Errorf("Get mike hot pop failed:%v", err)
return err
}
// 操作过快熔断
if hot == nil || hot.MikeId == 0 {
return waitErr
}
if (hot.Timer + 5) > time.Now().Unix() {
err = mk.rmRepo.PushMikeHot(ctx, hot)
if err != nil {
mk.log.Errorf("Create mike hot failed:%v", err)
}
return waitErr
}
// 查看是否已经被删除的麦号
mikeHot, ext, err := mk.rmRepo.GetMikeHot(ctx, hot.RoomId, hot.MikeId)
if err != nil {
mk.log.Errorf("Ext delete mike hot id failed:%v", err)
err = mk.rmRepo.PushMikeHot(ctx, hot)
return err
}
if !ext {
fmt.Println("已经被删除")
if err != nil {
mk.log.Errorf("Create mike hot failed:%v", err)
}
return nil
}
if mikeHot.StartTime != hot.StartTime {
fmt.Println("清楚旧的队列")
if err != nil {
mk.log.Errorf("Create mike hot failed:%v", err)
}
return nil
}
// 获取消费总额
t := mikeHot.StartTime * 1000
giftRsp, err := mk.gift.QueryGiveRoomGift(ctx, &gv1.QueryGiveRoomGiftReq{
RoomIdList: []int64{mikeHot.RoomId},
AcceptGiftUidList: []int64{mikeHot.Uid},
CreateAtStart: &t,
})
if err != nil {
mk.log.Errorf("Delete mike hot failed:%v", err)
err = mk.rmRepo.PushMikeHot(ctx, hot)
if err != nil {
mk.log.Errorf("Create mike hot failed:%v", err)
}
}
mikeHot.Timer = time.Now().Unix()
if mikeHot.Total == giftRsp.TotalAmountDiamond {
err = mk.rmRepo.PushMikeHot(ctx, mikeHot)
if err != nil {
mk.log.Errorf("Create mike hot failed:%v", err)
}
return nil
}
mikeHot.Total = giftRsp.TotalAmountDiamond
// 超过两天重新检查一下mike是否存在
if mikeHot.StartTime+172800 <= time.Now().Unix() {
mike, err := mk.rmRepo.First(ctx, &RoomMikeCond{
Id: mikeHot.MikeId,
})
if err != nil {
mk.log.Errorf("Get mike first failed:%v", err)
err = mk.rmRepo.PushMikeHot(ctx, mikeHot)
return err
}
if mike == nil || mike.ID == 0 {
mk.log.Error("Get mike first null")
mk.rmRepo.DeleteMikeHot(ctx, mikeHot.RoomId, mikeHot.MikeId)
return errors.New("Get mike first null")
}
}
_, err = mk.message.RoomPush(ctx, &mv1.RoomPushRequest{
Code: mv1.RoomPushCode_HotCounter,
RoomId: mikeHot.RoomId,
Uid: mikeHot.Uid,
HotCounter: &mv1.RoomPushRequest_HotCounter{
MikeId: mikeHot.MikeId,
RoomId: mikeHot.RoomId,
Uid: mk.ide.Encode(mikeHot.Uid),
MikeNo: mikeHot.MikeNo,
Number: mikeHot.Total,
},
})
if err != nil {
mk.log.Errorf("Push failed:%v", err)
}
mikeHot.Timer = time.Now().Unix()
err = mk.createMikeHot(ctx, mikeHot)
if err != nil {
mk.log.Errorf("Create mike hot failed:%v", err)
}
return nil
}
func (mk *MikeHotTimer) createMikeHot(ctx context.Context, hot *model.MikeUpHot) error {
if mk.rmRepo.SetMikeHotLock(ctx, hot.RoomId, hot.Uid) {
err := mk.rmRepo.CreateMikeHot(ctx, hot, true)
if err != nil {
mk.log.Errorf("Create mike hot failed:%v", err)
return err
}
}
return nil
}

41
internal/biz/repo.go

@ -0,0 +1,41 @@
package biz
import (
"context"
"git.gz.internal.jumaiyx.cn/job/room-mike-hot-timer/internal/data/model"
)
type RoomMikeCond struct {
Id int64
Offset int
Limit int
RoomId int64
Uid int64
Status int32
OpenStatus int32
States []int32
MikeNo string
OrderBy []string
}
type RoomMikeRepo interface {
Begin(ctx context.Context, tx *model.Tx) *model.Tx
Exist(ctx context.Context, cond *RoomMikeCond) (bool, error)
First(ctx context.Context, cond *RoomMikeCond) (*model.RoomMike, error)
List(ctx context.Context, cond *RoomMikeCond) ([]*model.RoomMike, error)
Create(ctx context.Context, mike *model.RoomMike) error
Update(ctx context.Context, cond *RoomMikeCond, data map[string]interface{}) error
UpdateStatus(ctx context.Context, id uint, status int32) error
UpdateOpenStatus(ctx context.Context, id uint, status int32) error
Delete(ctx context.Context, cond *RoomMikeCond) error
SetMikeHotLock(ctx context.Context, roomId, uid int64) bool
CreateMikeHot(ctx context.Context, mikeHot *model.MikeUpHot, lockCheck bool) error
PushMikeHot(ctx context.Context, mikeHot *model.MikeUpHot) error
GetMikeHotPop(ctx context.Context) (*model.MikeUpHot, error)
DeleteMikeHot(ctx context.Context, roomId, uid int64) error
GetMikeHot(ctx context.Context, roomId, uid int64) (*model.MikeUpHot, bool, error)
GetRoomMikeHot(ctx context.Context, roomId int64) ([]*model.MikeUpHot, error)
}
type InitValueRepo interface {
GetValue(ctx context.Context, ty int32) (int64, error)
}

1
internal/data/README.md

@ -0,0 +1 @@
# Data

63
internal/data/data.go

@ -0,0 +1,63 @@
package data
import (
"git.gz.internal.jumaiyx.cn/jm/jmproto/conf"
"git.gz.internal.jumaiyx.cn/job/room-mike-hot-timer/internal/data/model"
"git.gz.internal.jumaiyx.cn/job/room-mike-hot-timer/pkg/redis"
"git.gz.internal.jumaiyx.cn/pkg/log"
"github.com/google/wire"
_ "github.com/jackc/pgx/v4/stdlib"
"gorm.io/driver/postgres"
"gorm.io/gorm"
"time"
)
// ProviderSet is data providers.
var ProviderSet = wire.NewSet(
NewData,
NewRoomMikeRepo,
NewInitValue,
)
// Data .
type Data struct {
db *gorm.DB
cache *redis.Cache
}
// NewData .
func NewData(c *conf.Data, log log.Logger) (*Data, func(), error) {
cleanup := func() {
log.Info("closing the data resources")
}
dsn := c.Database.Source
client, err := gorm.Open(postgres.Open(dsn), &gorm.Config{})
if err != nil {
log.Errorf("failed creating schema resources: %v", err)
return nil, nil, err
}
sqlDB, err := client.DB()
if err != nil {
log.Errorf("failed creating schema resources: %v", err)
return nil, nil, err
}
// SetMaxIdleConns 设置空闲连接池中连接的最大数量
sqlDB.SetMaxIdleConns(10)
// SetMaxOpenConns 设置打开数据库连接的最大数量
sqlDB.SetMaxOpenConns(100)
// SetConnMaxLifetime 设置了连接可复用的最大时间
sqlDB.SetConnMaxLifetime(time.Hour)
cache := redis.NewCache(log, c.Redis)
err = model.AutoMigrate(client, cache)
if err != nil {
log.Errorf("failed creating schema resources: %v", err)
return nil, nil, err
}
return &Data{
db: client,
cache: cache, // redis
}, cleanup, nil
}

31
internal/data/init_value.go

@ -0,0 +1,31 @@
package data
import (
"context"
"git.gz.internal.jumaiyx.cn/job/room-mike-hot-timer/internal/biz"
"git.gz.internal.jumaiyx.cn/job/room-mike-hot-timer/internal/data/model"
"git.gz.internal.jumaiyx.cn/pkg/log"
"github.com/pkg/errors"
"gorm.io/gorm"
)
type initValue struct {
data *Data
log log.Logger
}
func NewInitValue(data *Data, log log.Logger) biz.InitValueRepo {
return &initValue{
data: data,
log: log,
}
}
func (md *initValue) GetValue(ctx context.Context, ty int32) (int64, error) {
value := &model.InitValue{}
if err := md.data.db.Model(&model.InitValue{}).Where("type=?", ty).First(&value).Error; err != nil && !errors.Is(err, gorm.ErrRecordNotFound) {
md.log.Errorf("Get init value err:%v", err)
return 0, err
}
return value.Value, nil
}

15
internal/data/model/auto.go

@ -0,0 +1,15 @@
package model
import (
"git.gz.internal.jumaiyx.cn/job/room-mike-hot-timer/pkg/redis"
"gorm.io/gorm"
)
func AutoMigrate(db *gorm.DB, cache *redis.Cache) error {
err := db.AutoMigrate()
if err != nil {
panic(err)
//log.Error("create sql table failed:%v", err)
}
return err
}

32
internal/data/model/field.go

@ -0,0 +1,32 @@
package model
const (
FieldId = "id"
FieldUid = "uid"
FieldRoomName = "room_name"
FieldImage = "Image"
FieldDesc = "desc"
FieldRoomType = "room_type"
FieldSceneId = "scene_id"
FieldRoomPassword = "room_password"
FieldPayStatus = "pay_status"
FieldPrivateStatus = "private_status"
FieldMikeStatus = "mike_status"
FieldMikeExamineStatus = "mike_examine_status"
FieldMaxNum = "max_num"
FieldStatus = "status"
FieldStartTime = "start_time"
FieldMikeNum = "mike_num"
FieldMikeExamineOpen = "mike_examine_open"
FieldWeight = "weight"
FieldLedgerRatio = "ledger_ratio"
FieldRoomId = "room_id"
FieldOnlineStartTime = "online_start_time"
FieldOnlineEndTime = "online_end_time"
FieldGroupName = "group_name"
FieldGroupIcon = "group_icon"
FieldPodIp = "pod_ip"
FieldIp = "ip"
FieldPort = "port"
FieldEndTime = "end_time"
)

14
internal/data/model/init_value.go

@ -0,0 +1,14 @@
package model
import "gorm.io/gorm"
// InitValue 房间初始化值
type InitValue struct {
gorm.Model
Type int32 `json:"type" gorm:"type:int2;comment:类型 1.热度初始化值"`
Value int64 `json:"value" gorm:"type:int8;comment:类型 1.热度初始化值" `
}
func (InitValue) TableName() string {
return "init_value"
}

73
internal/data/model/room_mike.go

@ -0,0 +1,73 @@
package model
import (
"fmt"
"git.gz.internal.jumaiyx.cn/job/room-mike-hot-timer/internal/util"
"github.com/pkg/errors"
"gorm.io/gorm"
)
var (
ErrMikeHotLockOvertime = errors.New("lock overtime")
)
const (
MikeStatusNil = iota
MikeStatusUp
MikeStatusOut
MikeStatusApply
MikeStatusInvitation
)
const (
UpMikeTypeNil = iota
UpMikeTypeActive
UpMikeTypeUnActive
)
const (
OutMikeTypeNil = iota
OutMikeTypeActive
OutMikeTypeUnActive
)
const (
MikeUpHotListKey = "room:mike:hot:list"
MikeUpHotHashKey = "room:mike:hot:table:"
MikeHotLockKey = "room-mike-lock-%d-%d"
)
// RoomMike 房间上麦记录 废弃
type RoomMike struct {
gorm.Model
RoomId int64 `json:"room_id" gorm:"index:idx_room_uid;type:int8;comment:房间id"`
Uid int64 `json:"uid" gorm:"index:idx_room_uid;type:int8;comment:用户id"`
UpType int32 `json:"up_type" gorm:"type:int8;comment:上麦类型 1个人 2 邀请"`
OutType int32 `json:"out_type" gorm:"type:int8;comment:下麦类型 1个人 2 邀请"`
MikeNo string `json:"mike_no" gorm:"type:varchar;comment:麦号"`
Status int32 `json:"status" gorm:"default:1;type:int4;comment:1上麦, 2下麦,4、邀请,3、申请上麦"`
OpenStatus int32 `json:"open_status" gorm:"default:1;type:int4;comment:1开麦, 2闭麦"`
}
func (RoomMike) TableName() string {
return "room_mike"
}
func MikeHotLockRedisKey(roomId, uid int64) string {
return fmt.Sprintf(MikeHotLockKey, roomId, uid)
}
func MikeUpHotHashRedisKey(roomId int64) string {
return MikeUpHotHashKey + util.Int64TarnsString(roomId)
}
type MikeUpHot struct {
RoomId int64
StartTime int64
MikeId int64
MikeNo string
Uid int64
Total int64
Timer int64
Status int32
OpenStatus int32
}

74
internal/data/model/transaction.go

@ -0,0 +1,74 @@
package model
import (
"context"
"gorm.io/gorm"
)
type Tx struct {
db *gorm.DB
tx *gorm.DB
txs []*Tx
}
func NewTx(db *gorm.DB) *Tx {
return &Tx{
db: db,
}
}
func (t *Tx) Add(tx *Tx) {
t.txs = append(t.txs, tx)
}
func (t *Tx) Db(ctx context.Context) *gorm.DB {
var db *gorm.DB
if t.tx != nil {
db = t.tx
} else {
db = t.db
}
return db
}
func (t *Tx) GetTx() *gorm.DB {
return t.tx
}
func (t *Tx) SetTx(tx *Tx) *Tx {
t.tx = tx.GetTx()
tx.Add(t)
return tx
}
func (t *Tx) Begin(ctx context.Context) *Tx {
// 开启连的链接
tx := *t.db
t.tx = &tx
t.tx = t.tx.Begin()
return t
}
func (t *Tx) Rollback() {
if t.tx != nil {
t.tx.Rollback()
}
t.tx = nil
return
}
func (t *Tx) Commit() {
if t.tx != nil {
t.tx.Commit()
}
if len(t.txs) > 0 {
for _, tx := range t.txs {
//tx.GetTx().Commit()
tx.Close()
}
}
t.Close()
return
}
func (t *Tx) Close() {
t.tx = nil
}

304
internal/data/room_mike.go

@ -0,0 +1,304 @@
package data
import (
"context"
"git.gz.internal.jumaiyx.cn/job/room-mike-hot-timer/internal/biz"
"git.gz.internal.jumaiyx.cn/job/room-mike-hot-timer/internal/data/model"
"git.gz.internal.jumaiyx.cn/job/room-mike-hot-timer/internal/util"
"git.gz.internal.jumaiyx.cn/pkg/log"
"github.com/pkg/errors"
"gorm.io/gorm"
"k8s.io/apimachinery/pkg/util/json"
"strings"
"time"
)
type roomMikeRepo struct {
data *Data
log log.Logger
tx *model.Tx // 事务使用
}
func NewRoomMikeRepo(data *Data, logger log.Logger) biz.RoomMikeRepo {
return &roomMikeRepo{
data: data,
log: logger,
tx: model.NewTx(data.db),
}
}
func (r *roomMikeRepo) Begin(ctx context.Context, tx *model.Tx) *model.Tx {
if tx == nil {
return r.tx.Begin(ctx)
}
return r.tx.SetTx(tx)
}
func (r *roomMikeRepo) query(ctx context.Context, cond *biz.RoomMikeCond) *gorm.DB {
db := r.tx.Db(ctx).Model(&model.RoomMike{}).Debug()
if cond.Id != 0 {
db = db.Where("id=?", cond.Id)
}
if cond.RoomId != 0 {
db = db.Where("room_id=?", cond.RoomId)
}
if cond.Uid != 0 {
db = db.Where("uid=?", cond.Uid)
}
if cond.MikeNo != "" {
db = db.Where("mike_no=?", cond.MikeNo)
}
if cond.Status != 0 {
db = db.Where("status=?", cond.Status)
}
if cond.OpenStatus != 0 {
db = db.Where("open_status=?", cond.OpenStatus)
}
if len(cond.States) > 0 {
//gorm.DB{}.Where("id=?", 1)
wdb := r.data.db
for _, state := range cond.States {
wdb = wdb.Or("status=?", state)
//db = db.Where("status = ?", state)
}
db = db.Where(wdb)
}
if cond.Offset != 0 {
db = db.Offset(cond.Offset)
}
if cond.Limit != 0 {
db = db.Limit(cond.Limit)
}
if cond.OrderBy != nil {
db = db.Order(strings.Join(cond.OrderBy, ","))
}
return db
}
func (r *roomMikeRepo) Exist(ctx context.Context, cond *biz.RoomMikeCond) (bool, error) {
var count int64
if err := r.query(ctx, cond).Count(&count).Error; err != nil && !errors.Is(err, gorm.ErrRecordNotFound) {
r.log.Errorf("get mike count err%v", err)
return false, err
}
if count == 0 {
return false, nil
}
return true, nil
}
func (r *roomMikeRepo) First(ctx context.Context, cond *biz.RoomMikeCond) (*model.RoomMike, error) {
mike := &model.RoomMike{}
if err := r.query(ctx, cond).First(&mike).Error; err != nil && !errors.Is(err, gorm.ErrRecordNotFound) {
r.log.Errorf("get mike list err%v", err)
return nil, err
}
return mike, nil
}
func (r *roomMikeRepo) List(ctx context.Context, cond *biz.RoomMikeCond) ([]*model.RoomMike, error) {
var mikes []*model.RoomMike
if err := r.query(ctx, cond).Find(&mikes).Error; err != nil && !errors.Is(err, gorm.ErrRecordNotFound) {
r.log.Errorf("get mike list err%v", err)
return nil, err
}
return mikes, nil
}
func (r *roomMikeRepo) Create(ctx context.Context, mike *model.RoomMike) error {
db := r.tx.Db(ctx)
if err := db.Model(&model.RoomMike{}).Create(mike).Error; err != nil {
r.log.Errorf("create mike err:%v", err)
return err
}
return nil
}
func (r *roomMikeRepo) Update(ctx context.Context, cond *biz.RoomMikeCond, data map[string]interface{}) error {
if err := r.query(ctx, cond).Updates(data).Error; err != nil {
r.log.Errorf("update mike err:%v", err)
return err
}
return nil
}
func (r *roomMikeRepo) UpdateStatus(ctx context.Context, id uint, status int32) error {
if err := r.data.db.Debug().Model(&model.RoomMike{}).Where("id=?", id).Update("status", status).Error; err != nil {
r.log.Errorf("Update mike status err:%v", err)
return err
}
return nil
}
func (r *roomMikeRepo) UpdateOpenStatus(ctx context.Context, id uint, status int32) error {
if err := r.data.db.Debug().Model(&model.RoomMike{}).Where("id=?", id).Update("open_status", status).Error; err != nil {
r.log.Errorf("Update mike status err:%v", err)
return err
}
return nil
}
func (r *roomMikeRepo) Delete(ctx context.Context, cond *biz.RoomMikeCond) error {
db := r.query(ctx, cond)
if err := db.Delete(&model.RoomMike{}).Error; err != nil {
r.log.Errorf("delete mike err:%v", err)
return err
}
return nil
}
func (r *roomMikeRepo) SetMikeHotLock(ctx context.Context, roomId, uid int64) bool {
b, err := r.data.cache.SetNX(ctx, model.MikeHotLockRedisKey(roomId, uid), 1, time.Second*100)
if err != nil {
r.log.Errorf("Set mike hot lock err:%v", err)
}
return b
}
func (r *roomMikeRepo) CreateMikeHot(ctx context.Context, mikeHot *model.MikeUpHot, lockCheck bool) error {
key := model.MikeUpHotListKey
mikeHot.Timer = time.Now().Unix()
hot, err := json.Marshal(mikeHot)
if err != nil {
r.log.Errorf("Create mike hot json marshal err:%v", err)
return err
}
err = r.data.cache.LPush(ctx, key, string(hot))
if err != nil {
r.log.Errorf("Create mike hot err:%v", err)
return err
}
r.SetMikeHotLock(ctx, mikeHot.RoomId, mikeHot.Uid)
if lockCheck {
h, err := r.data.cache.HGet(ctx, model.MikeUpHotHashRedisKey(mikeHot.RoomId), util.Int64TarnsString(mikeHot.MikeId))
if err != nil {
r.log.Errorf("Get mike hot err:%v", err)
return err
}
if h == "" {
r.log.Error("Mike hot lock")
return model.ErrMikeHotLockOvertime
}
}
err = r.data.cache.HSet(ctx, model.MikeUpHotHashRedisKey(mikeHot.RoomId), mikeHot.MikeId, hot)
if err != nil {
r.log.Errorf("Create mike hot table err:%v", err)
return err
}
defer func() {
r.data.cache.Del(ctx, model.MikeHotLockRedisKey(mikeHot.RoomId, mikeHot.Uid))
}()
return nil
}
func (r *roomMikeRepo) PushMikeHot(ctx context.Context, mikeHot *model.MikeUpHot) error {
key := model.MikeUpHotListKey
mikeHot.Timer = time.Now().Unix()
hot, err := json.Marshal(mikeHot)
if err != nil {
r.log.Errorf("Create mike hot json marshal err:%v", err)
return err
}
err = r.data.cache.LPush(ctx, key, string(hot))
if err != nil {
r.log.Errorf("Create mike hot err:%v", err)
return err
}
return nil
}
func (r *roomMikeRepo) DeleteMikeHot(ctx context.Context, roomId, mikeId int64) error {
if mikeId == 0 {
err := r.data.cache.Del(ctx, model.MikeUpHotHashRedisKey(roomId))
if err != nil {
r.log.Errorf("Delete mike hot table err:%v", err)
return err
}
} else {
err := r.data.cache.HDel(ctx, model.MikeUpHotHashRedisKey(roomId), util.Int64TarnsString(mikeId))
if err != nil {
r.log.Errorf("Delete mike hot table err:%v", err)
return err
}
}
return nil
}
func (r *roomMikeRepo) GetMikeHotPop(ctx context.Context) (*model.MikeUpHot, error) {
lLen, err := r.data.cache.LLen(ctx, model.MikeUpHotListKey)
if err != nil {
r.log.Errorf("Get mike hot len err:%v", err)
return nil, err
}
if lLen == 0 {
return &model.MikeUpHot{}, nil
}
hot, err := r.data.cache.RPop(ctx, model.MikeUpHotListKey)
if err != nil {
r.log.Errorf("Get mike hot pop err:%v", err)
return nil, err
}
var mikeHot *model.MikeUpHot
err = json.Unmarshal([]byte(hot), &mikeHot)
if err != nil {
r.log.Errorf("Get mike hot pop json unmarshal err:%v", err)
err = r.data.cache.LPush(ctx, model.MikeUpHotListKey, hot)
if err != nil {
r.log.Errorf("Get mike hot lpush err:%v", err)
}
return nil, err
}
return mikeHot, nil
}
func (r *roomMikeRepo) GetMikeHot(ctx context.Context, roomId, mikeId int64) (*model.MikeUpHot, bool, error) {
exists, err := r.data.cache.HExists(ctx, model.MikeUpHotHashRedisKey(roomId), util.Int64TarnsString(mikeId))
if err != nil {
r.log.Errorf("Get mike hot exists err:%v", err)
return nil, false, err
}
if !exists {
return nil, false, nil
}
hot, err := r.data.cache.HGet(ctx, model.MikeUpHotHashRedisKey(roomId), util.Int64TarnsString(mikeId))
if err != nil {
r.log.Errorf("Get mike hot err:%v", err)
return nil, false, err
}
var miekHot *model.MikeUpHot
err = json.Unmarshal([]byte(hot), &miekHot)
if err != nil {
r.log.Errorf("Get mike hot json unmarshal err:%v", err)
return nil, false, err
}
return miekHot, true, nil
}
func (r *roomMikeRepo) GetRoomMikeHot(ctx context.Context, roomId int64) ([]*model.MikeUpHot, error) {
hots, err := r.data.cache.HGetAll(ctx, model.MikeUpHotHashRedisKey(roomId))
if err != nil {
r.log.Errorf("Get room mike hot err:%v", err)
return nil, err
}
var mikeHots []*model.MikeUpHot
for _, hot := range hots {
var mikeHot *model.MikeUpHot
err = json.Unmarshal([]byte(hot), &mikeHot)
if err != nil {
r.log.Errorf("Get room mike hot json unmarshal err:%v", err)
return nil, err
}
mikeHots = append(mikeHots, mikeHot)
}
return mikeHots, nil
}

20
internal/util/page.go

@ -0,0 +1,20 @@
package util
const (
defaultLimit = 50
)
func GetPage(offset, limit *int32) (o, l int) {
if offset == nil {
o = 0
} else {
o = int(*offset)
}
if limit == nil {
l = 0
} else {
l = int(*limit)
}
return
}

21
internal/util/time.go

@ -0,0 +1,21 @@
package util
import "time"
// GetNowYmdHms 获取当前datetime
func GetNowYmdHms() string {
return time.Now().Format("2006-01-02 15:04:05")
}
// GetNowUnix 获取当前时间戳
func GetNowUnix() int64 {
return time.Now().Unix()
}
func TraYmdHms(t time.Time) string {
return t.Format("2006-01-02 15:04:05")
}
func TimeTranYmdHms(t int64) string {
return time.Unix(t, 0).Format("2006-01-02 15:04:05")
}

55
internal/util/transform.go

@ -0,0 +1,55 @@
package util
import (
"math"
"strconv"
)
func IntTransString(i int) string {
return strconv.Itoa(i)
}
func Int32TarnsString(i int32) string {
return IntTransString(int(i))
}
func Int64TarnsString(i int64) string {
return IntTransString(int(i))
}
func StringTarnsInt(s string) int {
i, _ := strconv.Atoi(s)
return i
}
func StringTarnsInt64(s string) int64 {
return int64(StringTarnsInt(s))
}
// Float64TarnsInt float64转int
func Float64TarnsInt(i float64) int {
return int(i)
}
// Float64IncrTarnsInt float64 向上递增转int
func Float64IncrTarnsInt(i float64) int {
return int(math.Ceil(i))
}
// Float64DecrTarnsInt float64 向下递增转int
func Float64DecrTarnsInt(i float64) int {
return int(math.Floor(i))
}
// Float64IncrTarnsInt32 float64 向上递增转int32
func Float64IncrTarnsInt32(i float64) int32 {
return int32(Float64IncrTarnsInt(i))
}
// StringsTarInt64s
func StringsTarInt64s(strs []string) (int64s []int64) {
for _, v := range strs {
int64s = append(int64s, StringTarnsInt64(v))
}
return
}

20
job.yaml

@ -0,0 +1,20 @@
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: room-hot-compute-job
namespace: dev
spec:
schedule: "*/1 * * * *"
jobTemplate:
spec:
template:
spec:
containers:
- name: room-hot-compute-job
image: registry.internal.jumaiyx.cn/job/room-hot-compute:v1.0.0
imagePullPolicy: IfNotPresent
command:
- ./server
restartPolicy: OnFailure
imagePullSecrets:
- name: registry-harbor

39
openapi.yaml

@ -0,0 +1,39 @@
# Generated with protoc-gen-openapi
# https://github.com/google/gnostic/tree/master/cmd/protoc-gen-openapi
openapi: 3.0.3
info:
title: Greeter API
description: The greeting service definition.
version: 0.0.1
paths:
/helloworld/{name}:
get:
tags:
- Greeter
- subgroup
description: Sends a greeting
operationId: Greeter_SayHello
parameters:
- name: name
in: path
required: true
schema:
type: string
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/helloworld.v1.HelloReply'
components:
schemas:
helloworld.v1.HelloReply:
type: object
properties:
message:
type: string
description: The response message containing the greetings
tags:
- name: Greeter

258
pkg/redis/redis.go

@ -0,0 +1,258 @@
package redis
import (
"context"
"git.gz.internal.jumaiyx.cn/jm/jmproto/conf"
"git.gz.internal.jumaiyx.cn/pkg/log"
"github.com/go-redis/redis/v8"
"github.com/pkg/errors"
"time"
)
// todo 往后封包
const (
NullString = ""
)
type Cache struct {
log log.Logger
client *redis.Client
}
func NewCache(log log.Logger, c *conf.Data_Redis) *Cache {
client := redis.NewClient(&redis.Options{
Network: c.Network,
Addr: c.Addr,
Password: c.Password,
PoolSize: 10,
})
return &Cache{
log: log,
client: client,
}
}
func (rdb Cache) Get(ctx context.Context, key string) (string, error) {
val, err := rdb.client.Get(ctx, key).Result()
if err != nil {
if errors.Is(err, redis.Nil) {
return NullString, nil
}
rdb.log.Errorf("redis cache get err:%v", err)
return NullString, err
}
return val, nil
}
func (rdb Cache) Set(ctx context.Context, key string, value interface{}) error {
err := rdb.client.Set(ctx, key, value, 0).Err()
if err != nil {
rdb.log.Errorf("redis cache set err:%v", err)
return err
}
return nil
}
func (rdb Cache) SetNX(ctx context.Context, key string, value interface{}, exp time.Duration) (bool, error) {
b, err := rdb.client.SetNX(ctx, key, value, exp).Result()
if err != nil {
rdb.log.Errorf("redis cache SetNX err:%v", err)
return false, err
}
return b, nil
}
func (rdb Cache) Incr(ctx context.Context, key string) (int64, error) {
result, err := rdb.client.Incr(ctx, key).Result()
if err != nil {
rdb.log.Errorf("redis cache incr err:%v", err)
return result, err
}
return result, nil
}
func (rdb Cache) Decr(ctx context.Context, key string) (int64, error) {
result, err := rdb.client.Decr(ctx, key).Result()
if err != nil {
rdb.log.Errorf("redis cache decr err:%v", err)
return result, err
}
return result, nil
}
func (rdb Cache) SetExp(ctx context.Context, key string, value interface{}, exp time.Duration) error {
err := rdb.client.Set(ctx, key, value, exp).Err()
if err != nil {
rdb.log.Errorf("redis cache set exp err:%v", err)
return err
}
return nil
}
func (rdb Cache) Del(ctx context.Context, key string) error {
_, err := rdb.client.Del(ctx, key).Result()
if err != nil {
rdb.log.Errorf("redis del err:%v", err)
return err
}
return nil
}
//************** list ****************
func (rdb Cache) LPush(ctx context.Context, key string, values ...interface{}) error {
_, err := rdb.client.LPush(ctx, key, values...).Result()
if err != nil {
rdb.log.Errorf("Redis cache lpush err:%v", err)
return err
}
return nil
}
func (rdb Cache) LLen(ctx context.Context, key string) (int64, error) {
l, err := rdb.client.LLen(ctx, key).Result()
if err != nil {
rdb.log.Errorf("Redis cache lpush err:%v", err)
return 0, err
}
return l, nil
}
func (rdb Cache) RPop(ctx context.Context, key string) (string, error) {
res, err := rdb.client.RPop(ctx, key).Result()
if err != nil {
rdb.log.Errorf("Redis cache rpop err:%v", err)
return "", err
}
return res, nil
}
func (rdb Cache) LRange(ctx context.Context, key string) {
//rdb.client.LRange(ctx, key)
}
//****************集合*******************
func (rdb Cache) ZAdd(ctx context.Context, key string, z *redis.Z) (int64, error) {
result, err := rdb.client.ZAdd(ctx, key, z).Result()
if err != nil {
rdb.log.Errorf("redis cache zadd err:%v", err)
return 0, err
}
return result, err
}
func (rdb Cache) ZIncrBy(ctx context.Context, key string, member string, incr float64) error {
_, err := rdb.client.ZIncrBy(ctx, key, incr, member).Result()
if err != nil {
rdb.log.Errorf("redis cache zadd err:%v", err)
return err
}
return err
}
func (rdb Cache) ZRange(ctx context.Context, key string, tart, stop int64) ([]string, error) {
result, err := rdb.client.ZRange(ctx, key, tart, stop).Result()
if err != nil {
rdb.log.Errorf("redis cache zrange err:%v", err)
return nil, err
}
return result, nil
}
func (rdb Cache) ZRevRange(ctx context.Context, key string, tart, stop int64) ([]string, error) {
result, err := rdb.client.ZRevRange(ctx, key, tart, stop).Result()
if err != nil {
rdb.log.Errorf("redis cache ZRevRange err:%v", err)
return nil, err
}
return result, nil
}
func (rdb Cache) ZRevRangeWithScores(ctx context.Context, key string, tart, stop int64) ([]redis.Z, error) {
result, err := rdb.client.ZRevRangeWithScores(ctx, key, tart, stop).Result()
if err != nil {
rdb.log.Errorf("redis cache ZRevRange err:%v", err)
return nil, err
}
return result, nil
}
func (rdb Cache) ZRem(ctx context.Context, key string, number string) error {
_, err := rdb.client.ZRem(ctx, key, number).Result()
if err != nil {
rdb.log.Errorf("Redis cache ZRem err:%v", err)
return err
}
return nil
}
func (rdb Cache) ZScore(ctx context.Context, key string, number string) (float64, error) {
result, err := rdb.client.ZScore(ctx, key, number).Result()
if err != nil {
rdb.log.Errorf("Redis cache ZScore err:%v", err)
return 0, err
}
return result, nil
}
// ************* 哈希表 ****************
func (rdb Cache) HSet(ctx context.Context, hkey string, key, value interface{}) error {
_, err := rdb.client.HSet(ctx, hkey, key, value).Result()
if err != nil {
rdb.log.Errorf("redis cache hset err:%v", err)
return err
}
return nil
}
func (rdb Cache) HSetExp(ctx context.Context, hkey string, key, value interface{}, duration time.Duration) error {
err := rdb.client.HSet(ctx, hkey, key).Err()
if err != nil {
rdb.log.Errorf("redis cache hset Expire err:%v", err)
return err
}
err = rdb.client.Expire(ctx, hkey, duration).Err()
if err != nil {
rdb.log.Errorf("redis cache hset Expire err:%v", err)
return err
}
return nil
}
func (rdb Cache) HGet(ctx context.Context, hkey, key string) (string, error) {
result, err := rdb.client.HGet(ctx, hkey, key).Result()
if err != nil {
rdb.log.Errorf("redis cache hset Expire err:%v", err)
return "", err
}
return result, nil
}
func (rdb Cache) HGetAll(ctx context.Context, key string) (map[string]string, error) {
result, err := rdb.client.HGetAll(ctx, key).Result()
if err != nil {
rdb.log.Errorf("redis cache hgetall err:%v", err)
return nil, err
}
return result, nil
}
func (rdb Cache) HDel(ctx context.Context, hkey string, key ...string) error {
err := rdb.client.HDel(ctx, hkey, key...).Err()
if err != nil {
rdb.log.Errorf("redis cache hdel err:%v", err)
return err
}
return nil
}
func (rdb Cache) HExists(ctx context.Context, hkey, key string) (bool, error) {
result, err := rdb.client.HExists(ctx, hkey, key).Result()
if err != nil {
rdb.log.Errorf("Redis cache HExists err:%v", err)
return false, err
}
return result, nil
}

22
pkg/server/gift/gift.go

@ -0,0 +1,22 @@
package gift
import (
"context"
v1 "git.gz.internal.jumaiyx.cn/jm/jmproto/gift/v1"
k8s_client "git.gz.internal.jumaiyx.cn/pkg/k8s-client"
"git.gz.internal.jumaiyx.cn/pkg/kubediscovery"
"git.gz.internal.jumaiyx.cn/pkg/log"
)
func NewGiftClient(logger log.Logger) v1.GiftClient {
ctx := context.Background()
discovery, err := kubediscovery.Discovery(ctx, logger, "gift-service", kubediscovery.Namespace(k8s_client.DevNamespace))
if err != nil {
logger.Errorf("Gift client failed:%v", err)
return nil
}
client := v1.NewGiftClient(discovery)
return client
}

50
pkg/server/message/message.go

@ -0,0 +1,50 @@
package message
import (
"context"
v1 "git.gz.internal.jumaiyx.cn/jm/jmproto/message/v1"
k8s_client "git.gz.internal.jumaiyx.cn/pkg/k8s-client"
"git.gz.internal.jumaiyx.cn/pkg/kubediscovery"
"git.gz.internal.jumaiyx.cn/pkg/log"
"github.com/go-kratos/kratos/v2/transport/grpc"
)
func NewMessageClient(logger log.Logger) v1.MessageClient {
ctx := context.Background()
discovery, err := kubediscovery.Discovery(ctx, logger, "message-service", kubediscovery.Namespace(k8s_client.DevNamespace))
if err != nil {
logger.Errorf("user profile link failed:%v", err)
return nil
}
client := v1.NewMessageClient(discovery)
return client
}
func NewMessageTest(ctx context.Context, logger log.Logger) v1.MessageClient {
conn, err := grpc.DialInsecure(
context.Background(),
grpc.WithEndpoint("127.0.0.1:9001"),
)
if err != nil {
logger.Errorf("user profile link failed:%v", err)
}
client := v1.NewMessageClient(conn)
return client
}
func NewMessageT(ctx context.Context, logger log.Logger) v1.MessageClient {
discovery, err := kubediscovery.Discovery(ctx, logger, "message-service", kubediscovery.Namespace(k8s_client.DevNamespace))
if err != nil {
logger.Errorf("user profile link failed:%v", err)
}
if err != nil {
logger.Errorf("user profile link failed:%v", err)
return nil
}
client := v1.NewMessageClient(discovery)
return client
}

10
pkg/server/server.go

@ -0,0 +1,10 @@
package server
import (
"git.gz.internal.jumaiyx.cn/job/room-mike-hot-timer/pkg/server/gift"
"git.gz.internal.jumaiyx.cn/job/room-mike-hot-timer/pkg/server/message"
"github.com/google/wire"
)
// ProviderServerSet is data providers.
var ProviderServerSet = wire.NewSet(message.NewMessageClient, gift.NewGiftClient)
Loading…
Cancel
Save