merge from dev branch

pull/351/head
Michael Li 1 year ago
commit dd963d2d1b
No known key found for this signature in database

@ -2,6 +2,9 @@
All notable changes to paopao-ce are documented in this file. All notable changes to paopao-ce are documented in this file.
## 0.4.0+dev ([`dev`](https://github.com/rocboss/paopao-ce/tree/dev)) ## 0.4.0+dev ([`dev`](https://github.com/rocboss/paopao-ce/tree/dev))
### Added
- add `pprof` feature support [#327](https://github.com/rocboss/paopao-ce/pull/327)
- use compiler profile-guided optimization (PGO) to further optimize builds. [#327](https://github.com/rocboss/paopao-ce/pull/327)
## 0.3.0 ## 0.3.0
### Added ### Added

@ -32,10 +32,10 @@ all: fmt build
build: build:
@go mod download @go mod download
@echo Build paopao-ce @echo Build paopao-ce
@go build -trimpath -tags '$(TAGS)' -ldflags '$(LDFLAGS)' -o $(RELEASE_ROOT)/$(TARGET) @go build -pgo=auto -trimpath -tags '$(TAGS)' -ldflags '$(LDFLAGS)' -o $(RELEASE_ROOT)/$(TARGET)
run: run:
@go run -trimpath -gcflags "all=-N -l" -tags '$(TAGS)' -ldflags '$(LDFLAGS)' . @go run -pgo=auto -trimpath -gcflags "all=-N -l" -tags '$(TAGS)' -ldflags '$(LDFLAGS)' .
.PHONY: release .PHONY: release
release: linux-amd64 darwin-amd64 darwin-arm64 windows-x64 release: linux-amd64 darwin-amd64 darwin-arm64 windows-x64
@ -52,22 +52,22 @@ release: linux-amd64 darwin-amd64 darwin-arm64 windows-x64
.PHONY: linux-amd64 .PHONY: linux-amd64
linux-amd64: linux-amd64:
@echo Build paopao-ce [linux-amd64] CGO_ENABLED=$(CGO_ENABLED) TAGS="'$(TAGS)'" @echo Build paopao-ce [linux-amd64] CGO_ENABLED=$(CGO_ENABLED) TAGS="'$(TAGS)'"
@CGO_ENABLED=$(CGO_ENABLED) GOOS=linux GOARCH=amd64 go build -trimpath -tags '$(TAGS)' -ldflags '$(LDFLAGS)' -o $(RELEASE_LINUX_AMD64)/$(TARGET_BIN) @CGO_ENABLED=$(CGO_ENABLED) GOOS=linux GOARCH=amd64 go build -pgo=auto -trimpath -tags '$(TAGS)' -ldflags '$(LDFLAGS)' -o $(RELEASE_LINUX_AMD64)/$(TARGET_BIN)
.PHONY: darwin-amd64 .PHONY: darwin-amd64
darwin-amd64: darwin-amd64:
@echo Build paopao-ce [darwin-amd64] CGO_ENABLED=$(CGO_ENABLED) TAGS="'$(TAGS)'" @echo Build paopao-ce [darwin-amd64] CGO_ENABLED=$(CGO_ENABLED) TAGS="'$(TAGS)'"
@CGO_ENABLED=$(CGO_ENABLED) GOOS=darwin GOARCH=amd64 go build -trimpath -tags '$(TAGS)' -ldflags '$(LDFLAGS)' -o $(RELEASE_DARWIN_AMD64)/$(TARGET_BIN) @CGO_ENABLED=$(CGO_ENABLED) GOOS=darwin GOARCH=amd64 go build -pgo=auto -trimpath -tags '$(TAGS)' -ldflags '$(LDFLAGS)' -o $(RELEASE_DARWIN_AMD64)/$(TARGET_BIN)
.PHONY: darwin-arm64 .PHONY: darwin-arm64
darwin-arm64: darwin-arm64:
@echo Build paopao-ce [darwin-arm64] CGO_ENABLED=$(CGO_ENABLED) TAGS="'$(TAGS)'" @echo Build paopao-ce [darwin-arm64] CGO_ENABLED=$(CGO_ENABLED) TAGS="'$(TAGS)'"
@CGO_ENABLED=$(CGO_ENABLED) GOOS=darwin GOARCH=arm64 go build -trimpath -tags '$(TAGS)' -ldflags '$(LDFLAGS)' -o $(RELEASE_DARWIN_ARM64)/$(TARGET_BIN) @CGO_ENABLED=$(CGO_ENABLED) GOOS=darwin GOARCH=arm64 go build -pgo=auto -trimpath -tags '$(TAGS)' -ldflags '$(LDFLAGS)' -o $(RELEASE_DARWIN_ARM64)/$(TARGET_BIN)
.PHONY: windows-x64 .PHONY: windows-x64
windows-x64: windows-x64:
@echo Build paopao-ce [windows-x64] CGO_ENABLED=$(CGO_ENABLED) TAGS="'$(TAGS)'" @echo Build paopao-ce [windows-x64] CGO_ENABLED=$(CGO_ENABLED) TAGS="'$(TAGS)'"
@CGO_ENABLED=$(CGO_ENABLED) GOOS=windows GOARCH=amd64 go build -trimpath -tags '$(TAGS)' -ldflags '$(LDFLAGS)' -o $(RELEASE_WINDOWS_AMD64)/$(TARGET_BIN).exe @CGO_ENABLED=$(CGO_ENABLED) GOOS=windows GOARCH=amd64 go build -pgo=auto -trimpath -tags '$(TAGS)' -ldflags '$(LDFLAGS)' -o $(RELEASE_WINDOWS_AMD64)/$(TARGET_BIN).exe
.PHONY: generate .PHONY: generate
generate: gen-mir gen-grpc generate: gen-mir gen-grpc
@ -110,9 +110,9 @@ pre-commit: fmt
.PHONY: install-protobuf-plugins .PHONY: install-protobuf-plugins
install-protobuf-plugins: install-protobuf-plugins:
@go install github.com/bufbuild/buf/cmd/buf@v1.18.0 @go install github.com/bufbuild/buf/cmd/buf@v1.22.0
@go install github.com/bufbuild/buf/cmd/protoc-gen-buf-breaking@v1.18.0 @go install github.com/bufbuild/buf/cmd/protoc-gen-buf-breaking@v1.22.0
@go install github.com/bufbuild/buf/cmd/protoc-gen-buf-lint@v1.18.0 @go install github.com/bufbuild/buf/cmd/protoc-gen-buf-lint@v1.22.0
@go install google.golang.org/protobuf/cmd/protoc-gen-go@latest @go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
@go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest @go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest

@ -375,7 +375,8 @@ release/paopao-ce --no-default-features --features sqlite3,localoss,loggerfile,r
|`Alipay` | 支付 | 稳定 | 开启基于[支付宝开放平台](https://open.alipay.com/)的钱包功能 | |`Alipay` | 支付 | 稳定 | 开启基于[支付宝开放平台](https://open.alipay.com/)的钱包功能 |
|`Sms` | 短信验证 | 稳定 | 开启短信验证码功能,用于手机绑定验证手机是否注册者的;功能如果没有开启,手机绑定时任意短信验证码都可以绑定手机 | |`Sms` | 短信验证 | 稳定 | 开启短信验证码功能,用于手机绑定验证手机是否注册者的;功能如果没有开启,手机绑定时任意短信验证码都可以绑定手机 |
|`Docs:OpenAPI` | 开发文档 | 稳定 | 开启openapi文档功能提供web api文档说明(visit http://127.0.0.1:8008/docs/openapi) | |`Docs:OpenAPI` | 开发文档 | 稳定 | 开启openapi文档功能提供web api文档说明(visit http://127.0.0.1:8008/docs/openapi) |
|[`Pyroscope`](docs/proposal/016-关于使用pyroscope用于性能调试的设计.md)| 性能优化 | 内测 | 开启Pyroscope功能用于性能调试 | |[`Pyroscope`](docs/proposal/23021510-关于使用pyroscope用于性能调试的设计.md)| 性能优化 | 内测 | 开启Pyroscope功能用于性能调试 |
|[`Pprof`](docs/proposal/23062905-添加Pprof功能特性用于获取Profile.md)| 性能优化 | 内测 | 开启Pprof功能收集Profile信息 |
|`PhoneBind` | 其他 | 稳定 | 手机绑定功能 | |`PhoneBind` | 其他 | 稳定 | 手机绑定功能 |
|`Web:DisallowUserRegister` | 功能特性 | 稳定 | 不允许用户注册 | |`Web:DisallowUserRegister` | 功能特性 | 稳定 | 不允许用户注册 |

@ -1,16 +1,29 @@
// Code generated by go-mir. DO NOT EDIT. // Code generated by go-mir. DO NOT EDIT.
// versions: // versions:
// - mir v3.2.0 // - mir v4.0.0
package v1 package v1
import ( import (
"net/http" "net/http"
"github.com/alimy/mir/v3" "github.com/alimy/mir/v4"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
) )
type _binding_ interface {
Bind(*gin.Context) mir.Error
}
type _render_ interface {
Render(*gin.Context)
}
type _default_ interface {
Bind(*gin.Context, any) mir.Error
Render(*gin.Context, any, mir.Error)
}
type LoginReq struct { type LoginReq struct {
AgentInfo AgentInfo `json:"agent_info"` AgentInfo AgentInfo `json:"agent_info"`
Name string `json:"name"` Name string `json:"name"`
@ -37,6 +50,8 @@ type UserInfo struct {
} }
type User interface { type User interface {
_default_
// Chain provide handlers chain for gin // Chain provide handlers chain for gin
Chain() gin.HandlersChain Chain() gin.HandlersChain
@ -46,21 +61,8 @@ type User interface {
mustEmbedUnimplementedUserServant() mustEmbedUnimplementedUserServant()
} }
type UserBinding interface {
BindLogin(*gin.Context) (*LoginReq, mir.Error)
mustEmbedUnimplementedUserBinding()
}
type UserRender interface {
RenderLogout(*gin.Context, mir.Error)
RenderLogin(*gin.Context, *LoginResp, mir.Error)
mustEmbedUnimplementedUserRender()
}
// RegisterUserServant register User servant to gin // RegisterUserServant register User servant to gin
func RegisterUserServant(e *gin.Engine, s User, b UserBinding, r UserRender) { func RegisterUserServant(e *gin.Engine, s User) {
router := e.Group("m/v1") router := e.Group("m/v1")
// use chain for router // use chain for router
middlewares := s.Chain() middlewares := s.Chain()
@ -74,9 +76,8 @@ func RegisterUserServant(e *gin.Engine, s User, b UserBinding, r UserRender) {
default: default:
} }
r.RenderLogout(c, s.Logout()) s.Render(c, nil, s.Logout())
}) })
router.Handle("POST", "/user/login/", func(c *gin.Context) { router.Handle("POST", "/user/login/", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
@ -84,20 +85,18 @@ func RegisterUserServant(e *gin.Engine, s User, b UserBinding, r UserRender) {
default: default:
} }
req, err := b.BindLogin(c) req := new(LoginReq)
if err != nil { if err := s.Bind(c, req); err != nil {
r.RenderLogin(c, nil, err) s.Render(c, nil, err)
return return
} }
resp, err := s.Login(req) resp, err := s.Login(req)
r.RenderLogin(c, resp, err) s.Render(c, resp, err)
}) })
} }
// UnimplementedUserServant can be embedded to have forward compatible implementations. // UnimplementedUserServant can be embedded to have forward compatible implementations.
type UnimplementedUserServant struct { type UnimplementedUserServant struct{}
}
func (UnimplementedUserServant) Chain() gin.HandlersChain { func (UnimplementedUserServant) Chain() gin.HandlersChain {
return nil return nil
@ -112,31 +111,3 @@ func (UnimplementedUserServant) Login(req *LoginReq) (*LoginResp, mir.Error) {
} }
func (UnimplementedUserServant) mustEmbedUnimplementedUserServant() {} func (UnimplementedUserServant) mustEmbedUnimplementedUserServant() {}
// UnimplementedUserRender can be embedded to have forward compatible implementations.
type UnimplementedUserRender struct {
RenderAny func(*gin.Context, any, mir.Error)
}
func (r *UnimplementedUserRender) RenderLogout(c *gin.Context, err mir.Error) {
r.RenderAny(c, nil, err)
}
func (r *UnimplementedUserRender) RenderLogin(c *gin.Context, data *LoginResp, err mir.Error) {
r.RenderAny(c, data, err)
}
func (r *UnimplementedUserRender) mustEmbedUnimplementedUserRender() {}
// UnimplementedUserBinding can be embedded to have forward compatible implementations.
type UnimplementedUserBinding struct {
BindAny func(*gin.Context, any) mir.Error
}
func (b *UnimplementedUserBinding) BindLogin(c *gin.Context) (*LoginReq, mir.Error) {
obj := new(LoginReq)
err := b.BindAny(c, obj)
return obj, err
}
func (b *UnimplementedUserBinding) mustEmbedUnimplementedUserBinding() {}

@ -1,16 +1,29 @@
// Code generated by go-mir. DO NOT EDIT. // Code generated by go-mir. DO NOT EDIT.
// versions: // versions:
// - mir v3.2.0 // - mir v4.0.0
package v1 package v1
import ( import (
"net/http" "net/http"
"github.com/alimy/mir/v3" "github.com/alimy/mir/v4"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
) )
type _binding_ interface {
Bind(*gin.Context) mir.Error
}
type _render_ interface {
Render(*gin.Context)
}
type _default_ interface {
Bind(*gin.Context, any) mir.Error
Render(*gin.Context, any, mir.Error)
}
type LoginReq struct { type LoginReq struct {
AgentInfo AgentInfo `json:"agent_info"` AgentInfo AgentInfo `json:"agent_info"`
Name string `json:"name"` Name string `json:"name"`
@ -37,6 +50,8 @@ type UserInfo struct {
} }
type User interface { type User interface {
_default_
// Chain provide handlers chain for gin // Chain provide handlers chain for gin
Chain() gin.HandlersChain Chain() gin.HandlersChain
@ -46,21 +61,8 @@ type User interface {
mustEmbedUnimplementedUserServant() mustEmbedUnimplementedUserServant()
} }
type UserBinding interface {
BindLogin(*gin.Context) (*LoginReq, mir.Error)
mustEmbedUnimplementedUserBinding()
}
type UserRender interface {
RenderLogout(*gin.Context, mir.Error)
RenderLogin(*gin.Context, *LoginResp, mir.Error)
mustEmbedUnimplementedUserRender()
}
// RegisterUserServant register User servant to gin // RegisterUserServant register User servant to gin
func RegisterUserServant(e *gin.Engine, s User, b UserBinding, r UserRender) { func RegisterUserServant(e *gin.Engine, s User) {
router := e.Group("r/v1") router := e.Group("r/v1")
// use chain for router // use chain for router
middlewares := s.Chain() middlewares := s.Chain()
@ -74,9 +76,8 @@ func RegisterUserServant(e *gin.Engine, s User, b UserBinding, r UserRender) {
default: default:
} }
r.RenderLogout(c, s.Logout()) s.Render(c, nil, s.Logout())
}) })
router.Handle("POST", "/user/login/", func(c *gin.Context) { router.Handle("POST", "/user/login/", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
@ -84,20 +85,18 @@ func RegisterUserServant(e *gin.Engine, s User, b UserBinding, r UserRender) {
default: default:
} }
req, err := b.BindLogin(c) req := new(LoginReq)
if err != nil { if err := s.Bind(c, req); err != nil {
r.RenderLogin(c, nil, err) s.Render(c, nil, err)
return return
} }
resp, err := s.Login(req) resp, err := s.Login(req)
r.RenderLogin(c, resp, err) s.Render(c, resp, err)
}) })
} }
// UnimplementedUserServant can be embedded to have forward compatible implementations. // UnimplementedUserServant can be embedded to have forward compatible implementations.
type UnimplementedUserServant struct { type UnimplementedUserServant struct{}
}
func (UnimplementedUserServant) Chain() gin.HandlersChain { func (UnimplementedUserServant) Chain() gin.HandlersChain {
return nil return nil
@ -112,31 +111,3 @@ func (UnimplementedUserServant) Login(req *LoginReq) (*LoginResp, mir.Error) {
} }
func (UnimplementedUserServant) mustEmbedUnimplementedUserServant() {} func (UnimplementedUserServant) mustEmbedUnimplementedUserServant() {}
// UnimplementedUserRender can be embedded to have forward compatible implementations.
type UnimplementedUserRender struct {
RenderAny func(*gin.Context, any, mir.Error)
}
func (r *UnimplementedUserRender) RenderLogout(c *gin.Context, err mir.Error) {
r.RenderAny(c, nil, err)
}
func (r *UnimplementedUserRender) RenderLogin(c *gin.Context, data *LoginResp, err mir.Error) {
r.RenderAny(c, data, err)
}
func (r *UnimplementedUserRender) mustEmbedUnimplementedUserRender() {}
// UnimplementedUserBinding can be embedded to have forward compatible implementations.
type UnimplementedUserBinding struct {
BindAny func(*gin.Context, any) mir.Error
}
func (b *UnimplementedUserBinding) BindLogin(c *gin.Context) (*LoginReq, mir.Error) {
obj := new(LoginReq)
err := b.BindAny(c, obj)
return obj, err
}
func (b *UnimplementedUserBinding) mustEmbedUnimplementedUserBinding() {}

@ -1,16 +1,29 @@
// Code generated by go-mir. DO NOT EDIT. // Code generated by go-mir. DO NOT EDIT.
// versions: // versions:
// - mir v3.2.0 // - mir v4.0.0
package v1 package v1
import ( import (
"net/http" "net/http"
"github.com/alimy/mir/v3" "github.com/alimy/mir/v4"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
) )
type _binding_ interface {
Bind(*gin.Context) mir.Error
}
type _render_ interface {
Render(*gin.Context)
}
type _default_ interface {
Bind(*gin.Context, any) mir.Error
Render(*gin.Context, any, mir.Error)
}
type LoginReq struct { type LoginReq struct {
AgentInfo AgentInfo `json:"agent_info"` AgentInfo AgentInfo `json:"agent_info"`
Name string `json:"name"` Name string `json:"name"`
@ -37,6 +50,8 @@ type UserInfo struct {
} }
type User interface { type User interface {
_default_
Logout() mir.Error Logout() mir.Error
Login(*LoginReq) (*LoginResp, mir.Error) Login(*LoginReq) (*LoginResp, mir.Error)
Index() mir.Error Index() mir.Error
@ -44,22 +59,8 @@ type User interface {
mustEmbedUnimplementedUserServant() mustEmbedUnimplementedUserServant()
} }
type UserBinding interface {
BindLogin(*gin.Context) (*LoginReq, mir.Error)
mustEmbedUnimplementedUserBinding()
}
type UserRender interface {
RenderLogout(*gin.Context, mir.Error)
RenderLogin(*gin.Context, *LoginResp, mir.Error)
RenderIndex(*gin.Context, mir.Error)
mustEmbedUnimplementedUserRender()
}
// RegisterUserServant register User servant to gin // RegisterUserServant register User servant to gin
func RegisterUserServant(e *gin.Engine, s User, b UserBinding, r UserRender) { func RegisterUserServant(e *gin.Engine, s User) {
router := e.Group("s/v1") router := e.Group("s/v1")
// register routes info to router // register routes info to router
@ -70,9 +71,8 @@ func RegisterUserServant(e *gin.Engine, s User, b UserBinding, r UserRender) {
default: default:
} }
r.RenderLogout(c, s.Logout()) s.Render(c, nil, s.Logout())
}) })
router.Handle("POST", "/user/login/", func(c *gin.Context) { router.Handle("POST", "/user/login/", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
@ -80,15 +80,14 @@ func RegisterUserServant(e *gin.Engine, s User, b UserBinding, r UserRender) {
default: default:
} }
req, err := b.BindLogin(c) req := new(LoginReq)
if err != nil { if err := s.Bind(c, req); err != nil {
r.RenderLogin(c, nil, err) s.Render(c, nil, err)
return return
} }
resp, err := s.Login(req) resp, err := s.Login(req)
r.RenderLogin(c, resp, err) s.Render(c, resp, err)
}) })
router.Handle("GET", "/index/", func(c *gin.Context) { router.Handle("GET", "/index/", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
@ -96,14 +95,12 @@ func RegisterUserServant(e *gin.Engine, s User, b UserBinding, r UserRender) {
default: default:
} }
r.RenderIndex(c, s.Index()) s.Render(c, nil, s.Index())
}) })
} }
// UnimplementedUserServant can be embedded to have forward compatible implementations. // UnimplementedUserServant can be embedded to have forward compatible implementations.
type UnimplementedUserServant struct { type UnimplementedUserServant struct{}
}
func (UnimplementedUserServant) Logout() mir.Error { func (UnimplementedUserServant) Logout() mir.Error {
return mir.Errorln(http.StatusNotImplemented, http.StatusText(http.StatusNotImplemented)) return mir.Errorln(http.StatusNotImplemented, http.StatusText(http.StatusNotImplemented))
@ -118,35 +115,3 @@ func (UnimplementedUserServant) Index() mir.Error {
} }
func (UnimplementedUserServant) mustEmbedUnimplementedUserServant() {} func (UnimplementedUserServant) mustEmbedUnimplementedUserServant() {}
// UnimplementedUserRender can be embedded to have forward compatible implementations.
type UnimplementedUserRender struct {
RenderAny func(*gin.Context, any, mir.Error)
}
func (r *UnimplementedUserRender) RenderLogout(c *gin.Context, err mir.Error) {
r.RenderAny(c, nil, err)
}
func (r *UnimplementedUserRender) RenderLogin(c *gin.Context, data *LoginResp, err mir.Error) {
r.RenderAny(c, data, err)
}
func (r *UnimplementedUserRender) RenderIndex(c *gin.Context, err mir.Error) {
r.RenderAny(c, nil, err)
}
func (r *UnimplementedUserRender) mustEmbedUnimplementedUserRender() {}
// UnimplementedUserBinding can be embedded to have forward compatible implementations.
type UnimplementedUserBinding struct {
BindAny func(*gin.Context, any) mir.Error
}
func (b *UnimplementedUserBinding) BindLogin(c *gin.Context) (*LoginReq, mir.Error) {
obj := new(LoginReq)
err := b.BindAny(c, obj)
return obj, err
}
func (b *UnimplementedUserBinding) mustEmbedUnimplementedUserBinding() {}

@ -1,40 +1,43 @@
// Code generated by go-mir. DO NOT EDIT. // Code generated by go-mir. DO NOT EDIT.
// versions: // versions:
// - mir v3.2.0 // - mir v4.0.0
package v1 package v1
import ( import (
"net/http" "net/http"
"github.com/alimy/mir/v3" "github.com/alimy/mir/v4"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/rocboss/paopao-ce/internal/model/web" "github.com/rocboss/paopao-ce/internal/model/web"
) )
type Admin interface { type _binding_ interface {
// Chain provide handlers chain for gin Bind(*gin.Context) mir.Error
Chain() gin.HandlersChain }
ChangeUserStatus(*web.ChangeUserStatusReq) mir.Error type _render_ interface {
Render(*gin.Context)
}
mustEmbedUnimplementedAdminServant() type _default_ interface {
Bind(*gin.Context, any) mir.Error
Render(*gin.Context, any, mir.Error)
} }
type AdminBinding interface { type Admin interface {
BindChangeUserStatus(*gin.Context) (*web.ChangeUserStatusReq, mir.Error) _default_
mustEmbedUnimplementedAdminBinding() // Chain provide handlers chain for gin
} Chain() gin.HandlersChain
type AdminRender interface { ChangeUserStatus(*web.ChangeUserStatusReq) mir.Error
RenderChangeUserStatus(*gin.Context, mir.Error)
mustEmbedUnimplementedAdminRender() mustEmbedUnimplementedAdminServant()
} }
// RegisterAdminServant register Admin servant to gin // RegisterAdminServant register Admin servant to gin
func RegisterAdminServant(e *gin.Engine, s Admin, b AdminBinding, r AdminRender) { func RegisterAdminServant(e *gin.Engine, s Admin) {
router := e.Group("v1") router := e.Group("v1")
// use chain for router // use chain for router
middlewares := s.Chain() middlewares := s.Chain()
@ -48,19 +51,17 @@ func RegisterAdminServant(e *gin.Engine, s Admin, b AdminBinding, r AdminRender)
default: default:
} }
req, err := b.BindChangeUserStatus(c) req := new(web.ChangeUserStatusReq)
if err != nil { if err := s.Bind(c, req); err != nil {
r.RenderChangeUserStatus(c, err) s.Render(c, nil, err)
return return
} }
r.RenderChangeUserStatus(c, s.ChangeUserStatus(req)) s.Render(c, nil, s.ChangeUserStatus(req))
}) })
} }
// UnimplementedAdminServant can be embedded to have forward compatible implementations. // UnimplementedAdminServant can be embedded to have forward compatible implementations.
type UnimplementedAdminServant struct { type UnimplementedAdminServant struct{}
}
func (UnimplementedAdminServant) Chain() gin.HandlersChain { func (UnimplementedAdminServant) Chain() gin.HandlersChain {
return nil return nil
@ -71,27 +72,3 @@ func (UnimplementedAdminServant) ChangeUserStatus(req *web.ChangeUserStatusReq)
} }
func (UnimplementedAdminServant) mustEmbedUnimplementedAdminServant() {} func (UnimplementedAdminServant) mustEmbedUnimplementedAdminServant() {}
// UnimplementedAdminRender can be embedded to have forward compatible implementations.
type UnimplementedAdminRender struct {
RenderAny func(*gin.Context, any, mir.Error)
}
func (r *UnimplementedAdminRender) RenderChangeUserStatus(c *gin.Context, err mir.Error) {
r.RenderAny(c, nil, err)
}
func (r *UnimplementedAdminRender) mustEmbedUnimplementedAdminRender() {}
// UnimplementedAdminBinding can be embedded to have forward compatible implementations.
type UnimplementedAdminBinding struct {
BindAny func(*gin.Context, any) mir.Error
}
func (b *UnimplementedAdminBinding) BindChangeUserStatus(c *gin.Context) (*web.ChangeUserStatusReq, mir.Error) {
obj := new(web.ChangeUserStatusReq)
err := b.BindAny(c, obj)
return obj, err
}
func (b *UnimplementedAdminBinding) mustEmbedUnimplementedAdminBinding() {}

@ -1,18 +1,20 @@
// Code generated by go-mir. DO NOT EDIT. // Code generated by go-mir. DO NOT EDIT.
// versions: // versions:
// - mir v3.2.0 // - mir v4.0.0
package v1 package v1
import ( import (
"net/http" "net/http"
"github.com/alimy/mir/v3" "github.com/alimy/mir/v4"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/rocboss/paopao-ce/internal/model/web" "github.com/rocboss/paopao-ce/internal/model/web"
) )
type AlipayPriv interface { type AlipayPriv interface {
_default_
// Chain provide handlers chain for gin // Chain provide handlers chain for gin
Chain() gin.HandlersChain Chain() gin.HandlersChain
@ -23,24 +25,8 @@ type AlipayPriv interface {
mustEmbedUnimplementedAlipayPrivServant() mustEmbedUnimplementedAlipayPrivServant()
} }
type AlipayPrivBinding interface {
BindUserWalletBills(*gin.Context) (*web.UserWalletBillsReq, mir.Error)
BindUserRechargeResult(*gin.Context) (*web.UserRechargeResultReq, mir.Error)
BindUserRechargeLink(*gin.Context) (*web.UserRechargeLinkReq, mir.Error)
mustEmbedUnimplementedAlipayPrivBinding()
}
type AlipayPrivRender interface {
RenderUserWalletBills(*gin.Context, *web.UserWalletBillsResp, mir.Error)
RenderUserRechargeResult(*gin.Context, *web.UserRechargeResultResp, mir.Error)
RenderUserRechargeLink(*gin.Context, *web.UserRechargeLinkResp, mir.Error)
mustEmbedUnimplementedAlipayPrivRender()
}
// RegisterAlipayPrivServant register AlipayPriv servant to gin // RegisterAlipayPrivServant register AlipayPriv servant to gin
func RegisterAlipayPrivServant(e *gin.Engine, s AlipayPriv, b AlipayPrivBinding, r AlipayPrivRender) { func RegisterAlipayPrivServant(e *gin.Engine, s AlipayPriv) {
router := e.Group("v1") router := e.Group("v1")
// use chain for router // use chain for router
middlewares := s.Chain() middlewares := s.Chain()
@ -54,15 +40,15 @@ func RegisterAlipayPrivServant(e *gin.Engine, s AlipayPriv, b AlipayPrivBinding,
default: default:
} }
req, err := b.BindUserWalletBills(c) req := new(web.UserWalletBillsReq)
if err != nil { var bv _binding_ = req
r.RenderUserWalletBills(c, nil, err) if err := bv.Bind(c); err != nil {
s.Render(c, nil, err)
return return
} }
resp, err := s.UserWalletBills(req) resp, err := s.UserWalletBills(req)
r.RenderUserWalletBills(c, resp, err) s.Render(c, resp, err)
}) })
router.Handle("GET", "/user/recharge", func(c *gin.Context) { router.Handle("GET", "/user/recharge", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
@ -70,15 +56,15 @@ func RegisterAlipayPrivServant(e *gin.Engine, s AlipayPriv, b AlipayPrivBinding,
default: default:
} }
req, err := b.BindUserRechargeResult(c) req := new(web.UserRechargeResultReq)
if err != nil { var bv _binding_ = req
r.RenderUserRechargeResult(c, nil, err) if err := bv.Bind(c); err != nil {
s.Render(c, nil, err)
return return
} }
resp, err := s.UserRechargeResult(req) resp, err := s.UserRechargeResult(req)
r.RenderUserRechargeResult(c, resp, err) s.Render(c, resp, err)
}) })
router.Handle("POST", "/user/recharge", func(c *gin.Context) { router.Handle("POST", "/user/recharge", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
@ -86,20 +72,19 @@ func RegisterAlipayPrivServant(e *gin.Engine, s AlipayPriv, b AlipayPrivBinding,
default: default:
} }
req, err := b.BindUserRechargeLink(c) req := new(web.UserRechargeLinkReq)
if err != nil { var bv _binding_ = req
r.RenderUserRechargeLink(c, nil, err) if err := bv.Bind(c); err != nil {
s.Render(c, nil, err)
return return
} }
resp, err := s.UserRechargeLink(req) resp, err := s.UserRechargeLink(req)
r.RenderUserRechargeLink(c, resp, err) s.Render(c, resp, err)
}) })
} }
// UnimplementedAlipayPrivServant can be embedded to have forward compatible implementations. // UnimplementedAlipayPrivServant can be embedded to have forward compatible implementations.
type UnimplementedAlipayPrivServant struct { type UnimplementedAlipayPrivServant struct{}
}
func (UnimplementedAlipayPrivServant) Chain() gin.HandlersChain { func (UnimplementedAlipayPrivServant) Chain() gin.HandlersChain {
return nil return nil
@ -118,47 +103,3 @@ func (UnimplementedAlipayPrivServant) UserRechargeLink(req *web.UserRechargeLink
} }
func (UnimplementedAlipayPrivServant) mustEmbedUnimplementedAlipayPrivServant() {} func (UnimplementedAlipayPrivServant) mustEmbedUnimplementedAlipayPrivServant() {}
// UnimplementedAlipayPrivRender can be embedded to have forward compatible implementations.
type UnimplementedAlipayPrivRender struct {
RenderAny func(*gin.Context, any, mir.Error)
}
func (r *UnimplementedAlipayPrivRender) RenderUserWalletBills(c *gin.Context, data *web.UserWalletBillsResp, err mir.Error) {
r.RenderAny(c, data, err)
}
func (r *UnimplementedAlipayPrivRender) RenderUserRechargeResult(c *gin.Context, data *web.UserRechargeResultResp, err mir.Error) {
r.RenderAny(c, data, err)
}
func (r *UnimplementedAlipayPrivRender) RenderUserRechargeLink(c *gin.Context, data *web.UserRechargeLinkResp, err mir.Error) {
r.RenderAny(c, data, err)
}
func (r *UnimplementedAlipayPrivRender) mustEmbedUnimplementedAlipayPrivRender() {}
// UnimplementedAlipayPrivBinding can be embedded to have forward compatible implementations.
type UnimplementedAlipayPrivBinding struct {
BindAny func(*gin.Context, any) mir.Error
}
func (b *UnimplementedAlipayPrivBinding) BindUserWalletBills(c *gin.Context) (*web.UserWalletBillsReq, mir.Error) {
obj := new(web.UserWalletBillsReq)
err := b.BindAny(c, obj)
return obj, err
}
func (b *UnimplementedAlipayPrivBinding) BindUserRechargeResult(c *gin.Context) (*web.UserRechargeResultReq, mir.Error) {
obj := new(web.UserRechargeResultReq)
err := b.BindAny(c, obj)
return obj, err
}
func (b *UnimplementedAlipayPrivBinding) BindUserRechargeLink(c *gin.Context) (*web.UserRechargeLinkReq, mir.Error) {
obj := new(web.UserRechargeLinkReq)
err := b.BindAny(c, obj)
return obj, err
}
func (b *UnimplementedAlipayPrivBinding) mustEmbedUnimplementedAlipayPrivBinding() {}

@ -1,37 +1,27 @@
// Code generated by go-mir. DO NOT EDIT. // Code generated by go-mir. DO NOT EDIT.
// versions: // versions:
// - mir v3.2.0 // - mir v4.0.0
package v1 package v1
import ( import (
"net/http" "net/http"
"github.com/alimy/mir/v3" "github.com/alimy/mir/v4"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/rocboss/paopao-ce/internal/model/web" "github.com/rocboss/paopao-ce/internal/model/web"
) )
type AlipayPub interface { type AlipayPub interface {
_default_
AlipayNotify(*web.AlipayNotifyReq) mir.Error AlipayNotify(*web.AlipayNotifyReq) mir.Error
mustEmbedUnimplementedAlipayPubServant() mustEmbedUnimplementedAlipayPubServant()
} }
type AlipayPubBinding interface {
BindAlipayNotify(*gin.Context) (*web.AlipayNotifyReq, mir.Error)
mustEmbedUnimplementedAlipayPubBinding()
}
type AlipayPubRender interface {
RenderAlipayNotify(*gin.Context, mir.Error)
mustEmbedUnimplementedAlipayPubRender()
}
// RegisterAlipayPubServant register AlipayPub servant to gin // RegisterAlipayPubServant register AlipayPub servant to gin
func RegisterAlipayPubServant(e *gin.Engine, s AlipayPub, b AlipayPubBinding, r AlipayPubRender) { func RegisterAlipayPubServant(e *gin.Engine, s AlipayPub) {
router := e.Group("v1") router := e.Group("v1")
// register routes info to router // register routes info to router
@ -42,46 +32,21 @@ func RegisterAlipayPubServant(e *gin.Engine, s AlipayPub, b AlipayPubBinding, r
default: default:
} }
req, err := b.BindAlipayNotify(c) req := new(web.AlipayNotifyReq)
if err != nil { var bv _binding_ = req
r.RenderAlipayNotify(c, err) if err := bv.Bind(c); err != nil {
s.Render(c, nil, err)
return return
} }
r.RenderAlipayNotify(c, s.AlipayNotify(req)) s.Render(c, nil, s.AlipayNotify(req))
}) })
} }
// UnimplementedAlipayPubServant can be embedded to have forward compatible implementations. // UnimplementedAlipayPubServant can be embedded to have forward compatible implementations.
type UnimplementedAlipayPubServant struct { type UnimplementedAlipayPubServant struct{}
}
func (UnimplementedAlipayPubServant) AlipayNotify(req *web.AlipayNotifyReq) mir.Error { func (UnimplementedAlipayPubServant) AlipayNotify(req *web.AlipayNotifyReq) mir.Error {
return mir.Errorln(http.StatusNotImplemented, http.StatusText(http.StatusNotImplemented)) return mir.Errorln(http.StatusNotImplemented, http.StatusText(http.StatusNotImplemented))
} }
func (UnimplementedAlipayPubServant) mustEmbedUnimplementedAlipayPubServant() {} func (UnimplementedAlipayPubServant) mustEmbedUnimplementedAlipayPubServant() {}
// UnimplementedAlipayPubRender can be embedded to have forward compatible implementations.
type UnimplementedAlipayPubRender struct {
RenderAny func(*gin.Context, any, mir.Error)
}
func (r *UnimplementedAlipayPubRender) RenderAlipayNotify(c *gin.Context, err mir.Error) {
r.RenderAny(c, nil, err)
}
func (r *UnimplementedAlipayPubRender) mustEmbedUnimplementedAlipayPubRender() {}
// UnimplementedAlipayPubBinding can be embedded to have forward compatible implementations.
type UnimplementedAlipayPubBinding struct {
BindAny func(*gin.Context, any) mir.Error
}
func (b *UnimplementedAlipayPubBinding) BindAlipayNotify(c *gin.Context) (*web.AlipayNotifyReq, mir.Error) {
obj := new(web.AlipayNotifyReq)
err := b.BindAny(c, obj)
return obj, err
}
func (b *UnimplementedAlipayPubBinding) mustEmbedUnimplementedAlipayPubBinding() {}

@ -1,18 +1,20 @@
// Code generated by go-mir. DO NOT EDIT. // Code generated by go-mir. DO NOT EDIT.
// versions: // versions:
// - mir v3.2.0 // - mir v4.0.0
package v1 package v1
import ( import (
"net/http" "net/http"
"github.com/alimy/mir/v3" "github.com/alimy/mir/v4"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/rocboss/paopao-ce/internal/model/web" "github.com/rocboss/paopao-ce/internal/model/web"
) )
type Core interface { type Core interface {
_default_
// Chain provide handlers chain for gin // Chain provide handlers chain for gin
Chain() gin.HandlersChain Chain() gin.HandlersChain
@ -36,50 +38,8 @@ type Core interface {
mustEmbedUnimplementedCoreServant() mustEmbedUnimplementedCoreServant()
} }
type CoreBinding interface {
BindTweetCollectionStatus(*gin.Context) (*web.TweetCollectionStatusReq, mir.Error)
BindTweetStarStatus(*gin.Context) (*web.TweetStarStatusReq, mir.Error)
BindSuggestTags(*gin.Context) (*web.SuggestTagsReq, mir.Error)
BindSuggestUsers(*gin.Context) (*web.SuggestUsersReq, mir.Error)
BindChangeAvatar(*gin.Context) (*web.ChangeAvatarReq, mir.Error)
BindChangeNickname(*gin.Context) (*web.ChangeNicknameReq, mir.Error)
BindChangePassword(*gin.Context) (*web.ChangePasswordReq, mir.Error)
BindUserPhoneBind(*gin.Context) (*web.UserPhoneBindReq, mir.Error)
BindGetStars(*gin.Context) (*web.GetStarsReq, mir.Error)
BindGetCollections(*gin.Context) (*web.GetCollectionsReq, mir.Error)
BindSendUserWhisper(*gin.Context) (*web.SendWhisperReq, mir.Error)
BindReadMessage(*gin.Context) (*web.ReadMessageReq, mir.Error)
BindGetMessages(*gin.Context) (*web.GetMessagesReq, mir.Error)
BindGetUnreadMsgCount(*gin.Context) (*web.GetUnreadMsgCountReq, mir.Error)
BindGetUserInfo(*gin.Context) (*web.UserInfoReq, mir.Error)
BindSyncSearchIndex(*gin.Context) (*web.SyncSearchIndexReq, mir.Error)
mustEmbedUnimplementedCoreBinding()
}
type CoreRender interface {
RenderTweetCollectionStatus(*gin.Context, *web.TweetCollectionStatusResp, mir.Error)
RenderTweetStarStatus(*gin.Context, *web.TweetStarStatusResp, mir.Error)
RenderSuggestTags(*gin.Context, *web.SuggestTagsResp, mir.Error)
RenderSuggestUsers(*gin.Context, *web.SuggestUsersResp, mir.Error)
RenderChangeAvatar(*gin.Context, mir.Error)
RenderChangeNickname(*gin.Context, mir.Error)
RenderChangePassword(*gin.Context, mir.Error)
RenderUserPhoneBind(*gin.Context, mir.Error)
RenderGetStars(*gin.Context, *web.GetStarsResp, mir.Error)
RenderGetCollections(*gin.Context, *web.GetCollectionsResp, mir.Error)
RenderSendUserWhisper(*gin.Context, mir.Error)
RenderReadMessage(*gin.Context, mir.Error)
RenderGetMessages(*gin.Context, *web.GetMessagesResp, mir.Error)
RenderGetUnreadMsgCount(*gin.Context, *web.GetUnreadMsgCountResp, mir.Error)
RenderGetUserInfo(*gin.Context, *web.UserInfoResp, mir.Error)
RenderSyncSearchIndex(*gin.Context, mir.Error)
mustEmbedUnimplementedCoreRender()
}
// RegisterCoreServant register Core servant to gin // RegisterCoreServant register Core servant to gin
func RegisterCoreServant(e *gin.Engine, s Core, b CoreBinding, r CoreRender) { func RegisterCoreServant(e *gin.Engine, s Core) {
router := e.Group("v1") router := e.Group("v1")
// use chain for router // use chain for router
middlewares := s.Chain() middlewares := s.Chain()
@ -93,15 +53,15 @@ func RegisterCoreServant(e *gin.Engine, s Core, b CoreBinding, r CoreRender) {
default: default:
} }
req, err := b.BindTweetCollectionStatus(c) req := new(web.TweetCollectionStatusReq)
if err != nil { var bv _binding_ = req
r.RenderTweetCollectionStatus(c, nil, err) if err := bv.Bind(c); err != nil {
s.Render(c, nil, err)
return return
} }
resp, err := s.TweetCollectionStatus(req) resp, err := s.TweetCollectionStatus(req)
r.RenderTweetCollectionStatus(c, resp, err) s.Render(c, resp, err)
}) })
router.Handle("GET", "/post/star", func(c *gin.Context) { router.Handle("GET", "/post/star", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
@ -109,15 +69,15 @@ func RegisterCoreServant(e *gin.Engine, s Core, b CoreBinding, r CoreRender) {
default: default:
} }
req, err := b.BindTweetStarStatus(c) req := new(web.TweetStarStatusReq)
if err != nil { var bv _binding_ = req
r.RenderTweetStarStatus(c, nil, err) if err := bv.Bind(c); err != nil {
s.Render(c, nil, err)
return return
} }
resp, err := s.TweetStarStatus(req) resp, err := s.TweetStarStatus(req)
r.RenderTweetStarStatus(c, resp, err) s.Render(c, resp, err)
}) })
router.Handle("GET", "/suggest/tags", func(c *gin.Context) { router.Handle("GET", "/suggest/tags", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
@ -125,15 +85,15 @@ func RegisterCoreServant(e *gin.Engine, s Core, b CoreBinding, r CoreRender) {
default: default:
} }
req, err := b.BindSuggestTags(c) req := new(web.SuggestTagsReq)
if err != nil { var bv _binding_ = req
r.RenderSuggestTags(c, nil, err) if err := bv.Bind(c); err != nil {
s.Render(c, nil, err)
return return
} }
resp, err := s.SuggestTags(req) resp, err := s.SuggestTags(req)
r.RenderSuggestTags(c, resp, err) s.Render(c, resp, err)
}) })
router.Handle("GET", "/suggest/users", func(c *gin.Context) { router.Handle("GET", "/suggest/users", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
@ -141,15 +101,15 @@ func RegisterCoreServant(e *gin.Engine, s Core, b CoreBinding, r CoreRender) {
default: default:
} }
req, err := b.BindSuggestUsers(c) req := new(web.SuggestUsersReq)
if err != nil { var bv _binding_ = req
r.RenderSuggestUsers(c, nil, err) if err := bv.Bind(c); err != nil {
s.Render(c, nil, err)
return return
} }
resp, err := s.SuggestUsers(req) resp, err := s.SuggestUsers(req)
r.RenderSuggestUsers(c, resp, err) s.Render(c, resp, err)
}) })
router.Handle("POST", "/user/avatar", func(c *gin.Context) { router.Handle("POST", "/user/avatar", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
@ -157,14 +117,13 @@ func RegisterCoreServant(e *gin.Engine, s Core, b CoreBinding, r CoreRender) {
default: default:
} }
req, err := b.BindChangeAvatar(c) req := new(web.ChangeAvatarReq)
if err != nil { if err := s.Bind(c, req); err != nil {
r.RenderChangeAvatar(c, err) s.Render(c, nil, err)
return return
} }
r.RenderChangeAvatar(c, s.ChangeAvatar(req)) s.Render(c, nil, s.ChangeAvatar(req))
}) })
router.Handle("POST", "/user/nickname", func(c *gin.Context) { router.Handle("POST", "/user/nickname", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
@ -172,14 +131,13 @@ func RegisterCoreServant(e *gin.Engine, s Core, b CoreBinding, r CoreRender) {
default: default:
} }
req, err := b.BindChangeNickname(c) req := new(web.ChangeNicknameReq)
if err != nil { if err := s.Bind(c, req); err != nil {
r.RenderChangeNickname(c, err) s.Render(c, nil, err)
return return
} }
r.RenderChangeNickname(c, s.ChangeNickname(req)) s.Render(c, nil, s.ChangeNickname(req))
}) })
router.Handle("POST", "/user/password", func(c *gin.Context) { router.Handle("POST", "/user/password", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
@ -187,14 +145,13 @@ func RegisterCoreServant(e *gin.Engine, s Core, b CoreBinding, r CoreRender) {
default: default:
} }
req, err := b.BindChangePassword(c) req := new(web.ChangePasswordReq)
if err != nil { if err := s.Bind(c, req); err != nil {
r.RenderChangePassword(c, err) s.Render(c, nil, err)
return return
} }
r.RenderChangePassword(c, s.ChangePassword(req)) s.Render(c, nil, s.ChangePassword(req))
}) })
router.Handle("POST", "/user/phone", func(c *gin.Context) { router.Handle("POST", "/user/phone", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
@ -202,14 +159,13 @@ func RegisterCoreServant(e *gin.Engine, s Core, b CoreBinding, r CoreRender) {
default: default:
} }
req, err := b.BindUserPhoneBind(c) req := new(web.UserPhoneBindReq)
if err != nil { if err := s.Bind(c, req); err != nil {
r.RenderUserPhoneBind(c, err) s.Render(c, nil, err)
return return
} }
r.RenderUserPhoneBind(c, s.UserPhoneBind(req)) s.Render(c, nil, s.UserPhoneBind(req))
}) })
router.Handle("GET", "/user/stars", func(c *gin.Context) { router.Handle("GET", "/user/stars", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
@ -217,15 +173,15 @@ func RegisterCoreServant(e *gin.Engine, s Core, b CoreBinding, r CoreRender) {
default: default:
} }
req, err := b.BindGetStars(c) req := new(web.GetStarsReq)
if err != nil { var bv _binding_ = req
r.RenderGetStars(c, nil, err) if err := bv.Bind(c); err != nil {
s.Render(c, nil, err)
return return
} }
resp, err := s.GetStars(req) resp, err := s.GetStars(req)
r.RenderGetStars(c, resp, err) s.Render(c, resp, err)
}) })
router.Handle("GET", "/user/collections", func(c *gin.Context) { router.Handle("GET", "/user/collections", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
@ -233,15 +189,15 @@ func RegisterCoreServant(e *gin.Engine, s Core, b CoreBinding, r CoreRender) {
default: default:
} }
req, err := b.BindGetCollections(c) req := new(web.GetCollectionsReq)
if err != nil { var bv _binding_ = req
r.RenderGetCollections(c, nil, err) if err := bv.Bind(c); err != nil {
s.Render(c, nil, err)
return return
} }
resp, err := s.GetCollections(req) resp, err := s.GetCollections(req)
r.RenderGetCollections(c, resp, err) s.Render(c, resp, err)
}) })
router.Handle("POST", "/user/whisper", func(c *gin.Context) { router.Handle("POST", "/user/whisper", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
@ -249,14 +205,13 @@ func RegisterCoreServant(e *gin.Engine, s Core, b CoreBinding, r CoreRender) {
default: default:
} }
req, err := b.BindSendUserWhisper(c) req := new(web.SendWhisperReq)
if err != nil { if err := s.Bind(c, req); err != nil {
r.RenderSendUserWhisper(c, err) s.Render(c, nil, err)
return return
} }
r.RenderSendUserWhisper(c, s.SendUserWhisper(req)) s.Render(c, nil, s.SendUserWhisper(req))
}) })
router.Handle("POST", "/user/message/read", func(c *gin.Context) { router.Handle("POST", "/user/message/read", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
@ -264,14 +219,13 @@ func RegisterCoreServant(e *gin.Engine, s Core, b CoreBinding, r CoreRender) {
default: default:
} }
req, err := b.BindReadMessage(c) req := new(web.ReadMessageReq)
if err != nil { if err := s.Bind(c, req); err != nil {
r.RenderReadMessage(c, err) s.Render(c, nil, err)
return return
} }
r.RenderReadMessage(c, s.ReadMessage(req)) s.Render(c, nil, s.ReadMessage(req))
}) })
router.Handle("GET", "/user/messages", func(c *gin.Context) { router.Handle("GET", "/user/messages", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
@ -279,15 +233,15 @@ func RegisterCoreServant(e *gin.Engine, s Core, b CoreBinding, r CoreRender) {
default: default:
} }
req, err := b.BindGetMessages(c) req := new(web.GetMessagesReq)
if err != nil { var bv _binding_ = req
r.RenderGetMessages(c, nil, err) if err := bv.Bind(c); err != nil {
s.Render(c, nil, err)
return return
} }
resp, err := s.GetMessages(req) resp, err := s.GetMessages(req)
r.RenderGetMessages(c, resp, err) s.Render(c, resp, err)
}) })
router.Handle("GET", "/user/msgcount/unread", func(c *gin.Context) { router.Handle("GET", "/user/msgcount/unread", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
@ -295,15 +249,14 @@ func RegisterCoreServant(e *gin.Engine, s Core, b CoreBinding, r CoreRender) {
default: default:
} }
req, err := b.BindGetUnreadMsgCount(c) req := new(web.GetUnreadMsgCountReq)
if err != nil { if err := s.Bind(c, req); err != nil {
r.RenderGetUnreadMsgCount(c, nil, err) s.Render(c, nil, err)
return return
} }
resp, err := s.GetUnreadMsgCount(req) resp, err := s.GetUnreadMsgCount(req)
r.RenderGetUnreadMsgCount(c, resp, err) s.Render(c, resp, err)
}) })
router.Handle("GET", "/user/info", func(c *gin.Context) { router.Handle("GET", "/user/info", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
@ -311,15 +264,15 @@ func RegisterCoreServant(e *gin.Engine, s Core, b CoreBinding, r CoreRender) {
default: default:
} }
req, err := b.BindGetUserInfo(c) req := new(web.UserInfoReq)
if err != nil { var bv _binding_ = req
r.RenderGetUserInfo(c, nil, err) if err := bv.Bind(c); err != nil {
s.Render(c, nil, err)
return return
} }
resp, err := s.GetUserInfo(req) resp, err := s.GetUserInfo(req)
r.RenderGetUserInfo(c, resp, err) s.Render(c, resp, err)
}) })
router.Handle("GET", "/sync/index", func(c *gin.Context) { router.Handle("GET", "/sync/index", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
@ -327,19 +280,17 @@ func RegisterCoreServant(e *gin.Engine, s Core, b CoreBinding, r CoreRender) {
default: default:
} }
req, err := b.BindSyncSearchIndex(c) req := new(web.SyncSearchIndexReq)
if err != nil { if err := s.Bind(c, req); err != nil {
r.RenderSyncSearchIndex(c, err) s.Render(c, nil, err)
return return
} }
r.RenderSyncSearchIndex(c, s.SyncSearchIndex(req)) s.Render(c, nil, s.SyncSearchIndex(req))
}) })
} }
// UnimplementedCoreServant can be embedded to have forward compatible implementations. // UnimplementedCoreServant can be embedded to have forward compatible implementations.
type UnimplementedCoreServant struct { type UnimplementedCoreServant struct{}
}
func (UnimplementedCoreServant) Chain() gin.HandlersChain { func (UnimplementedCoreServant) Chain() gin.HandlersChain {
return nil return nil
@ -410,177 +361,3 @@ func (UnimplementedCoreServant) SyncSearchIndex(req *web.SyncSearchIndexReq) mir
} }
func (UnimplementedCoreServant) mustEmbedUnimplementedCoreServant() {} func (UnimplementedCoreServant) mustEmbedUnimplementedCoreServant() {}
// UnimplementedCoreRender can be embedded to have forward compatible implementations.
type UnimplementedCoreRender struct {
RenderAny func(*gin.Context, any, mir.Error)
}
func (r *UnimplementedCoreRender) RenderTweetCollectionStatus(c *gin.Context, data *web.TweetCollectionStatusResp, err mir.Error) {
r.RenderAny(c, data, err)
}
func (r *UnimplementedCoreRender) RenderTweetStarStatus(c *gin.Context, data *web.TweetStarStatusResp, err mir.Error) {
r.RenderAny(c, data, err)
}
func (r *UnimplementedCoreRender) RenderSuggestTags(c *gin.Context, data *web.SuggestTagsResp, err mir.Error) {
r.RenderAny(c, data, err)
}
func (r *UnimplementedCoreRender) RenderSuggestUsers(c *gin.Context, data *web.SuggestUsersResp, err mir.Error) {
r.RenderAny(c, data, err)
}
func (r *UnimplementedCoreRender) RenderChangeAvatar(c *gin.Context, err mir.Error) {
r.RenderAny(c, nil, err)
}
func (r *UnimplementedCoreRender) RenderChangeNickname(c *gin.Context, err mir.Error) {
r.RenderAny(c, nil, err)
}
func (r *UnimplementedCoreRender) RenderChangePassword(c *gin.Context, err mir.Error) {
r.RenderAny(c, nil, err)
}
func (r *UnimplementedCoreRender) RenderUserPhoneBind(c *gin.Context, err mir.Error) {
r.RenderAny(c, nil, err)
}
func (r *UnimplementedCoreRender) RenderGetStars(c *gin.Context, data *web.GetStarsResp, err mir.Error) {
r.RenderAny(c, data, err)
}
func (r *UnimplementedCoreRender) RenderGetCollections(c *gin.Context, data *web.GetCollectionsResp, err mir.Error) {
r.RenderAny(c, data, err)
}
func (r *UnimplementedCoreRender) RenderSendUserWhisper(c *gin.Context, err mir.Error) {
r.RenderAny(c, nil, err)
}
func (r *UnimplementedCoreRender) RenderReadMessage(c *gin.Context, err mir.Error) {
r.RenderAny(c, nil, err)
}
func (r *UnimplementedCoreRender) RenderGetMessages(c *gin.Context, data *web.GetMessagesResp, err mir.Error) {
r.RenderAny(c, data, err)
}
func (r *UnimplementedCoreRender) RenderGetUnreadMsgCount(c *gin.Context, data *web.GetUnreadMsgCountResp, err mir.Error) {
r.RenderAny(c, data, err)
}
func (r *UnimplementedCoreRender) RenderGetUserInfo(c *gin.Context, data *web.UserInfoResp, err mir.Error) {
r.RenderAny(c, data, err)
}
func (r *UnimplementedCoreRender) RenderSyncSearchIndex(c *gin.Context, err mir.Error) {
r.RenderAny(c, nil, err)
}
func (r *UnimplementedCoreRender) mustEmbedUnimplementedCoreRender() {}
// UnimplementedCoreBinding can be embedded to have forward compatible implementations.
type UnimplementedCoreBinding struct {
BindAny func(*gin.Context, any) mir.Error
}
func (b *UnimplementedCoreBinding) BindTweetCollectionStatus(c *gin.Context) (*web.TweetCollectionStatusReq, mir.Error) {
obj := new(web.TweetCollectionStatusReq)
err := b.BindAny(c, obj)
return obj, err
}
func (b *UnimplementedCoreBinding) BindTweetStarStatus(c *gin.Context) (*web.TweetStarStatusReq, mir.Error) {
obj := new(web.TweetStarStatusReq)
err := b.BindAny(c, obj)
return obj, err
}
func (b *UnimplementedCoreBinding) BindSuggestTags(c *gin.Context) (*web.SuggestTagsReq, mir.Error) {
obj := new(web.SuggestTagsReq)
err := b.BindAny(c, obj)
return obj, err
}
func (b *UnimplementedCoreBinding) BindSuggestUsers(c *gin.Context) (*web.SuggestUsersReq, mir.Error) {
obj := new(web.SuggestUsersReq)
err := b.BindAny(c, obj)
return obj, err
}
func (b *UnimplementedCoreBinding) BindChangeAvatar(c *gin.Context) (*web.ChangeAvatarReq, mir.Error) {
obj := new(web.ChangeAvatarReq)
err := b.BindAny(c, obj)
return obj, err
}
func (b *UnimplementedCoreBinding) BindChangeNickname(c *gin.Context) (*web.ChangeNicknameReq, mir.Error) {
obj := new(web.ChangeNicknameReq)
err := b.BindAny(c, obj)
return obj, err
}
func (b *UnimplementedCoreBinding) BindChangePassword(c *gin.Context) (*web.ChangePasswordReq, mir.Error) {
obj := new(web.ChangePasswordReq)
err := b.BindAny(c, obj)
return obj, err
}
func (b *UnimplementedCoreBinding) BindUserPhoneBind(c *gin.Context) (*web.UserPhoneBindReq, mir.Error) {
obj := new(web.UserPhoneBindReq)
err := b.BindAny(c, obj)
return obj, err
}
func (b *UnimplementedCoreBinding) BindGetStars(c *gin.Context) (*web.GetStarsReq, mir.Error) {
obj := new(web.GetStarsReq)
err := b.BindAny(c, obj)
return obj, err
}
func (b *UnimplementedCoreBinding) BindGetCollections(c *gin.Context) (*web.GetCollectionsReq, mir.Error) {
obj := new(web.GetCollectionsReq)
err := b.BindAny(c, obj)
return obj, err
}
func (b *UnimplementedCoreBinding) BindSendUserWhisper(c *gin.Context) (*web.SendWhisperReq, mir.Error) {
obj := new(web.SendWhisperReq)
err := b.BindAny(c, obj)
return obj, err
}
func (b *UnimplementedCoreBinding) BindReadMessage(c *gin.Context) (*web.ReadMessageReq, mir.Error) {
obj := new(web.ReadMessageReq)
err := b.BindAny(c, obj)
return obj, err
}
func (b *UnimplementedCoreBinding) BindGetMessages(c *gin.Context) (*web.GetMessagesReq, mir.Error) {
obj := new(web.GetMessagesReq)
err := b.BindAny(c, obj)
return obj, err
}
func (b *UnimplementedCoreBinding) BindGetUnreadMsgCount(c *gin.Context) (*web.GetUnreadMsgCountReq, mir.Error) {
obj := new(web.GetUnreadMsgCountReq)
err := b.BindAny(c, obj)
return obj, err
}
func (b *UnimplementedCoreBinding) BindGetUserInfo(c *gin.Context) (*web.UserInfoReq, mir.Error) {
obj := new(web.UserInfoReq)
err := b.BindAny(c, obj)
return obj, err
}
func (b *UnimplementedCoreBinding) BindSyncSearchIndex(c *gin.Context) (*web.SyncSearchIndexReq, mir.Error) {
obj := new(web.SyncSearchIndexReq)
err := b.BindAny(c, obj)
return obj, err
}
func (b *UnimplementedCoreBinding) mustEmbedUnimplementedCoreBinding() {}

@ -1,18 +1,20 @@
// Code generated by go-mir. DO NOT EDIT. // Code generated by go-mir. DO NOT EDIT.
// versions: // versions:
// - mir v3.2.0 // - mir v4.0.0
package v1 package v1
import ( import (
"net/http" "net/http"
"github.com/alimy/mir/v3" "github.com/alimy/mir/v4"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/rocboss/paopao-ce/internal/model/web" "github.com/rocboss/paopao-ce/internal/model/web"
) )
type Followship interface { type Followship interface {
_default_
// Chain provide handlers chain for gin // Chain provide handlers chain for gin
Chain() gin.HandlersChain Chain() gin.HandlersChain
@ -24,26 +26,8 @@ type Followship interface {
mustEmbedUnimplementedFollowshipServant() mustEmbedUnimplementedFollowshipServant()
} }
type FollowshipBinding interface {
BindListFollowers(*gin.Context) (*web.ListFollowersReq, mir.Error)
BindListFollowings(*gin.Context) (*web.ListFollowingsReq, mir.Error)
BindDeleteFollowing(*gin.Context) (*web.DeleteFollowingReq, mir.Error)
BindAddFollowing(*gin.Context) (*web.AddFollowingReq, mir.Error)
mustEmbedUnimplementedFollowshipBinding()
}
type FollowshipRender interface {
RenderListFollowers(*gin.Context, *web.ListFollowersResp, mir.Error)
RenderListFollowings(*gin.Context, *web.ListFollowingsResp, mir.Error)
RenderDeleteFollowing(*gin.Context, mir.Error)
RenderAddFollowing(*gin.Context, mir.Error)
mustEmbedUnimplementedFollowshipRender()
}
// RegisterFollowshipServant register Followship servant to gin // RegisterFollowshipServant register Followship servant to gin
func RegisterFollowshipServant(e *gin.Engine, s Followship, b FollowshipBinding, r FollowshipRender) { func RegisterFollowshipServant(e *gin.Engine, s Followship) {
router := e.Group("v1") router := e.Group("v1")
// use chain for router // use chain for router
middlewares := s.Chain() middlewares := s.Chain()
@ -57,15 +41,14 @@ func RegisterFollowshipServant(e *gin.Engine, s Followship, b FollowshipBinding,
default: default:
} }
req, err := b.BindListFollowers(c) req := new(web.ListFollowersReq)
if err != nil { if err := s.Bind(c, req); err != nil {
r.RenderListFollowers(c, nil, err) s.Render(c, nil, err)
return return
} }
resp, err := s.ListFollowers(req) resp, err := s.ListFollowers(req)
r.RenderListFollowers(c, resp, err) s.Render(c, resp, err)
}) })
router.Handle("GET", "/following/list", func(c *gin.Context) { router.Handle("GET", "/following/list", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
@ -73,15 +56,14 @@ func RegisterFollowshipServant(e *gin.Engine, s Followship, b FollowshipBinding,
default: default:
} }
req, err := b.BindListFollowings(c) req := new(web.ListFollowingsReq)
if err != nil { if err := s.Bind(c, req); err != nil {
r.RenderListFollowings(c, nil, err) s.Render(c, nil, err)
return return
} }
resp, err := s.ListFollowings(req) resp, err := s.ListFollowings(req)
r.RenderListFollowings(c, resp, err) s.Render(c, resp, err)
}) })
router.Handle("POST", "/following/delete", func(c *gin.Context) { router.Handle("POST", "/following/delete", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
@ -89,14 +71,13 @@ func RegisterFollowshipServant(e *gin.Engine, s Followship, b FollowshipBinding,
default: default:
} }
req, err := b.BindDeleteFollowing(c) req := new(web.DeleteFollowingReq)
if err != nil { if err := s.Bind(c, req); err != nil {
r.RenderDeleteFollowing(c, err) s.Render(c, nil, err)
return return
} }
r.RenderDeleteFollowing(c, s.DeleteFollowing(req)) s.Render(c, nil, s.DeleteFollowing(req))
}) })
router.Handle("POST", "/following/add", func(c *gin.Context) { router.Handle("POST", "/following/add", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
@ -104,19 +85,17 @@ func RegisterFollowshipServant(e *gin.Engine, s Followship, b FollowshipBinding,
default: default:
} }
req, err := b.BindAddFollowing(c) req := new(web.AddFollowingReq)
if err != nil { if err := s.Bind(c, req); err != nil {
r.RenderAddFollowing(c, err) s.Render(c, nil, err)
return return
} }
r.RenderAddFollowing(c, s.AddFollowing(req)) s.Render(c, nil, s.AddFollowing(req))
}) })
} }
// UnimplementedFollowshipServant can be embedded to have forward compatible implementations. // UnimplementedFollowshipServant can be embedded to have forward compatible implementations.
type UnimplementedFollowshipServant struct { type UnimplementedFollowshipServant struct{}
}
func (UnimplementedFollowshipServant) Chain() gin.HandlersChain { func (UnimplementedFollowshipServant) Chain() gin.HandlersChain {
return nil return nil
@ -139,57 +118,3 @@ func (UnimplementedFollowshipServant) AddFollowing(req *web.AddFollowingReq) mir
} }
func (UnimplementedFollowshipServant) mustEmbedUnimplementedFollowshipServant() {} func (UnimplementedFollowshipServant) mustEmbedUnimplementedFollowshipServant() {}
// UnimplementedFollowshipRender can be embedded to have forward compatible implementations.
type UnimplementedFollowshipRender struct {
RenderAny func(*gin.Context, any, mir.Error)
}
func (r *UnimplementedFollowshipRender) RenderListFollowers(c *gin.Context, data *web.ListFollowersResp, err mir.Error) {
r.RenderAny(c, data, err)
}
func (r *UnimplementedFollowshipRender) RenderListFollowings(c *gin.Context, data *web.ListFollowingsResp, err mir.Error) {
r.RenderAny(c, data, err)
}
func (r *UnimplementedFollowshipRender) RenderDeleteFollowing(c *gin.Context, err mir.Error) {
r.RenderAny(c, nil, err)
}
func (r *UnimplementedFollowshipRender) RenderAddFollowing(c *gin.Context, err mir.Error) {
r.RenderAny(c, nil, err)
}
func (r *UnimplementedFollowshipRender) mustEmbedUnimplementedFollowshipRender() {}
// UnimplementedFollowshipBinding can be embedded to have forward compatible implementations.
type UnimplementedFollowshipBinding struct {
BindAny func(*gin.Context, any) mir.Error
}
func (b *UnimplementedFollowshipBinding) BindListFollowers(c *gin.Context) (*web.ListFollowersReq, mir.Error) {
obj := new(web.ListFollowersReq)
err := b.BindAny(c, obj)
return obj, err
}
func (b *UnimplementedFollowshipBinding) BindListFollowings(c *gin.Context) (*web.ListFollowingsReq, mir.Error) {
obj := new(web.ListFollowingsReq)
err := b.BindAny(c, obj)
return obj, err
}
func (b *UnimplementedFollowshipBinding) BindDeleteFollowing(c *gin.Context) (*web.DeleteFollowingReq, mir.Error) {
obj := new(web.DeleteFollowingReq)
err := b.BindAny(c, obj)
return obj, err
}
func (b *UnimplementedFollowshipBinding) BindAddFollowing(c *gin.Context) (*web.AddFollowingReq, mir.Error) {
obj := new(web.AddFollowingReq)
err := b.BindAny(c, obj)
return obj, err
}
func (b *UnimplementedFollowshipBinding) mustEmbedUnimplementedFollowshipBinding() {}

@ -1,18 +1,20 @@
// Code generated by go-mir. DO NOT EDIT. // Code generated by go-mir. DO NOT EDIT.
// versions: // versions:
// - mir v3.2.0 // - mir v4.0.0
package v1 package v1
import ( import (
"net/http" "net/http"
"github.com/alimy/mir/v3" "github.com/alimy/mir/v4"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/rocboss/paopao-ce/internal/model/web" "github.com/rocboss/paopao-ce/internal/model/web"
) )
type Friendship interface { type Friendship interface {
_default_
// Chain provide handlers chain for gin // Chain provide handlers chain for gin
Chain() gin.HandlersChain Chain() gin.HandlersChain
@ -25,28 +27,8 @@ type Friendship interface {
mustEmbedUnimplementedFriendshipServant() mustEmbedUnimplementedFriendshipServant()
} }
type FriendshipBinding interface {
BindGetContacts(*gin.Context) (*web.GetContactsReq, mir.Error)
BindDeleteFriend(*gin.Context) (*web.DeleteFriendReq, mir.Error)
BindRejectFriend(*gin.Context) (*web.RejectFriendReq, mir.Error)
BindAddFriend(*gin.Context) (*web.AddFriendReq, mir.Error)
BindRequestingFriend(*gin.Context) (*web.RequestingFriendReq, mir.Error)
mustEmbedUnimplementedFriendshipBinding()
}
type FriendshipRender interface {
RenderGetContacts(*gin.Context, *web.GetContactsResp, mir.Error)
RenderDeleteFriend(*gin.Context, mir.Error)
RenderRejectFriend(*gin.Context, mir.Error)
RenderAddFriend(*gin.Context, mir.Error)
RenderRequestingFriend(*gin.Context, mir.Error)
mustEmbedUnimplementedFriendshipRender()
}
// RegisterFriendshipServant register Friendship servant to gin // RegisterFriendshipServant register Friendship servant to gin
func RegisterFriendshipServant(e *gin.Engine, s Friendship, b FriendshipBinding, r FriendshipRender) { func RegisterFriendshipServant(e *gin.Engine, s Friendship) {
router := e.Group("v1") router := e.Group("v1")
// use chain for router // use chain for router
middlewares := s.Chain() middlewares := s.Chain()
@ -60,15 +42,14 @@ func RegisterFriendshipServant(e *gin.Engine, s Friendship, b FriendshipBinding,
default: default:
} }
req, err := b.BindGetContacts(c) req := new(web.GetContactsReq)
if err != nil { if err := s.Bind(c, req); err != nil {
r.RenderGetContacts(c, nil, err) s.Render(c, nil, err)
return return
} }
resp, err := s.GetContacts(req) resp, err := s.GetContacts(req)
r.RenderGetContacts(c, resp, err) s.Render(c, resp, err)
}) })
router.Handle("POST", "/friend/delete", func(c *gin.Context) { router.Handle("POST", "/friend/delete", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
@ -76,14 +57,13 @@ func RegisterFriendshipServant(e *gin.Engine, s Friendship, b FriendshipBinding,
default: default:
} }
req, err := b.BindDeleteFriend(c) req := new(web.DeleteFriendReq)
if err != nil { if err := s.Bind(c, req); err != nil {
r.RenderDeleteFriend(c, err) s.Render(c, nil, err)
return return
} }
r.RenderDeleteFriend(c, s.DeleteFriend(req)) s.Render(c, nil, s.DeleteFriend(req))
}) })
router.Handle("POST", "/friend/reject", func(c *gin.Context) { router.Handle("POST", "/friend/reject", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
@ -91,14 +71,13 @@ func RegisterFriendshipServant(e *gin.Engine, s Friendship, b FriendshipBinding,
default: default:
} }
req, err := b.BindRejectFriend(c) req := new(web.RejectFriendReq)
if err != nil { if err := s.Bind(c, req); err != nil {
r.RenderRejectFriend(c, err) s.Render(c, nil, err)
return return
} }
r.RenderRejectFriend(c, s.RejectFriend(req)) s.Render(c, nil, s.RejectFriend(req))
}) })
router.Handle("POST", "/friend/add", func(c *gin.Context) { router.Handle("POST", "/friend/add", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
@ -106,14 +85,13 @@ func RegisterFriendshipServant(e *gin.Engine, s Friendship, b FriendshipBinding,
default: default:
} }
req, err := b.BindAddFriend(c) req := new(web.AddFriendReq)
if err != nil { if err := s.Bind(c, req); err != nil {
r.RenderAddFriend(c, err) s.Render(c, nil, err)
return return
} }
r.RenderAddFriend(c, s.AddFriend(req)) s.Render(c, nil, s.AddFriend(req))
}) })
router.Handle("POST", "/friend/requesting", func(c *gin.Context) { router.Handle("POST", "/friend/requesting", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
@ -121,19 +99,17 @@ func RegisterFriendshipServant(e *gin.Engine, s Friendship, b FriendshipBinding,
default: default:
} }
req, err := b.BindRequestingFriend(c) req := new(web.RequestingFriendReq)
if err != nil { if err := s.Bind(c, req); err != nil {
r.RenderRequestingFriend(c, err) s.Render(c, nil, err)
return return
} }
r.RenderRequestingFriend(c, s.RequestingFriend(req)) s.Render(c, nil, s.RequestingFriend(req))
}) })
} }
// UnimplementedFriendshipServant can be embedded to have forward compatible implementations. // UnimplementedFriendshipServant can be embedded to have forward compatible implementations.
type UnimplementedFriendshipServant struct { type UnimplementedFriendshipServant struct{}
}
func (UnimplementedFriendshipServant) Chain() gin.HandlersChain { func (UnimplementedFriendshipServant) Chain() gin.HandlersChain {
return nil return nil
@ -160,67 +136,3 @@ func (UnimplementedFriendshipServant) RequestingFriend(req *web.RequestingFriend
} }
func (UnimplementedFriendshipServant) mustEmbedUnimplementedFriendshipServant() {} func (UnimplementedFriendshipServant) mustEmbedUnimplementedFriendshipServant() {}
// UnimplementedFriendshipRender can be embedded to have forward compatible implementations.
type UnimplementedFriendshipRender struct {
RenderAny func(*gin.Context, any, mir.Error)
}
func (r *UnimplementedFriendshipRender) RenderGetContacts(c *gin.Context, data *web.GetContactsResp, err mir.Error) {
r.RenderAny(c, data, err)
}
func (r *UnimplementedFriendshipRender) RenderDeleteFriend(c *gin.Context, err mir.Error) {
r.RenderAny(c, nil, err)
}
func (r *UnimplementedFriendshipRender) RenderRejectFriend(c *gin.Context, err mir.Error) {
r.RenderAny(c, nil, err)
}
func (r *UnimplementedFriendshipRender) RenderAddFriend(c *gin.Context, err mir.Error) {
r.RenderAny(c, nil, err)
}
func (r *UnimplementedFriendshipRender) RenderRequestingFriend(c *gin.Context, err mir.Error) {
r.RenderAny(c, nil, err)
}
func (r *UnimplementedFriendshipRender) mustEmbedUnimplementedFriendshipRender() {}
// UnimplementedFriendshipBinding can be embedded to have forward compatible implementations.
type UnimplementedFriendshipBinding struct {
BindAny func(*gin.Context, any) mir.Error
}
func (b *UnimplementedFriendshipBinding) BindGetContacts(c *gin.Context) (*web.GetContactsReq, mir.Error) {
obj := new(web.GetContactsReq)
err := b.BindAny(c, obj)
return obj, err
}
func (b *UnimplementedFriendshipBinding) BindDeleteFriend(c *gin.Context) (*web.DeleteFriendReq, mir.Error) {
obj := new(web.DeleteFriendReq)
err := b.BindAny(c, obj)
return obj, err
}
func (b *UnimplementedFriendshipBinding) BindRejectFriend(c *gin.Context) (*web.RejectFriendReq, mir.Error) {
obj := new(web.RejectFriendReq)
err := b.BindAny(c, obj)
return obj, err
}
func (b *UnimplementedFriendshipBinding) BindAddFriend(c *gin.Context) (*web.AddFriendReq, mir.Error) {
obj := new(web.AddFriendReq)
err := b.BindAny(c, obj)
return obj, err
}
func (b *UnimplementedFriendshipBinding) BindRequestingFriend(c *gin.Context) (*web.RequestingFriendReq, mir.Error) {
obj := new(web.RequestingFriendReq)
err := b.BindAny(c, obj)
return obj, err
}
func (b *UnimplementedFriendshipBinding) mustEmbedUnimplementedFriendshipBinding() {}

@ -1,18 +1,20 @@
// Code generated by go-mir. DO NOT EDIT. // Code generated by go-mir. DO NOT EDIT.
// versions: // versions:
// - mir v3.2.0 // - mir v4.0.0
package v1 package v1
import ( import (
"net/http" "net/http"
"github.com/alimy/mir/v3" "github.com/alimy/mir/v4"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/rocboss/paopao-ce/internal/model/web" "github.com/rocboss/paopao-ce/internal/model/web"
) )
type Loose interface { type Loose interface {
_default_
// Chain provide handlers chain for gin // Chain provide handlers chain for gin
Chain() gin.HandlersChain Chain() gin.HandlersChain
@ -25,28 +27,8 @@ type Loose interface {
mustEmbedUnimplementedLooseServant() mustEmbedUnimplementedLooseServant()
} }
type LooseBinding interface {
BindTweetComments(*gin.Context) (*web.TweetCommentsReq, mir.Error)
BindTopicList(*gin.Context) (*web.TopicListReq, mir.Error)
BindGetUserProfile(*gin.Context) (*web.GetUserProfileReq, mir.Error)
BindGetUserTweets(*gin.Context) (*web.GetUserTweetsReq, mir.Error)
BindTimeline(*gin.Context) (*web.TimelineReq, mir.Error)
mustEmbedUnimplementedLooseBinding()
}
type LooseRender interface {
RenderTweetComments(*gin.Context, *web.TweetCommentsResp, mir.Error)
RenderTopicList(*gin.Context, *web.TopicListResp, mir.Error)
RenderGetUserProfile(*gin.Context, *web.GetUserProfileResp, mir.Error)
RenderGetUserTweets(*gin.Context, *web.GetUserTweetsResp, mir.Error)
RenderTimeline(*gin.Context, *web.TimelineResp, mir.Error)
mustEmbedUnimplementedLooseRender()
}
// RegisterLooseServant register Loose servant to gin // RegisterLooseServant register Loose servant to gin
func RegisterLooseServant(e *gin.Engine, s Loose, b LooseBinding, r LooseRender) { func RegisterLooseServant(e *gin.Engine, s Loose) {
router := e.Group("v1") router := e.Group("v1")
// use chain for router // use chain for router
middlewares := s.Chain() middlewares := s.Chain()
@ -60,15 +42,14 @@ func RegisterLooseServant(e *gin.Engine, s Loose, b LooseBinding, r LooseRender)
default: default:
} }
req, err := b.BindTweetComments(c) req := new(web.TweetCommentsReq)
if err != nil { if err := s.Bind(c, req); err != nil {
r.RenderTweetComments(c, nil, err) s.Render(c, nil, err)
return return
} }
resp, err := s.TweetComments(req) resp, err := s.TweetComments(req)
r.RenderTweetComments(c, resp, err) s.Render(c, resp, err)
}) })
router.Handle("GET", "/tags", func(c *gin.Context) { router.Handle("GET", "/tags", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
@ -76,15 +57,14 @@ func RegisterLooseServant(e *gin.Engine, s Loose, b LooseBinding, r LooseRender)
default: default:
} }
req, err := b.BindTopicList(c) req := new(web.TopicListReq)
if err != nil { if err := s.Bind(c, req); err != nil {
r.RenderTopicList(c, nil, err) s.Render(c, nil, err)
return return
} }
resp, err := s.TopicList(req) resp, err := s.TopicList(req)
r.RenderTopicList(c, resp, err) s.Render(c, resp, err)
}) })
router.Handle("GET", "/user/profile", func(c *gin.Context) { router.Handle("GET", "/user/profile", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
@ -92,15 +72,14 @@ func RegisterLooseServant(e *gin.Engine, s Loose, b LooseBinding, r LooseRender)
default: default:
} }
req, err := b.BindGetUserProfile(c) req := new(web.GetUserProfileReq)
if err != nil { if err := s.Bind(c, req); err != nil {
r.RenderGetUserProfile(c, nil, err) s.Render(c, nil, err)
return return
} }
resp, err := s.GetUserProfile(req) resp, err := s.GetUserProfile(req)
r.RenderGetUserProfile(c, resp, err) s.Render(c, resp, err)
}) })
router.Handle("GET", "/user/posts", func(c *gin.Context) { router.Handle("GET", "/user/posts", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
@ -108,15 +87,14 @@ func RegisterLooseServant(e *gin.Engine, s Loose, b LooseBinding, r LooseRender)
default: default:
} }
req, err := b.BindGetUserTweets(c) req := new(web.GetUserTweetsReq)
if err != nil { if err := s.Bind(c, req); err != nil {
r.RenderGetUserTweets(c, nil, err) s.Render(c, nil, err)
return return
} }
resp, err := s.GetUserTweets(req) resp, err := s.GetUserTweets(req)
r.RenderGetUserTweets(c, resp, err) s.Render(c, resp, err)
}) })
router.Handle("GET", "/posts", func(c *gin.Context) { router.Handle("GET", "/posts", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
@ -124,20 +102,19 @@ func RegisterLooseServant(e *gin.Engine, s Loose, b LooseBinding, r LooseRender)
default: default:
} }
req, err := b.BindTimeline(c) req := new(web.TimelineReq)
if err != nil { var bv _binding_ = req
r.RenderTimeline(c, nil, err) if err := bv.Bind(c); err != nil {
s.Render(c, nil, err)
return return
} }
resp, err := s.Timeline(req) resp, err := s.Timeline(req)
r.RenderTimeline(c, resp, err) s.Render(c, resp, err)
}) })
} }
// UnimplementedLooseServant can be embedded to have forward compatible implementations. // UnimplementedLooseServant can be embedded to have forward compatible implementations.
type UnimplementedLooseServant struct { type UnimplementedLooseServant struct{}
}
func (UnimplementedLooseServant) Chain() gin.HandlersChain { func (UnimplementedLooseServant) Chain() gin.HandlersChain {
return nil return nil
@ -164,67 +141,3 @@ func (UnimplementedLooseServant) Timeline(req *web.TimelineReq) (*web.TimelineRe
} }
func (UnimplementedLooseServant) mustEmbedUnimplementedLooseServant() {} func (UnimplementedLooseServant) mustEmbedUnimplementedLooseServant() {}
// UnimplementedLooseRender can be embedded to have forward compatible implementations.
type UnimplementedLooseRender struct {
RenderAny func(*gin.Context, any, mir.Error)
}
func (r *UnimplementedLooseRender) RenderTweetComments(c *gin.Context, data *web.TweetCommentsResp, err mir.Error) {
r.RenderAny(c, data, err)
}
func (r *UnimplementedLooseRender) RenderTopicList(c *gin.Context, data *web.TopicListResp, err mir.Error) {
r.RenderAny(c, data, err)
}
func (r *UnimplementedLooseRender) RenderGetUserProfile(c *gin.Context, data *web.GetUserProfileResp, err mir.Error) {
r.RenderAny(c, data, err)
}
func (r *UnimplementedLooseRender) RenderGetUserTweets(c *gin.Context, data *web.GetUserTweetsResp, err mir.Error) {
r.RenderAny(c, data, err)
}
func (r *UnimplementedLooseRender) RenderTimeline(c *gin.Context, data *web.TimelineResp, err mir.Error) {
r.RenderAny(c, data, err)
}
func (r *UnimplementedLooseRender) mustEmbedUnimplementedLooseRender() {}
// UnimplementedLooseBinding can be embedded to have forward compatible implementations.
type UnimplementedLooseBinding struct {
BindAny func(*gin.Context, any) mir.Error
}
func (b *UnimplementedLooseBinding) BindTweetComments(c *gin.Context) (*web.TweetCommentsReq, mir.Error) {
obj := new(web.TweetCommentsReq)
err := b.BindAny(c, obj)
return obj, err
}
func (b *UnimplementedLooseBinding) BindTopicList(c *gin.Context) (*web.TopicListReq, mir.Error) {
obj := new(web.TopicListReq)
err := b.BindAny(c, obj)
return obj, err
}
func (b *UnimplementedLooseBinding) BindGetUserProfile(c *gin.Context) (*web.GetUserProfileReq, mir.Error) {
obj := new(web.GetUserProfileReq)
err := b.BindAny(c, obj)
return obj, err
}
func (b *UnimplementedLooseBinding) BindGetUserTweets(c *gin.Context) (*web.GetUserTweetsReq, mir.Error) {
obj := new(web.GetUserTweetsReq)
err := b.BindAny(c, obj)
return obj, err
}
func (b *UnimplementedLooseBinding) BindTimeline(c *gin.Context) (*web.TimelineReq, mir.Error) {
obj := new(web.TimelineReq)
err := b.BindAny(c, obj)
return obj, err
}
func (b *UnimplementedLooseBinding) mustEmbedUnimplementedLooseBinding() {}

@ -1,18 +1,20 @@
// Code generated by go-mir. DO NOT EDIT. // Code generated by go-mir. DO NOT EDIT.
// versions: // versions:
// - mir v3.2.0 // - mir v4.0.0
package v1 package v1
import ( import (
"net/http" "net/http"
"github.com/alimy/mir/v3" "github.com/alimy/mir/v4"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/rocboss/paopao-ce/internal/model/web" "github.com/rocboss/paopao-ce/internal/model/web"
) )
type Priv interface { type Priv interface {
_default_
// Chain provide handlers chain for gin // Chain provide handlers chain for gin
Chain() gin.HandlersChain Chain() gin.HandlersChain
@ -41,60 +43,8 @@ type Priv interface {
mustEmbedUnimplementedPrivServant() mustEmbedUnimplementedPrivServant()
} }
type PrivBinding interface {
BindUnfollowTopic(*gin.Context) (*web.UnfollowTopicReq, mir.Error)
BindFollowTopic(*gin.Context) (*web.FollowTopicReq, mir.Error)
BindStickTopic(*gin.Context) (*web.StickTopicReq, mir.Error)
BindThumbsDownTweetReply(*gin.Context) (*web.TweetReplyThumbsReq, mir.Error)
BindThumbsUpTweetReply(*gin.Context) (*web.TweetReplyThumbsReq, mir.Error)
BindThumbsDownTweetComment(*gin.Context) (*web.TweetCommentThumbsReq, mir.Error)
BindThumbsUpTweetComment(*gin.Context) (*web.TweetCommentThumbsReq, mir.Error)
BindDeleteCommentReply(*gin.Context) (*web.DeleteCommentReplyReq, mir.Error)
BindCreateCommentReply(*gin.Context) (*web.CreateCommentReplyReq, mir.Error)
BindDeleteComment(*gin.Context) (*web.DeleteCommentReq, mir.Error)
BindCreateComment(*gin.Context) (*web.CreateCommentReq, mir.Error)
BindVisibleTweet(*gin.Context) (*web.VisibleTweetReq, mir.Error)
BindStickTweet(*gin.Context) (*web.StickTweetReq, mir.Error)
BindLockTweet(*gin.Context) (*web.LockTweetReq, mir.Error)
BindCollectionTweet(*gin.Context) (*web.CollectionTweetReq, mir.Error)
BindStarTweet(*gin.Context) (*web.StarTweetReq, mir.Error)
BindDeleteTweet(*gin.Context) (*web.DeleteTweetReq, mir.Error)
BindCreateTweet(*gin.Context) (*web.CreateTweetReq, mir.Error)
BindDownloadAttachment(*gin.Context) (*web.DownloadAttachmentReq, mir.Error)
BindDownloadAttachmentPrecheck(*gin.Context) (*web.DownloadAttachmentPrecheckReq, mir.Error)
BindUploadAttachment(*gin.Context) (*web.UploadAttachmentReq, mir.Error)
mustEmbedUnimplementedPrivBinding()
}
type PrivRender interface {
RenderUnfollowTopic(*gin.Context, mir.Error)
RenderFollowTopic(*gin.Context, mir.Error)
RenderStickTopic(*gin.Context, *web.StickTopicResp, mir.Error)
RenderThumbsDownTweetReply(*gin.Context, mir.Error)
RenderThumbsUpTweetReply(*gin.Context, mir.Error)
RenderThumbsDownTweetComment(*gin.Context, mir.Error)
RenderThumbsUpTweetComment(*gin.Context, mir.Error)
RenderDeleteCommentReply(*gin.Context, mir.Error)
RenderCreateCommentReply(*gin.Context, *web.CreateCommentReplyResp, mir.Error)
RenderDeleteComment(*gin.Context, mir.Error)
RenderCreateComment(*gin.Context, *web.CreateCommentResp, mir.Error)
RenderVisibleTweet(*gin.Context, *web.VisibleTweetResp, mir.Error)
RenderStickTweet(*gin.Context, *web.StickTweetResp, mir.Error)
RenderLockTweet(*gin.Context, *web.LockTweetResp, mir.Error)
RenderCollectionTweet(*gin.Context, *web.CollectionTweetResp, mir.Error)
RenderStarTweet(*gin.Context, *web.StarTweetResp, mir.Error)
RenderDeleteTweet(*gin.Context, mir.Error)
RenderCreateTweet(*gin.Context, *web.CreateTweetResp, mir.Error)
RenderDownloadAttachment(*gin.Context, *web.DownloadAttachmentResp, mir.Error)
RenderDownloadAttachmentPrecheck(*gin.Context, *web.DownloadAttachmentPrecheckResp, mir.Error)
RenderUploadAttachment(*gin.Context, *web.UploadAttachmentResp, mir.Error)
mustEmbedUnimplementedPrivRender()
}
// RegisterPrivServant register Priv servant to gin // RegisterPrivServant register Priv servant to gin
func RegisterPrivServant(e *gin.Engine, s Priv, b PrivBinding, r PrivRender) { func RegisterPrivServant(e *gin.Engine, s Priv) {
router := e.Group("v1") router := e.Group("v1")
// use chain for router // use chain for router
middlewares := s.Chain() middlewares := s.Chain()
@ -108,14 +58,13 @@ func RegisterPrivServant(e *gin.Engine, s Priv, b PrivBinding, r PrivRender) {
default: default:
} }
req, err := b.BindUnfollowTopic(c) req := new(web.UnfollowTopicReq)
if err != nil { if err := s.Bind(c, req); err != nil {
r.RenderUnfollowTopic(c, err) s.Render(c, nil, err)
return return
} }
r.RenderUnfollowTopic(c, s.UnfollowTopic(req)) s.Render(c, nil, s.UnfollowTopic(req))
}) })
router.Handle("POST", "/topic/follow", func(c *gin.Context) { router.Handle("POST", "/topic/follow", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
@ -123,14 +72,13 @@ func RegisterPrivServant(e *gin.Engine, s Priv, b PrivBinding, r PrivRender) {
default: default:
} }
req, err := b.BindFollowTopic(c) req := new(web.FollowTopicReq)
if err != nil { if err := s.Bind(c, req); err != nil {
r.RenderFollowTopic(c, err) s.Render(c, nil, err)
return return
} }
r.RenderFollowTopic(c, s.FollowTopic(req)) s.Render(c, nil, s.FollowTopic(req))
}) })
router.Handle("POST", "/topic/stick", func(c *gin.Context) { router.Handle("POST", "/topic/stick", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
@ -138,15 +86,14 @@ func RegisterPrivServant(e *gin.Engine, s Priv, b PrivBinding, r PrivRender) {
default: default:
} }
req, err := b.BindStickTopic(c) req := new(web.StickTopicReq)
if err != nil { if err := s.Bind(c, req); err != nil {
r.RenderStickTopic(c, nil, err) s.Render(c, nil, err)
return return
} }
resp, err := s.StickTopic(req) resp, err := s.StickTopic(req)
r.RenderStickTopic(c, resp, err) s.Render(c, resp, err)
}) })
router.Handle("POST", "/tweet/reply/thumbsdown", func(c *gin.Context) { router.Handle("POST", "/tweet/reply/thumbsdown", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
@ -154,14 +101,13 @@ func RegisterPrivServant(e *gin.Engine, s Priv, b PrivBinding, r PrivRender) {
default: default:
} }
req, err := b.BindThumbsDownTweetReply(c) req := new(web.TweetReplyThumbsReq)
if err != nil { if err := s.Bind(c, req); err != nil {
r.RenderThumbsDownTweetReply(c, err) s.Render(c, nil, err)
return return
} }
r.RenderThumbsDownTweetReply(c, s.ThumbsDownTweetReply(req)) s.Render(c, nil, s.ThumbsDownTweetReply(req))
}) })
router.Handle("POST", "/tweet/reply/thumbsup", func(c *gin.Context) { router.Handle("POST", "/tweet/reply/thumbsup", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
@ -169,14 +115,13 @@ func RegisterPrivServant(e *gin.Engine, s Priv, b PrivBinding, r PrivRender) {
default: default:
} }
req, err := b.BindThumbsUpTweetReply(c) req := new(web.TweetReplyThumbsReq)
if err != nil { if err := s.Bind(c, req); err != nil {
r.RenderThumbsUpTweetReply(c, err) s.Render(c, nil, err)
return return
} }
r.RenderThumbsUpTweetReply(c, s.ThumbsUpTweetReply(req)) s.Render(c, nil, s.ThumbsUpTweetReply(req))
}) })
router.Handle("POST", "/tweet/comment/thumbsdown", func(c *gin.Context) { router.Handle("POST", "/tweet/comment/thumbsdown", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
@ -184,14 +129,13 @@ func RegisterPrivServant(e *gin.Engine, s Priv, b PrivBinding, r PrivRender) {
default: default:
} }
req, err := b.BindThumbsDownTweetComment(c) req := new(web.TweetCommentThumbsReq)
if err != nil { if err := s.Bind(c, req); err != nil {
r.RenderThumbsDownTweetComment(c, err) s.Render(c, nil, err)
return return
} }
r.RenderThumbsDownTweetComment(c, s.ThumbsDownTweetComment(req)) s.Render(c, nil, s.ThumbsDownTweetComment(req))
}) })
router.Handle("POST", "/tweet/comment/thumbsup", func(c *gin.Context) { router.Handle("POST", "/tweet/comment/thumbsup", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
@ -199,14 +143,13 @@ func RegisterPrivServant(e *gin.Engine, s Priv, b PrivBinding, r PrivRender) {
default: default:
} }
req, err := b.BindThumbsUpTweetComment(c) req := new(web.TweetCommentThumbsReq)
if err != nil { if err := s.Bind(c, req); err != nil {
r.RenderThumbsUpTweetComment(c, err) s.Render(c, nil, err)
return return
} }
r.RenderThumbsUpTweetComment(c, s.ThumbsUpTweetComment(req)) s.Render(c, nil, s.ThumbsUpTweetComment(req))
}) })
router.Handle("DELETE", "/post/comment/reply", func(c *gin.Context) { router.Handle("DELETE", "/post/comment/reply", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
@ -214,14 +157,13 @@ func RegisterPrivServant(e *gin.Engine, s Priv, b PrivBinding, r PrivRender) {
default: default:
} }
req, err := b.BindDeleteCommentReply(c) req := new(web.DeleteCommentReplyReq)
if err != nil { if err := s.Bind(c, req); err != nil {
r.RenderDeleteCommentReply(c, err) s.Render(c, nil, err)
return return
} }
r.RenderDeleteCommentReply(c, s.DeleteCommentReply(req)) s.Render(c, nil, s.DeleteCommentReply(req))
}) })
router.Handle("POST", "/post/comment/reply", func(c *gin.Context) { router.Handle("POST", "/post/comment/reply", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
@ -229,15 +171,15 @@ func RegisterPrivServant(e *gin.Engine, s Priv, b PrivBinding, r PrivRender) {
default: default:
} }
req, err := b.BindCreateCommentReply(c) req := new(web.CreateCommentReplyReq)
if err != nil { var bv _binding_ = req
r.RenderCreateCommentReply(c, nil, err) if err := bv.Bind(c); err != nil {
s.Render(c, nil, err)
return return
} }
resp, err := s.CreateCommentReply(req) resp, err := s.CreateCommentReply(req)
r.RenderCreateCommentReply(c, resp, err) s.Render(c, resp, err)
}) })
router.Handle("DELETE", "/post/comment", func(c *gin.Context) { router.Handle("DELETE", "/post/comment", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
@ -245,14 +187,13 @@ func RegisterPrivServant(e *gin.Engine, s Priv, b PrivBinding, r PrivRender) {
default: default:
} }
req, err := b.BindDeleteComment(c) req := new(web.DeleteCommentReq)
if err != nil { if err := s.Bind(c, req); err != nil {
r.RenderDeleteComment(c, err) s.Render(c, nil, err)
return return
} }
r.RenderDeleteComment(c, s.DeleteComment(req)) s.Render(c, nil, s.DeleteComment(req))
}) })
router.Handle("POST", "/post/comment", func(c *gin.Context) { router.Handle("POST", "/post/comment", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
@ -260,15 +201,15 @@ func RegisterPrivServant(e *gin.Engine, s Priv, b PrivBinding, r PrivRender) {
default: default:
} }
req, err := b.BindCreateComment(c) req := new(web.CreateCommentReq)
if err != nil { var bv _binding_ = req
r.RenderCreateComment(c, nil, err) if err := bv.Bind(c); err != nil {
s.Render(c, nil, err)
return return
} }
resp, err := s.CreateComment(req) resp, err := s.CreateComment(req)
r.RenderCreateComment(c, resp, err) s.Render(c, resp, err)
}) })
router.Handle("POST", "/post/visibility", func(c *gin.Context) { router.Handle("POST", "/post/visibility", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
@ -276,15 +217,14 @@ func RegisterPrivServant(e *gin.Engine, s Priv, b PrivBinding, r PrivRender) {
default: default:
} }
req, err := b.BindVisibleTweet(c) req := new(web.VisibleTweetReq)
if err != nil { if err := s.Bind(c, req); err != nil {
r.RenderVisibleTweet(c, nil, err) s.Render(c, nil, err)
return return
} }
resp, err := s.VisibleTweet(req) resp, err := s.VisibleTweet(req)
r.RenderVisibleTweet(c, resp, err) s.Render(c, resp, err)
}) })
router.Handle("POST", "/post/stick", func(c *gin.Context) { router.Handle("POST", "/post/stick", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
@ -292,15 +232,14 @@ func RegisterPrivServant(e *gin.Engine, s Priv, b PrivBinding, r PrivRender) {
default: default:
} }
req, err := b.BindStickTweet(c) req := new(web.StickTweetReq)
if err != nil { if err := s.Bind(c, req); err != nil {
r.RenderStickTweet(c, nil, err) s.Render(c, nil, err)
return return
} }
resp, err := s.StickTweet(req) resp, err := s.StickTweet(req)
r.RenderStickTweet(c, resp, err) s.Render(c, resp, err)
}) })
router.Handle("POST", "/post/lock", func(c *gin.Context) { router.Handle("POST", "/post/lock", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
@ -308,15 +247,14 @@ func RegisterPrivServant(e *gin.Engine, s Priv, b PrivBinding, r PrivRender) {
default: default:
} }
req, err := b.BindLockTweet(c) req := new(web.LockTweetReq)
if err != nil { if err := s.Bind(c, req); err != nil {
r.RenderLockTweet(c, nil, err) s.Render(c, nil, err)
return return
} }
resp, err := s.LockTweet(req) resp, err := s.LockTweet(req)
r.RenderLockTweet(c, resp, err) s.Render(c, resp, err)
}) })
router.Handle("POST", "/post/collection", func(c *gin.Context) { router.Handle("POST", "/post/collection", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
@ -324,15 +262,14 @@ func RegisterPrivServant(e *gin.Engine, s Priv, b PrivBinding, r PrivRender) {
default: default:
} }
req, err := b.BindCollectionTweet(c) req := new(web.CollectionTweetReq)
if err != nil { if err := s.Bind(c, req); err != nil {
r.RenderCollectionTweet(c, nil, err) s.Render(c, nil, err)
return return
} }
resp, err := s.CollectionTweet(req) resp, err := s.CollectionTweet(req)
r.RenderCollectionTweet(c, resp, err) s.Render(c, resp, err)
}) })
router.Handle("POST", "/post/star", func(c *gin.Context) { router.Handle("POST", "/post/star", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
@ -340,15 +277,14 @@ func RegisterPrivServant(e *gin.Engine, s Priv, b PrivBinding, r PrivRender) {
default: default:
} }
req, err := b.BindStarTweet(c) req := new(web.StarTweetReq)
if err != nil { if err := s.Bind(c, req); err != nil {
r.RenderStarTweet(c, nil, err) s.Render(c, nil, err)
return return
} }
resp, err := s.StarTweet(req) resp, err := s.StarTweet(req)
r.RenderStarTweet(c, resp, err) s.Render(c, resp, err)
}) })
router.Handle("DELETE", "/post", func(c *gin.Context) { router.Handle("DELETE", "/post", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
@ -356,14 +292,13 @@ func RegisterPrivServant(e *gin.Engine, s Priv, b PrivBinding, r PrivRender) {
default: default:
} }
req, err := b.BindDeleteTweet(c) req := new(web.DeleteTweetReq)
if err != nil { if err := s.Bind(c, req); err != nil {
r.RenderDeleteTweet(c, err) s.Render(c, nil, err)
return return
} }
r.RenderDeleteTweet(c, s.DeleteTweet(req)) s.Render(c, nil, s.DeleteTweet(req))
}) })
router.Handle("POST", "/post", func(c *gin.Context) { router.Handle("POST", "/post", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
@ -371,15 +306,15 @@ func RegisterPrivServant(e *gin.Engine, s Priv, b PrivBinding, r PrivRender) {
default: default:
} }
req, err := b.BindCreateTweet(c) req := new(web.CreateTweetReq)
if err != nil { var bv _binding_ = req
r.RenderCreateTweet(c, nil, err) if err := bv.Bind(c); err != nil {
s.Render(c, nil, err)
return return
} }
resp, err := s.CreateTweet(req) resp, err := s.CreateTweet(req)
r.RenderCreateTweet(c, resp, err) s.Render(c, resp, err)
}) })
router.Handle("GET", "/attachment", func(c *gin.Context) { router.Handle("GET", "/attachment", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
@ -387,15 +322,15 @@ func RegisterPrivServant(e *gin.Engine, s Priv, b PrivBinding, r PrivRender) {
default: default:
} }
req, err := b.BindDownloadAttachment(c) req := new(web.DownloadAttachmentReq)
if err != nil { var bv _binding_ = req
r.RenderDownloadAttachment(c, nil, err) if err := bv.Bind(c); err != nil {
s.Render(c, nil, err)
return return
} }
resp, err := s.DownloadAttachment(req) resp, err := s.DownloadAttachment(req)
r.RenderDownloadAttachment(c, resp, err) s.Render(c, resp, err)
}) })
router.Handle("GET", "/attachment/precheck", func(c *gin.Context) { router.Handle("GET", "/attachment/precheck", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
@ -403,15 +338,15 @@ func RegisterPrivServant(e *gin.Engine, s Priv, b PrivBinding, r PrivRender) {
default: default:
} }
req, err := b.BindDownloadAttachmentPrecheck(c) req := new(web.DownloadAttachmentPrecheckReq)
if err != nil { var bv _binding_ = req
r.RenderDownloadAttachmentPrecheck(c, nil, err) if err := bv.Bind(c); err != nil {
s.Render(c, nil, err)
return return
} }
resp, err := s.DownloadAttachmentPrecheck(req) resp, err := s.DownloadAttachmentPrecheck(req)
r.RenderDownloadAttachmentPrecheck(c, resp, err) s.Render(c, resp, err)
}) })
router.Handle("POST", "/attachment", func(c *gin.Context) { router.Handle("POST", "/attachment", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
@ -419,20 +354,19 @@ func RegisterPrivServant(e *gin.Engine, s Priv, b PrivBinding, r PrivRender) {
default: default:
} }
req, err := b.BindUploadAttachment(c) req := new(web.UploadAttachmentReq)
if err != nil { var bv _binding_ = req
r.RenderUploadAttachment(c, nil, err) if err := bv.Bind(c); err != nil {
s.Render(c, nil, err)
return return
} }
resp, err := s.UploadAttachment(req) resp, err := s.UploadAttachment(req)
r.RenderUploadAttachment(c, resp, err) s.Render(c, resp, err)
}) })
} }
// UnimplementedPrivServant can be embedded to have forward compatible implementations. // UnimplementedPrivServant can be embedded to have forward compatible implementations.
type UnimplementedPrivServant struct { type UnimplementedPrivServant struct{}
}
func (UnimplementedPrivServant) Chain() gin.HandlersChain { func (UnimplementedPrivServant) Chain() gin.HandlersChain {
return nil return nil
@ -523,227 +457,3 @@ func (UnimplementedPrivServant) UploadAttachment(req *web.UploadAttachmentReq) (
} }
func (UnimplementedPrivServant) mustEmbedUnimplementedPrivServant() {} func (UnimplementedPrivServant) mustEmbedUnimplementedPrivServant() {}
// UnimplementedPrivRender can be embedded to have forward compatible implementations.
type UnimplementedPrivRender struct {
RenderAny func(*gin.Context, any, mir.Error)
}
func (r *UnimplementedPrivRender) RenderUnfollowTopic(c *gin.Context, err mir.Error) {
r.RenderAny(c, nil, err)
}
func (r *UnimplementedPrivRender) RenderFollowTopic(c *gin.Context, err mir.Error) {
r.RenderAny(c, nil, err)
}
func (r *UnimplementedPrivRender) RenderStickTopic(c *gin.Context, data *web.StickTopicResp, err mir.Error) {
r.RenderAny(c, data, err)
}
func (r *UnimplementedPrivRender) RenderThumbsDownTweetReply(c *gin.Context, err mir.Error) {
r.RenderAny(c, nil, err)
}
func (r *UnimplementedPrivRender) RenderThumbsUpTweetReply(c *gin.Context, err mir.Error) {
r.RenderAny(c, nil, err)
}
func (r *UnimplementedPrivRender) RenderThumbsDownTweetComment(c *gin.Context, err mir.Error) {
r.RenderAny(c, nil, err)
}
func (r *UnimplementedPrivRender) RenderThumbsUpTweetComment(c *gin.Context, err mir.Error) {
r.RenderAny(c, nil, err)
}
func (r *UnimplementedPrivRender) RenderDeleteCommentReply(c *gin.Context, err mir.Error) {
r.RenderAny(c, nil, err)
}
func (r *UnimplementedPrivRender) RenderCreateCommentReply(c *gin.Context, data *web.CreateCommentReplyResp, err mir.Error) {
r.RenderAny(c, data, err)
}
func (r *UnimplementedPrivRender) RenderDeleteComment(c *gin.Context, err mir.Error) {
r.RenderAny(c, nil, err)
}
func (r *UnimplementedPrivRender) RenderCreateComment(c *gin.Context, data *web.CreateCommentResp, err mir.Error) {
r.RenderAny(c, data, err)
}
func (r *UnimplementedPrivRender) RenderVisibleTweet(c *gin.Context, data *web.VisibleTweetResp, err mir.Error) {
r.RenderAny(c, data, err)
}
func (r *UnimplementedPrivRender) RenderStickTweet(c *gin.Context, data *web.StickTweetResp, err mir.Error) {
r.RenderAny(c, data, err)
}
func (r *UnimplementedPrivRender) RenderLockTweet(c *gin.Context, data *web.LockTweetResp, err mir.Error) {
r.RenderAny(c, data, err)
}
func (r *UnimplementedPrivRender) RenderCollectionTweet(c *gin.Context, data *web.CollectionTweetResp, err mir.Error) {
r.RenderAny(c, data, err)
}
func (r *UnimplementedPrivRender) RenderStarTweet(c *gin.Context, data *web.StarTweetResp, err mir.Error) {
r.RenderAny(c, data, err)
}
func (r *UnimplementedPrivRender) RenderDeleteTweet(c *gin.Context, err mir.Error) {
r.RenderAny(c, nil, err)
}
func (r *UnimplementedPrivRender) RenderCreateTweet(c *gin.Context, data *web.CreateTweetResp, err mir.Error) {
r.RenderAny(c, data, err)
}
func (r *UnimplementedPrivRender) RenderDownloadAttachment(c *gin.Context, data *web.DownloadAttachmentResp, err mir.Error) {
r.RenderAny(c, data, err)
}
func (r *UnimplementedPrivRender) RenderDownloadAttachmentPrecheck(c *gin.Context, data *web.DownloadAttachmentPrecheckResp, err mir.Error) {
r.RenderAny(c, data, err)
}
func (r *UnimplementedPrivRender) RenderUploadAttachment(c *gin.Context, data *web.UploadAttachmentResp, err mir.Error) {
r.RenderAny(c, data, err)
}
func (r *UnimplementedPrivRender) mustEmbedUnimplementedPrivRender() {}
// UnimplementedPrivBinding can be embedded to have forward compatible implementations.
type UnimplementedPrivBinding struct {
BindAny func(*gin.Context, any) mir.Error
}
func (b *UnimplementedPrivBinding) BindUnfollowTopic(c *gin.Context) (*web.UnfollowTopicReq, mir.Error) {
obj := new(web.UnfollowTopicReq)
err := b.BindAny(c, obj)
return obj, err
}
func (b *UnimplementedPrivBinding) BindFollowTopic(c *gin.Context) (*web.FollowTopicReq, mir.Error) {
obj := new(web.FollowTopicReq)
err := b.BindAny(c, obj)
return obj, err
}
func (b *UnimplementedPrivBinding) BindStickTopic(c *gin.Context) (*web.StickTopicReq, mir.Error) {
obj := new(web.StickTopicReq)
err := b.BindAny(c, obj)
return obj, err
}
func (b *UnimplementedPrivBinding) BindThumbsDownTweetReply(c *gin.Context) (*web.TweetReplyThumbsReq, mir.Error) {
obj := new(web.TweetReplyThumbsReq)
err := b.BindAny(c, obj)
return obj, err
}
func (b *UnimplementedPrivBinding) BindThumbsUpTweetReply(c *gin.Context) (*web.TweetReplyThumbsReq, mir.Error) {
obj := new(web.TweetReplyThumbsReq)
err := b.BindAny(c, obj)
return obj, err
}
func (b *UnimplementedPrivBinding) BindThumbsDownTweetComment(c *gin.Context) (*web.TweetCommentThumbsReq, mir.Error) {
obj := new(web.TweetCommentThumbsReq)
err := b.BindAny(c, obj)
return obj, err
}
func (b *UnimplementedPrivBinding) BindThumbsUpTweetComment(c *gin.Context) (*web.TweetCommentThumbsReq, mir.Error) {
obj := new(web.TweetCommentThumbsReq)
err := b.BindAny(c, obj)
return obj, err
}
func (b *UnimplementedPrivBinding) BindDeleteCommentReply(c *gin.Context) (*web.DeleteCommentReplyReq, mir.Error) {
obj := new(web.DeleteCommentReplyReq)
err := b.BindAny(c, obj)
return obj, err
}
func (b *UnimplementedPrivBinding) BindCreateCommentReply(c *gin.Context) (*web.CreateCommentReplyReq, mir.Error) {
obj := new(web.CreateCommentReplyReq)
err := b.BindAny(c, obj)
return obj, err
}
func (b *UnimplementedPrivBinding) BindDeleteComment(c *gin.Context) (*web.DeleteCommentReq, mir.Error) {
obj := new(web.DeleteCommentReq)
err := b.BindAny(c, obj)
return obj, err
}
func (b *UnimplementedPrivBinding) BindCreateComment(c *gin.Context) (*web.CreateCommentReq, mir.Error) {
obj := new(web.CreateCommentReq)
err := b.BindAny(c, obj)
return obj, err
}
func (b *UnimplementedPrivBinding) BindVisibleTweet(c *gin.Context) (*web.VisibleTweetReq, mir.Error) {
obj := new(web.VisibleTweetReq)
err := b.BindAny(c, obj)
return obj, err
}
func (b *UnimplementedPrivBinding) BindStickTweet(c *gin.Context) (*web.StickTweetReq, mir.Error) {
obj := new(web.StickTweetReq)
err := b.BindAny(c, obj)
return obj, err
}
func (b *UnimplementedPrivBinding) BindLockTweet(c *gin.Context) (*web.LockTweetReq, mir.Error) {
obj := new(web.LockTweetReq)
err := b.BindAny(c, obj)
return obj, err
}
func (b *UnimplementedPrivBinding) BindCollectionTweet(c *gin.Context) (*web.CollectionTweetReq, mir.Error) {
obj := new(web.CollectionTweetReq)
err := b.BindAny(c, obj)
return obj, err
}
func (b *UnimplementedPrivBinding) BindStarTweet(c *gin.Context) (*web.StarTweetReq, mir.Error) {
obj := new(web.StarTweetReq)
err := b.BindAny(c, obj)
return obj, err
}
func (b *UnimplementedPrivBinding) BindDeleteTweet(c *gin.Context) (*web.DeleteTweetReq, mir.Error) {
obj := new(web.DeleteTweetReq)
err := b.BindAny(c, obj)
return obj, err
}
func (b *UnimplementedPrivBinding) BindCreateTweet(c *gin.Context) (*web.CreateTweetReq, mir.Error) {
obj := new(web.CreateTweetReq)
err := b.BindAny(c, obj)
return obj, err
}
func (b *UnimplementedPrivBinding) BindDownloadAttachment(c *gin.Context) (*web.DownloadAttachmentReq, mir.Error) {
obj := new(web.DownloadAttachmentReq)
err := b.BindAny(c, obj)
return obj, err
}
func (b *UnimplementedPrivBinding) BindDownloadAttachmentPrecheck(c *gin.Context) (*web.DownloadAttachmentPrecheckReq, mir.Error) {
obj := new(web.DownloadAttachmentPrecheckReq)
err := b.BindAny(c, obj)
return obj, err
}
func (b *UnimplementedPrivBinding) BindUploadAttachment(c *gin.Context) (*web.UploadAttachmentReq, mir.Error) {
obj := new(web.UploadAttachmentReq)
err := b.BindAny(c, obj)
return obj, err
}
func (b *UnimplementedPrivBinding) mustEmbedUnimplementedPrivBinding() {}

@ -1,18 +1,20 @@
// Code generated by go-mir. DO NOT EDIT. // Code generated by go-mir. DO NOT EDIT.
// versions: // versions:
// - mir v3.2.0 // - mir v4.0.0
package v1 package v1
import ( import (
"net/http" "net/http"
"github.com/alimy/mir/v3" "github.com/alimy/mir/v4"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/rocboss/paopao-ce/internal/model/web" "github.com/rocboss/paopao-ce/internal/model/web"
) )
type Pub interface { type Pub interface {
_default_
TweetDetail(*web.TweetDetailReq) (*web.TweetDetailResp, mir.Error) TweetDetail(*web.TweetDetailReq) (*web.TweetDetailResp, mir.Error)
SendCaptcha(*web.SendCaptchaReq) mir.Error SendCaptcha(*web.SendCaptchaReq) mir.Error
GetCaptcha() (*web.GetCaptchaResp, mir.Error) GetCaptcha() (*web.GetCaptchaResp, mir.Error)
@ -23,28 +25,8 @@ type Pub interface {
mustEmbedUnimplementedPubServant() mustEmbedUnimplementedPubServant()
} }
type PubBinding interface {
BindTweetDetail(*gin.Context) (*web.TweetDetailReq, mir.Error)
BindSendCaptcha(*gin.Context) (*web.SendCaptchaReq, mir.Error)
BindRegister(*gin.Context) (*web.RegisterReq, mir.Error)
BindLogin(*gin.Context) (*web.LoginReq, mir.Error)
mustEmbedUnimplementedPubBinding()
}
type PubRender interface {
RenderTweetDetail(*gin.Context, *web.TweetDetailResp, mir.Error)
RenderSendCaptcha(*gin.Context, mir.Error)
RenderGetCaptcha(*gin.Context, *web.GetCaptchaResp, mir.Error)
RenderRegister(*gin.Context, *web.RegisterResp, mir.Error)
RenderLogin(*gin.Context, *web.LoginResp, mir.Error)
RenderVersion(*gin.Context, *web.VersionResp, mir.Error)
mustEmbedUnimplementedPubRender()
}
// RegisterPubServant register Pub servant to gin // RegisterPubServant register Pub servant to gin
func RegisterPubServant(e *gin.Engine, s Pub, b PubBinding, r PubRender) { func RegisterPubServant(e *gin.Engine, s Pub) {
router := e.Group("v1") router := e.Group("v1")
// register routes info to router // register routes info to router
@ -55,15 +37,14 @@ func RegisterPubServant(e *gin.Engine, s Pub, b PubBinding, r PubRender) {
default: default:
} }
req, err := b.BindTweetDetail(c) req := new(web.TweetDetailReq)
if err != nil { if err := s.Bind(c, req); err != nil {
r.RenderTweetDetail(c, nil, err) s.Render(c, nil, err)
return return
} }
resp, err := s.TweetDetail(req) resp, err := s.TweetDetail(req)
r.RenderTweetDetail(c, resp, err) s.Render(c, resp, err)
}) })
router.Handle("POST", "/captcha", func(c *gin.Context) { router.Handle("POST", "/captcha", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
@ -71,14 +52,13 @@ func RegisterPubServant(e *gin.Engine, s Pub, b PubBinding, r PubRender) {
default: default:
} }
req, err := b.BindSendCaptcha(c) req := new(web.SendCaptchaReq)
if err != nil { if err := s.Bind(c, req); err != nil {
r.RenderSendCaptcha(c, err) s.Render(c, nil, err)
return return
} }
r.RenderSendCaptcha(c, s.SendCaptcha(req)) s.Render(c, nil, s.SendCaptcha(req))
}) })
router.Handle("GET", "/captcha", func(c *gin.Context) { router.Handle("GET", "/captcha", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
@ -87,9 +67,8 @@ func RegisterPubServant(e *gin.Engine, s Pub, b PubBinding, r PubRender) {
} }
resp, err := s.GetCaptcha() resp, err := s.GetCaptcha()
r.RenderGetCaptcha(c, resp, err) s.Render(c, resp, err)
}) })
router.Handle("POST", "/auth/register", func(c *gin.Context) { router.Handle("POST", "/auth/register", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
@ -97,15 +76,14 @@ func RegisterPubServant(e *gin.Engine, s Pub, b PubBinding, r PubRender) {
default: default:
} }
req, err := b.BindRegister(c) req := new(web.RegisterReq)
if err != nil { if err := s.Bind(c, req); err != nil {
r.RenderRegister(c, nil, err) s.Render(c, nil, err)
return return
} }
resp, err := s.Register(req) resp, err := s.Register(req)
r.RenderRegister(c, resp, err) s.Render(c, resp, err)
}) })
router.Handle("POST", "/auth/login", func(c *gin.Context) { router.Handle("POST", "/auth/login", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
@ -113,15 +91,14 @@ func RegisterPubServant(e *gin.Engine, s Pub, b PubBinding, r PubRender) {
default: default:
} }
req, err := b.BindLogin(c) req := new(web.LoginReq)
if err != nil { if err := s.Bind(c, req); err != nil {
r.RenderLogin(c, nil, err) s.Render(c, nil, err)
return return
} }
resp, err := s.Login(req) resp, err := s.Login(req)
r.RenderLogin(c, resp, err) s.Render(c, resp, err)
}) })
router.Handle("GET", "/", func(c *gin.Context) { router.Handle("GET", "/", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
@ -130,14 +107,12 @@ func RegisterPubServant(e *gin.Engine, s Pub, b PubBinding, r PubRender) {
} }
resp, err := s.Version() resp, err := s.Version()
r.RenderVersion(c, resp, err) s.Render(c, resp, err)
}) })
} }
// UnimplementedPubServant can be embedded to have forward compatible implementations. // UnimplementedPubServant can be embedded to have forward compatible implementations.
type UnimplementedPubServant struct { type UnimplementedPubServant struct{}
}
func (UnimplementedPubServant) TweetDetail(req *web.TweetDetailReq) (*web.TweetDetailResp, mir.Error) { func (UnimplementedPubServant) TweetDetail(req *web.TweetDetailReq) (*web.TweetDetailResp, mir.Error) {
return nil, mir.Errorln(http.StatusNotImplemented, http.StatusText(http.StatusNotImplemented)) return nil, mir.Errorln(http.StatusNotImplemented, http.StatusText(http.StatusNotImplemented))
@ -164,65 +139,3 @@ func (UnimplementedPubServant) Version() (*web.VersionResp, mir.Error) {
} }
func (UnimplementedPubServant) mustEmbedUnimplementedPubServant() {} func (UnimplementedPubServant) mustEmbedUnimplementedPubServant() {}
// UnimplementedPubRender can be embedded to have forward compatible implementations.
type UnimplementedPubRender struct {
RenderAny func(*gin.Context, any, mir.Error)
}
func (r *UnimplementedPubRender) RenderTweetDetail(c *gin.Context, data *web.TweetDetailResp, err mir.Error) {
r.RenderAny(c, data, err)
}
func (r *UnimplementedPubRender) RenderSendCaptcha(c *gin.Context, err mir.Error) {
r.RenderAny(c, nil, err)
}
func (r *UnimplementedPubRender) RenderGetCaptcha(c *gin.Context, data *web.GetCaptchaResp, err mir.Error) {
r.RenderAny(c, data, err)
}
func (r *UnimplementedPubRender) RenderRegister(c *gin.Context, data *web.RegisterResp, err mir.Error) {
r.RenderAny(c, data, err)
}
func (r *UnimplementedPubRender) RenderLogin(c *gin.Context, data *web.LoginResp, err mir.Error) {
r.RenderAny(c, data, err)
}
func (r *UnimplementedPubRender) RenderVersion(c *gin.Context, data *web.VersionResp, err mir.Error) {
r.RenderAny(c, data, err)
}
func (r *UnimplementedPubRender) mustEmbedUnimplementedPubRender() {}
// UnimplementedPubBinding can be embedded to have forward compatible implementations.
type UnimplementedPubBinding struct {
BindAny func(*gin.Context, any) mir.Error
}
func (b *UnimplementedPubBinding) BindTweetDetail(c *gin.Context) (*web.TweetDetailReq, mir.Error) {
obj := new(web.TweetDetailReq)
err := b.BindAny(c, obj)
return obj, err
}
func (b *UnimplementedPubBinding) BindSendCaptcha(c *gin.Context) (*web.SendCaptchaReq, mir.Error) {
obj := new(web.SendCaptchaReq)
err := b.BindAny(c, obj)
return obj, err
}
func (b *UnimplementedPubBinding) BindRegister(c *gin.Context) (*web.RegisterReq, mir.Error) {
obj := new(web.RegisterReq)
err := b.BindAny(c, obj)
return obj, err
}
func (b *UnimplementedPubBinding) BindLogin(c *gin.Context) (*web.LoginReq, mir.Error) {
obj := new(web.LoginReq)
err := b.BindAny(c, obj)
return obj, err
}
func (b *UnimplementedPubBinding) mustEmbedUnimplementedPubBinding() {}

@ -1,16 +1,29 @@
// Code generated by go-mir. DO NOT EDIT. // Code generated by go-mir. DO NOT EDIT.
// versions: // versions:
// - mir v3.2.0 // - mir v4.0.0
package v1 package v1
import ( import (
"net/http" "net/http"
"github.com/alimy/mir/v3" "github.com/alimy/mir/v4"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
) )
type _binding_ interface {
Bind(*gin.Context) mir.Error
}
type _render_ interface {
Render(*gin.Context)
}
type _default_ interface {
Bind(*gin.Context, any) mir.Error
Render(*gin.Context, any, mir.Error)
}
type LoginReq struct { type LoginReq struct {
AgentInfo AgentInfo `json:"agent_info"` AgentInfo AgentInfo `json:"agent_info"`
Name string `json:"name"` Name string `json:"name"`
@ -37,6 +50,8 @@ type UserInfo struct {
} }
type User interface { type User interface {
_default_
// Chain provide handlers chain for gin // Chain provide handlers chain for gin
Chain() gin.HandlersChain Chain() gin.HandlersChain
@ -46,21 +61,8 @@ type User interface {
mustEmbedUnimplementedUserServant() mustEmbedUnimplementedUserServant()
} }
type UserBinding interface {
BindLogin(*gin.Context) (*LoginReq, mir.Error)
mustEmbedUnimplementedUserBinding()
}
type UserRender interface {
RenderLogout(*gin.Context, mir.Error)
RenderLogin(*gin.Context, *LoginResp, mir.Error)
mustEmbedUnimplementedUserRender()
}
// RegisterUserServant register User servant to gin // RegisterUserServant register User servant to gin
func RegisterUserServant(e *gin.Engine, s User, b UserBinding, r UserRender) { func RegisterUserServant(e *gin.Engine, s User) {
router := e.Group("x/v1") router := e.Group("x/v1")
// use chain for router // use chain for router
middlewares := s.Chain() middlewares := s.Chain()
@ -74,9 +76,8 @@ func RegisterUserServant(e *gin.Engine, s User, b UserBinding, r UserRender) {
default: default:
} }
r.RenderLogout(c, s.Logout()) s.Render(c, nil, s.Logout())
}) })
router.Handle("POST", "/user/login/", func(c *gin.Context) { router.Handle("POST", "/user/login/", func(c *gin.Context) {
select { select {
case <-c.Request.Context().Done(): case <-c.Request.Context().Done():
@ -84,20 +85,18 @@ func RegisterUserServant(e *gin.Engine, s User, b UserBinding, r UserRender) {
default: default:
} }
req, err := b.BindLogin(c) req := new(LoginReq)
if err != nil { if err := s.Bind(c, req); err != nil {
r.RenderLogin(c, nil, err) s.Render(c, nil, err)
return return
} }
resp, err := s.Login(req) resp, err := s.Login(req)
r.RenderLogin(c, resp, err) s.Render(c, resp, err)
}) })
} }
// UnimplementedUserServant can be embedded to have forward compatible implementations. // UnimplementedUserServant can be embedded to have forward compatible implementations.
type UnimplementedUserServant struct { type UnimplementedUserServant struct{}
}
func (UnimplementedUserServant) Chain() gin.HandlersChain { func (UnimplementedUserServant) Chain() gin.HandlersChain {
return nil return nil
@ -112,31 +111,3 @@ func (UnimplementedUserServant) Login(req *LoginReq) (*LoginResp, mir.Error) {
} }
func (UnimplementedUserServant) mustEmbedUnimplementedUserServant() {} func (UnimplementedUserServant) mustEmbedUnimplementedUserServant() {}
// UnimplementedUserRender can be embedded to have forward compatible implementations.
type UnimplementedUserRender struct {
RenderAny func(*gin.Context, any, mir.Error)
}
func (r *UnimplementedUserRender) RenderLogout(c *gin.Context, err mir.Error) {
r.RenderAny(c, nil, err)
}
func (r *UnimplementedUserRender) RenderLogin(c *gin.Context, data *LoginResp, err mir.Error) {
r.RenderAny(c, data, err)
}
func (r *UnimplementedUserRender) mustEmbedUnimplementedUserRender() {}
// UnimplementedUserBinding can be embedded to have forward compatible implementations.
type UnimplementedUserBinding struct {
BindAny func(*gin.Context, any) mir.Error
}
func (b *UnimplementedUserBinding) BindLogin(c *gin.Context) (*LoginReq, mir.Error) {
obj := new(LoginReq)
err := b.BindAny(c, obj)
return obj, err
}
func (b *UnimplementedUserBinding) mustEmbedUnimplementedUserBinding() {}

@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions: // versions:
// protoc-gen-go v1.30.0 // protoc-gen-go v1.31.0
// protoc (unknown) // protoc (unknown)
// source: v1/auth.proto // source: v1/auth.proto

Binary file not shown.

@ -67,7 +67,7 @@ services:
- paopao-network - paopao-network
# meili: # meili:
# image: getmeili/meilisearch:v1.1 # image: getmeili/meilisearch:v1.2
# restart: always # restart: always
# ports: # ports:
# - 7700:7700 # - 7700:7700

@ -0,0 +1,67 @@
| 编号 | 作者 | 发表时间 | 变更时间 | 版本 | 状态 |
| ----- | ----- | ----- | ----- | ----- | ----- |
| 23062905| 北野 | 2023-06-29 | 2023-06-29 | v1.0 | 提议 |
### 概述
使用net/http/pprof获取Profile信息。添加`Pprof`功能特性用于开启PprofServer服务。
### 需求
- 只在开发环境下获取profile信息
- 可以在配置文件中开启获取profile的服务
### 方案
- 添加`Pprof`功能特性
- 添加`PprofServer`服务
#### 设计细节
- 配置文件中添加`PprofServer`项用于配制http server
- 添加`Pprof`功能特性
- 添加`PprofServer`服务
- 使用`//go:build pprof`按需编译profile功能
- `PprofServer` 不能和其他服务共用一个端口
### 疑问
1. 为什么要添加`pprof`功能特性?
使用 net/http/pprof 在线获取CPU profile信息用于 [PGO](https://go.dev/doc/pgo) 编译优化。
2. 如何开启`Pprof`服务?
* 构建时将 `pprof` 添加到TAGS中:
```sh
make run TAGS='pprof'
```
* 在配置文件config.yaml中的`Features`中添加`Pprof`功能项开启该功能:
```yaml
...
# features中加上 Friendship
Features:
Default: ["Meili", "LoggerMeili", "Base", "Sqlite3", "BigCacheIndex", "MinIO", "Pprof"]
Base: ["Redis", "PhoneBind"]
...
```
3. 常见命令
#### Merging profiles
The pprof tool can merge multiple profiles like this:
```sh
$ go tool pprof -proto a.pprof b.pprof > merged.pprof
```
This merge is effectively a straightforward sum of samples in the input, regardless of wall duration of the profile. As a result, when profiling a small time slice of an application (e.g., a server that runs indefinitely), you likely want to ensure that all profiles have the same wall duration (i.e., all profiles are collected for 30s). Otherwise, profiles with longer wall duration will be overrepresented in the merged profile.
#### look at a 30-second CPU profile:
```sh
go tool pprof http://localhost:6060/debug/pprof/profile?seconds=30
```
### 参考文档
* [PGO](https://go.dev/doc/pgo)
* [net/http/pprof](https://pkg.go.dev/net/http/pprof)
* [runtime/pprof](https://pkg.go.dev/runtime/pprof)
### 参考实现
- [#327](https://github.com/rocboss/paopao-ce/pull/327)
### 更新记录
#### v1.0(2023-06-20) - 北野
* 初始文档

@ -0,0 +1,38 @@
| 编号 | 作者 | 发表时间 | 变更时间 | 版本 | 状态 |
| ----- | ----- | ----- | ----- | ----- | ----- |
| 23062906| 北野 | 2023-06-29 | 2023-06-29 | v1.0 | 提议 |
### 概述
Beginning in Go 1.20, the Go compiler supports profile-guided optimization ([PGO](https://go.dev/doc/pgo)) to further optimize builds.
### 疑问
1. 为什么要添加`pprof`功能特性?
使用 net/http/pprof 在线获取CPU profile信息用于 [PGO](https://go.dev/doc/pgo) 编译优化。
2. 如何开启`pgo`编译优化?
The standard approach is to store a pprof CPU profile with filename default.pgo in the main package directory of the profiled binary, and build with go build -pgo=auto, which will pick up default.pgo files automatically.
3. 常见命令
#### Merging profiles
The pprof tool can merge multiple profiles like this:
```sh
$ go tool pprof -proto a.pprof b.pprof > default.pgo
```
This merge is effectively a straightforward sum of samples in the input, regardless of wall duration of the profile. As a result, when profiling a small time slice of an application (e.g., a server that runs indefinitely), you likely want to ensure that all profiles have the same wall duration (i.e., all profiles are collected for 30s). Otherwise, profiles with longer wall duration will be overrepresented in the merged profile.
#### look at a 30-second CPU profile:
```sh
go tool pprof http://localhost:6060/debug/pprof/profile?seconds=30
```
### 参考文档
* [PGO](https://go.dev/doc/pgo)
* [net/http/pprof](https://pkg.go.dev/net/http/pprof)
* [runtime/pprof](https://pkg.go.dev/runtime/pprof)
### 更新记录
#### v1.0(2023-06-20) - 北野
* 初始文档

@ -146,15 +146,15 @@
#### 关系模式: #### 关系模式:
* `Friendship` 弱关系好友模式,类似微信朋友圈(目前状态: 内测); * `Friendship` 弱关系好友模式,类似微信朋友圈(目前状态: 内测);
* [x] [提按文档](docs/proposal/002-关于Friendship功能项的设计.md) * [x] [提按文档](docs/proposal/22110410-关于Friendship功能项的设计.md)
* [x] 接口定义 * [x] 接口定义
* [x] 业务逻辑实现 * [x] 业务逻辑实现
* `Followship` 关注者模式类似Twitter的Follow模式(目前状态: WIP); * `Followship` 关注者模式类似Twitter的Follow模式(目前状态: WIP);
* [ ] [提按文档](docs/proposal/003-关于Followship功能项的设计.md) * [ ] [提按文档](docs/proposal/22110409-关于Followship功能项的设计.md)
* [ ] 接口定义 * [ ] 接口定义
* [ ] 业务逻辑实现 * [ ] 业务逻辑实现
* `Lightship` 开放模式,所有推文都公开可见(目前状态: 内测、默认); * `Lightship` 开放模式,所有推文都公开可见(目前状态: 内测、默认);
* [x] [提按文档](docs/proposal/011-关于Lightship功能项的设计.md) * [x] [提按文档](docs/proposal/22121409-关于Lightship功能项的设计.md)
* [x] 接口定义 * [x] 接口定义
* [x] 业务逻辑实现 * [x] 业务逻辑实现
@ -181,7 +181,10 @@
* [x] 业务逻辑实现 * [x] 业务逻辑实现
### 性能优化 ### 性能优化
* [`Pyroscope`](docs/proposal/016-关于使用pyroscope用于性能调试的设计.md) 开启Pyroscope功能用于性能调试(目前状态: 内测); * [`Pyroscope`](docs/proposal/23021510-关于使用pyroscope用于性能调试的设计.md) 开启Pyroscope功能用于性能调试(目前状态: 内测);
* [x] 提按文档
* [x] 业务逻辑实现
* [`Pprof`](docs/proposal/23062905-添加Pprof功能特性用于获取Profile.md) 开启Pprof功能收集Profile信息(目前状态: 内测);
* [x] 提按文档 * [x] 提按文档
* [x] 业务逻辑实现 * [x] 业务逻辑实现

@ -6,55 +6,56 @@ require (
github.com/Masterminds/semver/v3 v3.2.1 github.com/Masterminds/semver/v3 v3.2.1
github.com/afocus/captcha v0.0.0-20191010092841-4bd1f21c8868 github.com/afocus/captcha v0.0.0-20191010092841-4bd1f21c8868
github.com/alimy/cfg v0.3.0 github.com/alimy/cfg v0.3.0
github.com/alimy/mir/v3 v3.2.1 github.com/alimy/mir/engine/gin/v4 v4.0.0
github.com/alimy/mir/v4 v4.0.0-alpha.4
github.com/aliyun/aliyun-oss-go-sdk v2.2.7+incompatible github.com/aliyun/aliyun-oss-go-sdk v2.2.7+incompatible
github.com/allegro/bigcache/v3 v3.0.2 github.com/allegro/bigcache/v3 v3.1.0
github.com/bytedance/sonic v1.9.1 github.com/bytedance/sonic v1.9.1
github.com/cockroachdb/errors v1.9.1 github.com/cockroachdb/errors v1.10.0
github.com/disintegration/imaging v1.6.2 github.com/disintegration/imaging v1.6.2
github.com/fatih/color v1.15.0 github.com/fatih/color v1.15.0
github.com/getsentry/sentry-go v0.21.0 github.com/getsentry/sentry-go v0.22.0
github.com/gin-contrib/cors v1.4.0 github.com/gin-contrib/cors v1.4.0
github.com/gin-gonic/gin v1.9.1 github.com/gin-gonic/gin v1.9.1
github.com/go-resty/resty/v2 v2.7.0 github.com/go-resty/resty/v2 v2.7.0
github.com/goccy/go-json v0.10.2 github.com/goccy/go-json v0.10.2
github.com/gofrs/uuid v4.4.0+incompatible github.com/gofrs/uuid/v5 v5.0.0
github.com/golang-jwt/jwt/v4 v4.5.0 github.com/golang-jwt/jwt/v4 v4.5.0
github.com/golang-migrate/migrate/v4 v4.15.2 github.com/golang-migrate/migrate/v4 v4.15.2
github.com/huaweicloud/huaweicloud-sdk-go-obs v3.23.4+incompatible github.com/huaweicloud/huaweicloud-sdk-go-obs v3.23.4+incompatible
github.com/json-iterator/go v1.1.12 github.com/json-iterator/go v1.1.12
github.com/meilisearch/meilisearch-go v0.24.0 github.com/meilisearch/meilisearch-go v0.25.0
github.com/minio/minio-go/v7 v7.0.53 github.com/minio/minio-go/v7 v7.0.59
github.com/onsi/ginkgo/v2 v2.11.0 github.com/onsi/ginkgo/v2 v2.11.0
github.com/onsi/gomega v1.27.8 github.com/onsi/gomega v1.27.8
github.com/pyroscope-io/client v0.7.1 github.com/pyroscope-io/client v0.7.1
github.com/redis/rueidis v1.0.5 github.com/redis/rueidis v1.0.10
github.com/sirupsen/logrus v1.9.2 github.com/sirupsen/logrus v1.9.3
github.com/smartwalle/alipay/v3 v3.2.3 github.com/smartwalle/alipay/v3 v3.2.14
github.com/sourcegraph/conc v0.3.0 github.com/sourcegraph/conc v0.3.0
github.com/spf13/viper v1.15.0 github.com/spf13/viper v1.16.0
github.com/tencentyun/cos-go-sdk-v5 v0.7.41 github.com/tencentyun/cos-go-sdk-v5 v0.7.41
github.com/yinheli/mahonia v0.0.0-20131226213531-0eef680515cc github.com/yinheli/mahonia v0.0.0-20131226213531-0eef680515cc
go.uber.org/automaxprocs v1.5.2 go.uber.org/automaxprocs v1.5.2
google.golang.org/grpc v1.55.0 google.golang.org/grpc v1.56.1
google.golang.org/protobuf v1.30.0 google.golang.org/protobuf v1.31.0
gopkg.in/natefinch/lumberjack.v2 v2.2.1 gopkg.in/natefinch/lumberjack.v2 v2.2.1
gopkg.in/resty.v1 v1.12.0 gopkg.in/resty.v1 v1.12.0
gorm.io/driver/mysql v1.5.1 gorm.io/driver/mysql v1.5.1
gorm.io/driver/postgres v1.5.2 gorm.io/driver/postgres v1.5.2
gorm.io/driver/sqlite v1.4.4 gorm.io/driver/sqlite v1.5.2
gorm.io/gorm v1.25.1 gorm.io/gorm v1.25.2
gorm.io/plugin/dbresolver v1.4.1 gorm.io/plugin/dbresolver v1.4.1
gorm.io/plugin/soft_delete v1.2.1 gorm.io/plugin/soft_delete v1.2.1
modernc.org/sqlite v1.22.1 modernc.org/sqlite v1.23.1
) )
require ( require (
github.com/andybalholm/brotli v1.0.5 // indirect github.com/andybalholm/brotli v1.0.5 // indirect
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect
github.com/clbanning/mxj v1.8.4 // indirect github.com/clbanning/mxj v1.8.4 // indirect
github.com/cockroachdb/logtags v0.0.0-20211118104740-dabe8e521a4f // indirect github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect
github.com/cockroachdb/redact v1.1.3 // indirect github.com/cockroachdb/redact v1.1.5 // indirect
github.com/dustin/go-humanize v1.0.1 // indirect github.com/dustin/go-humanize v1.0.1 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/gabriel-vasile/mimetype v1.4.2 // indirect github.com/gabriel-vasile/mimetype v1.4.2 // indirect
@ -82,7 +83,7 @@ require (
github.com/jinzhu/now v1.1.5 // indirect github.com/jinzhu/now v1.1.5 // indirect
github.com/josharian/intern v1.0.0 // indirect github.com/josharian/intern v1.0.0 // indirect
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
github.com/klauspost/compress v1.16.0 // indirect github.com/klauspost/compress v1.16.5 // indirect
github.com/klauspost/cpuid/v2 v2.2.4 // indirect github.com/klauspost/cpuid/v2 v2.2.4 // indirect
github.com/kr/pretty v0.3.1 // indirect github.com/kr/pretty v0.3.1 // indirect
github.com/kr/text v0.2.0 // indirect github.com/kr/text v0.2.0 // indirect
@ -92,9 +93,9 @@ require (
github.com/mailru/easyjson v0.7.7 // indirect github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.19 // indirect github.com/mattn/go-isatty v0.0.19 // indirect
github.com/mattn/go-sqlite3 v1.14.16 // indirect github.com/mattn/go-sqlite3 v1.14.17 // indirect
github.com/minio/md5-simd v1.1.2 // indirect github.com/minio/md5-simd v1.1.2 // indirect
github.com/minio/sha256-simd v1.0.0 // indirect github.com/minio/sha256-simd v1.0.1 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect github.com/modern-go/reflect2 v1.0.2 // indirect
@ -104,10 +105,12 @@ require (
github.com/pyroscope-io/godeltaprof v0.1.0 // indirect github.com/pyroscope-io/godeltaprof v0.1.0 // indirect
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
github.com/rogpeppe/go-internal v1.9.0 // indirect github.com/rogpeppe/go-internal v1.9.0 // indirect
github.com/rs/xid v1.4.0 // indirect github.com/rs/xid v1.5.0 // indirect
github.com/smartwalle/ncrypto v1.0.0 // indirect github.com/smartwalle/ncrypto v1.0.2 // indirect
github.com/spf13/afero v1.9.3 // indirect github.com/smartwalle/ngx v1.0.6 // indirect
github.com/spf13/cast v1.5.0 // indirect github.com/smartwalle/nsign v1.0.8 // indirect
github.com/spf13/afero v1.9.5 // indirect
github.com/spf13/cast v1.5.1 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect github.com/spf13/pflag v1.0.5 // indirect
github.com/subosito/gotenv v1.4.2 // indirect github.com/subosito/gotenv v1.4.2 // indirect
@ -125,7 +128,7 @@ require (
golang.org/x/text v0.9.0 // indirect golang.org/x/text v0.9.0 // indirect
golang.org/x/time v0.3.0 // indirect golang.org/x/time v0.3.0 // indirect
golang.org/x/tools v0.9.3 // indirect golang.org/x/tools v0.9.3 // indirect
google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4 // indirect google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect
lukechampine.com/uint128 v1.2.0 // indirect lukechampine.com/uint128 v1.2.0 // indirect

218
go.sum

@ -54,7 +54,6 @@ cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3f
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
gioui.org v0.0.0-20210308172011-57750fc8a0a6/go.mod h1:RSH6KIUZ0p2xy5zHDxgAM4zumjgTw83q2ge/PI+yyw8= gioui.org v0.0.0-20210308172011-57750fc8a0a6/go.mod h1:RSH6KIUZ0p2xy5zHDxgAM4zumjgTw83q2ge/PI+yyw8=
github.com/AdaLogics/go-fuzz-headers v0.0.0-20210715213245-6c3934b029d8/go.mod h1:CzsSbkDixRphAF5hS6wbMKq0eI6ccJRb7/A0M6JBnwg= github.com/AdaLogics/go-fuzz-headers v0.0.0-20210715213245-6c3934b029d8/go.mod h1:CzsSbkDixRphAF5hS6wbMKq0eI6ccJRb7/A0M6JBnwg=
github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8=
github.com/Azure/azure-pipeline-go v0.2.3/go.mod h1:x841ezTBIMG6O3lAcl8ATHnsOPVl2bqk7S3ta6S6u4k= github.com/Azure/azure-pipeline-go v0.2.3/go.mod h1:x841ezTBIMG6O3lAcl8ATHnsOPVl2bqk7S3ta6S6u4k=
github.com/Azure/azure-sdk-for-go v16.2.1+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/azure-sdk-for-go v16.2.1+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
github.com/Azure/azure-storage-blob-go v0.14.0/go.mod h1:SMqIBi+SuiQH32bvyjngEewEeXoPfKMgWlBDaYf6fck= github.com/Azure/azure-storage-blob-go v0.14.0/go.mod h1:SMqIBi+SuiQH32bvyjngEewEeXoPfKMgWlBDaYf6fck=
@ -79,9 +78,6 @@ github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBp
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/ClickHouse/clickhouse-go v1.4.3/go.mod h1:EaI/sW7Azgz9UATzd5ZdZHRUhHgv5+JMS9NSr2smCJI= github.com/ClickHouse/clickhouse-go v1.4.3/go.mod h1:EaI/sW7Azgz9UATzd5ZdZHRUhHgv5+JMS9NSr2smCJI=
github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno=
github.com/CloudyKit/jet/v3 v3.0.0/go.mod h1:HKQPgSJmdK8hdoAbKUUWajkHyHo4RaU5rMdUywE7VMo=
github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY=
github.com/Masterminds/semver/v3 v3.2.1 h1:RN9w6+7QoMeJVGyfmbcgs28Br8cvmnucEXnY0rYXWg0= github.com/Masterminds/semver/v3 v3.2.1 h1:RN9w6+7QoMeJVGyfmbcgs28Br8cvmnucEXnY0rYXWg0=
github.com/Masterminds/semver/v3 v3.2.1/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= github.com/Masterminds/semver/v3 v3.2.1/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ=
github.com/Microsoft/go-winio v0.4.11/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA= github.com/Microsoft/go-winio v0.4.11/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA=
@ -116,11 +112,9 @@ github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbt
github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE=
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE=
github.com/QcloudApi/qcloud_sign_golang v0.0.0-20141224014652-e4130a326409/go.mod h1:1pk82RBxDY/JZnPQrtqHlUFfCctgdorsd9M06fMynOM= github.com/QcloudApi/qcloud_sign_golang v0.0.0-20141224014652-e4130a326409/go.mod h1:1pk82RBxDY/JZnPQrtqHlUFfCctgdorsd9M06fMynOM=
github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0=
github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d/go.mod h1:HI8ITrYtUY+O+ZhtlqUnD8+KwNPOyugEhfP9fdUIaEQ= github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d/go.mod h1:HI8ITrYtUY+O+ZhtlqUnD8+KwNPOyugEhfP9fdUIaEQ=
github.com/afocus/captcha v0.0.0-20191010092841-4bd1f21c8868 h1:uFrPOl1VBt/Abfl2z+A/DFc+AwmFLxEHR1+Yq6cXvww= github.com/afocus/captcha v0.0.0-20191010092841-4bd1f21c8868 h1:uFrPOl1VBt/Abfl2z+A/DFc+AwmFLxEHR1+Yq6cXvww=
github.com/afocus/captcha v0.0.0-20191010092841-4bd1f21c8868/go.mod h1:srphKZ1i+yGXxl/LpBS7ZIECTjCTPzZzAMtJWoG3sLo= github.com/afocus/captcha v0.0.0-20191010092841-4bd1f21c8868/go.mod h1:srphKZ1i+yGXxl/LpBS7ZIECTjCTPzZzAMtJWoG3sLo=
github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY=
github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw=
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
@ -131,12 +125,14 @@ github.com/alexflint/go-filemutex v0.0.0-20171022225611-72bdc8eae2ae/go.mod h1:C
github.com/alexflint/go-filemutex v1.1.0/go.mod h1:7P4iRhttt/nUvUOrYIhcpMzv2G6CY9UnI16Z+UJqRyk= github.com/alexflint/go-filemutex v1.1.0/go.mod h1:7P4iRhttt/nUvUOrYIhcpMzv2G6CY9UnI16Z+UJqRyk=
github.com/alimy/cfg v0.3.0 h1:9xgA0QWVCPSq9fFNRcYahVCAX22IL9ts2wrTQPfAStY= github.com/alimy/cfg v0.3.0 h1:9xgA0QWVCPSq9fFNRcYahVCAX22IL9ts2wrTQPfAStY=
github.com/alimy/cfg v0.3.0/go.mod h1:rOxbasTH2srl6StAjNF5Vyi8bfrdkl3fLGmOYtSw81c= github.com/alimy/cfg v0.3.0/go.mod h1:rOxbasTH2srl6StAjNF5Vyi8bfrdkl3fLGmOYtSw81c=
github.com/alimy/mir/v3 v3.2.1 h1:vnAHdqzMccP8C0DDyY3hAV50cVNBfDopgcyvv8TL9L4= github.com/alimy/mir/engine/gin/v4 v4.0.0 h1:N3nvpniFLW2z1WxU26gHw1FKx+/G+B/5cllOjOTjsWI=
github.com/alimy/mir/v3 v3.2.1/go.mod h1:ybhT2ijOiDn0lLwWzIY6vXdv+uzZrctS7VFfczcXBWU= github.com/alimy/mir/engine/gin/v4 v4.0.0/go.mod h1:M28AJQ5h1CEA+m2s6acuVjGXI8ElLNDA5IKtSdWI48k=
github.com/alimy/mir/v4 v4.0.0-alpha.4 h1:UKYwkvYnGo/5wr5pMwy+n2MW1+K8b4btCfdhTQhQB1A=
github.com/alimy/mir/v4 v4.0.0-alpha.4/go.mod h1:X09f2IOQ4NTyJFKJ10S+J7Jk988T5IvvprwTijQZAsg=
github.com/aliyun/aliyun-oss-go-sdk v2.2.7+incompatible h1:KpbJFXwhVeuxNtBJ74MCGbIoaBok2uZvkD7QXp2+Wis= github.com/aliyun/aliyun-oss-go-sdk v2.2.7+incompatible h1:KpbJFXwhVeuxNtBJ74MCGbIoaBok2uZvkD7QXp2+Wis=
github.com/aliyun/aliyun-oss-go-sdk v2.2.7+incompatible/go.mod h1:T/Aws4fEfogEE9v+HPhhw+CntffsBHJ8nXQCwKr0/g8= github.com/aliyun/aliyun-oss-go-sdk v2.2.7+incompatible/go.mod h1:T/Aws4fEfogEE9v+HPhhw+CntffsBHJ8nXQCwKr0/g8=
github.com/allegro/bigcache/v3 v3.0.2 h1:AKZCw+5eAaVyNTBmI2fgyPVJhHkdWder3O9IrprcQfI= github.com/allegro/bigcache/v3 v3.1.0 h1:H2Vp8VOvxcrB91o86fUSVJFqeuz8kpyyB02eH3bSzwk=
github.com/allegro/bigcache/v3 v3.0.2/go.mod h1:aPyh7jEvrog9zAwx5N7+JUQX5dZTSGpxF1LAR4dr35I= github.com/allegro/bigcache/v3 v3.1.0/go.mod h1:aPyh7jEvrog9zAwx5N7+JUQX5dZTSGpxF1LAR4dr35I=
github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig=
github.com/andybalholm/brotli v1.0.5 h1:8uQZIdzKmjc/iuPu7O2ioW48L81FgatrcpfFmiq/cCs= github.com/andybalholm/brotli v1.0.5 h1:8uQZIdzKmjc/iuPu7O2ioW48L81FgatrcpfFmiq/cCs=
github.com/andybalholm/brotli v1.0.5/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= github.com/andybalholm/brotli v1.0.5/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig=
@ -176,7 +172,6 @@ github.com/aws/aws-sdk-go-v2/service/sts v1.6.1/go.mod h1:hLZ/AnkIKHLuPGjEiyghNE
github.com/aws/aws-sdk-go-v2/service/sts v1.7.2/go.mod h1:8EzeIqfWt2wWT4rJVu3f21TfrhJ8AEMzVybRNSb/b4g= github.com/aws/aws-sdk-go-v2/service/sts v1.7.2/go.mod h1:8EzeIqfWt2wWT4rJVu3f21TfrhJ8AEMzVybRNSb/b4g=
github.com/aws/smithy-go v1.7.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= github.com/aws/smithy-go v1.7.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E=
github.com/aws/smithy-go v1.8.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= github.com/aws/smithy-go v1.8.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E=
github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g=
github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM=
github.com/beorn7/perks v0.0.0-20160804104726-4c0e84591b9a/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v0.0.0-20160804104726-4c0e84591b9a/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
@ -243,16 +238,14 @@ github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMe
github.com/cockroachdb/cockroach-go/v2 v2.1.1/go.mod h1:7NtUnP6eK+l6k483WSYNrq3Kb23bWV10IRV1TyeSpwM= github.com/cockroachdb/cockroach-go/v2 v2.1.1/go.mod h1:7NtUnP6eK+l6k483WSYNrq3Kb23bWV10IRV1TyeSpwM=
github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8=
github.com/cockroachdb/datadriven v0.0.0-20200714090401-bf6692d28da5/go.mod h1:h6jFvWxBdQXxjopDMZyH2UVceIRfR84bdzbkoKrsWNo= github.com/cockroachdb/datadriven v0.0.0-20200714090401-bf6692d28da5/go.mod h1:h6jFvWxBdQXxjopDMZyH2UVceIRfR84bdzbkoKrsWNo=
github.com/cockroachdb/datadriven v1.0.2/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU=
github.com/cockroachdb/errors v1.2.4/go.mod h1:rQD95gz6FARkaKkQXUksEje/d9a6wBJoCr5oaCLELYA= github.com/cockroachdb/errors v1.2.4/go.mod h1:rQD95gz6FARkaKkQXUksEje/d9a6wBJoCr5oaCLELYA=
github.com/cockroachdb/errors v1.9.1 h1:yFVvsI0VxmRShfawbt/laCIDy/mtTqqnvoNgiy5bEV8= github.com/cockroachdb/errors v1.10.0 h1:lfxS8zZz1+OjtV4MtNWgboi/W5tyLEB6VQZBXN+0VUU=
github.com/cockroachdb/errors v1.9.1/go.mod h1:2sxOtL2WIc096WSZqZ5h8fa17rdDq9HZOZLBCor4mBk= github.com/cockroachdb/errors v1.10.0/go.mod h1:lknhIsEVQ9Ss/qKDBQS/UqFSvPQjOwNq2qyKAxtHRqE=
github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI= github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI=
github.com/cockroachdb/logtags v0.0.0-20211118104740-dabe8e521a4f h1:6jduT9Hfc0njg5jJ1DdKCFPdMBrp/mdZfCpa5h+WM74= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE=
github.com/cockroachdb/logtags v0.0.0-20211118104740-dabe8e521a4f/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs=
github.com/cockroachdb/redact v1.1.3 h1:AKZds10rFSIj7qADf0g46UixK8NNLwWTNdCIGS5wfSQ= github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30=
github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg=
github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM=
github.com/containerd/aufs v0.0.0-20200908144142-dab0cbea06f4/go.mod h1:nukgQABAEopAHvB6j7cnP5zJ+/3aVcE7hCYqvIwAHyE= github.com/containerd/aufs v0.0.0-20200908144142-dab0cbea06f4/go.mod h1:nukgQABAEopAHvB6j7cnP5zJ+/3aVcE7hCYqvIwAHyE=
github.com/containerd/aufs v0.0.0-20201003224125-76a6863f2989/go.mod h1:AkGGQs9NM2vtYHaUen+NljV0/baGCAPELGm2q9ZXpWU= github.com/containerd/aufs v0.0.0-20201003224125-76a6863f2989/go.mod h1:AkGGQs9NM2vtYHaUen+NljV0/baGCAPELGm2q9ZXpWU=
github.com/containerd/aufs v0.0.0-20210316121734-20793ff83c97/go.mod h1:kL5kd6KM5TzQjR79jljyi4olc1Vrx6XBlcyj3gNv2PU= github.com/containerd/aufs v0.0.0-20210316121734-20793ff83c97/go.mod h1:kL5kd6KM5TzQjR79jljyi4olc1Vrx6XBlcyj3gNv2PU=
@ -353,7 +346,6 @@ github.com/containers/ocicrypt v1.1.2/go.mod h1:Dm55fwWm1YZAjYRaJ94z2mfZikIyIN4B
github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk=
github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk=
github.com/coreos/go-iptables v0.4.5/go.mod h1:/mVI274lEDI2ns62jHCDnCyBF9Iwsmekav8Dbxlm1MU= github.com/coreos/go-iptables v0.4.5/go.mod h1:/mVI274lEDI2ns62jHCDnCyBF9Iwsmekav8Dbxlm1MU=
github.com/coreos/go-iptables v0.5.0/go.mod h1:/mVI274lEDI2ns62jHCDnCyBF9Iwsmekav8Dbxlm1MU= github.com/coreos/go-iptables v0.5.0/go.mod h1:/mVI274lEDI2ns62jHCDnCyBF9Iwsmekav8Dbxlm1MU=
github.com/coreos/go-iptables v0.6.0/go.mod h1:Qe8Bv2Xik5FyTXwgIbLAnv2sWSBmvWdFETJConOQ//Q= github.com/coreos/go-iptables v0.6.0/go.mod h1:Qe8Bv2Xik5FyTXwgIbLAnv2sWSBmvWdFETJConOQ//Q=
@ -369,7 +361,6 @@ github.com/coreos/go-systemd/v22 v22.1.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+
github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE=
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY=
@ -387,10 +378,8 @@ 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/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/denisenkom/go-mssqldb v0.10.0/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU= github.com/denisenkom/go-mssqldb v0.10.0/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU=
github.com/denverdino/aliyungo v0.0.0-20190125010748-a747050bb1ba/go.mod h1:dV8lFg6daOBZbT6/BDGIz6Y3WFGn8juu6G+CQ6LHtl0= github.com/denverdino/aliyungo v0.0.0-20190125010748-a747050bb1ba/go.mod h1:dV8lFg6daOBZbT6/BDGIz6Y3WFGn8juu6G+CQ6LHtl0=
github.com/dgraph-io/badger v1.6.0/go.mod h1:zwt7syl517jmP8s94KqSxTlM6IMsdhYy6psNgSztDR4=
github.com/dgrijalva/jwt-go v0.0.0-20170104182250-a601269ab70c/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgrijalva/jwt-go v0.0.0-20170104182250-a601269ab70c/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw=
github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no=
github.com/dhui/dktest v0.3.10 h1:0frpeeoM9pHouHjhLeZDuDTJ0PqjDTrycaHaMmkJAo8= github.com/dhui/dktest v0.3.10 h1:0frpeeoM9pHouHjhLeZDuDTJ0PqjDTrycaHaMmkJAo8=
github.com/dhui/dktest v0.3.10/go.mod h1:h5Enh0nG3Qbo9WjNFRrwmKUaePEBhXMOygbz3Ww7Sz0= github.com/dhui/dktest v0.3.10/go.mod h1:h5Enh0nG3Qbo9WjNFRrwmKUaePEBhXMOygbz3Ww7Sz0=
@ -423,7 +412,6 @@ github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25Kn
github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY=
github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto=
github.com/edsrzf/mmap-go v0.0.0-20170320065105-0bce6a688712/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= github.com/edsrzf/mmap-go v0.0.0-20170320065105-0bce6a688712/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M=
github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM=
github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc=
github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs=
github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs=
@ -438,14 +426,11 @@ github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.
github.com/envoyproxy/go-control-plane v0.10.1/go.mod h1:AY7fTTXNdv/aJ2O5jwpxAPOWUZ7hQAEvzN5Pf27BkQQ= github.com/envoyproxy/go-control-plane v0.10.1/go.mod h1:AY7fTTXNdv/aJ2O5jwpxAPOWUZ7hQAEvzN5Pf27BkQQ=
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/envoyproxy/protoc-gen-validate v0.6.2/go.mod h1:2t7qjJNvHPx8IjnBOzl9E9/baC+qXE/TeeyBRzgJDws= github.com/envoyproxy/protoc-gen-validate v0.6.2/go.mod h1:2t7qjJNvHPx8IjnBOzl9E9/baC+qXE/TeeyBRzgJDws=
github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw=
github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
github.com/evanphx/json-patch v4.11.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.11.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
github.com/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072/go.mod h1:duJ4Jxv5lDcvg4QuQr0oowTf7dz4/CR8NtyCooz9HL8=
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs=
github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw=
github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M=
github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k=
github.com/fogleman/gg v1.3.0/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/fogleman/gg v1.3.0/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k=
@ -453,7 +438,7 @@ github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoD
github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k=
github.com/form3tech-oss/jwt-go v3.2.5+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/form3tech-oss/jwt-go v3.2.5+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k=
github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k=
github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY=
@ -465,24 +450,18 @@ github.com/gabriel-vasile/mimetype v1.4.0/go.mod h1:fA8fi6KUiG7MgQQ+mEWotXoEOvmx
github.com/gabriel-vasile/mimetype v1.4.2 h1:w5qFW6JKBz9Y393Y4q372O9A7cUSequkh1Q7OhCmWKU= github.com/gabriel-vasile/mimetype v1.4.2 h1:w5qFW6JKBz9Y393Y4q372O9A7cUSequkh1Q7OhCmWKU=
github.com/gabriel-vasile/mimetype v1.4.2/go.mod h1:zApsH/mKG4w07erKIaJPFiX0Tsq9BFQgN3qGY5GnNgA= github.com/gabriel-vasile/mimetype v1.4.2/go.mod h1:zApsH/mKG4w07erKIaJPFiX0Tsq9BFQgN3qGY5GnNgA=
github.com/garyburd/redigo v0.0.0-20150301180006-535138d7bcd7/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY= github.com/garyburd/redigo v0.0.0-20150301180006-535138d7bcd7/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY=
github.com/gavv/httpexpect v2.0.0+incompatible/go.mod h1:x+9tiU1YnrOvnB725RkpoLv1M62hOWzwo5OXotisrKc=
github.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ= github.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ=
github.com/getsentry/sentry-go v0.12.0/go.mod h1:NSap0JBYWzHND8oMbyi0+XZhUalc1TBdRL1M71JZW2c= github.com/getsentry/sentry-go v0.22.0 h1:XNX9zKbv7baSEI65l+H1GEJgSeIC1c7EN5kluWaP6dM=
github.com/getsentry/sentry-go v0.21.0 h1:c9l5F1nPF30JIppulk4veau90PK6Smu3abgVtVQWon4= github.com/getsentry/sentry-go v0.22.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY=
github.com/getsentry/sentry-go v0.21.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY=
github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/gin-contrib/cors v1.4.0 h1:oJ6gwtUl3lqV0WEIwM/LxPF1QZ5qe2lGWdY2+bz7y0g= github.com/gin-contrib/cors v1.4.0 h1:oJ6gwtUl3lqV0WEIwM/LxPF1QZ5qe2lGWdY2+bz7y0g=
github.com/gin-contrib/cors v1.4.0/go.mod h1:bs9pNM0x/UsmHPBWT2xZz9ROh8xYjYkiURUfmBoMlcs= github.com/gin-contrib/cors v1.4.0/go.mod h1:bs9pNM0x/UsmHPBWT2xZz9ROh8xYjYkiURUfmBoMlcs=
github.com/gin-contrib/sse v0.0.0-20190301062529-5545eab6dad3/go.mod h1:VJ0WA2NBN22VlZ2dKZQPAPnyWw5XTlK1KymzLKsr59s=
github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE=
github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI=
github.com/gin-gonic/gin v1.4.0/go.mod h1:OW2EZn3DO8Ln9oIKOvM++LBO+5UPHJJDH72/q/3rZdM=
github.com/gin-gonic/gin v1.8.1/go.mod h1:ji8BvRH1azfM+SYow9zQ6SZMvR8qOMZHmsCuWR9tTTk= github.com/gin-gonic/gin v1.8.1/go.mod h1:ji8BvRH1azfM+SYow9zQ6SZMvR8qOMZHmsCuWR9tTTk=
github.com/gin-gonic/gin v1.9.1 h1:4idEAncQnU5cB7BeOkPtxjfCSye0AAm1R0RVIqJ+Jmg= github.com/gin-gonic/gin v1.9.1 h1:4idEAncQnU5cB7BeOkPtxjfCSye0AAm1R0RVIqJ+Jmg=
github.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SUcPTeU= github.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SUcPTeU=
github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98=
github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q=
github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA=
github.com/go-fonts/dejavu v0.1.0/go.mod h1:4Wt4I4OU2Nq9asgDCteaAaWZOV24E+0/Pwo0gppep4g= github.com/go-fonts/dejavu v0.1.0/go.mod h1:4Wt4I4OU2Nq9asgDCteaAaWZOV24E+0/Pwo0gppep4g=
github.com/go-fonts/latin-modern v0.2.0/go.mod h1:rQVLdDMK+mK1xscDwsqM5J8U2jrRa3T0ecnM9pNujks= github.com/go-fonts/latin-modern v0.2.0/go.mod h1:rQVLdDMK+mK1xscDwsqM5J8U2jrRa3T0ecnM9pNujks=
@ -509,7 +488,6 @@ github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ=
github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-logr/stdr v1.2.0/go.mod h1:YkVgnZu1ZjjL7xTxrfm/LLZBfkhTqSR1ydtm6jTKKwI= github.com/go-logr/stdr v1.2.0/go.mod h1:YkVgnZu1ZjjL7xTxrfm/LLZBfkhTqSR1ydtm6jTKKwI=
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8=
github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0=
github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg=
github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg=
@ -571,9 +549,6 @@ github.com/gobuffalo/packd v0.1.0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWe
github.com/gobuffalo/packr/v2 v2.0.9/go.mod h1:emmyGweYTm6Kdper+iywB6YK5YzuKchGtJQZ0Odn4pQ= github.com/gobuffalo/packr/v2 v2.0.9/go.mod h1:emmyGweYTm6Kdper+iywB6YK5YzuKchGtJQZ0Odn4pQ=
github.com/gobuffalo/packr/v2 v2.2.0/go.mod h1:CaAwI0GPIAv+5wKLtv8Afwl+Cm78K/I/VCm/3ptBN+0= github.com/gobuffalo/packr/v2 v2.2.0/go.mod h1:CaAwI0GPIAv+5wKLtv8Afwl+Cm78K/I/VCm/3ptBN+0=
github.com/gobuffalo/syncx v0.0.0-20190224160051-33c29581e754/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw= github.com/gobuffalo/syncx v0.0.0-20190224160051-33c29581e754/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw=
github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo=
github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw=
github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM=
github.com/goccy/go-json v0.9.7/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/goccy/go-json v0.9.7/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I=
github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU=
github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I=
@ -586,22 +561,17 @@ github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5x
github.com/godbus/dbus/v5 v5.0.6/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godbus/dbus/v5 v5.0.6/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
github.com/gofrs/uuid v4.4.0+incompatible h1:3qXRTX8/NbyulANqlc0lchS1gqAVxRgsuW1YrTJupqA= github.com/gofrs/uuid/v5 v5.0.0 h1:p544++a97kEL+svbcFbCQVM9KFu0Yo25UoISXGNNH9M=
github.com/gofrs/uuid v4.4.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gofrs/uuid/v5 v5.0.0/go.mod h1:CDOjlDMVAtN56jqyRUZh58JT31Tiw7/oQyEXZV+9bD8=
github.com/gogo/googleapis v0.0.0-20180223154316-0cd9801be74a/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s=
github.com/gogo/googleapis v1.2.0/go.mod h1:Njal3psf3qN6dwBtQfUmBZh2ybovJ0tlu3o/AC7HYjU= github.com/gogo/googleapis v1.2.0/go.mod h1:Njal3psf3qN6dwBtQfUmBZh2ybovJ0tlu3o/AC7HYjU=
github.com/gogo/googleapis v1.4.0/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= github.com/gogo/googleapis v1.4.0/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c=
github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4=
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4=
github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o=
github.com/gogo/protobuf v1.3.0/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.0/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o=
github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o=
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
github.com/gogo/status v1.1.0/go.mod h1:BFv9nrluPLmrS0EmGVvLaPNmRosr9KapBYd5/hpY1WM=
github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I=
github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg=
github.com/golang-jwt/jwt/v4 v4.1.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= github.com/golang-jwt/jwt/v4 v4.1.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg=
github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg=
@ -651,7 +621,6 @@ github.com/golang/snappy v0.0.0-20170215233205-553a64147049/go.mod h1:/XxbfmMg8l
github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/gomodule/redigo v1.7.1-0.20190724094224-574c33c3df38/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4=
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA=
@ -722,7 +691,6 @@ github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2z
github.com/gorilla/mux v1.7.4/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/mux v1.7.4/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So=
github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA=
github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs=
@ -751,7 +719,6 @@ github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerX
github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4=
github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90=
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
@ -764,7 +731,6 @@ github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/J
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
github.com/huaweicloud/huaweicloud-sdk-go-obs v3.23.4+incompatible h1:XRAk4HBDLCYEdPLWtKf5iZhOi7lfx17aY0oSO9+mcg8= github.com/huaweicloud/huaweicloud-sdk-go-obs v3.23.4+incompatible h1:XRAk4HBDLCYEdPLWtKf5iZhOi7lfx17aY0oSO9+mcg8=
github.com/huaweicloud/huaweicloud-sdk-go-obs v3.23.4+incompatible/go.mod h1:l7VUhRbTKCzdOacdT4oWCwATKyvZqUOlOqr0Ous3k4s= github.com/huaweicloud/huaweicloud-sdk-go-obs v3.23.4+incompatible/go.mod h1:l7VUhRbTKCzdOacdT4oWCwATKyvZqUOlOqr0Ous3k4s=
github.com/hydrogen18/memlistener v0.0.0-20200120041712-dcc25e7acd91/go.mod h1:qEIFzExnS6016fRpRfxrExeVn2gbClQA99gQhnIcdhE=
github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho=
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
@ -773,14 +739,8 @@ github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJ
github.com/imdario/mergo v0.3.10/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/imdario/mergo v0.3.10/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA=
github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA=
github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA=
github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA=
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
github.com/intel/goresctrl v0.2.0/go.mod h1:+CZdzouYFn5EsxgqAQTEzMfwKwuc0fVdMrT9FCCAVRQ= github.com/intel/goresctrl v0.2.0/go.mod h1:+CZdzouYFn5EsxgqAQTEzMfwKwuc0fVdMrT9FCCAVRQ=
github.com/iris-contrib/blackfriday v2.0.0+incompatible/go.mod h1:UzZ2bDEoaSGPbkg6SAB4att1aAwTmVIx/5gCVqeyUdI=
github.com/iris-contrib/go.uuid v2.0.0+incompatible/go.mod h1:iz2lgM/1UnEf1kP0L/+fafWORmlnuysV2EMP8MW+qe0=
github.com/iris-contrib/jade v1.1.3/go.mod h1:H/geBymxJhShH5kecoiOCSssPX7QWYH7UaeZTSWddIk=
github.com/iris-contrib/pongo2 v0.0.1/go.mod h1:Ssh+00+3GAZqSQb30AvBRNxBx7rf0GqwkjqxNd0u65g=
github.com/iris-contrib/schema v0.0.1/go.mod h1:urYA3uvUNG1TIIjOSCzHr9/LmbQo8LrOcOqfqxa4hXw=
github.com/j-keck/arping v0.0.0-20160618110441-2cf9dc699c56/go.mod h1:ymszkNOg6tORTn+6F6j+Jc8TOr5osrynvN6ivFWZ2GA= github.com/j-keck/arping v0.0.0-20160618110441-2cf9dc699c56/go.mod h1:ymszkNOg6tORTn+6F6j+Jc8TOr5osrynvN6ivFWZ2GA=
github.com/j-keck/arping v1.0.2/go.mod h1:aJbELhR92bSk7tp79AWM/ftfc90EfEi2bQJrbBFOsPw= github.com/j-keck/arping v1.0.2/go.mod h1:aJbELhR92bSk7tp79AWM/ftfc90EfEi2bQJrbBFOsPw=
github.com/jackc/chunkreader v1.0.0/go.mod h1:RT6O25fNZIuasFJRyZ4R/Y2BbhasbmZXF9QQ7T3kePo= github.com/jackc/chunkreader v1.0.0/go.mod h1:RT6O25fNZIuasFJRyZ4R/Y2BbhasbmZXF9QQ7T3kePo=
@ -853,7 +813,6 @@ github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFF
github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4=
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
@ -870,20 +829,13 @@ github.com/k0kubun/pp v2.3.0+incompatible/go.mod h1:GWse8YhT0p8pT4ir3ZgBbfZild3t
github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0/go.mod h1:1NbS8ALrpOvjt0rHPNLyCIeMtbizbir8U//inJ+zuB8= github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0/go.mod h1:1NbS8ALrpOvjt0rHPNLyCIeMtbizbir8U//inJ+zuB8=
github.com/karrick/godirwalk v1.8.0/go.mod h1:H5KPZjojv4lE+QYImBI8xVtrBRgYrIVsaRPx4tDPEn4= github.com/karrick/godirwalk v1.8.0/go.mod h1:H5KPZjojv4lE+QYImBI8xVtrBRgYrIVsaRPx4tDPEn4=
github.com/karrick/godirwalk v1.10.3/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA= github.com/karrick/godirwalk v1.10.3/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA=
github.com/kataras/golog v0.0.10/go.mod h1:yJ8YKCmyL+nWjERB90Qwn+bdyBZsaQwU3bTVFgkFIp8=
github.com/kataras/iris/v12 v12.1.8/go.mod h1:LMYy4VlP67TQ3Zgriz8RE2h2kMZV2SgMYbq3UhfoFmE=
github.com/kataras/neffos v0.0.14/go.mod h1:8lqADm8PnbeFfL7CLXh1WHw53dG27MC3pgi2R1rmoTE=
github.com/kataras/pio v0.0.2/go.mod h1:hAoW0t9UmXi4R5Oyq5Z4irTbaTsOemSrDGUtaTl7Dro=
github.com/kataras/sitemap v0.0.5/go.mod h1:KY2eugMKiPwsJgx7+U103YZehfvNGOXURubcGyk0Bz8=
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs=
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8=
github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q=
github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00=
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= 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/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/klauspost/compress v1.8.2/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A=
github.com/klauspost/compress v1.9.5/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.9.5/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A=
github.com/klauspost/compress v1.9.7/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A=
github.com/klauspost/compress v1.11.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.11.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
github.com/klauspost/compress v1.11.13/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.11.13/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
github.com/klauspost/compress v1.13.1/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/klauspost/compress v1.13.1/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg=
@ -891,11 +843,9 @@ github.com/klauspost/compress v1.13.4/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8
github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk=
github.com/klauspost/compress v1.15.0/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/klauspost/compress v1.15.0/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk=
github.com/klauspost/compress v1.15.6/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU= github.com/klauspost/compress v1.15.6/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU=
github.com/klauspost/compress v1.16.0 h1:iULayQNOReoYUe+1qtKOqw9CwJv3aNQu8ivo7lw1HU4= github.com/klauspost/compress v1.16.5 h1:IFV2oUNUzZaz+XyusxpLzpzS8Pt5rh0Z16For/djlyI=
github.com/klauspost/compress v1.16.0/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= github.com/klauspost/compress v1.16.5/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE=
github.com/klauspost/cpuid v1.2.1/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek=
github.com/klauspost/cpuid/v2 v2.0.1/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.0.1/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
github.com/klauspost/cpuid/v2 v2.0.4/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
github.com/klauspost/cpuid/v2 v2.2.4 h1:acbojRNwl3o09bUq+yDCtZFc1aiwaAAxtcn8YkZXnvk= github.com/klauspost/cpuid/v2 v2.2.4 h1:acbojRNwl3o09bUq+yDCtZFc1aiwaAAxtcn8YkZXnvk=
github.com/klauspost/cpuid/v2 v2.2.4/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= github.com/klauspost/cpuid/v2 v2.2.4/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY=
@ -917,8 +867,6 @@ github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/ktrysmt/go-bitbucket v0.6.4/go.mod h1:9u0v3hsd2rqCHRIpbir1oP7F58uo5dq19sBYvuMoyQ4= github.com/ktrysmt/go-bitbucket v0.6.4/go.mod h1:9u0v3hsd2rqCHRIpbir1oP7F58uo5dq19sBYvuMoyQ4=
github.com/labstack/echo/v4 v4.5.0/go.mod h1:czIriw4a0C1dFun+ObrXp7ok03xON0N1awStJ6ArI7Y=
github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k=
github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY=
github.com/leodido/go-urn v1.2.4 h1:XlAE/cm/ms7TE/VMVoduSpNBoyc2dOxHs5MZSwAN63Q= github.com/leodido/go-urn v1.2.4 h1:XlAE/cm/ms7TE/VMVoduSpNBoyc2dOxHs5MZSwAN63Q=
github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4= github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4=
@ -951,8 +899,6 @@ github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaO
github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ=
github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4=
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
github.com/mattn/go-ieproxy v0.0.1/go.mod h1:pYabZ6IHcRpFh7vIaLfK7rdcWgFEb3SFJ6/gNWuh88E= github.com/mattn/go-ieproxy v0.0.1/go.mod h1:pYabZ6IHcRpFh7vIaLfK7rdcWgFEb3SFJ6/gNWuh88E=
@ -975,25 +921,21 @@ github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOq
github.com/mattn/go-sqlite3 v1.14.3/go.mod h1:WVKg1VTActs4Qso6iwGbiFih2UIHo0ENGwNd0Lj+XmI= github.com/mattn/go-sqlite3 v1.14.3/go.mod h1:WVKg1VTActs4Qso6iwGbiFih2UIHo0ENGwNd0Lj+XmI=
github.com/mattn/go-sqlite3 v1.14.6/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= github.com/mattn/go-sqlite3 v1.14.6/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=
github.com/mattn/go-sqlite3 v1.14.10/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= github.com/mattn/go-sqlite3 v1.14.10/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=
github.com/mattn/go-sqlite3 v1.14.15/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg= github.com/mattn/go-sqlite3 v1.14.17 h1:mCRHCLDUBXgpKAqIKsaAaAsrAlbkeomtRFKXh2L6YIM=
github.com/mattn/go-sqlite3 v1.14.16 h1:yOQRA0RpS5PFz/oikGwBEqvAWhWg5ufRz4ETLjwpU1Y= github.com/mattn/go-sqlite3 v1.14.17/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg=
github.com/mattn/go-sqlite3 v1.14.16/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg=
github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw=
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4=
github.com/maxbrunsfeld/counterfeiter/v6 v6.2.2/go.mod h1:eD9eIE7cdwcMi9rYluz88Jz2VyhSmden33/aXg4oVIY= github.com/maxbrunsfeld/counterfeiter/v6 v6.2.2/go.mod h1:eD9eIE7cdwcMi9rYluz88Jz2VyhSmden33/aXg4oVIY=
github.com/mediocregopher/radix/v3 v3.4.2/go.mod h1:8FL3F6UQRXHXIBSPUs5h0RybMF8i4n7wVopoX3x7Bv8= github.com/meilisearch/meilisearch-go v0.25.0 h1:xIp+8YWterHuDvpdYlwQ4Qp7im3JlRHmSKiP0NvjyXs=
github.com/meilisearch/meilisearch-go v0.24.0 h1:GTP8LWZmkMYrGgX5BRZdkC2Txyp0mFYLzXYMlVV7cSQ= github.com/meilisearch/meilisearch-go v0.25.0/go.mod h1:SxuSqDcPBIykjWz1PX+KzsYzArNLSCadQodWs8extS0=
github.com/meilisearch/meilisearch-go v0.24.0/go.mod h1:SxuSqDcPBIykjWz1PX+KzsYzArNLSCadQodWs8extS0=
github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc=
github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
github.com/miekg/pkcs11 v1.0.3/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs= github.com/miekg/pkcs11 v1.0.3/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs=
github.com/minio/md5-simd v1.1.2 h1:Gdi1DZK69+ZVMoNHRXJyNcxrMA4dSxoYHZSQbirFg34= github.com/minio/md5-simd v1.1.2 h1:Gdi1DZK69+ZVMoNHRXJyNcxrMA4dSxoYHZSQbirFg34=
github.com/minio/md5-simd v1.1.2/go.mod h1:MzdKDxYpY2BT9XQFocsiZf/NKVtR7nkE4RoEpN+20RM= github.com/minio/md5-simd v1.1.2/go.mod h1:MzdKDxYpY2BT9XQFocsiZf/NKVtR7nkE4RoEpN+20RM=
github.com/minio/minio-go/v7 v7.0.53 h1:qtPyQ+b0Cc1ums3LsnVMAYULPNdAGz8qdX8R2zl9XMU= github.com/minio/minio-go/v7 v7.0.59 h1:lxIXwsTIcQkYoEG25rUJbzpmSB/oWeVDmxFo/uWUUsw=
github.com/minio/minio-go/v7 v7.0.53/go.mod h1:IbbodHyjUAguneyucUaahv+VMNs/EOTV9du7A7/Z3HU= github.com/minio/minio-go/v7 v7.0.59/go.mod h1:NUDy4A4oXPq1l2yK6LTSvCEzAMeIcoz9lcj5dbzSrRE=
github.com/minio/sha256-simd v1.0.0 h1:v1ta+49hkWZyvaKwrQB8elexRqm6Y0aMLjCNsrYxo6g= github.com/minio/sha256-simd v1.0.1 h1:6kaan5IFmwTNynnKKpDHe6FWHohJOHhCPchzK49dzMM=
github.com/minio/sha256-simd v1.0.0/go.mod h1:OuYzVNI5vcoYIAmbIvHPl3N3jUzVedXbKy5RFepssQM= github.com/minio/sha256-simd v1.0.1/go.mod h1:Pz6AKMiUdngCLpeTL/RJY1M9rUuPMYujV5xJjtbRSN8=
github.com/mistifyio/go-zfs v2.1.2-0.20190413222219-f784269be439+incompatible/go.mod h1:8AuVvqP/mXw1px98n46wfvcGfQ4ci2FwoAjKYxuo3Z4= github.com/mistifyio/go-zfs v2.1.2-0.20190413222219-f784269be439+incompatible/go.mod h1:8AuVvqP/mXw1px98n46wfvcGfQ4ci2FwoAjKYxuo3Z4=
github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc=
github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
@ -1030,7 +972,6 @@ github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjY
github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc=
github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A=
github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc=
github.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ=
github.com/mozillazg/go-httpheader v0.2.1/go.mod h1:jJ8xECTlalr6ValeXYdOF8fFUISeBAdw6E61aqQma60= github.com/mozillazg/go-httpheader v0.2.1/go.mod h1:jJ8xECTlalr6ValeXYdOF8fFUISeBAdw6E61aqQma60=
github.com/mozillazg/go-httpheader v0.3.1 h1:IRP+HFrMX2SlwY9riuio7raffXUpzAosHtZu25BSJok= github.com/mozillazg/go-httpheader v0.3.1 h1:IRP+HFrMX2SlwY9riuio7raffXUpzAosHtZu25BSJok=
github.com/mozillazg/go-httpheader v0.3.1/go.mod h1:PuT8h0pw6efvp8ZeUec1Rs7dwjK08bt6gKSReGMqtdA= github.com/mozillazg/go-httpheader v0.3.1/go.mod h1:PuT8h0pw6efvp8ZeUec1Rs7dwjK08bt6gKSReGMqtdA=
@ -1042,10 +983,6 @@ github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRW
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw=
github.com/nakagami/firebirdsql v0.0.0-20190310045651-3c02a58cfed8/go.mod h1:86wM1zFnC6/uDBfZGNwB65O+pR2OFi5q/YQaEUid1qA= github.com/nakagami/firebirdsql v0.0.0-20190310045651-3c02a58cfed8/go.mod h1:86wM1zFnC6/uDBfZGNwB65O+pR2OFi5q/YQaEUid1qA=
github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg=
github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w=
github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w=
github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c=
github.com/ncw/swift v1.0.47/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= github.com/ncw/swift v1.0.47/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM=
github.com/neo4j/neo4j-go-driver v1.8.1-0.20200803113522-b626aa943eba/go.mod h1:ncO5VaFWh0Nrt+4KT4mOZboaczBZcLuHrG+/sUeP8gI= github.com/neo4j/neo4j-go-driver v1.8.1-0.20200803113522-b626aa943eba/go.mod h1:ncO5VaFWh0Nrt+4KT4mOZboaczBZcLuHrG+/sUeP8gI=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
@ -1122,7 +1059,6 @@ github.com/phpdave11/gofpdi v1.0.12/go.mod h1:vBmVV0Do6hSBHC8uKUQ71JGW+ZGQq74llk
github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=
github.com/pierrec/lz4/v4 v4.1.8/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= github.com/pierrec/lz4/v4 v4.1.8/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4=
github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4=
github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8=
github.com/pkg/browser v0.0.0-20210706143420-7d21f8c997e2/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= github.com/pkg/browser v0.0.0-20210706143420-7d21f8c997e2/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI=
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI=
github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=
@ -1175,8 +1111,8 @@ github.com/pyroscope-io/client v0.7.1 h1:yFRhj3vbgjBxehvxQmedmUWJQ4CAfCHhn+itPsu
github.com/pyroscope-io/client v0.7.1/go.mod h1:4h21iOU4pUOq0prKyDlvYRL+SCKsBc5wKiEtV+rJGqU= github.com/pyroscope-io/client v0.7.1/go.mod h1:4h21iOU4pUOq0prKyDlvYRL+SCKsBc5wKiEtV+rJGqU=
github.com/pyroscope-io/godeltaprof v0.1.0 h1:UBqtjt0yZi4jTxqZmLAs34XG6ycS3vUTlhEUSq4NHLE= github.com/pyroscope-io/godeltaprof v0.1.0 h1:UBqtjt0yZi4jTxqZmLAs34XG6ycS3vUTlhEUSq4NHLE=
github.com/pyroscope-io/godeltaprof v0.1.0/go.mod h1:psMITXp90+8pFenXkKIpNhrfmI9saQnPbba27VIaiQE= github.com/pyroscope-io/godeltaprof v0.1.0/go.mod h1:psMITXp90+8pFenXkKIpNhrfmI9saQnPbba27VIaiQE=
github.com/redis/rueidis v1.0.5 h1:VQ8m2AfkNskm5nK9lswTvTpL6/clF+UY1KgIcAZcBx4= github.com/redis/rueidis v1.0.10 h1:5QbYwjVoC8sGFP3LXZIqUt6eqbpNY/ZZq9nYgCTRkqk=
github.com/redis/rueidis v1.0.5/go.mod h1:yxbpgX+VYNxCvdE0KEQXDeUFcF2hB2Oz/TJiaqFxoEU= github.com/redis/rueidis v1.0.10/go.mod h1:+1zDH4a8XhwIbCSlIhVGIu6Xib0ZMDoBM0qGhHXc1ew=
github.com/remyoudompheng/bigfft v0.0.0-20190728182440-6a916e37a237/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/remyoudompheng/bigfft v0.0.0-20190728182440-6a916e37a237/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=
github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE= github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE=
@ -1188,29 +1124,24 @@ github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE=
github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o=
github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8=
github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs=
github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ=
github.com/rs/xid v1.4.0 h1:qd7wPTDkN6KQx2VmMBLrpHkiyQwgFXRnkOLacUiaSNY= github.com/rs/xid v1.5.0 h1:mKX4bl4iPYJtEIxp6CYiUuLQ/8DYMoz0PUdtGgMFRVc=
github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg=
github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU= 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/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc=
github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g=
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/ruudk/golang-pdf417 v0.0.0-20181029194003-1af4ab5afa58/go.mod h1:6lfFZQK844Gfx8o5WFuvpxWRwnSoipWe/p622j1v06w= github.com/ruudk/golang-pdf417 v0.0.0-20181029194003-1af4ab5afa58/go.mod h1:6lfFZQK844Gfx8o5WFuvpxWRwnSoipWe/p622j1v06w=
github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
github.com/safchain/ethtool v0.0.0-20190326074333-42ed695e3de8/go.mod h1:Z0q5wiBQGYcxhMZ6gUqHn6pYNLypFAvaL3UvgZLR0U4= github.com/safchain/ethtool v0.0.0-20190326074333-42ed695e3de8/go.mod h1:Z0q5wiBQGYcxhMZ6gUqHn6pYNLypFAvaL3UvgZLR0U4=
github.com/safchain/ethtool v0.0.0-20210803160452-9aa261dae9b1/go.mod h1:Z0q5wiBQGYcxhMZ6gUqHn6pYNLypFAvaL3UvgZLR0U4= github.com/safchain/ethtool v0.0.0-20210803160452-9aa261dae9b1/go.mod h1:Z0q5wiBQGYcxhMZ6gUqHn6pYNLypFAvaL3UvgZLR0U4=
github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
github.com/schollz/closestmatch v2.1.0+incompatible/go.mod h1:RtP1ddjLong6gTkbtmuhtR2uUrrJOpYzYRvbcPAid+g=
github.com/sclevine/agouti v3.0.0+incompatible/go.mod h1:b4WX9W9L1sfQKXeJf1mUTLZKJ48R1S7H23Ji7oFO5Bw= github.com/sclevine/agouti v3.0.0+incompatible/go.mod h1:b4WX9W9L1sfQKXeJf1mUTLZKJ48R1S7H23Ji7oFO5Bw=
github.com/sclevine/spec v1.2.0/go.mod h1:W4J29eT/Kzv7/b9IWLB055Z+qvVC9vt0Arko24q7p+U= github.com/sclevine/spec v1.2.0/go.mod h1:W4J29eT/Kzv7/b9IWLB055Z+qvVC9vt0Arko24q7p+U=
github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc=
github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo= github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo=
github.com/seccomp/libseccomp-golang v0.9.2-0.20210429002308-3879420cc921/go.mod h1:JA8cRccbGaA1s33RQf7Y1+q9gHmZX1yB/z9WDN1C6fg= github.com/seccomp/libseccomp-golang v0.9.2-0.20210429002308-3879420cc921/go.mod h1:JA8cRccbGaA1s33RQf7Y1+q9gHmZX1yB/z9WDN1C6fg=
github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=
github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4= github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4=
github.com/shopspring/decimal v0.0.0-20200227202807-02e2044944cc/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/shopspring/decimal v0.0.0-20200227202807-02e2044944cc/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o=
github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o=
@ -1224,12 +1155,16 @@ github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6Mwd
github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88=
github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
github.com/sirupsen/logrus v1.9.2 h1:oxx1eChJGI6Uks2ZC4W1zpLlVgqB8ner4EuQwV4Ik1Y= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=
github.com/sirupsen/logrus v1.9.2/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
github.com/smartwalle/alipay/v3 v3.2.3 h1:X7HVDcIJ7+2pV29fySEG4BMF1ocFPAV/aE4OZpX+LnA= github.com/smartwalle/alipay/v3 v3.2.14 h1:X7IPMzweYXjxO+30G9amEjCogzpoA/K1GZpVjM1keps=
github.com/smartwalle/alipay/v3 v3.2.3/go.mod h1:AtAg7UMCxuqG61WcEv5DJTkyF2qI+iw75kZvxbEqINQ= github.com/smartwalle/alipay/v3 v3.2.14/go.mod h1:niTNB609KyUYuAx9Bex/MawEjv2yPx4XOjxSAkqmGjE=
github.com/smartwalle/ncrypto v1.0.0 h1:nQFxIS3fRgr8V0xRkhnfNQOrcJGPNF6d5XzFwVm79KU= github.com/smartwalle/ncrypto v1.0.2 h1:pTAhCqtPCMhpOwFXX+EcMdR6PNzruBNoGQrN2S1GbGI=
github.com/smartwalle/ncrypto v1.0.0/go.mod h1:NmCbG0nLnSDnMImEDrjptFKs0PiLThnFkjQSMtGYgs4= github.com/smartwalle/ncrypto v1.0.2/go.mod h1:Dwlp6sfeNaPMnOxMNayMTacvC5JGEVln3CVdiVDgbBk=
github.com/smartwalle/ngx v1.0.6 h1:JPNqNOIj+2nxxFtrSkJO+vKJfeNUSEQueck/Wworjps=
github.com/smartwalle/ngx v1.0.6/go.mod h1:mx/nz2Pk5j+RBs7t6u6k22MPiBG/8CtOMpCnALIG8Y0=
github.com/smartwalle/nsign v1.0.8 h1:78KWtwKPrdt4Xsn+tNEBVxaTLIJBX9YRX0ZSrMUeuHo=
github.com/smartwalle/nsign v1.0.8/go.mod h1:eY6I4CJlyNdVMP+t6z1H6Jpd4m5/V+8xi44ufSTxXgc=
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
@ -1243,14 +1178,13 @@ github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B
github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk=
github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4= github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4=
github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I=
github.com/spf13/afero v1.9.3 h1:41FoI0fD7OR7mGcKE/aOiLkGreyf8ifIOQmJANWogMk= github.com/spf13/afero v1.9.5 h1:stMpOSZFs//0Lv29HduCmli3GUfpFoF3Y1Q/aXj/wVM=
github.com/spf13/afero v1.9.3/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= github.com/spf13/afero v1.9.5/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ=
github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= github.com/spf13/cast v1.5.1 h1:R+kOtfhWQE6TVQzY+4D7wJLBgkdVasCEFxSUBYBYIlA=
github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN48=
github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ=
github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ=
github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU=
github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE=
github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo=
github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo=
@ -1262,11 +1196,10 @@ github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnIn
github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s=
github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE=
github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg=
github.com/spf13/viper v1.15.0 h1:js3yy885G8xwJa6iOISGFwd+qlUo5AvyXb7CiihdtiU= github.com/spf13/viper v1.16.0 h1:rGGH0XDZhdUOryiDWjmIvUSWpbNqisK8Wk0Vyefw8hc=
github.com/spf13/viper v1.15.0/go.mod h1:fFcTBJxvhhzSJiZy8n+PeW6t8l+KeT/uTARa0jHOQLA= github.com/spf13/viper v1.16.0/go.mod h1:yg78JgCJcbrQOvV9YLXgkLaZqUidkY9K+Dd1FofRzQg=
github.com/stefanberger/go-pkcs11uri v0.0.0-20201008174630-78d3cae3a980/go.mod h1:AO3tvPzVZ/ayst6UlUKUv6rcPQInYe3IknH3jYhAKu8= github.com/stefanberger/go-pkcs11uri v0.0.0-20201008174630-78d3cae3a980/go.mod h1:AO3tvPzVZ/ayst6UlUKUv6rcPQInYe3IknH3jYhAKu8=
github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8=
github.com/stretchr/objx v0.0.0-20180129172003-8a3f7159479f/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.0.0-20180129172003-8a3f7159479f/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
@ -1307,10 +1240,7 @@ github.com/tv42/httpunix v0.0.0-20191220191345-2ba4b9c3382c/go.mod h1:hzIxponao9
github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI=
github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08=
github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc=
github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw=
github.com/ugorji/go v1.2.7/go.mod h1:nF9osbDWLy6bDVv/Rtoh6QgnvNDpmCalQV5urGCCS6M= github.com/ugorji/go v1.2.7/go.mod h1:nF9osbDWLy6bDVv/Rtoh6QgnvNDpmCalQV5urGCCS6M=
github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0=
github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY=
github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY=
github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU= github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU=
github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg=
@ -1318,16 +1248,11 @@ github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/
github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4=
github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
github.com/valyala/fasthttp v1.6.0/go.mod h1:FstJa9V+Pj9vQ7OJie2qMHdwemEDaDiSdBnvPM1Su9w=
github.com/valyala/fasthttp v1.37.1-0.20220607072126-8a320890c08d/go.mod h1:t/G+3rLek+CyY9bnIE+YlMRddxVAAGjhxndDB4i4C0I= github.com/valyala/fasthttp v1.37.1-0.20220607072126-8a320890c08d/go.mod h1:t/G+3rLek+CyY9bnIE+YlMRddxVAAGjhxndDB4i4C0I=
github.com/valyala/fasthttp v1.40.0 h1:CRq/00MfruPGFLTQKY8b+8SfdK60TxNztjRMnH0t1Yc= github.com/valyala/fasthttp v1.40.0 h1:CRq/00MfruPGFLTQKY8b+8SfdK60TxNztjRMnH0t1Yc=
github.com/valyala/fasthttp v1.40.0/go.mod h1:t/G+3rLek+CyY9bnIE+YlMRddxVAAGjhxndDB4i4C0I= github.com/valyala/fasthttp v1.40.0/go.mod h1:t/G+3rLek+CyY9bnIE+YlMRddxVAAGjhxndDB4i4C0I=
github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8=
github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ=
github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio=
github.com/valyala/tcplisten v1.0.0/go.mod h1:T0xQ8SeCZGxckz9qRXTfG43PvQ/mcWh7FwZEA7Ioqkc= github.com/valyala/tcplisten v1.0.0/go.mod h1:T0xQ8SeCZGxckz9qRXTfG43PvQ/mcWh7FwZEA7Ioqkc=
github.com/vishvananda/netlink v0.0.0-20181108222139-023a6dafdcdf/go.mod h1:+SR5DhBJrl6ZM7CoCKvpw5BKroDKQ+PJqOg65H/2ktk= github.com/vishvananda/netlink v0.0.0-20181108222139-023a6dafdcdf/go.mod h1:+SR5DhBJrl6ZM7CoCKvpw5BKroDKQ+PJqOg65H/2ktk=
github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE= github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE=
@ -1346,16 +1271,11 @@ github.com/xdg-go/stringprep v1.0.2/go.mod h1:8F9zXuvzgwmyT5DUm4GUfZGDdT3W+LCvS6
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= 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/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ=
github.com/xeipuuv/gojsonschema v0.0.0-20180618132009-1d523034197f/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs= github.com/xeipuuv/gojsonschema v0.0.0-20180618132009-1d523034197f/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs=
github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y=
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q=
github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0/go.mod h1:/LWChgwKmvncFJFHJ7Gvn9wZArjbV5/FppcK2fKk/tI=
github.com/yinheli/mahonia v0.0.0-20131226213531-0eef680515cc h1:7VHQaaNwHymWbj8lAcXMYX1qopebSBHwYC3ceXLWONU= github.com/yinheli/mahonia v0.0.0-20131226213531-0eef680515cc h1:7VHQaaNwHymWbj8lAcXMYX1qopebSBHwYC3ceXLWONU=
github.com/yinheli/mahonia v0.0.0-20131226213531-0eef680515cc/go.mod h1:Pcc297eVCbkDBBVq8FbnI+qDUeIMrHy4Bo7nveAuCAs= github.com/yinheli/mahonia v0.0.0-20131226213531-0eef680515cc/go.mod h1:Pcc297eVCbkDBBVq8FbnI+qDUeIMrHy4Bo7nveAuCAs=
github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA= github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA=
github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg=
github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM=
github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc=
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
@ -1432,7 +1352,6 @@ golang.org/x/crypto v0.0.0-20171113213409-9f005a07e0d3/go.mod h1:6SG95UA2DQfeDnf
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20181009213950-7c1a557ab941/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181009213950-7c1a557ab941/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/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-20190411191339-88737f569e3a/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE=
@ -1444,7 +1363,6 @@ golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8U
golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190911031432-227b76d455e7/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190911031432-227b76d455e7/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20191227163750-53104e6ec876/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
@ -1456,8 +1374,8 @@ golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm
golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/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-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.9.0 h1:LF6fAI+IutBocDJ2OT0Q1g8plpYljMZ4+lty+dsqw3g= golang.org/x/crypto v0.9.0 h1:LF6fAI+IutBocDJ2OT0Q1g8plpYljMZ4+lty+dsqw3g=
golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0=
golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
@ -1526,7 +1444,6 @@ golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73r
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/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-20190225153610-fe579d43d832/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190225153610-fe579d43d832/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-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190327091125-710a502c58a2/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
@ -1575,7 +1492,6 @@ golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qx
golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20210825183410-e898025ed96a/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210825183410-e898025ed96a/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20211008194852-3b03d305991f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20211029224645-99673261e6eb/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211029224645-99673261e6eb/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20211209124913-491a49abca63/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211209124913-491a49abca63/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
@ -1623,7 +1539,6 @@ golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5h
golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/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-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-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@ -1730,15 +1645,12 @@ golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20210903071746-97244b99971b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210903071746-97244b99971b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210906170528-6f6e22806c34/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210906170528-6f6e22806c34/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211116061358-0a5406a5449c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211116061358-0a5406a5449c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211205182925-97ca703d548d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211205182925-97ca703d548d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220111092808-5a964db01320/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220111092808-5a964db01320/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220317061510-51cd9980dadf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220317061510-51cd9980dadf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
@ -1770,7 +1682,6 @@ golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxb
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20220224211638-0e9765cccd65/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20220224211638-0e9765cccd65/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
@ -1781,14 +1692,12 @@ golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGm
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20181221001348-537d06c36207/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-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/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-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-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190327201419-c70d86f8b7cf/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190329151228-23e29df326fe/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190329151228-23e29df326fe/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190416151739-9c9e1878f421/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190416151739-9c9e1878f421/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
@ -1913,7 +1822,6 @@ google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCID
google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
google.golang.org/cloud v0.0.0-20151119220103-975617b05ea8/go.mod h1:0H1ncTHf11KCFhTc/+EFRbzSCOZx+VUbRMk55Yv5MYk= google.golang.org/cloud v0.0.0-20151119220103-975617b05ea8/go.mod h1:0H1ncTHf11KCFhTc/+EFRbzSCOZx+VUbRMk55Yv5MYk=
google.golang.org/genproto v0.0.0-20180518175338-11a468237815/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
@ -1986,10 +1894,9 @@ google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ6
google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
google.golang.org/genproto v0.0.0-20220111164026-67b88f271998/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20220111164026-67b88f271998/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
google.golang.org/genproto v0.0.0-20220314164441-57ef72a4c106/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= google.golang.org/genproto v0.0.0-20220314164441-57ef72a4c106/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E=
google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4 h1:DdoeryqhaXp1LtT/emMP1BRJPHHKFi5akj/nbx/zNTA= google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 h1:KpwkzHKEF7B9Zxg18WzOa7djJ+Ha5DzthMyZYQfEn2A=
google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4/go.mod h1:NWraEVixdDnqcqQ30jipen1STv2r/n24Wb7twVTGR4s= google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1/go.mod h1:nKE/iIaLqn2bQwXBg8f1g2Ylh6r5MN5CmZvuzZCgsCU=
google.golang.org/grpc v0.0.0-20160317175043-d3ddb4469d5a/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v0.0.0-20160317175043-d3ddb4469d5a/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw=
google.golang.org/grpc v1.12.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
@ -2022,8 +1929,8 @@ google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9K
google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU=
google.golang.org/grpc v1.43.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= google.golang.org/grpc v1.43.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU=
google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ=
google.golang.org/grpc v1.55.0 h1:3Oj82/tFSCeUrRTg/5E/7d/W5A1tj6Ky1ABAuZuv5ag= google.golang.org/grpc v1.56.1 h1:z0dNfjIl0VpaZ9iSVjA6daGatAYwPGstTjt5vkRMFkQ=
google.golang.org/grpc v1.55.0/go.mod h1:iYEXKGkEBhg1PjZQvoYEVPTDkHo1/bjTnfwTeGONTY8= google.golang.org/grpc v1.56.1/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s=
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= 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-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
@ -2039,8 +1946,8 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.27.1/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.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8=
google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U=
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
@ -2054,15 +1961,11 @@ gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qS
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo=
gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE=
gopkg.in/go-playground/validator.v8 v8.18.2/go.mod h1:RX2a/7Ha8BgOhfk7j780h4/u/RRjR0eouCJSH80/M2Y=
gopkg.in/inconshreveable/log15.v2 v2.0.0-20180818164646-67afb5ed74ec/go.mod h1:aPpfJ7XW+gOuirDoZ8gHhLh3kZ1B08FtV2bbmy7Jv3s= gopkg.in/inconshreveable/log15.v2 v2.0.0-20180818164646-67afb5ed74ec/go.mod h1:aPpfJ7XW+gOuirDoZ8gHhLh3kZ1B08FtV2bbmy7Jv3s=
gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
gopkg.in/ini.v1 v1.51.1/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA=
gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA=
gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k=
gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc= gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc=
gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYskCTPBJVb9jqSc= gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYskCTPBJVb9jqSc=
@ -2082,7 +1985,6 @@ gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.8/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.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
gopkg.in/yaml.v3 v3.0.0-20191120175047-4206685974f2/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= 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-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
@ -2095,17 +1997,17 @@ gorm.io/driver/postgres v1.0.8/go.mod h1:4eOzrI1MUfm6ObJU/UcmbXyiHSs8jSwH95G5P5d
gorm.io/driver/postgres v1.5.2 h1:ytTDxxEv+MplXOfFe3Lzm7SjG09fcdb3Z/c056DTBx0= gorm.io/driver/postgres v1.5.2 h1:ytTDxxEv+MplXOfFe3Lzm7SjG09fcdb3Z/c056DTBx0=
gorm.io/driver/postgres v1.5.2/go.mod h1:fmpX0m2I1PKuR7mKZiEluwrP3hbs+ps7JIGMUBpCgl8= gorm.io/driver/postgres v1.5.2/go.mod h1:fmpX0m2I1PKuR7mKZiEluwrP3hbs+ps7JIGMUBpCgl8=
gorm.io/driver/sqlite v1.1.3/go.mod h1:AKDgRWk8lcSQSw+9kxCJnX/yySj8G3rdwYlU57cB45c= gorm.io/driver/sqlite v1.1.3/go.mod h1:AKDgRWk8lcSQSw+9kxCJnX/yySj8G3rdwYlU57cB45c=
gorm.io/driver/sqlite v1.4.4 h1:gIufGoR0dQzjkyqDyYSCvsYR6fba1Gw5YKDqKeChxFc= gorm.io/driver/sqlite v1.5.2 h1:TpQ+/dqCY4uCigCFyrfnrJnrW9zjpelWVoEVNy5qJkc=
gorm.io/driver/sqlite v1.4.4/go.mod h1:0Aq3iPO+v9ZKbcdiz8gLWRw5VOPcBOPUQJFLq5e2ecI= gorm.io/driver/sqlite v1.5.2/go.mod h1:qxAuCol+2r6PannQDpOP1FP6ag3mKi4esLnB/jHed+4=
gorm.io/gorm v1.20.1/go.mod h1:0HFTzE/SqkGTzK6TlDPPQbAYCluiVvhzoA1+aVyzenw= gorm.io/gorm v1.20.1/go.mod h1:0HFTzE/SqkGTzK6TlDPPQbAYCluiVvhzoA1+aVyzenw=
gorm.io/gorm v1.20.12/go.mod h1:0HFTzE/SqkGTzK6TlDPPQbAYCluiVvhzoA1+aVyzenw= gorm.io/gorm v1.20.12/go.mod h1:0HFTzE/SqkGTzK6TlDPPQbAYCluiVvhzoA1+aVyzenw=
gorm.io/gorm v1.21.4/go.mod h1:0HFTzE/SqkGTzK6TlDPPQbAYCluiVvhzoA1+aVyzenw= gorm.io/gorm v1.21.4/go.mod h1:0HFTzE/SqkGTzK6TlDPPQbAYCluiVvhzoA1+aVyzenw=
gorm.io/gorm v1.23.0/go.mod h1:l2lP/RyAtc1ynaTjFksBde/O8v9oOGIApu2/xRitmZk= gorm.io/gorm v1.23.0/go.mod h1:l2lP/RyAtc1ynaTjFksBde/O8v9oOGIApu2/xRitmZk=
gorm.io/gorm v1.23.8/go.mod h1:l2lP/RyAtc1ynaTjFksBde/O8v9oOGIApu2/xRitmZk= gorm.io/gorm v1.23.8/go.mod h1:l2lP/RyAtc1ynaTjFksBde/O8v9oOGIApu2/xRitmZk=
gorm.io/gorm v1.24.0/go.mod h1:DVrVomtaYTbqs7gB/x2uVvqnXzv0nqjB396B8cG4dBA=
gorm.io/gorm v1.24.3/go.mod h1:DVrVomtaYTbqs7gB/x2uVvqnXzv0nqjB396B8cG4dBA= gorm.io/gorm v1.24.3/go.mod h1:DVrVomtaYTbqs7gB/x2uVvqnXzv0nqjB396B8cG4dBA=
gorm.io/gorm v1.25.1 h1:nsSALe5Pr+cM3V1qwwQ7rOkw+6UeLrX5O4v3llhHa64=
gorm.io/gorm v1.25.1/go.mod h1:L4uxeKpfBml98NYqVqwAdmV1a2nBtAec/cf3fpucW/k= gorm.io/gorm v1.25.1/go.mod h1:L4uxeKpfBml98NYqVqwAdmV1a2nBtAec/cf3fpucW/k=
gorm.io/gorm v1.25.2 h1:gs1o6Vsa+oVKG/a9ElL3XgyGfghFfkKA2SInQaCyMho=
gorm.io/gorm v1.25.2/go.mod h1:L4uxeKpfBml98NYqVqwAdmV1a2nBtAec/cf3fpucW/k=
gorm.io/plugin/dbresolver v1.4.1 h1:Ug4LcoPhrvqq71UhxtF346f+skTYoCa/nEsdjvHwEzk= gorm.io/plugin/dbresolver v1.4.1 h1:Ug4LcoPhrvqq71UhxtF346f+skTYoCa/nEsdjvHwEzk=
gorm.io/plugin/dbresolver v1.4.1/go.mod h1:CTbCtMWhsjXSiJqiW2R8POvJ2cq18RVOl4WGyT5nhNc= gorm.io/plugin/dbresolver v1.4.1/go.mod h1:CTbCtMWhsjXSiJqiW2R8POvJ2cq18RVOl4WGyT5nhNc=
gorm.io/plugin/soft_delete v1.2.1 h1:qx9D/c4Xu6w5KT8LviX8DgLcB9hkKl6JC9f44Tj7cGU= gorm.io/plugin/soft_delete v1.2.1 h1:qx9D/c4Xu6w5KT8LviX8DgLcB9hkKl6JC9f44Tj7cGU=
@ -2200,8 +2102,8 @@ modernc.org/opt v0.1.3/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0=
modernc.org/ql v1.0.0/go.mod h1:xGVyrLIatPcO2C1JvI/Co8c0sr6y91HKFNy4pt9JXEY= modernc.org/ql v1.0.0/go.mod h1:xGVyrLIatPcO2C1JvI/Co8c0sr6y91HKFNy4pt9JXEY=
modernc.org/sortutil v1.1.0/go.mod h1:ZyL98OQHJgH9IEfN71VsamvJgrtRX9Dj2gX+vH86L1k= modernc.org/sortutil v1.1.0/go.mod h1:ZyL98OQHJgH9IEfN71VsamvJgrtRX9Dj2gX+vH86L1k=
modernc.org/sqlite v1.10.6/go.mod h1:Z9FEjUtZP4qFEg6/SiADg9XCER7aYy9a/j7Pg9P7CPs= modernc.org/sqlite v1.10.6/go.mod h1:Z9FEjUtZP4qFEg6/SiADg9XCER7aYy9a/j7Pg9P7CPs=
modernc.org/sqlite v1.22.1 h1:P2+Dhp5FR1RlVRkQ3dDfCiv3Ok8XPxqpe70IjYVA9oE= modernc.org/sqlite v1.23.1 h1:nrSBg4aRQQwq59JpvGEQ15tNxoO5pX/kUjcRNwSAGQM=
modernc.org/sqlite v1.22.1/go.mod h1:OrDj17Mggn6MhE+iPbBNf7RGKODDE9NFT0f3EwDzJqk= modernc.org/sqlite v1.23.1/go.mod h1:OrDj17Mggn6MhE+iPbBNf7RGKODDE9NFT0f3EwDzJqk=
modernc.org/strutil v1.1.0/go.mod h1:lstksw84oURvj9y3tn8lGvRxyRC1S2+g5uuIzNfIOBs= modernc.org/strutil v1.1.0/go.mod h1:lstksw84oURvj9y3tn8lGvRxyRC1S2+g5uuIzNfIOBs=
modernc.org/strutil v1.1.3 h1:fNMm+oJklMGYfU9Ylcywl0CO5O6nTfaowNsh2wpPjzY= modernc.org/strutil v1.1.3 h1:fNMm+oJklMGYfU9Ylcywl0CO5O6nTfaowNsh2wpPjzY=
modernc.org/strutil v1.1.3/go.mod h1:MEHNA7PdEnEwLvspRMtWTNnp2nnyvMfkimT1NKNAGbw= modernc.org/strutil v1.1.3/go.mod h1:MEHNA7PdEnEwLvspRMtWTNnp2nnyvMfkimT1NKNAGbw=

@ -0,0 +1,38 @@
package conf
import (
"sync"
"github.com/sirupsen/logrus"
"github.com/smartwalle/alipay/v3"
)
var (
_alipayClient *alipay.Client
_onceAlipay sync.Once
)
func MustAlipayClient() *alipay.Client {
_onceAlipay.Do(func() {
s := AlipaySetting
// 将 key 的验证调整到初始化阶段
client, err := alipay.New(s.AppID, s.PrivateKey, s.InProduction)
if err != nil {
logrus.Fatalf("alipay.New err: %s", err)
}
// 加载应用公钥证书
if err = client.LoadAppPublicCertFromFile(s.AppPublicCertFile); err != nil {
logrus.Fatalf("client.LoadAppPublicCertFromFile err: %s\n", err)
}
// 加载支付宝根证书
if err = client.LoadAliPayRootCertFromFile(s.RootCertFile); err != nil {
logrus.Fatalf("client.LoadAliPayRootCertFromFile err: %s\n", err)
}
// 加载支付宝公钥证书
if err = client.LoadAliPayPublicCertFromFile(s.PublicCertFile); err != nil {
logrus.Fatalf("client.LoadAliPayPublicCertFromFile err: %s\n", err)
}
_alipayClient = client
})
return _alipayClient
}

@ -24,6 +24,7 @@ var (
MysqlSetting *mysqlConf MysqlSetting *mysqlConf
PostgresSetting *postgresConf PostgresSetting *postgresConf
Sqlite3Setting *sqlite3Conf Sqlite3Setting *sqlite3Conf
PprofServerSetting *httpServerConf
WebServerSetting *httpServerConf WebServerSetting *httpServerConf
AdminServerSetting *httpServerConf AdminServerSetting *httpServerConf
SpaceXServerSetting *httpServerConf SpaceXServerSetting *httpServerConf
@ -67,6 +68,7 @@ func setupSetting(suite []string, noDefault bool) error {
objects := map[string]any{ objects := map[string]any{
"App": &AppSetting, "App": &AppSetting,
"PprofServer": &PprofServerSetting,
"WebServer": &WebServerSetting, "WebServer": &WebServerSetting,
"AdminServer": &AdminServerSetting, "AdminServer": &AdminServerSetting,
"SpaceXServer": &SpaceXServerSetting, "SpaceXServer": &SpaceXServerSetting,

@ -37,6 +37,12 @@ LocalossServer: # Localoss服务
HttpPort: 8018 HttpPort: 8018
ReadTimeout: 60 ReadTimeout: 60
WriteTimeout: 60 WriteTimeout: 60
PprofServer: # Pprof服务
RunMode: debug
HttpIp: 0.0.0.0
HttpPort: 6060
ReadTimeout: 60
WriteTimeout: 60
FrontendWebServer: # Web前端静态资源服务 FrontendWebServer: # Web前端静态资源服务
RunMode: debug RunMode: debug
HttpIp: 0.0.0.0 HttpIp: 0.0.0.0

@ -7,7 +7,14 @@ package web
import ( import (
"context" "context"
"github.com/alimy/mir/v4"
"github.com/gin-gonic/gin"
"github.com/rocboss/paopao-ce/internal/conf"
"github.com/rocboss/paopao-ce/internal/servants/base" "github.com/rocboss/paopao-ce/internal/servants/base"
"github.com/rocboss/paopao-ce/pkg/app"
"github.com/rocboss/paopao-ce/pkg/convert"
"github.com/rocboss/paopao-ce/pkg/xerror"
"github.com/sirupsen/logrus"
"github.com/smartwalle/alipay/v3" "github.com/smartwalle/alipay/v3"
) )
@ -46,3 +53,44 @@ type AlipayNotifyReq struct {
TradeNo string TradeNo string
TradeStatus alipay.TradeStatus TradeStatus alipay.TradeStatus
} }
func (r *AlipayNotifyReq) Bind(c *gin.Context) mir.Error {
if err := c.Request.ParseForm(); err != nil {
logrus.Errorf("parse form err: %s", err)
return ErrRechargeNotifyError
}
noti, err := conf.MustAlipayClient().GetTradeNotification(c.Request)
if err != nil {
logrus.Errorf("alipayClient.GetTradeNotification err: %s form: %v", err, c.Request.Form)
return ErrRechargeNotifyError
}
r.Ctx = c.Request.Context()
r.ID = convert.StrTo(noti.OutTradeNo).MustInt64()
r.TradeNo, r.TradeStatus = noti.TradeNo, noti.TradeStatus
return nil
}
func (r *UserWalletBillsReq) Bind(c *gin.Context) mir.Error {
uid, ok := base.UserIdFrom(c)
if !ok {
return xerror.UnauthorizedTokenError
}
r.UserId = uid
r.Page, r.PageSize = app.GetPageInfo(c)
return nil
}
func (r *UserRechargeLinkReq) Bind(c *gin.Context) mir.Error {
r.Host = c.Request.Host
return bindAny(c, r)
}
func (r *UserRechargeResultReq) Bind(c *gin.Context) mir.Error {
uid, exist := base.UserIdFrom(c)
if !exist {
return xerror.UnauthorizedTokenError
}
r.UserId, r.Id = uid, convert.StrTo(c.Query("id")).MustInt64()
return nil
}

@ -5,7 +5,11 @@
package web package web
import ( import (
"github.com/alimy/mir/v4"
"github.com/gin-gonic/gin"
"github.com/rocboss/paopao-ce/internal/servants/base" "github.com/rocboss/paopao-ce/internal/servants/base"
"github.com/rocboss/paopao-ce/pkg/convert"
"github.com/rocboss/paopao-ce/pkg/xerror"
) )
type ChangeAvatarReq struct { type ChangeAvatarReq struct {
@ -111,3 +115,58 @@ type TweetCollectionStatusReq struct {
type TweetCollectionStatusResp struct { type TweetCollectionStatusResp struct {
Status bool `json:"status"` Status bool `json:"status"`
} }
func (r *UserInfoReq) Bind(c *gin.Context) mir.Error {
username, exist := base.UserNameFrom(c)
if !exist {
return xerror.UnauthorizedAuthNotExist
}
r.Username = username
return nil
}
func (r *GetMessagesReq) Bind(c *gin.Context) mir.Error {
return (*BasePageReq)(r).Bind(c)
}
func (r *GetCollectionsReq) Bind(c *gin.Context) mir.Error {
return (*BasePageReq)(r).Bind(c)
}
func (r *GetStarsReq) Bind(c *gin.Context) mir.Error {
return (*BasePageReq)(r).Bind(c)
}
func (r *SuggestTagsReq) Bind(c *gin.Context) mir.Error {
r.Keyword = c.Query("k")
return nil
}
func (r *SuggestUsersReq) Bind(c *gin.Context) mir.Error {
r.Keyword = c.Query("k")
return nil
}
func (r *TweetCollectionStatusReq) Bind(c *gin.Context) mir.Error {
userId, exist := base.UserIdFrom(c)
if !exist {
return xerror.UnauthorizedAuthNotExist
}
r.SimpleInfo = SimpleInfo{
Uid: userId,
}
r.TweetId = convert.StrTo(c.Query("id")).MustInt64()
return nil
}
func (r *TweetStarStatusReq) Bind(c *gin.Context) mir.Error {
UserId, exist := base.UserIdFrom(c)
if !exist {
return xerror.UnauthorizedAuthNotExist
}
r.SimpleInfo = SimpleInfo{
Uid: UserId,
}
r.TweetId = convert.StrTo(c.Query("id")).MustInt64()
return nil
}

@ -5,9 +5,12 @@
package web package web
import ( import (
"github.com/alimy/mir/v4"
"github.com/gin-gonic/gin"
"github.com/rocboss/paopao-ce/internal/core" "github.com/rocboss/paopao-ce/internal/core"
"github.com/rocboss/paopao-ce/internal/core/cs" "github.com/rocboss/paopao-ce/internal/core/cs"
"github.com/rocboss/paopao-ce/internal/servants/base" "github.com/rocboss/paopao-ce/internal/servants/base"
"github.com/rocboss/paopao-ce/pkg/app"
) )
const ( const (
@ -85,3 +88,13 @@ func (r *GetUserTweetsReq) SetPageInfo(page int, pageSize int) {
func (r *TweetCommentsReq) SetPageInfo(page int, pageSize int) { func (r *TweetCommentsReq) SetPageInfo(page int, pageSize int) {
r.Page, r.PageSize = page, pageSize r.Page, r.PageSize = page, pageSize
} }
func (r *TimelineReq) Bind(c *gin.Context) mir.Error {
user, _ := base.UserFrom(c)
r.BaseInfo = BaseInfo{
User: user,
}
r.Page, r.PageSize = app.GetPageInfo(c)
r.Query, r.Type = c.Query("query"), "search"
return nil
}

@ -9,8 +9,13 @@ import (
"mime/multipart" "mime/multipart"
"strings" "strings"
"github.com/alimy/mir/v4"
"github.com/gin-gonic/gin"
"github.com/rocboss/paopao-ce/internal/core" "github.com/rocboss/paopao-ce/internal/core"
"github.com/rocboss/paopao-ce/internal/core/cs" "github.com/rocboss/paopao-ce/internal/core/cs"
"github.com/rocboss/paopao-ce/internal/servants/base"
"github.com/rocboss/paopao-ce/pkg/convert"
"github.com/rocboss/paopao-ce/pkg/xerror"
) )
type TweetCommentThumbsReq struct { type TweetCommentThumbsReq struct {
@ -195,3 +200,75 @@ func (p *PostContentItem) Check(acs core.AttachmentCheckService) error {
} }
return nil return nil
} }
func (r *UploadAttachmentReq) Bind(c *gin.Context) (xerr mir.Error) {
userId, exist := base.UserIdFrom(c)
if !exist {
return xerror.UnauthorizedAuthNotExist
}
uploadType := c.Request.FormValue("type")
file, fileHeader, err := c.Request.FormFile("file")
if err != nil {
return ErrFileUploadFailed
}
defer func() {
if xerr != nil {
file.Close()
}
}()
if err := fileCheck(uploadType, fileHeader.Size); err != nil {
return err
}
contentType := fileHeader.Header.Get("Content-Type")
fileExt, xerr := getFileExt(contentType)
if xerr != nil {
return xerr
}
r.SimpleInfo = SimpleInfo{
Uid: userId,
}
r.UploadType, r.ContentType = uploadType, contentType
r.File, r.FileSize, r.FileExt = file, fileHeader.Size, fileExt
return nil
}
func (r *DownloadAttachmentPrecheckReq) Bind(c *gin.Context) mir.Error {
user, exist := base.UserFrom(c)
if !exist {
return xerror.UnauthorizedAuthNotExist
}
r.BaseInfo = BaseInfo{
User: user,
}
r.ContentID = convert.StrTo(c.Query("id")).MustInt64()
return nil
}
func (r *DownloadAttachmentReq) Bind(c *gin.Context) mir.Error {
user, exist := base.UserFrom(c)
if !exist {
return xerror.UnauthorizedAuthNotExist
}
r.BaseInfo = BaseInfo{
User: user,
}
r.ContentID = convert.StrTo(c.Query("id")).MustInt64()
return nil
}
func (r *CreateTweetReq) Bind(c *gin.Context) mir.Error {
r.ClientIP = c.ClientIP()
return bindAny(c, r)
}
func (r *CreateCommentReplyReq) Bind(c *gin.Context) mir.Error {
r.ClientIP = c.ClientIP()
return bindAny(c, r)
}
func (r *CreateCommentReq) Bind(c *gin.Context) mir.Error {
r.ClientIP = c.ClientIP()
return bindAny(c, r)
}

@ -0,0 +1,47 @@
// Copyright 2022 ROC. All rights reserved.
// Use of this source code is governed by a MIT style
// license that can be found in the LICENSE file.
package web
import (
"github.com/alimy/mir/v4"
"github.com/rocboss/paopao-ce/pkg/xerror"
)
func fileCheck(uploadType string, size int64) mir.Error {
if uploadType != "public/video" &&
uploadType != "public/image" &&
uploadType != "public/avatar" &&
uploadType != "attachment" {
return xerror.InvalidParams
}
if size > 1024*1024*100 {
return ErrFileInvalidSize.WithDetails("最大允许100MB")
}
return nil
}
func getFileExt(s string) (string, mir.Error) {
switch s {
case "image/png":
return ".png", nil
case "image/jpg":
return ".jpg", nil
case "image/jpeg":
return ".jpeg", nil
case "image/gif":
return ".gif", nil
case "video/mp4":
return ".mp4", nil
case "video/quicktime":
return ".mov", nil
case "application/zip",
"application/x-zip",
"application/octet-stream",
"application/x-zip-compressed":
return ".zip", nil
default:
return "", ErrFileInvalidExt.WithDetails("仅允许 png/jpg/gif/mp4/mov/zip 类型")
}
}

@ -5,7 +5,7 @@
package web package web
import ( import (
"github.com/alimy/mir/v3" "github.com/alimy/mir/v4"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/rocboss/paopao-ce/internal/core" "github.com/rocboss/paopao-ce/internal/core"
"github.com/rocboss/paopao-ce/internal/servants/base" "github.com/rocboss/paopao-ce/internal/servants/base"
@ -13,6 +13,10 @@ import (
"github.com/rocboss/paopao-ce/pkg/xerror" "github.com/rocboss/paopao-ce/pkg/xerror"
) )
var (
bindAny = base.NewBindAnyFn()
)
type BaseInfo struct { type BaseInfo struct {
User *core.User User *core.User
} }
@ -47,3 +51,13 @@ func BasePageReqFrom(c *gin.Context) (*BasePageReq, mir.Error) {
PageSize: pageSize, PageSize: pageSize,
}, nil }, nil
} }
func (r *BasePageReq) Bind(c *gin.Context) mir.Error {
uid, ok := base.UserIdFrom(c)
if !ok {
return xerror.UnauthorizedTokenError
}
r.UserId = uid
r.Page, r.PageSize = app.GetPageInfo(c)
return nil
}

@ -0,0 +1,93 @@
// Copyright 2023 ROC. All rights reserved.
// Use of this source code is governed by a MIT style
// license that can be found in the LICENSE file.
package web
import (
"github.com/rocboss/paopao-ce/pkg/xerror"
)
// nolint
var (
ErrUsernameHasExisted = xerror.NewError(20001, "用户名已存在")
ErrUsernameLengthLimit = xerror.NewError(20002, "用户名长度3~12")
ErrUsernameCharLimit = xerror.NewError(20003, "用户名只能包含字母、数字")
ErrPasswordLengthLimit = xerror.NewError(20004, "密码长度6~16")
ErrUserRegisterFailed = xerror.NewError(20005, "用户注册失败")
ErrUserHasBeenBanned = xerror.NewError(20006, "该账户已被封停")
ErrNoPermission = xerror.NewError(20007, "无权限执行该请求")
ErrUserHasBindOTP = xerror.NewError(20008, "当前用户已绑定二次验证")
ErrUserOTPInvalid = xerror.NewError(20009, "二次验证码验证失败")
ErrUserNoBindOTP = xerror.NewError(20010, "当前用户未绑定二次验证")
ErrErrorOldPassword = xerror.NewError(20011, "当前用户密码验证失败")
ErrErrorCaptchaPassword = xerror.NewError(20012, "图形验证码验证失败")
ErrAccountNoPhoneBind = xerror.NewError(20013, "拒绝操作: 账户未绑定手机号")
ErrTooManyLoginError = xerror.NewError(20014, "登录失败次数过多,请稍后再试")
ErrGetPhoneCaptchaError = xerror.NewError(20015, "短信验证码获取失败")
ErrTooManyPhoneCaptchaSend = xerror.NewError(20016, "短信验证码获取次数已达今日上限")
ErrExistedUserPhone = xerror.NewError(20017, "该手机号已被绑定")
ErrErrorPhoneCaptcha = xerror.NewError(20018, "手机验证码不正确")
ErrMaxPhoneCaptchaUseTimes = xerror.NewError(20019, "手机验证码已达最大使用次数")
ErrNicknameLengthLimit = xerror.NewError(20020, "昵称长度2~12")
ErrNoExistUsername = xerror.NewError(20021, "用户不存在")
ErrNoAdminPermission = xerror.NewError(20022, "无管理权限")
ErrDisallowUserRegister = xerror.NewError(20023, "系统不允许注册用户")
ErrGetPostsFailed = xerror.NewError(30001, "获取动态列表失败")
ErrCreatePostFailed = xerror.NewError(30002, "动态发布失败")
ErrGetPostFailed = xerror.NewError(30003, "获取动态详情失败")
ErrDeletePostFailed = xerror.NewError(30004, "动态删除失败")
ErrLockPostFailed = xerror.NewError(30005, "动态锁定失败")
ErrGetPostTagsFailed = xerror.NewError(30006, "获取话题列表失败")
ErrInvalidDownloadReq = xerror.NewError(30007, "附件下载请求不合法")
ErrDownloadReqError = xerror.NewError(30008, "附件下载请求失败")
ErrInsuffientDownloadMoney = xerror.NewError(30009, "附件下载失败:账户资金不足")
ErrDownloadExecFail = xerror.NewError(30010, "附件下载失败:扣费失败")
ErrStickPostFailed = xerror.NewError(30011, "动态置顶失败")
ErrVisblePostFailed = xerror.NewError(30012, "更新可见性失败")
ErrGetCommentsFailed = xerror.NewError(40001, "获取评论列表失败")
ErrCreateCommentFailed = xerror.NewError(40002, "评论发布失败")
ErrGetCommentFailed = xerror.NewError(40003, "获取评论详情失败")
ErrDeleteCommentFailed = xerror.NewError(40004, "评论删除失败")
ErrCreateReplyFailed = xerror.NewError(40005, "评论回复失败")
ErrGetReplyFailed = xerror.NewError(40006, "获取评论详情失败")
ErrMaxCommentCount = xerror.NewError(40007, "评论数已达最大限制")
ErrGetCommentThumbs = xerror.NewError(40008, "获取评论点赞信息失败")
ErrGetMessagesFailed = xerror.NewError(50001, "获取消息列表失败")
ErrReadMessageFailed = xerror.NewError(50002, "标记消息已读失败")
ErrSendWhisperFailed = xerror.NewError(50003, "私信发送失败")
ErrNoWhisperToSelf = xerror.NewError(50004, "不允许给自己发送私信")
ErrTooManyWhisperNum = xerror.NewError(50005, "今日私信次数已达上限")
ErrGetCollectionsFailed = xerror.NewError(60001, "获取收藏列表失败")
ErrGetStarsFailed = xerror.NewError(60002, "获取点赞列表失败")
ErrRechargeReqFail = xerror.NewError(70001, "充值请求失败")
ErrRechargeNotifyError = xerror.NewError(70002, "充值回调失败")
ErrGetRechargeFailed = xerror.NewError(70003, "充值详情获取失败")
ErrUserWalletBillsFailed = xerror.NewError(70004, "用户钱包账单获取失败")
ErrNoRequestingFriendToSelf = xerror.NewError(80001, "不允许添加自己为好友")
ErrNotExistFriendId = xerror.NewError(80002, "好友id不存在")
ErrSendRequestingFriendFailed = xerror.NewError(80003, "申请添加朋友请求发送失败")
ErrAddFriendFailed = xerror.NewError(80004, "添加好友失败")
ErrRejectFriendFailed = xerror.NewError(80005, "拒绝好友失败")
ErrDeleteFriendFailed = xerror.NewError(80006, "删除好友失败")
ErrGetContactsFailed = xerror.NewError(80007, "获取联系人列表失败")
ErrNoActionToSelf = xerror.NewError(80008, "不允许对自己操作")
ErrFollowTopicFailed = xerror.NewError(90001, "关注话题失败")
ErrUnfollowTopicFailed = xerror.NewError(90002, "取消关注话题失败")
ErrStickTopicFailed = xerror.NewError(90003, "更行话题置顶状态失败")
ErrThumbsUpTweetComment = xerror.NewError(90101, "评论点赞失败")
ErrThumbsDownTweetComment = xerror.NewError(90102, "评论点踩失败")
ErrThumbsUpTweetReply = xerror.NewError(90103, "评论回复点赞失败")
ErrThumbsDownTweetReply = xerror.NewError(90104, "评论回复点踩失败")
ErrFileUploadFailed = xerror.NewError(10200, "文件上传失败")
ErrFileInvalidExt = xerror.NewError(10201, "文件类型不合法")
ErrFileInvalidSize = xerror.NewError(10202, "文件大小超限")
)

@ -11,5 +11,5 @@ import (
// RouteWeb register Manager route // RouteWeb register Manager route
func RouteManager(e *gin.Engine) { func RouteManager(e *gin.Engine) {
api.RegisterUserServant(e, newUserSrv(), newUserBinding(), newUserRender()) api.RegisterUserServant(e, newUserSrv())
} }

@ -11,41 +11,15 @@ import (
var ( var (
_ api.User = (*userSrv)(nil) _ api.User = (*userSrv)(nil)
_ api.UserBinding = (*userBinding)(nil)
_ api.UserRender = (*userRender)(nil)
) )
type userSrv struct { type userSrv struct {
base.BaseServant *base.BaseServant
api.UnimplementedUserServant api.UnimplementedUserServant
} }
type userBinding struct {
base.BaseBinding
*api.UnimplementedUserBinding
}
type userRender struct {
base.BaseRender
*api.UnimplementedUserRender
}
func newUserSrv() api.User { func newUserSrv() api.User {
return &userSrv{} return &userSrv{
} BaseServant: base.NewBaseServant(),
func newUserBinding() api.UserBinding {
return &userBinding{
UnimplementedUserBinding: &api.UnimplementedUserBinding{
BindAny: base.NewBindAnyFn(),
},
}
}
func newUserRender() api.UserRender {
return &userRender{
UnimplementedUserRender: &api.UnimplementedUserRender{
RenderAny: base.RenderAny,
},
} }
} }

@ -10,7 +10,7 @@ import (
"math" "math"
"net/http" "net/http"
"github.com/alimy/mir/v3" "github.com/alimy/mir/v4"
"github.com/cockroachdb/errors" "github.com/cockroachdb/errors"
"github.com/getsentry/sentry-go" "github.com/getsentry/sentry-go"
sentrygin "github.com/getsentry/sentry-go/gin" sentrygin "github.com/getsentry/sentry-go/gin"
@ -20,24 +20,23 @@ import (
"github.com/rocboss/paopao-ce/internal/dao" "github.com/rocboss/paopao-ce/internal/dao"
"github.com/rocboss/paopao-ce/internal/dao/cache" "github.com/rocboss/paopao-ce/internal/dao/cache"
"github.com/rocboss/paopao-ce/pkg/app" "github.com/rocboss/paopao-ce/pkg/app"
"github.com/rocboss/paopao-ce/pkg/types"
"github.com/rocboss/paopao-ce/pkg/xerror" "github.com/rocboss/paopao-ce/pkg/xerror"
"github.com/sirupsen/logrus" "github.com/sirupsen/logrus"
) )
type BaseServant types.Empty type BaseServant struct {
bindAny func(c *gin.Context, obj any) mir.Error
}
type DaoServant struct { type DaoServant struct {
*BaseServant
Dsa core.WebDataServantA Dsa core.WebDataServantA
Ds core.DataService Ds core.DataService
Ts core.TweetSearchService Ts core.TweetSearchService
Redis core.RedisCache Redis core.RedisCache
} }
type BaseBinding types.Empty
type BaseRender types.Empty
type JsonResp struct { type JsonResp struct {
Code int `json:"code"` Code int `json:"code"`
Msg string `json:"msg,omitempty"` Msg string `json:"msg,omitempty"`
@ -157,6 +156,25 @@ func RenderAny(c *gin.Context, data any, err mir.Error) {
} }
} }
func (s *BaseServant) Bind(c *gin.Context, obj any) mir.Error {
return s.bindAny(c, obj)
}
func (s *BaseServant) Render(c *gin.Context, data any, err mir.Error) {
if err == nil {
c.JSON(http.StatusOK, &JsonResp{
Code: 0,
Msg: "success",
Data: data,
})
} else {
c.JSON(xerror.HttpStatusCode(err), &JsonResp{
Code: err.StatusCode(),
Msg: err.Error(),
})
}
}
func (s *DaoServant) GetTweetBy(id int64) (*core.PostFormated, error) { func (s *DaoServant) GetTweetBy(id int64) (*core.PostFormated, error) {
post, err := s.Ds.GetPostByID(id) post, err := s.Ds.GetPostByID(id)
if err != nil { if err != nil {
@ -254,18 +272,25 @@ func (s *DaoServant) GetTweetList(conditions *core.ConditionsT, offset, limit in
return posts, postFormated, err return posts, postFormated, err
} }
func NewBindAnyFn() func(c *gin.Context, obj any) mir.Error {
if conf.UseSentryGin() {
return bindAnySentry
}
return bindAny
}
func NewBaseServant() *BaseServant {
return &BaseServant{
bindAny: NewBindAnyFn(),
}
}
func NewDaoServant() *DaoServant { func NewDaoServant() *DaoServant {
return &DaoServant{ return &DaoServant{
BaseServant: NewBaseServant(),
Redis: cache.NewRedisCache(), Redis: cache.NewRedisCache(),
Dsa: dao.WebDataServantA(), Dsa: dao.WebDataServantA(),
Ds: dao.DataService(), Ds: dao.DataService(),
Ts: dao.TweetSearchService(), Ts: dao.TweetSearchService(),
} }
} }
func NewBindAnyFn() func(c *gin.Context, obj any) mir.Error {
if conf.UseSentryGin() {
return bindAnySentry
}
return bindAny
}

@ -11,5 +11,5 @@ import (
// RouteBot register Bot route // RouteBot register Bot route
func RouteBot(e *gin.Engine) { func RouteBot(e *gin.Engine) {
api.RegisterUserServant(e, newUserSrv(), newUserBinding(), newUserRender()) api.RegisterUserServant(e, newUserSrv())
} }

@ -11,41 +11,15 @@ import (
var ( var (
_ api.User = (*userSrv)(nil) _ api.User = (*userSrv)(nil)
_ api.UserBinding = (*userBinding)(nil)
_ api.UserRender = (*userRender)(nil)
) )
type userSrv struct { type userSrv struct {
base.BaseServant *base.BaseServant
api.UnimplementedUserServant api.UnimplementedUserServant
} }
type userBinding struct {
base.BaseBinding
*api.UnimplementedUserBinding
}
type userRender struct {
base.BaseRender
*api.UnimplementedUserRender
}
func newUserSrv() api.User { func newUserSrv() api.User {
return &userSrv{} return &userSrv{
} BaseServant: base.NewBaseServant(),
func newUserBinding() api.UserBinding {
return &userBinding{
UnimplementedUserBinding: &api.UnimplementedUserBinding{
BindAny: base.NewBindAnyFn(),
},
}
}
func newUserRender() api.UserRender {
return &userRender{
UnimplementedUserRender: &api.UnimplementedUserRender{
RenderAny: base.RenderAny,
},
} }
} }

@ -26,5 +26,5 @@ func RouteLocalOSS(e *gin.Engine) {
// RouteLocaloss register LocalOSS route if needed // RouteLocaloss register LocalOSS route if needed
func RouteLocaloss(e *gin.Engine) { func RouteLocaloss(e *gin.Engine) {
api.RegisterUserServant(e, newUserSrv(), newUserBinding(), newUserRender()) api.RegisterUserServant(e, newUserSrv())
} }

@ -11,41 +11,15 @@ import (
var ( var (
_ api.User = (*userSrv)(nil) _ api.User = (*userSrv)(nil)
_ api.UserBinding = (*userBinding)(nil)
_ api.UserRender = (*userRender)(nil)
) )
type userSrv struct { type userSrv struct {
base.BaseServant *base.BaseServant
api.UnimplementedUserServant api.UnimplementedUserServant
} }
type userBinding struct {
base.BaseBinding
*api.UnimplementedUserBinding
}
type userRender struct {
base.BaseRender
*api.UnimplementedUserRender
}
func newUserSrv() api.User { func newUserSrv() api.User {
return &userSrv{} return &userSrv{
} BaseServant: base.NewBaseServant(),
func newUserBinding() api.UserBinding {
return &userBinding{
UnimplementedUserBinding: &api.UnimplementedUserBinding{
BindAny: base.NewBindAnyFn(),
},
}
}
func newUserRender() api.UserRender {
return &userRender{
UnimplementedUserRender: &api.UnimplementedUserRender{
RenderAny: base.RenderAny,
},
} }
} }

@ -11,5 +11,5 @@ import (
// RouteWeb register SpaceX route // RouteWeb register SpaceX route
func RouteSpaceX(e *gin.Engine) { func RouteSpaceX(e *gin.Engine) {
api.RegisterUserServant(e, newUserSrv(), newUserBinding(), newUserRender()) api.RegisterUserServant(e, newUserSrv())
} }

@ -11,41 +11,15 @@ import (
var ( var (
_ api.User = (*userSrv)(nil) _ api.User = (*userSrv)(nil)
_ api.UserBinding = (*userBinding)(nil)
_ api.UserRender = (*userRender)(nil)
) )
type userSrv struct { type userSrv struct {
base.BaseServant *base.BaseServant
api.UnimplementedUserServant api.UnimplementedUserServant
} }
type userBinding struct {
base.BaseBinding
*api.UnimplementedUserBinding
}
type userRender struct {
base.BaseRender
*api.UnimplementedUserRender
}
func newUserSrv() api.User { func newUserSrv() api.User {
return &userSrv{} return &userSrv{
} BaseServant: base.NewBaseServant(),
func newUserBinding() api.UserBinding {
return &userBinding{
UnimplementedUserBinding: &api.UnimplementedUserBinding{
BindAny: base.NewBindAnyFn(),
},
}
}
func newUserRender() api.UserRender {
return &userRender{
UnimplementedUserRender: &api.UnimplementedUserRender{
RenderAny: base.RenderAny,
},
} }
} }

@ -5,7 +5,7 @@
package web package web
import ( import (
"github.com/alimy/mir/v3" "github.com/alimy/mir/v4"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
api "github.com/rocboss/paopao-ce/auto/api/v1" api "github.com/rocboss/paopao-ce/auto/api/v1"
"github.com/rocboss/paopao-ce/internal/model/web" "github.com/rocboss/paopao-ce/internal/model/web"
@ -16,8 +16,6 @@ import (
var ( var (
_ api.Admin = (*adminSrv)(nil) _ api.Admin = (*adminSrv)(nil)
_ api.AdminBinding = (*adminBinding)(nil)
_ api.AdminRender = (*adminRender)(nil)
) )
type adminSrv struct { type adminSrv struct {
@ -25,14 +23,6 @@ type adminSrv struct {
*base.DaoServant *base.DaoServant
} }
type adminBinding struct {
*api.UnimplementedAdminBinding
}
type adminRender struct {
*api.UnimplementedAdminRender
}
func (s *adminSrv) Chain() gin.HandlersChain { func (s *adminSrv) Chain() gin.HandlersChain {
return gin.HandlersChain{chain.JWT(), chain.Admin()} return gin.HandlersChain{chain.JWT(), chain.Admin()}
} }
@ -40,7 +30,7 @@ func (s *adminSrv) Chain() gin.HandlersChain {
func (s *adminSrv) ChangeUserStatus(req *web.ChangeUserStatusReq) mir.Error { func (s *adminSrv) ChangeUserStatus(req *web.ChangeUserStatusReq) mir.Error {
user, err := s.Ds.GetUserByID(req.ID) user, err := s.Ds.GetUserByID(req.ID)
if err != nil || user.Model == nil || user.ID <= 0 { if err != nil || user.Model == nil || user.ID <= 0 {
return _errNoExistUsername return web.ErrNoExistUsername
} }
// 执行更新 // 执行更新
user.Status = req.Status user.Status = req.Status
@ -55,19 +45,3 @@ func newAdminSrv(s *base.DaoServant) api.Admin {
DaoServant: s, DaoServant: s,
} }
} }
func newAdminBinding() api.AdminBinding {
return &adminBinding{
UnimplementedAdminBinding: &api.UnimplementedAdminBinding{
BindAny: base.NewBindAnyFn(),
},
}
}
func newAdminRender() api.AdminRender {
return &adminRender{
UnimplementedAdminRender: &api.UnimplementedAdminRender{
RenderAny: base.RenderAny,
},
}
}

@ -7,26 +7,19 @@ package web
import ( import (
"fmt" "fmt"
"github.com/alimy/mir/v3" "github.com/alimy/mir/v4"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
api "github.com/rocboss/paopao-ce/auto/api/v1" api "github.com/rocboss/paopao-ce/auto/api/v1"
"github.com/rocboss/paopao-ce/internal/model/web" "github.com/rocboss/paopao-ce/internal/model/web"
"github.com/rocboss/paopao-ce/internal/servants/base" "github.com/rocboss/paopao-ce/internal/servants/base"
"github.com/rocboss/paopao-ce/internal/servants/chain" "github.com/rocboss/paopao-ce/internal/servants/chain"
"github.com/rocboss/paopao-ce/pkg/app"
"github.com/rocboss/paopao-ce/pkg/convert"
"github.com/rocboss/paopao-ce/pkg/xerror"
"github.com/sirupsen/logrus" "github.com/sirupsen/logrus"
"github.com/smartwalle/alipay/v3" "github.com/smartwalle/alipay/v3"
) )
var ( var (
_ api.AlipayPub = (*alipayPubSrv)(nil) _ api.AlipayPub = (*alipayPubSrv)(nil)
_ api.AlipayPubBinding = (*alipayPubBinding)(nil)
_ api.AlipayPubRender = (*alipayPubRender)(nil)
_ api.AlipayPriv = (*alipayPrivSrv)(nil) _ api.AlipayPriv = (*alipayPrivSrv)(nil)
_ api.AlipayPrivBinding = (*alipayPrivBinding)(nil)
_ api.AlipayPrivRender = (*alipayPrivRender)(nil)
) )
type alipayPubSrv struct { type alipayPubSrv struct {
@ -34,16 +27,6 @@ type alipayPubSrv struct {
*base.DaoServant *base.DaoServant
} }
type alipayPubBinding struct {
*api.UnimplementedAlipayPubBinding
alipayClient *alipay.Client
}
type alipayPubRender struct {
*api.UnimplementedAlipayPubRender
}
type alipayPrivSrv struct { type alipayPrivSrv struct {
api.UnimplementedAlipayPrivServant api.UnimplementedAlipayPrivServant
*base.DaoServant *base.DaoServant
@ -51,39 +34,13 @@ type alipayPrivSrv struct {
alipayClient *alipay.Client alipayClient *alipay.Client
} }
type alipayPrivBinding struct {
*api.UnimplementedAlipayPrivBinding
}
type alipayPrivRender struct {
*api.UnimplementedAlipayPrivRender
}
func (b *alipayPubBinding) BindAlipayNotify(c *gin.Context) (*web.AlipayNotifyReq, mir.Error) {
if err := c.Request.ParseForm(); err != nil {
logrus.Errorf("parse form err: %s", err)
return nil, _errRechargeNotifyError
}
noti, err := b.alipayClient.GetTradeNotification(c.Request)
if err != nil {
logrus.Errorf("alipayClient.GetTradeNotification err: %s form: %v", err, c.Request.Form)
return nil, _errRechargeNotifyError
}
return &web.AlipayNotifyReq{
Ctx: c.Request.Context(),
ID: convert.StrTo(noti.OutTradeNo).MustInt64(),
TradeNo: noti.TradeNo,
TradeStatus: noti.TradeStatus,
}, nil
}
func (s *alipayPubSrv) AlipayNotify(req *web.AlipayNotifyReq) mir.Error { func (s *alipayPubSrv) AlipayNotify(req *web.AlipayNotifyReq) mir.Error {
if req.TradeStatus == alipay.TradeStatusSuccess { if req.TradeStatus == alipay.TradeStatusSuccess {
if err := s.Redis.SetRechargeStatus(req.Ctx, req.TradeNo); err == nil { if err := s.Redis.SetRechargeStatus(req.Ctx, req.TradeNo); err == nil {
recharge, err := s.Ds.GetRechargeByID(req.ID) recharge, err := s.Ds.GetRechargeByID(req.ID)
if err != nil { if err != nil {
logrus.Errorf("GetRechargeByID id:%d err: %s", req.ID, err) logrus.Errorf("GetRechargeByID id:%d err: %s", req.ID, err)
return _errRechargeNotifyError return web.ErrRechargeNotifyError
} }
if recharge.TradeStatus != "TRADE_SUCCESS" { if recharge.TradeStatus != "TRADE_SUCCESS" {
// 标记为已付款 // 标记为已付款
@ -91,7 +48,7 @@ func (s *alipayPubSrv) AlipayNotify(req *web.AlipayNotifyReq) mir.Error {
defer s.Redis.DelRechargeStatus(req.Ctx, req.TradeNo) defer s.Redis.DelRechargeStatus(req.Ctx, req.TradeNo)
if err != nil { if err != nil {
logrus.Errorf("HandleRechargeSuccess id:%d err: %s", req.ID, err) logrus.Errorf("HandleRechargeSuccess id:%d err: %s", req.ID, err)
return _errRechargeNotifyError return web.ErrRechargeNotifyError
} }
} }
} }
@ -99,38 +56,6 @@ func (s *alipayPubSrv) AlipayNotify(req *web.AlipayNotifyReq) mir.Error {
return nil return nil
} }
func (b *alipayPrivBinding) BindUserWalletBills(c *gin.Context) (*web.UserWalletBillsReq, mir.Error) {
uid, ok := base.UserIdFrom(c)
if !ok {
return nil, xerror.UnauthorizedTokenError
}
page, pageSize := app.GetPageInfo(c)
return &web.UserWalletBillsReq{
UserId: uid,
Page: page,
PageSize: pageSize,
}, nil
}
func (b *alipayPrivBinding) BindUserRechargeLink(c *gin.Context) (*web.UserRechargeLinkReq, mir.Error) {
v := &web.UserRechargeLinkReq{
Host: c.Request.Host,
}
err := b.BindAny(c, v)
return v, err
}
func (b *alipayPrivBinding) BindUserRechargeResult(c *gin.Context) (*web.UserRechargeResultReq, mir.Error) {
uid, exist := base.UserIdFrom(c)
if !exist {
return nil, xerror.UnauthorizedTokenError
}
return &web.UserRechargeResultReq{
UserId: uid,
Id: convert.StrTo(c.Query("id")).MustInt64(),
}, nil
}
func (s *alipayPrivSrv) Chain() gin.HandlersChain { func (s *alipayPrivSrv) Chain() gin.HandlersChain {
return gin.HandlersChain{chain.JWT()} return gin.HandlersChain{chain.JWT()}
} }
@ -139,12 +64,12 @@ func (s *alipayPrivSrv) UserWalletBills(req *web.UserWalletBillsReq) (*web.UserW
bills, err := s.Ds.GetUserWalletBills(req.UserId, (req.Page-1)*req.PageSize, req.PageSize) bills, err := s.Ds.GetUserWalletBills(req.UserId, (req.Page-1)*req.PageSize, req.PageSize)
if err != nil { if err != nil {
logrus.Errorf("GetUserWalletBills err: %s", err) logrus.Errorf("GetUserWalletBills err: %s", err)
return nil, _errUserWalletBillsFailed return nil, web.ErrUserWalletBillsFailed
} }
totalRows, err := s.Ds.GetUserWalletBillCount(req.UserId) totalRows, err := s.Ds.GetUserWalletBillCount(req.UserId)
if err != nil { if err != nil {
logrus.Errorf("GetUserWalletBillCount err: %s", err) logrus.Errorf("GetUserWalletBillCount err: %s", err)
return nil, _errUserWalletBillsFailed return nil, web.ErrUserWalletBillsFailed
} }
resp := base.PageRespFrom(bills, req.Page, req.PageSize, totalRows) resp := base.PageRespFrom(bills, req.Page, req.PageSize, totalRows)
return (*web.UserWalletBillsResp)(resp), nil return (*web.UserWalletBillsResp)(resp), nil
@ -154,7 +79,7 @@ func (s *alipayPrivSrv) UserRechargeLink(req *web.UserRechargeLinkReq) (*web.Use
recharge, err := s.Ds.CreateRecharge(req.User.ID, req.Amount) recharge, err := s.Ds.CreateRecharge(req.User.ID, req.Amount)
if err != nil { if err != nil {
logrus.Errorf("Ds.CreateRecharge err: %v", err) logrus.Errorf("Ds.CreateRecharge err: %v", err)
return nil, _errRechargeReqFail return nil, web.ErrRechargeReqFail
} }
p := alipay.TradePreCreate{} p := alipay.TradePreCreate{}
p.OutTradeNo = fmt.Sprintf("%d", recharge.ID) p.OutTradeNo = fmt.Sprintf("%d", recharge.ID)
@ -164,14 +89,14 @@ func (s *alipayPrivSrv) UserRechargeLink(req *web.UserRechargeLinkReq) (*web.Use
rsp, err := s.alipayClient.TradePreCreate(p) rsp, err := s.alipayClient.TradePreCreate(p)
if err != nil { if err != nil {
logrus.Errorf("client.TradePreCreate err: %v\n", err) logrus.Errorf("client.TradePreCreate err: %v\n", err)
return nil, _errRechargeReqFail return nil, web.ErrRechargeReqFail
} }
if rsp.Content.Code != alipay.CodeSuccess { if rsp.Code != alipay.CodeSuccess {
return nil, _errRechargeReqFail return nil, web.ErrRechargeReqFail
} }
return &web.UserRechargeLinkResp{ return &web.UserRechargeLinkResp{
Id: recharge.ID, Id: recharge.ID,
Pay: rsp.Content.QRCode, Pay: rsp.QRCode,
}, nil }, nil
} }
@ -179,11 +104,11 @@ func (s *alipayPrivSrv) UserRechargeResult(req *web.UserRechargeResultReq) (*web
recharge, err := s.Ds.GetRechargeByID(req.Id) recharge, err := s.Ds.GetRechargeByID(req.Id)
if err != nil { if err != nil {
logrus.Errorf("Ds.GetRechargeByID err: %v", err) logrus.Errorf("Ds.GetRechargeByID err: %v", err)
return nil, _errGetRechargeFailed return nil, web.ErrGetRechargeFailed
} }
if recharge.UserID != req.UserId { if recharge.UserID != req.UserId {
logrus.Errorf("Ds.GetRechargeByID userId not equel recharge.UserID: %d req.UserId %d", recharge.UserID, req.UserId) logrus.Errorf("Ds.GetRechargeByID userId not equel recharge.UserID: %d req.UserId %d", recharge.UserID, req.UserId)
return nil, _errGetRechargeFailed return nil, web.ErrGetRechargeFailed
} }
return &web.UserRechargeResultResp{ return &web.UserRechargeResultResp{
Id: recharge.ID, Id: recharge.ID,
@ -197,42 +122,9 @@ func newAlipayPubSrv(s *base.DaoServant) api.AlipayPub {
} }
} }
func newAlipayPubBinding(alipayClient *alipay.Client) api.AlipayPubBinding {
return &alipayPubBinding{
UnimplementedAlipayPubBinding: &api.UnimplementedAlipayPubBinding{
BindAny: base.NewBindAnyFn(),
},
alipayClient: alipayClient,
}
}
func newAlipayPubRender() api.AlipayPubRender {
return &alipayPubRender{
UnimplementedAlipayPubRender: &api.UnimplementedAlipayPubRender{
RenderAny: base.RenderAny,
},
}
}
func newAlipayPrivSrv(s *base.DaoServant, client *alipay.Client) api.AlipayPriv { func newAlipayPrivSrv(s *base.DaoServant, client *alipay.Client) api.AlipayPriv {
return &alipayPrivSrv{ return &alipayPrivSrv{
DaoServant: s, DaoServant: s,
alipayClient: client, alipayClient: client,
} }
} }
func newAlipayPrivBinding() api.AlipayPrivBinding {
return &alipayPrivBinding{
UnimplementedAlipayPrivBinding: &api.UnimplementedAlipayPrivBinding{
BindAny: base.NewBindAnyFn(),
},
}
}
func newAlipayPrivRender() api.AlipayPrivRender {
return &alipayPrivRender{
UnimplementedAlipayPrivRender: &api.UnimplementedAlipayPrivRender{
RenderAny: base.RenderAny,
},
}
}

@ -10,14 +10,13 @@ import (
"time" "time"
"unicode/utf8" "unicode/utf8"
"github.com/alimy/mir/v3" "github.com/alimy/mir/v4"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
api "github.com/rocboss/paopao-ce/auto/api/v1" api "github.com/rocboss/paopao-ce/auto/api/v1"
"github.com/rocboss/paopao-ce/internal/core" "github.com/rocboss/paopao-ce/internal/core"
"github.com/rocboss/paopao-ce/internal/model/web" "github.com/rocboss/paopao-ce/internal/model/web"
"github.com/rocboss/paopao-ce/internal/servants/base" "github.com/rocboss/paopao-ce/internal/servants/base"
"github.com/rocboss/paopao-ce/internal/servants/chain" "github.com/rocboss/paopao-ce/internal/servants/chain"
"github.com/rocboss/paopao-ce/pkg/convert"
"github.com/rocboss/paopao-ce/pkg/xerror" "github.com/rocboss/paopao-ce/pkg/xerror"
"github.com/sirupsen/logrus" "github.com/sirupsen/logrus"
) )
@ -30,8 +29,6 @@ const (
var ( var (
_ api.Core = (*coreSrv)(nil) _ api.Core = (*coreSrv)(nil)
_ api.CoreBinding = (*coreBinding)(nil)
_ api.CoreRender = (*coreRender)(nil)
) )
type coreSrv struct { type coreSrv struct {
@ -41,77 +38,6 @@ type coreSrv struct {
oss core.ObjectStorageService oss core.ObjectStorageService
} }
type coreBinding struct {
*api.UnimplementedCoreBinding
}
type coreRender struct {
*api.UnimplementedCoreRender
}
func (b *coreBinding) BindGetUserInfo(c *gin.Context) (*web.UserInfoReq, mir.Error) {
username, exist := base.UserNameFrom(c)
if !exist {
return nil, xerror.UnauthorizedAuthNotExist
}
return &web.UserInfoReq{
Username: username,
}, nil
}
func (b *coreBinding) BindGetMessages(c *gin.Context) (*web.GetMessagesReq, mir.Error) {
v, err := web.BasePageReqFrom(c)
return (*web.GetMessagesReq)(v), err
}
func (b *coreBinding) BindGetCollections(c *gin.Context) (*web.GetCollectionsReq, mir.Error) {
v, err := web.BasePageReqFrom(c)
return (*web.GetCollectionsReq)(v), err
}
func (b *coreBinding) BindGetStars(c *gin.Context) (*web.GetStarsReq, mir.Error) {
v, err := web.BasePageReqFrom(c)
return (*web.GetStarsReq)(v), err
}
func (b *coreBinding) BindSuggestTags(c *gin.Context) (*web.SuggestTagsReq, mir.Error) {
return &web.SuggestTagsReq{
Keyword: c.Query("k"),
}, nil
}
func (b *coreBinding) BindSuggestUsers(c *gin.Context) (*web.SuggestUsersReq, mir.Error) {
return &web.SuggestUsersReq{
Keyword: c.Query("k"),
}, nil
}
func (b *coreBinding) BindTweetCollectionStatus(c *gin.Context) (*web.TweetCollectionStatusReq, mir.Error) {
UserId, exist := base.UserIdFrom(c)
if !exist {
return nil, xerror.UnauthorizedAuthNotExist
}
return &web.TweetCollectionStatusReq{
SimpleInfo: web.SimpleInfo{
Uid: UserId,
},
TweetId: convert.StrTo(c.Query("id")).MustInt64(),
}, nil
}
func (b *coreBinding) BindTweetStarStatus(c *gin.Context) (*web.TweetStarStatusReq, mir.Error) {
UserId, exist := base.UserIdFrom(c)
if !exist {
return nil, xerror.UnauthorizedAuthNotExist
}
return &web.TweetStarStatusReq{
SimpleInfo: web.SimpleInfo{
Uid: UserId,
},
TweetId: convert.StrTo(c.Query("id")).MustInt64(),
}, nil
}
func (s *coreSrv) Chain() gin.HandlersChain { func (s *coreSrv) Chain() gin.HandlersChain {
return gin.HandlersChain{chain.JWT()} return gin.HandlersChain{chain.JWT()}
} }
@ -196,7 +122,7 @@ func (s *coreSrv) GetMessages(req *web.GetMessagesReq) (*web.GetMessagesResp, mi
} }
if err != nil { if err != nil {
logrus.Errorf("Ds.GetMessages err: %v\n", err) logrus.Errorf("Ds.GetMessages err: %v\n", err)
return nil, _errGetMessagesFailed return nil, web.ErrGetMessagesFailed
} }
totalRows, _ := s.Ds.GetMessageCount(conditions) totalRows, _ := s.Ds.GetMessageCount(conditions)
resp := base.PageRespFrom(messages, req.Page, req.PageSize, totalRows) resp := base.PageRespFrom(messages, req.Page, req.PageSize, totalRows)
@ -206,14 +132,14 @@ func (s *coreSrv) GetMessages(req *web.GetMessagesReq) (*web.GetMessagesResp, mi
func (s *coreSrv) ReadMessage(req *web.ReadMessageReq) mir.Error { func (s *coreSrv) ReadMessage(req *web.ReadMessageReq) mir.Error {
message, err := s.Ds.GetMessageByID(req.ID) message, err := s.Ds.GetMessageByID(req.ID)
if err != nil { if err != nil {
return _errReadMessageFailed return web.ErrReadMessageFailed
} }
if message.ReceiverUserID != req.Uid { if message.ReceiverUserID != req.Uid {
return _errNoPermission return web.ErrNoPermission
} }
if err = s.Ds.ReadMessage(message); err != nil { if err = s.Ds.ReadMessage(message); err != nil {
logrus.Errorf("Ds.ReadMessage err: %s", err) logrus.Errorf("Ds.ReadMessage err: %s", err)
return _errReadMessageFailed return web.ErrReadMessageFailed
} }
return nil return nil
} }
@ -221,13 +147,13 @@ func (s *coreSrv) ReadMessage(req *web.ReadMessageReq) mir.Error {
func (s *coreSrv) SendUserWhisper(req *web.SendWhisperReq) mir.Error { func (s *coreSrv) SendUserWhisper(req *web.SendWhisperReq) mir.Error {
// 不允许发送私信给自己 // 不允许发送私信给自己
if req.Uid == req.UserID { if req.Uid == req.UserID {
return _errNoWhisperToSelf return web.ErrNoWhisperToSelf
} }
// 今日频次限制 // 今日频次限制
ctx := context.Background() ctx := context.Background()
if count, _ := s.Redis.GetCountWhisper(ctx, req.Uid); count >= _MaxWhisperNumDaily { if count, _ := s.Redis.GetCountWhisper(ctx, req.Uid); count >= _MaxWhisperNumDaily {
return _errTooManyWhisperNum return web.ErrTooManyWhisperNum
} }
// 创建私信 // 创建私信
@ -240,7 +166,7 @@ func (s *coreSrv) SendUserWhisper(req *web.SendWhisperReq) mir.Error {
}) })
if err != nil { if err != nil {
logrus.Errorf("Ds.CreateWhisper err: %s", err) logrus.Errorf("Ds.CreateWhisper err: %s", err)
return _errSendWhisperFailed return web.ErrSendWhisperFailed
} }
// 写入当日(自然日)计数缓存 // 写入当日(自然日)计数缓存
@ -253,12 +179,12 @@ func (s *coreSrv) GetCollections(req *web.GetCollectionsReq) (*web.GetCollection
collections, err := s.Ds.GetUserPostCollections(req.UserId, (req.Page-1)*req.PageSize, req.PageSize) collections, err := s.Ds.GetUserPostCollections(req.UserId, (req.Page-1)*req.PageSize, req.PageSize)
if err != nil { if err != nil {
logrus.Errorf("Ds.GetUserPostCollections err: %s", err) logrus.Errorf("Ds.GetUserPostCollections err: %s", err)
return nil, _errGetCollectionsFailed return nil, web.ErrGetCollectionsFailed
} }
totalRows, err := s.Ds.GetUserPostCollectionCount(req.UserId) totalRows, err := s.Ds.GetUserPostCollectionCount(req.UserId)
if err != nil { if err != nil {
logrus.Errorf("Ds.GetUserPostCollectionCount err: %s", err) logrus.Errorf("Ds.GetUserPostCollectionCount err: %s", err)
return nil, _errGetCollectionsFailed return nil, web.ErrGetCollectionsFailed
} }
var posts []*core.Post var posts []*core.Post
@ -268,7 +194,7 @@ func (s *coreSrv) GetCollections(req *web.GetCollectionsReq) (*web.GetCollection
postsFormated, err := s.Ds.MergePosts(posts) postsFormated, err := s.Ds.MergePosts(posts)
if err != nil { if err != nil {
logrus.Errorf("Ds.MergePosts err: %s", err) logrus.Errorf("Ds.MergePosts err: %s", err)
return nil, _errGetCollectionsFailed return nil, web.ErrGetCollectionsFailed
} }
resp := base.PageRespFrom(postsFormated, req.Page, req.PageSize, totalRows) resp := base.PageRespFrom(postsFormated, req.Page, req.PageSize, totalRows)
@ -279,23 +205,23 @@ func (s *coreSrv) UserPhoneBind(req *web.UserPhoneBindReq) mir.Error {
// 手机重复性检查 // 手机重复性检查
u, err := s.Ds.GetUserByPhone(req.Phone) u, err := s.Ds.GetUserByPhone(req.Phone)
if err == nil && u.Model != nil && u.ID != 0 && u.ID != req.User.ID { if err == nil && u.Model != nil && u.ID != 0 && u.ID != req.User.ID {
return _errExistedUserPhone return web.ErrExistedUserPhone
} }
// 如果禁止phone verify 则允许通过任意验证码 // 如果禁止phone verify 则允许通过任意验证码
if _enablePhoneVerify { if _enablePhoneVerify {
c, err := s.Ds.GetLatestPhoneCaptcha(req.Phone) c, err := s.Ds.GetLatestPhoneCaptcha(req.Phone)
if err != nil { if err != nil {
return _errErrorPhoneCaptcha return web.ErrErrorPhoneCaptcha
} }
if c.Captcha != req.Captcha { if c.Captcha != req.Captcha {
return _errErrorPhoneCaptcha return web.ErrErrorPhoneCaptcha
} }
if c.ExpiredOn < time.Now().Unix() { if c.ExpiredOn < time.Now().Unix() {
return _errErrorPhoneCaptcha return web.ErrErrorPhoneCaptcha
} }
if c.UseTimes >= _MaxCaptchaTimes { if c.UseTimes >= _MaxCaptchaTimes {
return _errMaxPhoneCaptchaUseTimes return web.ErrMaxPhoneCaptchaUseTimes
} }
// 更新检测次数 // 更新检测次数
s.Ds.UsePhoneCaptcha(c) s.Ds.UsePhoneCaptcha(c)
@ -316,12 +242,12 @@ func (s *coreSrv) GetStars(req *web.GetStarsReq) (*web.GetStarsResp, mir.Error)
stars, err := s.Ds.GetUserPostStars(req.UserId, (req.Page-1)*req.PageSize, req.PageSize) stars, err := s.Ds.GetUserPostStars(req.UserId, (req.Page-1)*req.PageSize, req.PageSize)
if err != nil { if err != nil {
logrus.Errorf("Ds.GetUserPostStars err: %s", err) logrus.Errorf("Ds.GetUserPostStars err: %s", err)
return nil, _errGetStarsFailed return nil, web.ErrGetStarsFailed
} }
totalRows, err := s.Ds.GetUserPostStarCount(req.UserId) totalRows, err := s.Ds.GetUserPostStarCount(req.UserId)
if err != nil { if err != nil {
logrus.Errorf("Ds.GetUserPostStars err: %s", err) logrus.Errorf("Ds.GetUserPostStars err: %s", err)
return nil, _errGetStarsFailed return nil, web.ErrGetStarsFailed
} }
var posts []*core.Post var posts []*core.Post
@ -331,7 +257,7 @@ func (s *coreSrv) GetStars(req *web.GetStarsReq) (*web.GetStarsResp, mir.Error)
postsFormated, err := s.Ds.MergePosts(posts) postsFormated, err := s.Ds.MergePosts(posts)
if err != nil { if err != nil {
logrus.Errorf("Ds.MergePosts err: %s", err) logrus.Errorf("Ds.MergePosts err: %s", err)
return nil, _errGetStarsFailed return nil, web.ErrGetStarsFailed
} }
resp := base.PageRespFrom(postsFormated, req.Page, req.PageSize, totalRows) resp := base.PageRespFrom(postsFormated, req.Page, req.PageSize, totalRows)
@ -346,7 +272,7 @@ func (s *coreSrv) ChangePassword(req *web.ChangePasswordReq) mir.Error {
// 旧密码校验 // 旧密码校验
user := req.User user := req.User
if !validPassword(user.Password, req.OldPassword, req.User.Salt) { if !validPassword(user.Password, req.OldPassword, req.User.Salt) {
return _errErrorOldPassword return web.ErrErrorOldPassword
} }
// 更新入库 // 更新入库
user.Password, user.Salt = encryptPasswordAndSalt(req.Password) user.Password, user.Salt = encryptPasswordAndSalt(req.Password)
@ -385,7 +311,7 @@ func (s *coreSrv) SuggestUsers(req *web.SuggestUsersReq) (*web.SuggestUsersResp,
func (s *coreSrv) ChangeNickname(req *web.ChangeNicknameReq) mir.Error { func (s *coreSrv) ChangeNickname(req *web.ChangeNicknameReq) mir.Error {
if utf8.RuneCountInString(req.Nickname) < 2 || utf8.RuneCountInString(req.Nickname) > 12 { if utf8.RuneCountInString(req.Nickname) < 2 || utf8.RuneCountInString(req.Nickname) > 12 {
return _errNicknameLengthLimit return web.ErrNicknameLengthLimit
} }
user := req.User user := req.User
user.Nickname = req.Nickname user.Nickname = req.Nickname
@ -448,19 +374,3 @@ func newCoreSrv(s *base.DaoServant, oss core.ObjectStorageService) api.Core {
oss: oss, oss: oss,
} }
} }
func newCoreBinding() api.CoreBinding {
return &coreBinding{
UnimplementedCoreBinding: &api.UnimplementedCoreBinding{
BindAny: base.NewBindAnyFn(),
},
}
}
func newCoreRender() api.CoreRender {
return &coreRender{
UnimplementedCoreRender: &api.UnimplementedCoreRender{
RenderAny: base.RenderAny,
},
}
}

@ -13,8 +13,6 @@ import (
var ( var (
_ api.Followship = (*followshipSrv)(nil) _ api.Followship = (*followshipSrv)(nil)
_ api.FollowshipBinding = (*followshipBinding)(nil)
_ api.FollowshipRender = (*followshipRender)(nil)
) )
type followshipSrv struct { type followshipSrv struct {
@ -22,14 +20,6 @@ type followshipSrv struct {
*base.DaoServant *base.DaoServant
} }
type followshipBinding struct {
*api.UnimplementedFollowshipBinding
}
type followshipRender struct {
*api.UnimplementedFollowshipRender
}
func (s *followshipSrv) Chain() gin.HandlersChain { func (s *followshipSrv) Chain() gin.HandlersChain {
return gin.HandlersChain{chain.JWT()} return gin.HandlersChain{chain.JWT()}
} }
@ -37,19 +27,3 @@ func (s *followshipSrv) Chain() gin.HandlersChain {
func newFollowshipSrv(s *base.DaoServant) api.Followship { func newFollowshipSrv(s *base.DaoServant) api.Followship {
return &followshipSrv{} return &followshipSrv{}
} }
func newFollowshipBinding() api.FollowshipBinding {
return &followshipBinding{
UnimplementedFollowshipBinding: &api.UnimplementedFollowshipBinding{
BindAny: base.NewBindAnyFn(),
},
}
}
func newFollowshipRender() api.FollowshipRender {
return &followshipRender{
UnimplementedFollowshipRender: &api.UnimplementedFollowshipRender{
RenderAny: base.RenderAny,
},
}
}

@ -5,7 +5,7 @@
package web package web
import ( import (
"github.com/alimy/mir/v3" "github.com/alimy/mir/v4"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
api "github.com/rocboss/paopao-ce/auto/api/v1" api "github.com/rocboss/paopao-ce/auto/api/v1"
"github.com/rocboss/paopao-ce/internal/model/web" "github.com/rocboss/paopao-ce/internal/model/web"
@ -17,8 +17,6 @@ import (
var ( var (
_ api.Friendship = (*friendshipSrv)(nil) _ api.Friendship = (*friendshipSrv)(nil)
_ api.FriendshipBinding = (*friendshipBinding)(nil)
_ api.FriendshipRender = (*friendshipRender)(nil)
) )
type friendshipSrv struct { type friendshipSrv struct {
@ -26,14 +24,6 @@ type friendshipSrv struct {
*base.DaoServant *base.DaoServant
} }
type friendshipBinding struct {
*api.UnimplementedFriendshipBinding
}
type friendshipRender struct {
*api.UnimplementedFriendshipRender
}
func (s *friendshipSrv) Chain() gin.HandlersChain { func (s *friendshipSrv) Chain() gin.HandlersChain {
return gin.HandlersChain{chain.JWT()} return gin.HandlersChain{chain.JWT()}
} }
@ -45,7 +35,7 @@ func (s *friendshipSrv) GetContacts(req *web.GetContactsReq) (*web.GetContactsRe
res, err := s.Ds.GetContacts(req.User.ID, (req.Page-1)*req.PageSize, req.PageSize) res, err := s.Ds.GetContacts(req.User.ID, (req.Page-1)*req.PageSize, req.PageSize)
if err != nil { if err != nil {
logrus.Errorf("service.GetContacts err: %s", err) logrus.Errorf("service.GetContacts err: %s", err)
return nil, _errGetContactsFailed return nil, web.ErrGetContactsFailed
} }
resp := base.PageRespFrom(res.Contacts, req.Page, req.PageSize, res.Total) resp := base.PageRespFrom(res.Contacts, req.Page, req.PageSize, res.Total)
return (*web.GetContactsResp)(resp), nil return (*web.GetContactsResp)(resp), nil
@ -56,14 +46,14 @@ func (s *friendshipSrv) DeleteFriend(req *web.DeleteFriendReq) mir.Error {
return xerror.ServerError return xerror.ServerError
} }
if req.User != nil && req.User.ID == req.UserId { if req.User != nil && req.User.ID == req.UserId {
return _errNoActionToSelf return web.ErrNoActionToSelf
} }
if _, err := s.Ds.GetUserByID(req.UserId); err != nil { if _, err := s.Ds.GetUserByID(req.UserId); err != nil {
return _errNotExistFriendId return web.ErrNotExistFriendId
} }
if err := s.Ds.DeleteFriend(req.User.ID, req.UserId); err != nil { if err := s.Ds.DeleteFriend(req.User.ID, req.UserId); err != nil {
logrus.Errorf("Ds.DeleteFriend err: %s", err) logrus.Errorf("Ds.DeleteFriend err: %s", err)
return _errDeleteFriendFailed return web.ErrDeleteFriendFailed
} }
return nil return nil
} }
@ -73,14 +63,14 @@ func (s *friendshipSrv) RejectFriend(req *web.RejectFriendReq) mir.Error {
return xerror.ServerError return xerror.ServerError
} }
if req.User.ID == req.UserId { if req.User.ID == req.UserId {
return _errNoActionToSelf return web.ErrNoActionToSelf
} }
if _, err := s.Ds.GetUserByID(req.UserId); err != nil { if _, err := s.Ds.GetUserByID(req.UserId); err != nil {
return _errNotExistFriendId return web.ErrNotExistFriendId
} }
if err := s.Ds.RejectFriend(req.User.ID, req.UserId); err != nil { if err := s.Ds.RejectFriend(req.User.ID, req.UserId); err != nil {
logrus.Errorf("Ds.RejectFriend err: %s", err) logrus.Errorf("Ds.RejectFriend err: %s", err)
return _errRejectFriendFailed return web.ErrRejectFriendFailed
} }
return nil return nil
} }
@ -90,14 +80,14 @@ func (s *friendshipSrv) AddFriend(req *web.AddFriendReq) mir.Error {
return xerror.ServerError return xerror.ServerError
} }
if req.User.ID == req.UserId { if req.User.ID == req.UserId {
return _errNoActionToSelf return web.ErrNoActionToSelf
} }
if _, err := s.Ds.GetUserByID(req.UserId); err != nil { if _, err := s.Ds.GetUserByID(req.UserId); err != nil {
return _errNotExistFriendId return web.ErrNotExistFriendId
} }
if err := s.Ds.AddFriend(req.User.ID, req.UserId); err != nil { if err := s.Ds.AddFriend(req.User.ID, req.UserId); err != nil {
logrus.Errorf("Ds.AddFriend err: %s", err) logrus.Errorf("Ds.AddFriend err: %s", err)
return _errAddFriendFailed return web.ErrAddFriendFailed
} }
return nil return nil
} }
@ -107,14 +97,14 @@ func (s *friendshipSrv) RequestingFriend(req *web.RequestingFriendReq) mir.Error
return xerror.ServerError return xerror.ServerError
} }
if req.User.ID == req.UserId { if req.User.ID == req.UserId {
return _errNoRequestingFriendToSelf return web.ErrNoRequestingFriendToSelf
} }
if _, err := s.Ds.GetUserByID(req.UserId); err != nil { if _, err := s.Ds.GetUserByID(req.UserId); err != nil {
return _errNotExistFriendId return web.ErrNotExistFriendId
} }
if err := s.Ds.RequestingFriend(req.User.ID, req.UserId, req.Greetings); err != nil { if err := s.Ds.RequestingFriend(req.User.ID, req.UserId, req.Greetings); err != nil {
logrus.Errorf("Ds.RequestingFriend err: %s", err) logrus.Errorf("Ds.RequestingFriend err: %s", err)
return _errSendRequestingFriendFailed return web.ErrSendRequestingFriendFailed
} }
return nil return nil
} }
@ -124,19 +114,3 @@ func newFriendshipSrv(s *base.DaoServant) api.Friendship {
DaoServant: s, DaoServant: s,
} }
} }
func newFriendshipBinding() api.FriendshipBinding {
return &friendshipBinding{
UnimplementedFriendshipBinding: &api.UnimplementedFriendshipBinding{
BindAny: base.NewBindAnyFn(),
},
}
}
func newFriendshipRender() api.FriendshipRender {
return &friendshipRender{
UnimplementedFriendshipRender: &api.UnimplementedFriendshipRender{
RenderAny: base.RenderAny,
},
}
}

@ -5,7 +5,7 @@
package web package web
import ( import (
"github.com/alimy/mir/v3" "github.com/alimy/mir/v4"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
api "github.com/rocboss/paopao-ce/auto/api/v1" api "github.com/rocboss/paopao-ce/auto/api/v1"
"github.com/rocboss/paopao-ce/internal/core" "github.com/rocboss/paopao-ce/internal/core"
@ -14,14 +14,11 @@ import (
"github.com/rocboss/paopao-ce/internal/model/web" "github.com/rocboss/paopao-ce/internal/model/web"
"github.com/rocboss/paopao-ce/internal/servants/base" "github.com/rocboss/paopao-ce/internal/servants/base"
"github.com/rocboss/paopao-ce/internal/servants/chain" "github.com/rocboss/paopao-ce/internal/servants/chain"
"github.com/rocboss/paopao-ce/pkg/app"
"github.com/sirupsen/logrus" "github.com/sirupsen/logrus"
) )
var ( var (
_ api.Loose = (*looseSrv)(nil) _ api.Loose = (*looseSrv)(nil)
_ api.LooseBinding = (*looseBinding)(nil)
_ api.LooseRender = (*looseRender)(nil)
) )
type looseSrv struct { type looseSrv struct {
@ -29,32 +26,6 @@ type looseSrv struct {
*base.DaoServant *base.DaoServant
} }
type looseBinding struct {
*api.UnimplementedLooseBinding
}
type looseRender struct {
*api.UnimplementedLooseRender
}
func (s *looseBinding) BindTimeline(c *gin.Context) (*web.TimelineReq, mir.Error) {
user, _ := base.UserFrom(c)
page, pageSize := app.GetPageInfo(c)
v := &web.TimelineReq{
BaseInfo: web.BaseInfo{
User: user,
},
Query: c.Query("query"),
Type: "search",
Page: page,
PageSize: pageSize,
}
if c.Query("type") == "tag" {
v.Type = "tag"
}
return v, nil
}
func (s *looseSrv) Chain() gin.HandlersChain { func (s *looseSrv) Chain() gin.HandlersChain {
return gin.HandlersChain{chain.JwtLoose()} return gin.HandlersChain{chain.JwtLoose()}
} }
@ -66,7 +37,7 @@ func (s *looseSrv) Timeline(req *web.TimelineReq) (*web.TimelineResp, mir.Error)
res, err := s.Ds.IndexPosts(req.User, offset, limit) res, err := s.Ds.IndexPosts(req.User, offset, limit)
if err != nil { if err != nil {
logrus.Errorf("Ds.IndexPosts err: %s", err) logrus.Errorf("Ds.IndexPosts err: %s", err)
return nil, _errGetPostsFailed return nil, web.ErrGetPostsFailed
} }
resp = base.PageRespFrom(res.Tweets, req.Page, req.PageSize, res.Total) resp = base.PageRespFrom(res.Tweets, req.Page, req.PageSize, res.Total)
} else { } else {
@ -77,12 +48,12 @@ func (s *looseSrv) Timeline(req *web.TimelineReq) (*web.TimelineResp, mir.Error)
res, err := s.Ts.Search(req.User, q, offset, limit) res, err := s.Ts.Search(req.User, q, offset, limit)
if err != nil { if err != nil {
logrus.Errorf("Ts.Search err: %s", err) logrus.Errorf("Ts.Search err: %s", err)
return nil, _errGetPostsFailed return nil, web.ErrGetPostsFailed
} }
posts, err := s.Ds.RevampPosts(res.Items) posts, err := s.Ds.RevampPosts(res.Items)
if err != nil { if err != nil {
logrus.Errorf("Ds.RevampPosts err: %s", err) logrus.Errorf("Ds.RevampPosts err: %s", err)
return nil, _errGetPostsFailed return nil, web.ErrGetPostsFailed
} }
resp = base.PageRespFrom(posts, req.Page, req.PageSize, res.Total) resp = base.PageRespFrom(posts, req.Page, req.PageSize, res.Total)
} }
@ -114,12 +85,12 @@ func (s *looseSrv) GetUserTweets(req *web.GetUserTweetsReq) (*web.GetUserTweetsR
_, posts, err := s.GetTweetList(conditions, (req.Page-1)*req.PageSize, req.PageSize) _, posts, err := s.GetTweetList(conditions, (req.Page-1)*req.PageSize, req.PageSize)
if err != nil { if err != nil {
logrus.Errorf("s.GetTweetList err: %s", err) logrus.Errorf("s.GetTweetList err: %s", err)
return nil, _errGetPostsFailed return nil, web.ErrGetPostsFailed
} }
totalRows, err := s.Ds.GetPostCount(conditions) totalRows, err := s.Ds.GetPostCount(conditions)
if err != nil { if err != nil {
logrus.Errorf("s.GetPostCount err: %s", err) logrus.Errorf("s.GetPostCount err: %s", err)
return nil, _errGetPostsFailed return nil, web.ErrGetPostsFailed
} }
resp := base.PageRespFrom(posts, req.Page, req.PageSize, totalRows) resp := base.PageRespFrom(posts, req.Page, req.PageSize, totalRows)
@ -130,10 +101,10 @@ func (s *looseSrv) GetUserProfile(req *web.GetUserProfileReq) (*web.GetUserProfi
he, err := s.Ds.GetUserByUsername(req.Username) he, err := s.Ds.GetUserByUsername(req.Username)
if err != nil { if err != nil {
logrus.Errorf("Ds.GetUserByUsername err: %s", err) logrus.Errorf("Ds.GetUserByUsername err: %s", err)
return nil, _errNoExistUsername return nil, web.ErrNoExistUsername
} }
if he.Model == nil && he.ID <= 0 { if he.Model == nil && he.ID <= 0 {
return nil, _errNoExistUsername return nil, web.ErrNoExistUsername
} }
// 设定自己不是自己的朋友 // 设定自己不是自己的朋友
isFriend := !(req.User == nil || req.User.ID == he.ID) isFriend := !(req.User == nil || req.User.ID == he.ID)
@ -175,10 +146,10 @@ func (s *looseSrv) TopicList(req *web.TopicListReq) (*web.TopicListResp, mir.Err
} }
default: default:
// TODO: return good error // TODO: return good error
err = _errGetPostTagsFailed err = web.ErrGetPostTagsFailed
} }
if err != nil { if err != nil {
return nil, _errGetPostTagsFailed return nil, web.ErrGetPostTagsFailed
} }
return &web.TopicListResp{ return &web.TopicListResp{
Topics: tags, Topics: tags,
@ -198,7 +169,7 @@ func (s *looseSrv) TweetComments(req *web.TweetCommentsReq) (*web.TweetCommentsR
comments, err := s.Ds.GetComments(conditions, (req.Page-1)*req.PageSize, req.PageSize) comments, err := s.Ds.GetComments(conditions, (req.Page-1)*req.PageSize, req.PageSize)
if err != nil { if err != nil {
return nil, _errGetCommentsFailed return nil, web.ErrGetCommentsFailed
} }
userIDs := []int64{} userIDs := []int64{}
@ -210,24 +181,24 @@ func (s *looseSrv) TweetComments(req *web.TweetCommentsReq) (*web.TweetCommentsR
users, err := s.Ds.GetUsersByIDs(userIDs) users, err := s.Ds.GetUsersByIDs(userIDs)
if err != nil { if err != nil {
return nil, _errGetCommentsFailed return nil, web.ErrGetCommentsFailed
} }
contents, err := s.Ds.GetCommentContentsByIDs(commentIDs) contents, err := s.Ds.GetCommentContentsByIDs(commentIDs)
if err != nil { if err != nil {
return nil, _errGetCommentsFailed return nil, web.ErrGetCommentsFailed
} }
replies, err := s.Ds.GetCommentRepliesByID(commentIDs) replies, err := s.Ds.GetCommentRepliesByID(commentIDs)
if err != nil { if err != nil {
return nil, _errGetCommentsFailed return nil, web.ErrGetCommentsFailed
} }
var commentThumbs, replyThumbs cs.CommentThumbsMap var commentThumbs, replyThumbs cs.CommentThumbsMap
if req.Uid > 0 { if req.Uid > 0 {
commentThumbs, replyThumbs, err = s.Ds.GetCommentThumbsMap(req.Uid, req.TweetId) commentThumbs, replyThumbs, err = s.Ds.GetCommentThumbsMap(req.Uid, req.TweetId)
if err != nil { if err != nil {
return nil, _errGetCommentsFailed return nil, web.ErrGetCommentsFailed
} }
} }
@ -278,19 +249,3 @@ func newLooseSrv(s *base.DaoServant) api.Loose {
DaoServant: s, DaoServant: s,
} }
} }
func newLooseBinding() api.LooseBinding {
return &looseBinding{
UnimplementedLooseBinding: &api.UnimplementedLooseBinding{
BindAny: base.NewBindAnyFn(),
},
}
}
func newLooseRender() api.LooseRender {
return &looseRender{
UnimplementedLooseRender: &api.UnimplementedLooseRender{
RenderAny: base.RenderAny,
},
}
}

@ -9,10 +9,10 @@ import (
"strings" "strings"
"time" "time"
"github.com/alimy/mir/v3" "github.com/alimy/mir/v4"
"github.com/disintegration/imaging" "github.com/disintegration/imaging"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/gofrs/uuid" "github.com/gofrs/uuid/v5"
api "github.com/rocboss/paopao-ce/auto/api/v1" api "github.com/rocboss/paopao-ce/auto/api/v1"
"github.com/rocboss/paopao-ce/internal/conf" "github.com/rocboss/paopao-ce/internal/conf"
"github.com/rocboss/paopao-ce/internal/core" "github.com/rocboss/paopao-ce/internal/core"
@ -20,7 +20,6 @@ import (
"github.com/rocboss/paopao-ce/internal/model/web" "github.com/rocboss/paopao-ce/internal/model/web"
"github.com/rocboss/paopao-ce/internal/servants/base" "github.com/rocboss/paopao-ce/internal/servants/base"
"github.com/rocboss/paopao-ce/internal/servants/chain" "github.com/rocboss/paopao-ce/internal/servants/chain"
"github.com/rocboss/paopao-ce/pkg/convert"
"github.com/rocboss/paopao-ce/pkg/utils" "github.com/rocboss/paopao-ce/pkg/utils"
"github.com/rocboss/paopao-ce/pkg/xerror" "github.com/rocboss/paopao-ce/pkg/xerror"
"github.com/sirupsen/logrus" "github.com/sirupsen/logrus"
@ -28,8 +27,6 @@ import (
var ( var (
_ api.Priv = (*privSrv)(nil) _ api.Priv = (*privSrv)(nil)
_ api.PrivBinding = (*privBinding)(nil)
_ api.PrivRender = (*privRender)(nil)
_uploadAttachmentTypeMap = map[string]cs.AttachmentType{ _uploadAttachmentTypeMap = map[string]cs.AttachmentType{
"public/image": cs.AttachmentTypeImage, "public/image": cs.AttachmentTypeImage,
@ -46,100 +43,6 @@ type privSrv struct {
oss core.ObjectStorageService oss core.ObjectStorageService
} }
type privBinding struct {
*api.UnimplementedPrivBinding
}
type privRender struct {
*api.UnimplementedPrivRender
}
func (b *privBinding) BindUploadAttachment(c *gin.Context) (_ *web.UploadAttachmentReq, xerr mir.Error) {
UserId, exist := base.UserIdFrom(c)
if !exist {
return nil, xerror.UnauthorizedAuthNotExist
}
uploadType := c.Request.FormValue("type")
file, fileHeader, err := c.Request.FormFile("file")
if err != nil {
return nil, _errFileUploadFailed
}
defer func() {
if xerr != nil {
file.Close()
}
}()
if err := fileCheck(uploadType, fileHeader.Size); err != nil {
return nil, err
}
contentType := fileHeader.Header.Get("Content-Type")
fileExt, xerr := getFileExt(contentType)
if xerr != nil {
return nil, xerr
}
return &web.UploadAttachmentReq{
SimpleInfo: web.SimpleInfo{
Uid: UserId,
},
UploadType: uploadType,
ContentType: contentType,
File: file,
FileSize: fileHeader.Size,
FileExt: fileExt,
}, nil
}
func (b *privBinding) BindDownloadAttachmentPrecheck(c *gin.Context) (*web.DownloadAttachmentPrecheckReq, mir.Error) {
user, exist := base.UserFrom(c)
if !exist {
return nil, xerror.UnauthorizedAuthNotExist
}
return &web.DownloadAttachmentPrecheckReq{
BaseInfo: web.BaseInfo{
User: user,
},
ContentID: convert.StrTo(c.Query("id")).MustInt64(),
}, nil
}
func (b *privBinding) BindDownloadAttachment(c *gin.Context) (*web.DownloadAttachmentReq, mir.Error) {
user, exist := base.UserFrom(c)
if !exist {
return nil, xerror.UnauthorizedAuthNotExist
}
return &web.DownloadAttachmentReq{
BaseInfo: web.BaseInfo{
User: user,
},
ContentID: convert.StrTo(c.Query("id")).MustInt64(),
}, nil
}
func (s *privBinding) BindCreateTweet(c *gin.Context) (*web.CreateTweetReq, mir.Error) {
v := &web.CreateTweetReq{}
err := s.BindAny(c, v)
v.ClientIP = c.ClientIP()
return v, err
}
func (s *privBinding) BindCreateCommentReply(c *gin.Context) (*web.CreateCommentReplyReq, mir.Error) {
v := &web.CreateCommentReplyReq{}
err := s.BindAny(c, v)
v.ClientIP = c.ClientIP()
return v, err
}
func (s *privBinding) BindCreateComment(c *gin.Context) (*web.CreateCommentReq, mir.Error) {
v := &web.CreateCommentReq{}
err := s.BindAny(c, v)
v.ClientIP = c.ClientIP()
return v, err
}
func (s *privSrv) Chain() gin.HandlersChain { func (s *privSrv) Chain() gin.HandlersChain {
return gin.HandlersChain{chain.JWT(), chain.Priv()} return gin.HandlersChain{chain.JWT(), chain.Priv()}
} }
@ -147,7 +50,7 @@ func (s *privSrv) Chain() gin.HandlersChain {
func (s *privSrv) ThumbsDownTweetReply(req *web.TweetReplyThumbsReq) mir.Error { func (s *privSrv) ThumbsDownTweetReply(req *web.TweetReplyThumbsReq) mir.Error {
if err := s.Ds.ThumbsDownReply(req.Uid, req.TweetId, req.CommentId, req.ReplyId); err != nil { if err := s.Ds.ThumbsDownReply(req.Uid, req.TweetId, req.CommentId, req.ReplyId); err != nil {
logrus.Errorf("thumbs down tweet reply error: %s req:%v", err, req) logrus.Errorf("thumbs down tweet reply error: %s req:%v", err, req)
return _errThumbsDownTweetReply return web.ErrThumbsDownTweetReply
} }
return nil return nil
} }
@ -155,7 +58,7 @@ func (s *privSrv) ThumbsDownTweetReply(req *web.TweetReplyThumbsReq) mir.Error {
func (s *privSrv) ThumbsUpTweetReply(req *web.TweetReplyThumbsReq) mir.Error { func (s *privSrv) ThumbsUpTweetReply(req *web.TweetReplyThumbsReq) mir.Error {
if err := s.Ds.ThumbsUpReply(req.Uid, req.TweetId, req.CommentId, req.ReplyId); err != nil { if err := s.Ds.ThumbsUpReply(req.Uid, req.TweetId, req.CommentId, req.ReplyId); err != nil {
logrus.Errorf("thumbs up tweet reply error: %s req:%v", err, req) logrus.Errorf("thumbs up tweet reply error: %s req:%v", err, req)
return _errThumbsUpTweetReply return web.ErrThumbsUpTweetReply
} }
return nil return nil
} }
@ -163,7 +66,7 @@ func (s *privSrv) ThumbsUpTweetReply(req *web.TweetReplyThumbsReq) mir.Error {
func (s *privSrv) ThumbsDownTweetComment(req *web.TweetCommentThumbsReq) mir.Error { func (s *privSrv) ThumbsDownTweetComment(req *web.TweetCommentThumbsReq) mir.Error {
if err := s.Ds.ThumbsDownComment(req.Uid, req.TweetId, req.CommentId); err != nil { if err := s.Ds.ThumbsDownComment(req.Uid, req.TweetId, req.CommentId); err != nil {
logrus.Errorf("thumbs down tweet comment error: %s req:%v", err, req) logrus.Errorf("thumbs down tweet comment error: %s req:%v", err, req)
return _errThumbsDownTweetComment return web.ErrThumbsDownTweetComment
} }
return nil return nil
} }
@ -171,7 +74,7 @@ func (s *privSrv) ThumbsDownTweetComment(req *web.TweetCommentThumbsReq) mir.Err
func (s *privSrv) ThumbsUpTweetComment(req *web.TweetCommentThumbsReq) mir.Error { func (s *privSrv) ThumbsUpTweetComment(req *web.TweetCommentThumbsReq) mir.Error {
if err := s.Ds.ThumbsUpComment(req.Uid, req.TweetId, req.CommentId); err != nil { if err := s.Ds.ThumbsUpComment(req.Uid, req.TweetId, req.CommentId); err != nil {
logrus.Errorf("thumbs up tweet comment error: %s req:%v", err, req) logrus.Errorf("thumbs up tweet comment error: %s req:%v", err, req)
return _errThumbsUpTweetComment return web.ErrThumbsUpTweetComment
} }
return nil return nil
} }
@ -179,7 +82,7 @@ func (s *privSrv) ThumbsUpTweetComment(req *web.TweetCommentThumbsReq) mir.Error
func (s *privSrv) UnfollowTopic(req *web.UnfollowTopicReq) mir.Error { func (s *privSrv) UnfollowTopic(req *web.UnfollowTopicReq) mir.Error {
if err := s.Ds.UnfollowTopic(req.Uid, req.TopicId); err != nil { if err := s.Ds.UnfollowTopic(req.Uid, req.TopicId); err != nil {
logrus.Errorf("user(%d) unfollow topic(%d) failed: %s", req.Uid, req.TopicId, err) logrus.Errorf("user(%d) unfollow topic(%d) failed: %s", req.Uid, req.TopicId, err)
return _errUnfollowTopicFailed return web.ErrUnfollowTopicFailed
} }
return nil return nil
} }
@ -187,7 +90,7 @@ func (s *privSrv) UnfollowTopic(req *web.UnfollowTopicReq) mir.Error {
func (s *privSrv) FollowTopic(req *web.FollowTopicReq) mir.Error { func (s *privSrv) FollowTopic(req *web.FollowTopicReq) mir.Error {
if err := s.Ds.FollowTopic(req.Uid, req.TopicId); err != nil { if err := s.Ds.FollowTopic(req.Uid, req.TopicId); err != nil {
logrus.Errorf("user(%d) follow topic(%d) failed: %s", req.Uid, req.TopicId, err) logrus.Errorf("user(%d) follow topic(%d) failed: %s", req.Uid, req.TopicId, err)
return _errFollowTopicFailed return web.ErrFollowTopicFailed
} }
return nil return nil
} }
@ -196,7 +99,7 @@ func (s *privSrv) StickTopic(req *web.StickTopicReq) (*web.StickTopicResp, mir.E
status, err := s.Ds.StickTopic(req.Uid, req.TopicId) status, err := s.Ds.StickTopic(req.Uid, req.TopicId)
if err != nil { if err != nil {
logrus.Errorf("user(%d) stick topic(%d) failed: %s", req.Uid, req.TopicId, err) logrus.Errorf("user(%d) stick topic(%d) failed: %s", req.Uid, req.TopicId, err)
return nil, _errStickTopicFailed return nil, web.ErrStickTopicFailed
} }
return &web.StickTopicResp{ return &web.StickTopicResp{
StickStatus: status, StickStatus: status,
@ -212,7 +115,7 @@ func (s *privSrv) UploadAttachment(req *web.UploadAttachmentReq) (*web.UploadAtt
objectUrl, err := s.oss.PutObject(ossSavePath, req.File, req.FileSize, req.ContentType, false) objectUrl, err := s.oss.PutObject(ossSavePath, req.File, req.FileSize, req.ContentType, false)
if err != nil { if err != nil {
logrus.Errorf("oss.putObject err: %s", err) logrus.Errorf("oss.putObject err: %s", err)
return nil, _errFileUploadFailed return nil, web.ErrFileUploadFailed
} }
// 构造附件Model // 构造附件Model
@ -231,8 +134,8 @@ func (s *privSrv) UploadAttachment(req *web.UploadAttachmentReq) (*web.UploadAtt
} }
attachment.ID, err = s.Dsa.CreateAttachment(attachment) attachment.ID, err = s.Dsa.CreateAttachment(attachment)
if err != nil { if err != nil {
logrus.Errorf("Dsa.CreateAttachment err: %s", err) logrus.Errorf("Ds.CreateAttachment err: %s", err)
return nil, _errFileUploadFailed return nil, web.ErrFileUploadFailed
} }
return &web.UploadAttachmentResp{ return &web.UploadAttachmentResp{
@ -249,14 +152,14 @@ func (s *privSrv) DownloadAttachmentPrecheck(req *web.DownloadAttachmentPrecheck
content, err := s.Ds.GetPostContentByID(req.ContentID) content, err := s.Ds.GetPostContentByID(req.ContentID)
if err != nil { if err != nil {
logrus.Errorf("Ds.GetPostContentByID err: %s", err) logrus.Errorf("Ds.GetPostContentByID err: %s", err)
return nil, _errInvalidDownloadReq return nil, web.ErrInvalidDownloadReq
} }
resp := &web.DownloadAttachmentPrecheckResp{Paid: true} resp := &web.DownloadAttachmentPrecheckResp{Paid: true}
if content.Type == core.ContentTypeChargeAttachment { if content.Type == core.ContentTypeChargeAttachment {
tweet, err := s.GetTweetBy(content.PostID) tweet, err := s.GetTweetBy(content.PostID)
if err != nil { if err != nil {
logrus.Errorf("get tweet err: %v", err) logrus.Errorf("get tweet err: %v", err)
return nil, _errInvalidDownloadReq return nil, web.ErrInvalidDownloadReq
} }
// 发布者或管理员免费下载 // 发布者或管理员免费下载
if tweet.UserID == req.User.ID || req.User.IsAdmin { if tweet.UserID == req.User.ID || req.User.IsAdmin {
@ -272,7 +175,7 @@ func (s *privSrv) DownloadAttachment(req *web.DownloadAttachmentReq) (*web.Downl
content, err := s.Ds.GetPostContentByID(req.ContentID) content, err := s.Ds.GetPostContentByID(req.ContentID)
if err != nil { if err != nil {
logrus.Errorf("s.GetPostContentByID err: %v", err) logrus.Errorf("s.GetPostContentByID err: %v", err)
return nil, _errInvalidDownloadReq return nil, web.ErrInvalidDownloadReq
} }
// 收费附件 // 收费附件
if content.Type == core.ContentTypeChargeAttachment { if content.Type == core.ContentTypeChargeAttachment {
@ -305,7 +208,7 @@ func (s *privSrv) DownloadAttachment(req *web.DownloadAttachmentReq) (*web.Downl
signedURL, err := s.oss.SignURL(objectKey, 60) signedURL, err := s.oss.SignURL(objectKey, 60)
if err != nil { if err != nil {
logrus.Errorf("client.SignURL err: %v", err) logrus.Errorf("client.SignURL err: %v", err)
return nil, _errDownloadReqError return nil, web.ErrDownloadReqError
} }
return &web.DownloadAttachmentResp{ return &web.DownloadAttachmentResp{
SignedURL: signedURL, SignedURL: signedURL,
@ -322,7 +225,7 @@ func (s *privSrv) CreateTweet(req *web.CreateTweetReq) (_ *web.CreateTweetResp,
contents, err := persistMediaContents(s.oss, req.Contents) contents, err := persistMediaContents(s.oss, req.Contents)
if err != nil { if err != nil {
return nil, _errCreatePostFailed return nil, web.ErrCreatePostFailed
} }
mediaContents = contents mediaContents = contents
tags := tagsFrom(req.Tags) tags := tagsFrom(req.Tags)
@ -337,7 +240,7 @@ func (s *privSrv) CreateTweet(req *web.CreateTweetReq) (_ *web.CreateTweetResp,
post, err = s.Ds.CreatePost(post) post, err = s.Ds.CreatePost(post)
if err != nil { if err != nil {
logrus.Errorf("Ds.CreatePost err: %s", err) logrus.Errorf("Ds.CreatePost err: %s", err)
return nil, _errCreatePostFailed return nil, web.ErrCreatePostFailed
} }
// 创建推文内容 // 创建推文内容
@ -359,7 +262,7 @@ func (s *privSrv) CreateTweet(req *web.CreateTweetReq) (_ *web.CreateTweetResp,
} }
if _, err = s.Ds.CreatePostContent(postContent); err != nil { if _, err = s.Ds.CreatePostContent(postContent); err != nil {
logrus.Infof("Ds.CreatePostContent err: %s", err) logrus.Infof("Ds.CreatePostContent err: %s", err)
return nil, _errCreateCommentFailed return nil, web.ErrCreateCommentFailed
} }
} }
@ -391,27 +294,27 @@ func (s *privSrv) CreateTweet(req *web.CreateTweetReq) (_ *web.CreateTweetResp,
formatedPosts, err := s.Ds.RevampPosts([]*core.PostFormated{post.Format()}) formatedPosts, err := s.Ds.RevampPosts([]*core.PostFormated{post.Format()})
if err != nil { if err != nil {
logrus.Infof("Ds.RevampPosts err: %s", err) logrus.Infof("Ds.RevampPosts err: %s", err)
return nil, _errCreatePostFailed return nil, web.ErrCreatePostFailed
} }
return (*web.CreateTweetResp)(formatedPosts[0]), nil return (*web.CreateTweetResp)(formatedPosts[0]), nil
} }
func (s *privSrv) DeleteTweet(req *web.DeleteTweetReq) mir.Error { func (s *privSrv) DeleteTweet(req *web.DeleteTweetReq) mir.Error {
if req.User == nil { if req.User == nil {
return _errNoPermission return web.ErrNoPermission
} }
post, err := s.Ds.GetPostByID(req.ID) post, err := s.Ds.GetPostByID(req.ID)
if err != nil { if err != nil {
logrus.Errorf("Ds.GetPostByID err: %s", err) logrus.Errorf("Ds.GetPostByID err: %s", err)
return _errGetPostFailed return web.ErrGetPostFailed
} }
if post.UserID != req.User.ID && !req.User.IsAdmin { if post.UserID != req.User.ID && !req.User.IsAdmin {
return _errNoPermission return web.ErrNoPermission
} }
mediaContents, err := s.Ds.DeletePost(post) mediaContents, err := s.Ds.DeletePost(post)
if err != nil { if err != nil {
logrus.Errorf("Ds.DeletePost delete post failed: %s", err) logrus.Errorf("Ds.DeletePost delete post failed: %s", err)
return _errDeletePostFailed return web.ErrDeletePostFailed
} }
// 删除推文的媒体内容 // 删除推文的媒体内容
deleteOssObjects(s.oss, mediaContents) deleteOssObjects(s.oss, mediaContents)
@ -419,7 +322,7 @@ func (s *privSrv) DeleteTweet(req *web.DeleteTweetReq) mir.Error {
s.DeleteSearchPost(post) s.DeleteSearchPost(post)
if err != nil { if err != nil {
logrus.Errorf("s.DeleteSearchPost failed: %s", err) logrus.Errorf("s.DeleteSearchPost failed: %s", err)
return _errDeletePostFailed return web.ErrDeletePostFailed
} }
return nil return nil
} }
@ -428,16 +331,16 @@ func (s *privSrv) DeleteCommentReply(req *web.DeleteCommentReplyReq) mir.Error {
reply, err := s.Ds.GetCommentReplyByID(req.ID) reply, err := s.Ds.GetCommentReplyByID(req.ID)
if err != nil { if err != nil {
logrus.Errorf("Ds.GetCommentReplyByID err: %s", err) logrus.Errorf("Ds.GetCommentReplyByID err: %s", err)
return _errGetReplyFailed return web.ErrGetReplyFailed
} }
if req.User.ID != reply.UserID && !req.User.IsAdmin { if req.User.ID != reply.UserID && !req.User.IsAdmin {
return _errNoPermission return web.ErrNoPermission
} }
// 执行删除 // 执行删除
err = s.deletePostCommentReply(reply) err = s.deletePostCommentReply(reply)
if err != nil { if err != nil {
logrus.Errorf("s.deletePostCommentReply err: %s", err) logrus.Errorf("s.deletePostCommentReply err: %s", err)
return _errDeleteCommentFailed return web.ErrDeleteCommentFailed
} }
return nil return nil
} }
@ -451,7 +354,7 @@ func (s *privSrv) CreateCommentReply(req *web.CreateCommentReplyReq) (*web.Creat
) )
if post, comment, atUserID, err = s.createPostPreHandler(req.CommentID, req.Uid, req.AtUserID); err != nil { if post, comment, atUserID, err = s.createPostPreHandler(req.CommentID, req.Uid, req.AtUserID); err != nil {
return nil, _errCreateReplyFailed return nil, web.ErrCreateReplyFailed
} }
// 创建评论 // 创建评论
@ -466,7 +369,7 @@ func (s *privSrv) CreateCommentReply(req *web.CreateCommentReplyReq) (*web.Creat
reply, err = s.Ds.CreateCommentReply(reply) reply, err = s.Ds.CreateCommentReply(reply)
if err != nil { if err != nil {
return nil, _errCreateReplyFailed return nil, web.ErrCreateReplyFailed
} }
// 更新Post回复数 // 更新Post回复数
@ -524,26 +427,26 @@ func (s *privSrv) DeleteComment(req *web.DeleteCommentReq) mir.Error {
comment, err := s.Ds.GetCommentByID(req.ID) comment, err := s.Ds.GetCommentByID(req.ID)
if err != nil { if err != nil {
logrus.Errorf("Ds.GetCommentByID err: %v\n", err) logrus.Errorf("Ds.GetCommentByID err: %v\n", err)
return _errGetCommentFailed return web.ErrGetCommentFailed
} }
if req.User.ID != comment.UserID && !req.User.IsAdmin { if req.User.ID != comment.UserID && !req.User.IsAdmin {
return _errNoPermission return web.ErrNoPermission
} }
// 加载post // 加载post
post, err := s.Ds.GetPostByID(comment.PostID) post, err := s.Ds.GetPostByID(comment.PostID)
if err != nil { if err != nil {
return _errDeleteCommentFailed return web.ErrDeleteCommentFailed
} }
// 更新post回复数 // 更新post回复数
post.CommentCount-- post.CommentCount--
if err := s.Ds.UpdatePost(post); err != nil { if err := s.Ds.UpdatePost(post); err != nil {
logrus.Errorf("Ds.UpdatePost err: %s", err) logrus.Errorf("Ds.UpdatePost err: %s", err)
return _errDeleteCommentFailed return web.ErrDeleteCommentFailed
} }
// TODO: 优化删除逻辑事务化删除comment // TODO: 优化删除逻辑事务化删除comment
if err := s.Ds.DeleteComment(comment); err != nil { if err := s.Ds.DeleteComment(comment); err != nil {
logrus.Errorf("Ds.DeleteComment err: %s", err) logrus.Errorf("Ds.DeleteComment err: %s", err)
return _errDeleteCommentFailed return web.ErrDeleteCommentFailed
} }
return nil return nil
} }
@ -570,7 +473,7 @@ func (s *privSrv) CreateComment(req *web.CreateCommentReq) (_ *web.CreateComment
return nil, xerror.ServerError return nil, xerror.ServerError
} }
if post.CommentCount >= conf.AppSetting.MaxCommentCount { if post.CommentCount >= conf.AppSetting.MaxCommentCount {
return nil, _errMaxCommentCount return nil, web.ErrMaxCommentCount
} }
comment := &core.Comment{ comment := &core.Comment{
PostID: post.ID, PostID: post.ID,
@ -581,7 +484,7 @@ func (s *privSrv) CreateComment(req *web.CreateCommentReq) (_ *web.CreateComment
comment, err = s.Ds.CreateComment(comment) comment, err = s.Ds.CreateComment(comment)
if err != nil { if err != nil {
logrus.Errorf("Ds.CreateComment err:%s", err) logrus.Errorf("Ds.CreateComment err:%s", err)
return nil, _errCreateCommentFailed return nil, web.ErrCreateCommentFailed
} }
for _, item := range req.Contents { for _, item := range req.Contents {
@ -687,14 +590,14 @@ func (s *privSrv) VisibleTweet(req *web.VisibleTweetReq) (*web.VisibleTweetResp,
} }
post, err := s.Ds.GetPostByID(req.ID) post, err := s.Ds.GetPostByID(req.ID)
if err != nil { if err != nil {
return nil, _errVisblePostFailed return nil, web.ErrVisblePostFailed
} }
if xerr := checkPermision(req.User, post.UserID); xerr != nil { if xerr := checkPermision(req.User, post.UserID); xerr != nil {
return nil, xerr return nil, xerr
} }
if err = s.Ds.VisiblePost(post, req.Visibility); err != nil { if err = s.Ds.VisiblePost(post, req.Visibility); err != nil {
logrus.Warnf("s.Ds.VisiblePost: %s", err) logrus.Warnf("s.Ds.VisiblePost: %s", err)
return nil, _errVisblePostFailed return nil, web.ErrVisblePostFailed
} }
// 推送Search // 推送Search
@ -710,14 +613,14 @@ func (s *privSrv) StickTweet(req *web.StickTweetReq) (*web.StickTweetResp, mir.E
post, err := s.Ds.GetPostByID(req.ID) post, err := s.Ds.GetPostByID(req.ID)
if err != nil { if err != nil {
logrus.Errorf("Ds.GetPostByID err: %v\n", err) logrus.Errorf("Ds.GetPostByID err: %v\n", err)
return nil, _errStickPostFailed return nil, web.ErrStickPostFailed
} }
if !req.User.IsAdmin { if !req.User.IsAdmin {
return nil, _errNoPermission return nil, web.ErrNoPermission
} }
newStatus := 1 - post.IsTop newStatus := 1 - post.IsTop
if err = s.Ds.StickPost(post); err != nil { if err = s.Ds.StickPost(post); err != nil {
return nil, _errStickPostFailed return nil, web.ErrStickPostFailed
} }
return &web.StickTweetResp{ return &web.StickTweetResp{
StickStatus: newStatus, StickStatus: newStatus,
@ -727,14 +630,14 @@ func (s *privSrv) StickTweet(req *web.StickTweetReq) (*web.StickTweetResp, mir.E
func (s *privSrv) LockTweet(req *web.LockTweetReq) (*web.LockTweetResp, mir.Error) { func (s *privSrv) LockTweet(req *web.LockTweetReq) (*web.LockTweetResp, mir.Error) {
post, err := s.Ds.GetPostByID(req.ID) post, err := s.Ds.GetPostByID(req.ID)
if err != nil { if err != nil {
return nil, _errLockPostFailed return nil, web.ErrLockPostFailed
} }
if post.UserID != req.User.ID && !req.User.IsAdmin { if post.UserID != req.User.ID && !req.User.IsAdmin {
return nil, _errNoPermission return nil, web.ErrNoPermission
} }
newStatus := 1 - post.IsLock newStatus := 1 - post.IsLock
if err := s.Ds.LockPost(post); err != nil { if err := s.Ds.LockPost(post); err != nil {
return nil, _errLockPostFailed return nil, web.ErrLockPostFailed
} }
return &web.LockTweetResp{ return &web.LockTweetResp{
LockStatus: newStatus, LockStatus: newStatus,
@ -780,7 +683,7 @@ func (s *privSrv) createPostPreHandler(commentID int64, userID, atUserID int64)
} }
if post.CommentCount >= conf.AppSetting.MaxCommentCount { if post.CommentCount >= conf.AppSetting.MaxCommentCount {
return nil, nil, atUserID, _errMaxCommentCount return nil, nil, atUserID, web.ErrMaxCommentCount
} }
if userID == atUserID { if userID == atUserID {
@ -807,7 +710,7 @@ func (s *privSrv) createPostStar(postID, userID int64) (*core.PostStar, mir.Erro
// 私密post不可操作 // 私密post不可操作
// TODO: 使用统一的permission checker来检查权限问题这里好友可见post就没处理是bug // TODO: 使用统一的permission checker来检查权限问题这里好友可见post就没处理是bug
if post.Visibility == core.PostVisitPrivate && post.UserID != userID { if post.Visibility == core.PostVisitPrivate && post.UserID != userID {
return nil, _errNoPermission return nil, web.ErrNoPermission
} }
star, err := s.Ds.CreatePostStar(postID, userID) star, err := s.Ds.CreatePostStar(postID, userID)
@ -833,7 +736,7 @@ func (s *privSrv) deletePostStar(star *core.PostStar) mir.Error {
// 私密post特殊处理 // 私密post特殊处理
// TODO: 使用统一的permission checker来检查权限问题这里好友可见post就没处理是bug // TODO: 使用统一的permission checker来检查权限问题这里好友可见post就没处理是bug
if post.Visibility == core.PostVisitPrivate && post.UserID != star.UserID { if post.Visibility == core.PostVisitPrivate && post.UserID != star.UserID {
return _errNoPermission return web.ErrNoPermission
} }
if err = s.Ds.DeletePostStar(star); err != nil { if err = s.Ds.DeletePostStar(star); err != nil {
@ -858,7 +761,7 @@ func (s *privSrv) createPostCollection(postID, userID int64) (*core.PostCollecti
// 私密post特殊处理 // 私密post特殊处理
// TODO: 使用统一的permission checker来检查权限问题这里好友可见post就没处理是bug // TODO: 使用统一的permission checker来检查权限问题这里好友可见post就没处理是bug
if post.Visibility == core.PostVisitPrivate && post.UserID != userID { if post.Visibility == core.PostVisitPrivate && post.UserID != userID {
return nil, _errNoPermission return nil, web.ErrNoPermission
} }
collection, err := s.Ds.CreatePostCollection(postID, userID) collection, err := s.Ds.CreatePostCollection(postID, userID)
@ -884,7 +787,7 @@ func (s *privSrv) deletePostCollection(collection *core.PostCollection) mir.Erro
// 私密post特殊处理 // 私密post特殊处理
// TODO: 使用统一的permission checker来检查权限问题这里好友可见post就没处理是bug // TODO: 使用统一的permission checker来检查权限问题这里好友可见post就没处理是bug
if post.Visibility == core.PostVisitPrivate && post.UserID != collection.UserID { if post.Visibility == core.PostVisitPrivate && post.UserID != collection.UserID {
return _errNoPermission return web.ErrNoPermission
} }
if err = s.Ds.DeletePostCollection(collection); err != nil { if err = s.Ds.DeletePostCollection(collection); err != nil {
return xerror.ServerError return xerror.ServerError
@ -906,7 +809,7 @@ func (s *privSrv) checkPostAttachmentIsPaid(postID, userID int64) bool {
func (s *privSrv) buyPostAttachment(post *core.Post, user *core.User) mir.Error { func (s *privSrv) buyPostAttachment(post *core.Post, user *core.User) mir.Error {
if user.Balance < post.AttachmentPrice { if user.Balance < post.AttachmentPrice {
return _errInsuffientDownloadMoney return web.ErrInsuffientDownloadMoney
} }
// 执行购买 // 执行购买
if err := s.Ds.HandlePostAttachmentBought(post, user); err != nil { if err := s.Ds.HandlePostAttachmentBought(post, user); err != nil {
@ -922,19 +825,3 @@ func newPrivSrv(s *base.DaoServant, oss core.ObjectStorageService) api.Priv {
oss: oss, oss: oss,
} }
} }
func newPrivBinding() api.PrivBinding {
return &privBinding{
UnimplementedPrivBinding: &api.UnimplementedPrivBinding{
BindAny: base.NewBindAnyFn(),
},
}
}
func newPrivRender() api.PrivRender {
return &privRender{
UnimplementedPrivRender: &api.UnimplementedPrivRender{
RenderAny: base.RenderAny,
},
}
}

@ -14,8 +14,8 @@ import (
"unicode/utf8" "unicode/utf8"
"github.com/afocus/captcha" "github.com/afocus/captcha"
"github.com/alimy/mir/v3" "github.com/alimy/mir/v4"
"github.com/gofrs/uuid" "github.com/gofrs/uuid/v5"
api "github.com/rocboss/paopao-ce/auto/api/v1" api "github.com/rocboss/paopao-ce/auto/api/v1"
"github.com/rocboss/paopao-ce/internal/core" "github.com/rocboss/paopao-ce/internal/core"
"github.com/rocboss/paopao-ce/internal/model/web" "github.com/rocboss/paopao-ce/internal/model/web"
@ -30,8 +30,6 @@ import (
var ( var (
_ api.Pub = (*pubSrv)(nil) _ api.Pub = (*pubSrv)(nil)
_ api.PubBinding = (*pubBinding)(nil)
_ api.PubRender = (*pubRender)(nil)
) )
const ( const (
@ -44,26 +42,18 @@ type pubSrv struct {
*base.DaoServant *base.DaoServant
} }
type pubBinding struct {
*api.UnimplementedPubBinding
}
type pubRender struct {
*api.UnimplementedPubRender
}
func (s *pubSrv) TweetDetail(req *web.TweetDetailReq) (*web.TweetDetailResp, mir.Error) { func (s *pubSrv) TweetDetail(req *web.TweetDetailReq) (*web.TweetDetailResp, mir.Error) {
post, err := s.Ds.GetPostByID(req.TweetId) post, err := s.Ds.GetPostByID(req.TweetId)
if err != nil { if err != nil {
return nil, _errGetPostFailed return nil, web.ErrGetPostFailed
} }
postContents, err := s.Ds.GetPostContentsByIDs([]int64{post.ID}) postContents, err := s.Ds.GetPostContentsByIDs([]int64{post.ID})
if err != nil { if err != nil {
return nil, _errGetPostFailed return nil, web.ErrGetPostFailed
} }
users, err := s.Ds.GetUsersByIDs([]int64{post.UserID}) users, err := s.Ds.GetUsersByIDs([]int64{post.UserID})
if err != nil { if err != nil {
return nil, _errGetPostFailed return nil, web.ErrGetPostFailed
} }
// 数据整合 // 数据整合
postFormated := post.Format() postFormated := post.Format()
@ -84,13 +74,13 @@ func (s *pubSrv) SendCaptcha(req *web.SendCaptchaReq) mir.Error {
// 验证图片验证码 // 验证图片验证码
if captcha, err := s.Redis.GetImgCaptcha(ctx, req.ImgCaptchaID); err != nil || string(captcha) != req.ImgCaptcha { if captcha, err := s.Redis.GetImgCaptcha(ctx, req.ImgCaptchaID); err != nil || string(captcha) != req.ImgCaptcha {
logrus.Debugf("get captcha err:%s expect:%s got:%s", err, captcha, req.ImgCaptcha) logrus.Debugf("get captcha err:%s expect:%s got:%s", err, captcha, req.ImgCaptcha)
return _errErrorCaptchaPassword return web.ErrErrorCaptchaPassword
} }
s.Redis.DelImgCaptcha(ctx, req.ImgCaptchaID) s.Redis.DelImgCaptcha(ctx, req.ImgCaptchaID)
// 今日频次限制 // 今日频次限制
if count, _ := s.Redis.GetCountSmsCaptcha(ctx, req.Phone); count >= _MaxPhoneCaptcha { if count, _ := s.Redis.GetCountSmsCaptcha(ctx, req.Phone); count >= _MaxPhoneCaptcha {
return _errTooManyPhoneCaptchaSend return web.ErrTooManyPhoneCaptchaSend
} }
if err := s.Ds.SendPhoneCaptcha(req.Phone); err != nil { if err := s.Ds.SendPhoneCaptcha(req.Phone); err != nil {
@ -129,7 +119,7 @@ func (s *pubSrv) GetCaptcha() (*web.GetCaptchaResp, mir.Error) {
func (s *pubSrv) Register(req *web.RegisterReq) (*web.RegisterResp, mir.Error) { func (s *pubSrv) Register(req *web.RegisterReq) (*web.RegisterResp, mir.Error) {
if _disallowUserRegister { if _disallowUserRegister {
return nil, _errDisallowUserRegister return nil, web.ErrDisallowUserRegister
} }
// 用户名检查 // 用户名检查
if err := s.validUsername(req.Username); err != nil { if err := s.validUsername(req.Username); err != nil {
@ -138,7 +128,7 @@ func (s *pubSrv) Register(req *web.RegisterReq) (*web.RegisterResp, mir.Error) {
// 密码检查 // 密码检查
if err := checkPassword(req.Password); err != nil { if err := checkPassword(req.Password); err != nil {
logrus.Errorf("scheckPassword err: %v", err) logrus.Errorf("scheckPassword err: %v", err)
return nil, _errUserRegisterFailed return nil, web.ErrUserRegisterFailed
} }
password, salt := encryptPasswordAndSalt(req.Password) password, salt := encryptPasswordAndSalt(req.Password)
user := &core.User{ user := &core.User{
@ -152,7 +142,7 @@ func (s *pubSrv) Register(req *web.RegisterReq) (*web.RegisterResp, mir.Error) {
user, err := s.Ds.CreateUser(user) user, err := s.Ds.CreateUser(user)
if err != nil { if err != nil {
logrus.Errorf("Ds.CreateUser err: %s", err) logrus.Errorf("Ds.CreateUser err: %s", err)
return nil, _errUserRegisterFailed return nil, web.ErrUserRegisterFailed
} }
return &web.RegisterResp{ return &web.RegisterResp{
UserId: user.ID, UserId: user.ID,
@ -170,12 +160,12 @@ func (s *pubSrv) Login(req *web.LoginReq) (*web.LoginResp, mir.Error) {
if user.Model != nil && user.ID > 0 { if user.Model != nil && user.ID > 0 {
if count, err := s.Redis.GetCountLoginErr(ctx, user.ID); err == nil && count >= _MaxLoginErrTimes { if count, err := s.Redis.GetCountLoginErr(ctx, user.ID); err == nil && count >= _MaxLoginErrTimes {
return nil, _errTooManyLoginError return nil, web.ErrTooManyLoginError
} }
// 对比密码是否正确 // 对比密码是否正确
if validPassword(user.Password, req.Password, user.Salt) { if validPassword(user.Password, req.Password, user.Salt) {
if user.Status == core.UserStatusClosed { if user.Status == core.UserStatusClosed {
return nil, _errUserHasBeenBanned return nil, web.ErrUserHasBeenBanned
} }
// 清空登录计数 // 清空登录计数
s.Redis.DelCountLoginErr(ctx, user.ID) s.Redis.DelCountLoginErr(ctx, user.ID)
@ -208,17 +198,17 @@ func (s *pubSrv) Version() (*web.VersionResp, mir.Error) {
func (s *pubSrv) validUsername(username string) mir.Error { func (s *pubSrv) validUsername(username string) mir.Error {
// 检测用户是否合规 // 检测用户是否合规
if utf8.RuneCountInString(username) < 3 || utf8.RuneCountInString(username) > 12 { if utf8.RuneCountInString(username) < 3 || utf8.RuneCountInString(username) > 12 {
return _errUsernameLengthLimit return web.ErrUsernameLengthLimit
} }
if !regexp.MustCompile(`^[a-zA-Z0-9]+$`).MatchString(username) { if !regexp.MustCompile(`^[a-zA-Z0-9]+$`).MatchString(username) {
return _errUsernameCharLimit return web.ErrUsernameCharLimit
} }
// 重复检查 // 重复检查
user, _ := s.Ds.GetUserByUsername(username) user, _ := s.Ds.GetUserByUsername(username)
if user.Model != nil && user.ID > 0 { if user.Model != nil && user.ID > 0 {
return _errUsernameHasExisted return web.ErrUsernameHasExisted
} }
return nil return nil
} }
@ -228,19 +218,3 @@ func newPubSrv(s *base.DaoServant) api.Pub {
DaoServant: s, DaoServant: s,
} }
} }
func newPubBinding() api.PubBinding {
return &pubBinding{
UnimplementedPubBinding: &api.UnimplementedPubBinding{
BindAny: base.NewBindAnyFn(),
},
}
}
func newPubRender() api.PubRender {
return &pubRender{
UnimplementedPubRender: &api.UnimplementedPubRender{
RenderAny: base.RenderAny,
},
}
}

@ -11,8 +11,8 @@ import (
"time" "time"
"unicode/utf8" "unicode/utf8"
"github.com/alimy/mir/v3" "github.com/alimy/mir/v4"
"github.com/gofrs/uuid" "github.com/gofrs/uuid/v5"
"github.com/rocboss/paopao-ce/internal/core" "github.com/rocboss/paopao-ce/internal/core"
"github.com/rocboss/paopao-ce/internal/model/web" "github.com/rocboss/paopao-ce/internal/model/web"
"github.com/rocboss/paopao-ce/pkg/utils" "github.com/rocboss/paopao-ce/pkg/utils"
@ -82,7 +82,7 @@ func getRandomAvatar() string {
func checkPassword(password string) mir.Error { func checkPassword(password string) mir.Error {
// 检测用户是否合规 // 检测用户是否合规
if utf8.RuneCountInString(password) < 6 || utf8.RuneCountInString(password) > 16 { if utf8.RuneCountInString(password) < 6 || utf8.RuneCountInString(password) > 16 {
return _errPasswordLengthLimit return web.ErrPasswordLengthLimit
} }
return nil return nil
} }
@ -144,7 +144,7 @@ func fileCheck(uploadType string, size int64) mir.Error {
return xerror.InvalidParams return xerror.InvalidParams
} }
if size > 1024*1024*100 { if size > 1024*1024*100 {
return _errFileInvalidSize.WithDetails("最大允许100MB") return web.ErrFileInvalidSize.WithDetails("最大允许100MB")
} }
return nil return nil
} }
@ -169,7 +169,7 @@ func getFileExt(s string) (string, mir.Error) {
"application/x-zip-compressed": "application/x-zip-compressed":
return ".zip", nil return ".zip", nil
default: default:
return "", _errFileInvalidExt.WithDetails("仅允许 png/jpg/gif/mp4/mov/zip 类型") return "", web.ErrFileInvalidExt.WithDetails("仅允许 png/jpg/gif/mp4/mov/zip 类型")
} }
} }
@ -202,7 +202,7 @@ func tagsFrom(originTags []string) []string {
// checkPermision 检查是否拥有者或管理员 // checkPermision 检查是否拥有者或管理员
func checkPermision(user *core.User, targetUserId int64) mir.Error { func checkPermision(user *core.User, targetUserId int64) mir.Error {
if user == nil || (user.ID != targetUserId && !user.IsAdmin) { if user == nil || (user.ID != targetUserId && !user.IsAdmin) {
return _errNoPermission return web.ErrNoPermission
} }
return nil return nil
} }

@ -13,8 +13,6 @@ import (
"github.com/rocboss/paopao-ce/internal/conf" "github.com/rocboss/paopao-ce/internal/conf"
"github.com/rocboss/paopao-ce/internal/dao" "github.com/rocboss/paopao-ce/internal/dao"
"github.com/rocboss/paopao-ce/internal/servants/base" "github.com/rocboss/paopao-ce/internal/servants/base"
"github.com/sirupsen/logrus"
"github.com/smartwalle/alipay/v3"
) )
var ( var (
@ -29,49 +27,27 @@ func RouteWeb(e *gin.Engine) {
oss := dao.ObjectStorageService() oss := dao.ObjectStorageService()
ds := base.NewDaoServant() ds := base.NewDaoServant()
// aways register servants // aways register servants
api.RegisterAdminServant(e, newAdminSrv(ds), newAdminBinding(), newAdminRender()) api.RegisterAdminServant(e, newAdminSrv(ds))
api.RegisterCoreServant(e, newCoreSrv(ds, oss), newCoreBinding(), newCoreRender()) api.RegisterCoreServant(e, newCoreSrv(ds, oss))
api.RegisterLooseServant(e, newLooseSrv(ds), newLooseBinding(), newLooseRender()) api.RegisterLooseServant(e, newLooseSrv(ds))
api.RegisterPrivServant(e, newPrivSrv(ds, oss), newPrivBinding(), newPrivRender()) api.RegisterPrivServant(e, newPrivSrv(ds, oss))
api.RegisterPubServant(e, newPubSrv(ds), newPubBinding(), newPubRender()) api.RegisterPubServant(e, newPubSrv(ds))
// regster servants if needed by configure // regster servants if needed by configure
cfg.In(cfg.Actions{ cfg.In(cfg.Actions{
"Alipay": func() { "Alipay": func() {
client := mustAlipayClient() client := conf.MustAlipayClient()
api.RegisterAlipayPubServant(e, newAlipayPubSrv(ds), newAlipayPubBinding(client), newAlipayPubRender()) api.RegisterAlipayPubServant(e, newAlipayPubSrv(ds))
api.RegisterAlipayPrivServant(e, newAlipayPrivSrv(ds, client), newAlipayPrivBinding(), newAlipayPrivRender()) api.RegisterAlipayPrivServant(e, newAlipayPrivSrv(ds, client))
}, },
"Followship": func() { "Followship": func() {
api.RegisterFollowshipServant(e, newFollowshipSrv(ds), newFollowshipBinding(), newFollowshipRender()) api.RegisterFollowshipServant(e, newFollowshipSrv(ds))
}, },
"Friendship": func() { "Friendship": func() {
api.RegisterFriendshipServant(e, newFriendshipSrv(ds), newFriendshipBinding(), newFriendshipRender()) api.RegisterFriendshipServant(e, newFriendshipSrv(ds))
}, },
}) })
} }
func mustAlipayClient() *alipay.Client {
s := conf.AlipaySetting
// 将 key 的验证调整到初始化阶段
client, err := alipay.New(s.AppID, s.PrivateKey, s.InProduction)
if err != nil {
logrus.Fatalf("alipay.New err: %s", err)
}
// 加载应用公钥证书
if err = client.LoadAppPublicCertFromFile(s.AppPublicCertFile); err != nil {
logrus.Fatalf("client.LoadAppPublicCertFromFile err: %s\n", err)
}
// 加载支付宝根证书
if err = client.LoadAliPayRootCertFromFile(s.RootCertFile); err != nil {
logrus.Fatalf("client.LoadAliPayRootCertFromFile err: %s\n", err)
}
// 加载支付宝公钥证书
if err = client.LoadAliPayPublicCertFromFile(s.PublicCertFile); err != nil {
logrus.Fatalf("client.LoadAliPayPublicCertFromFile err: %s\n", err)
}
return client
}
// lazyInitial do some package lazy initialize for performance // lazyInitial do some package lazy initialize for performance
func lazyInitial() { func lazyInitial() {
_onceInitial.Do(func() { _onceInitial.Do(func() {

@ -1,93 +0,0 @@
// Copyright 2022 ROC. All rights reserved.
// Use of this source code is governed by a MIT style
// license that can be found in the LICENSE file.
package web
import (
"github.com/rocboss/paopao-ce/pkg/xerror"
)
// nolint
var (
_errUsernameHasExisted = xerror.NewError(20001, "用户名已存在")
_errUsernameLengthLimit = xerror.NewError(20002, "用户名长度3~12")
_errUsernameCharLimit = xerror.NewError(20003, "用户名只能包含字母、数字")
_errPasswordLengthLimit = xerror.NewError(20004, "密码长度6~16")
_errUserRegisterFailed = xerror.NewError(20005, "用户注册失败")
_errUserHasBeenBanned = xerror.NewError(20006, "该账户已被封停")
_errNoPermission = xerror.NewError(20007, "无权限执行该请求")
_errUserHasBindOTP = xerror.NewError(20008, "当前用户已绑定二次验证")
_errUserOTPInvalid = xerror.NewError(20009, "二次验证码验证失败")
_errUserNoBindOTP = xerror.NewError(20010, "当前用户未绑定二次验证")
_errErrorOldPassword = xerror.NewError(20011, "当前用户密码验证失败")
_errErrorCaptchaPassword = xerror.NewError(20012, "图形验证码验证失败")
_errAccountNoPhoneBind = xerror.NewError(20013, "拒绝操作: 账户未绑定手机号")
_errTooManyLoginError = xerror.NewError(20014, "登录失败次数过多,请稍后再试")
_errGetPhoneCaptchaError = xerror.NewError(20015, "短信验证码获取失败")
_errTooManyPhoneCaptchaSend = xerror.NewError(20016, "短信验证码获取次数已达今日上限")
_errExistedUserPhone = xerror.NewError(20017, "该手机号已被绑定")
_errErrorPhoneCaptcha = xerror.NewError(20018, "手机验证码不正确")
_errMaxPhoneCaptchaUseTimes = xerror.NewError(20019, "手机验证码已达最大使用次数")
_errNicknameLengthLimit = xerror.NewError(20020, "昵称长度2~12")
_errNoExistUsername = xerror.NewError(20021, "用户不存在")
_errNoAdminPermission = xerror.NewError(20022, "无管理权限")
_errDisallowUserRegister = xerror.NewError(20023, "系统不允许注册用户")
_errGetPostsFailed = xerror.NewError(30001, "获取动态列表失败")
_errCreatePostFailed = xerror.NewError(30002, "动态发布失败")
_errGetPostFailed = xerror.NewError(30003, "获取动态详情失败")
_errDeletePostFailed = xerror.NewError(30004, "动态删除失败")
_errLockPostFailed = xerror.NewError(30005, "动态锁定失败")
_errGetPostTagsFailed = xerror.NewError(30006, "获取话题列表失败")
_errInvalidDownloadReq = xerror.NewError(30007, "附件下载请求不合法")
_errDownloadReqError = xerror.NewError(30008, "附件下载请求失败")
_errInsuffientDownloadMoney = xerror.NewError(30009, "附件下载失败:账户资金不足")
_errDownloadExecFail = xerror.NewError(30010, "附件下载失败:扣费失败")
_errStickPostFailed = xerror.NewError(30011, "动态置顶失败")
_errVisblePostFailed = xerror.NewError(30012, "更新可见性失败")
_errGetCommentsFailed = xerror.NewError(40001, "获取评论列表失败")
_errCreateCommentFailed = xerror.NewError(40002, "评论发布失败")
_errGetCommentFailed = xerror.NewError(40003, "获取评论详情失败")
_errDeleteCommentFailed = xerror.NewError(40004, "评论删除失败")
_errCreateReplyFailed = xerror.NewError(40005, "评论回复失败")
_errGetReplyFailed = xerror.NewError(40006, "获取评论详情失败")
_errMaxCommentCount = xerror.NewError(40007, "评论数已达最大限制")
_errGetCommentThumbs = xerror.NewError(40008, "获取评论点赞信息失败")
_errGetMessagesFailed = xerror.NewError(50001, "获取消息列表失败")
_errReadMessageFailed = xerror.NewError(50002, "标记消息已读失败")
_errSendWhisperFailed = xerror.NewError(50003, "私信发送失败")
_errNoWhisperToSelf = xerror.NewError(50004, "不允许给自己发送私信")
_errTooManyWhisperNum = xerror.NewError(50005, "今日私信次数已达上限")
_errGetCollectionsFailed = xerror.NewError(60001, "获取收藏列表失败")
_errGetStarsFailed = xerror.NewError(60002, "获取点赞列表失败")
_errRechargeReqFail = xerror.NewError(70001, "充值请求失败")
_errRechargeNotifyError = xerror.NewError(70002, "充值回调失败")
_errGetRechargeFailed = xerror.NewError(70003, "充值详情获取失败")
_errUserWalletBillsFailed = xerror.NewError(70004, "用户钱包账单获取失败")
_errNoRequestingFriendToSelf = xerror.NewError(80001, "不允许添加自己为好友")
_errNotExistFriendId = xerror.NewError(80002, "好友id不存在")
_errSendRequestingFriendFailed = xerror.NewError(80003, "申请添加朋友请求发送失败")
_errAddFriendFailed = xerror.NewError(80004, "添加好友失败")
_errRejectFriendFailed = xerror.NewError(80005, "拒绝好友失败")
_errDeleteFriendFailed = xerror.NewError(80006, "删除好友失败")
_errGetContactsFailed = xerror.NewError(80007, "获取联系人列表失败")
_errNoActionToSelf = xerror.NewError(80008, "不允许对自己操作")
_errFollowTopicFailed = xerror.NewError(90001, "关注话题失败")
_errUnfollowTopicFailed = xerror.NewError(90002, "取消关注话题失败")
_errStickTopicFailed = xerror.NewError(90003, "更行话题置顶状态失败")
_errThumbsUpTweetComment = xerror.NewError(90101, "评论点赞失败")
_errThumbsDownTweetComment = xerror.NewError(90102, "评论点踩失败")
_errThumbsUpTweetReply = xerror.NewError(90103, "评论回复点赞失败")
_errThumbsDownTweetReply = xerror.NewError(90104, "评论回复点踩失败")
_errFileUploadFailed = xerror.NewError(10200, "文件上传失败")
_errFileInvalidExt = xerror.NewError(10201, "文件类型不合法")
_errFileInvalidSize = xerror.NewError(10202, "文件大小超限")
)

@ -0,0 +1,61 @@
// Copyright 2023 ROC. All rights reserved.
// Use of this source code is governed by a MIT style
// license that can be found in the LICENSE file.
package service
import (
"fmt"
"net/http"
"github.com/Masterminds/semver/v3"
"github.com/fatih/color"
"github.com/gin-gonic/gin"
"github.com/rocboss/paopao-ce/internal/conf"
)
var (
_ Service = (*pprofService)(nil)
)
type pprofService struct {
*baseHttpService
}
func (s *pprofService) Name() string {
return "PprofService"
}
func (s *pprofService) Version() *semver.Version {
return semver.MustParse("v0.1.0")
}
func (s *pprofService) OnInit() error {
s.registerRoute(s, func(*gin.Engine) {})
return nil
}
func (s *pprofService) String() string {
return fmt.Sprintf("listen on %s\n", color.GreenString("http://%s:%s", conf.PprofServerSetting.HttpIp, conf.PprofServerSetting.HttpPort))
}
func newPprofService() Service {
addr := conf.PprofServerSetting.HttpIp + ":" + conf.PprofServerSetting.HttpPort
// notice this step just to register pprof server to start. don't share server with pprof.
server := httpServers.from(addr, func() *httpServer {
engine := newWebEngine()
return &httpServer{
baseServer: newBaseServe(),
e: engine,
server: &http.Server{
Addr: addr,
Handler: http.DefaultServeMux,
},
}
})
return &pprofService{
baseHttpService: &baseHttpService{
server: server,
},
}
}

@ -72,6 +72,9 @@ func newService() (ss []Service) {
"Docs": func() { "Docs": func() {
ss = append(ss, newDocsService()) ss = append(ss, newDocsService())
}, },
"Pprof": func() {
ss = append(ss, newPprofService())
},
}) })
return return
} }

@ -1,8 +1,8 @@
package v1 package v1
import ( import (
. "github.com/alimy/mir/v3" . "github.com/alimy/mir/v4"
. "github.com/alimy/mir/v3/engine" . "github.com/alimy/mir/v4/engine"
) )
func init() { func init() {

@ -1,8 +1,8 @@
package v1 package v1
import ( import (
. "github.com/alimy/mir/v3" . "github.com/alimy/mir/v4"
. "github.com/alimy/mir/v3/engine" . "github.com/alimy/mir/v4/engine"
) )
func init() { func init() {

@ -10,9 +10,10 @@ package main
import ( import (
"log" "log"
. "github.com/alimy/mir/v3/core" . "github.com/alimy/mir/v4/core"
. "github.com/alimy/mir/v3/engine" . "github.com/alimy/mir/v4/engine"
_ "github.com/alimy/mir/engine/gin/v4"
_ "github.com/rocboss/paopao-ce/mirc/admin/v1" _ "github.com/rocboss/paopao-ce/mirc/admin/v1"
_ "github.com/rocboss/paopao-ce/mirc/bot/v1" _ "github.com/rocboss/paopao-ce/mirc/bot/v1"
_ "github.com/rocboss/paopao-ce/mirc/localoss/v1" _ "github.com/rocboss/paopao-ce/mirc/localoss/v1"

@ -1,8 +1,8 @@
package v1 package v1
import ( import (
. "github.com/alimy/mir/v3" . "github.com/alimy/mir/v4"
. "github.com/alimy/mir/v3/engine" . "github.com/alimy/mir/v4/engine"
) )
func init() { func init() {

@ -1,8 +1,8 @@
package v1 package v1
import ( import (
. "github.com/alimy/mir/v3" . "github.com/alimy/mir/v4"
. "github.com/alimy/mir/v3/engine" . "github.com/alimy/mir/v4/engine"
) )
func init() { func init() {

@ -1,8 +1,8 @@
package v1 package v1
import ( import (
. "github.com/alimy/mir/v3" . "github.com/alimy/mir/v4"
. "github.com/alimy/mir/v3/engine" . "github.com/alimy/mir/v4/engine"
"github.com/rocboss/paopao-ce/internal/model/web" "github.com/rocboss/paopao-ce/internal/model/web"
) )

@ -1,8 +1,8 @@
package v1 package v1
import ( import (
. "github.com/alimy/mir/v3" . "github.com/alimy/mir/v4"
. "github.com/alimy/mir/v3/engine" . "github.com/alimy/mir/v4/engine"
"github.com/rocboss/paopao-ce/internal/model/web" "github.com/rocboss/paopao-ce/internal/model/web"
) )

@ -1,8 +1,8 @@
package v1 package v1
import ( import (
. "github.com/alimy/mir/v3" . "github.com/alimy/mir/v4"
. "github.com/alimy/mir/v3/engine" . "github.com/alimy/mir/v4/engine"
"github.com/rocboss/paopao-ce/internal/model/web" "github.com/rocboss/paopao-ce/internal/model/web"
) )

@ -1,8 +1,8 @@
package v1 package v1
import ( import (
. "github.com/alimy/mir/v3" . "github.com/alimy/mir/v4"
. "github.com/alimy/mir/v3/engine" . "github.com/alimy/mir/v4/engine"
"github.com/rocboss/paopao-ce/internal/model/web" "github.com/rocboss/paopao-ce/internal/model/web"
) )

@ -1,8 +1,8 @@
package v1 package v1
import ( import (
. "github.com/alimy/mir/v3" . "github.com/alimy/mir/v4"
. "github.com/alimy/mir/v3/engine" . "github.com/alimy/mir/v4/engine"
"github.com/rocboss/paopao-ce/internal/model/web" "github.com/rocboss/paopao-ce/internal/model/web"
) )

@ -1,8 +1,8 @@
package v1 package v1
import ( import (
. "github.com/alimy/mir/v3" . "github.com/alimy/mir/v4"
. "github.com/alimy/mir/v3/engine" . "github.com/alimy/mir/v4/engine"
"github.com/rocboss/paopao-ce/internal/model/web" "github.com/rocboss/paopao-ce/internal/model/web"
) )

@ -1,8 +1,8 @@
package v1 package v1
import ( import (
. "github.com/alimy/mir/v3" . "github.com/alimy/mir/v4"
. "github.com/alimy/mir/v3/engine" . "github.com/alimy/mir/v4/engine"
"github.com/rocboss/paopao-ce/internal/model/web" "github.com/rocboss/paopao-ce/internal/model/web"
) )

@ -1,8 +1,8 @@
package v1 package v1
import ( import (
. "github.com/alimy/mir/v3" . "github.com/alimy/mir/v4"
. "github.com/alimy/mir/v3/engine" . "github.com/alimy/mir/v4/engine"
"github.com/rocboss/paopao-ce/internal/model/web" "github.com/rocboss/paopao-ce/internal/model/web"
) )

@ -0,0 +1,12 @@
// Copyright 2023 ROC. All rights reserved.
// Use of this source code is governed by a MIT style
// license that can be found in the LICENSE file.
//go:build pprof
// +build pprof
package debug
import (
_ "net/http/pprof"
)

@ -9,7 +9,7 @@ import (
"net/http" "net/http"
"strings" "strings"
"github.com/alimy/mir/v3" "github.com/alimy/mir/v4"
) )
var ( var (

Loading…
Cancel
Save