From dc0c66002164697146f8b00ce6e513a3f274f4be Mon Sep 17 00:00:00 2001 From: Vasiliy Tolstov Date: Sat, 12 Aug 2023 20:59:01 +0300 Subject: [PATCH] regen Signed-off-by: Vasiliy Tolstov --- proto/pkgdash.pb.go | 14 +++++++------- proto/pkgdash.pb.validate.go | 17 ----------------- proto/pkgdash_micro.pb.go | 13 +++++++------ proto/pkgdash_micro_http.pb.go | 17 +++++++++-------- 4 files changed, 23 insertions(+), 38 deletions(-) diff --git a/proto/pkgdash.pb.go b/proto/pkgdash.pb.go index 2531e73..0131546 100644 --- a/proto/pkgdash.pb.go +++ b/proto/pkgdash.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 +// protoc-gen-go v1.26.0 // protoc v4.23.4 // source: pkgdash.proto @@ -1160,8 +1160,8 @@ var file_pkgdash_proto_rawDesc = []byte{ 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x73, 0x70, 0x22, 0x45, 0xaa, 0x84, 0x9e, 0x03, 0x25, 0x2a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x17, 0x0a, 0x15, 0x12, 0x13, 0x0a, 0x11, 0x2e, 0x70, 0x6b, 0x67, 0x64, 0x61, 0x73, 0x68, 0x2e, 0x45, 0x72, 0x72, - 0x6f, 0x72, 0x52, 0x73, 0x70, 0xb2, 0xea, 0xff, 0xf9, 0x01, 0x15, 0x3a, 0x01, 0x2a, 0x22, 0x10, - 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x2f, 0x7b, 0x69, 0x64, 0x7d, + 0x6f, 0x72, 0x52, 0x73, 0x70, 0xb2, 0xea, 0xff, 0xf9, 0x01, 0x15, 0x22, 0x10, 0x2f, 0x76, 0x31, + 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x3a, 0x01, 0x2a, 0x12, 0x8c, 0x01, 0x0a, 0x0a, 0x41, 0x64, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x16, 0x2e, 0x70, 0x6b, 0x67, 0x64, 0x61, 0x73, 0x68, 0x2e, 0x41, 0x64, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x16, 0x2e, 0x70, 0x6b, 0x67, 0x64, 0x61, 0x73, @@ -1169,16 +1169,16 @@ var file_pkgdash_proto_rawDesc = []byte{ 0x4e, 0xaa, 0x84, 0x9e, 0x03, 0x25, 0x2a, 0x0a, 0x41, 0x64, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x17, 0x0a, 0x15, 0x12, 0x13, 0x0a, 0x11, 0x2e, 0x70, 0x6b, 0x67, 0x64, 0x61, 0x73, 0x68, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x73, 0x70, 0xb2, 0xea, 0xff, 0xf9, 0x01, - 0x1e, 0x3a, 0x01, 0x2a, 0x22, 0x19, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, - 0x65, 0x2f, 0x7b, 0x70, 0x6b, 0x67, 0x7d, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x12, + 0x1e, 0x22, 0x19, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x2f, 0x7b, + 0x70, 0x6b, 0x67, 0x7d, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x3a, 0x01, 0x2a, 0x12, 0x7e, 0x0a, 0x0a, 0x41, 0x64, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x16, 0x2e, 0x70, 0x6b, 0x67, 0x64, 0x61, 0x73, 0x68, 0x2e, 0x41, 0x64, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x16, 0x2e, 0x70, 0x6b, 0x67, 0x64, 0x61, 0x73, 0x68, 0x2e, 0x41, 0x64, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x73, 0x70, 0x22, 0x40, 0xaa, 0x84, 0x9e, 0x03, 0x25, 0x2a, 0x0a, 0x41, 0x64, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x42, 0x17, 0x0a, 0x15, 0x12, 0x13, 0x0a, 0x11, 0x2e, 0x70, 0x6b, 0x67, 0x64, 0x61, 0x73, 0x68, - 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x73, 0x70, 0xb2, 0xea, 0xff, 0xf9, 0x01, 0x10, 0x3a, - 0x01, 0x2a, 0x22, 0x0b, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, + 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x73, 0x70, 0xb2, 0xea, 0xff, 0xf9, 0x01, 0x10, 0x22, + 0x0b, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0x76, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x15, 0x2e, 0x70, 0x6b, 0x67, 0x64, 0x61, 0x73, 0x68, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x70, 0x6b, 0x67, 0x64, 0x61, 0x73, 0x68, 0x2e, 0x47, 0x65, diff --git a/proto/pkgdash.pb.validate.go b/proto/pkgdash.pb.validate.go index 6165d02..1345d7b 100644 --- a/proto/pkgdash.pb.validate.go +++ b/proto/pkgdash.pb.validate.go @@ -89,7 +89,6 @@ func (m *ErrorRsp) validate(all bool) error { if len(errors) > 0 { return ErrorRspMultiError(errors) } - return nil } @@ -195,7 +194,6 @@ func (m *Error) validate(all bool) error { if len(errors) > 0 { return ErrorMultiError(errors) } - return nil } @@ -326,7 +324,6 @@ func (m *Package) validate(all bool) error { if len(errors) > 0 { return PackageMultiError(errors) } - return nil } @@ -479,7 +476,6 @@ func (m *Module) validate(all bool) error { if len(errors) > 0 { return ModuleMultiError(errors) } - return nil } @@ -621,7 +617,6 @@ func (m *Issue) validate(all bool) error { if len(errors) > 0 { return IssueMultiError(errors) } - return nil } @@ -765,7 +760,6 @@ func (m *Comment) validate(all bool) error { if len(errors) > 0 { return CommentMultiError(errors) } - return nil } @@ -864,7 +858,6 @@ func (m *ListPackageReq) validate(all bool) error { if len(errors) > 0 { return ListPackageReqMultiError(errors) } - return nil } @@ -998,7 +991,6 @@ func (m *ListPackageRsp) validate(all bool) error { if len(errors) > 0 { return ListPackageRspMultiError(errors) } - return nil } @@ -1131,7 +1123,6 @@ func (m *UpdatePackageReq) validate(all bool) error { if len(errors) > 0 { return UpdatePackageReqMultiError(errors) } - return nil } @@ -1242,7 +1233,6 @@ func (m *UpdatePackageRsp) validate(all bool) error { if len(errors) > 0 { return UpdatePackageRspMultiError(errors) } - return nil } @@ -1355,7 +1345,6 @@ func (m *CommentReq) validate(all bool) error { if len(errors) > 0 { return CommentReqMultiError(errors) } - return nil } @@ -1467,7 +1456,6 @@ func (m *AddCommentReq) validate(all bool) error { if len(errors) > 0 { return AddCommentReqMultiError(errors) } - return nil } @@ -1578,7 +1566,6 @@ func (m *AddCommentRsp) validate(all bool) error { if len(errors) > 0 { return AddCommentRspMultiError(errors) } - return nil } @@ -1700,7 +1687,6 @@ func (m *AddPackageReq) validate(all bool) error { if len(errors) > 0 { return AddPackageReqMultiError(errors) } - return nil } @@ -1811,7 +1797,6 @@ func (m *AddPackageRsp) validate(all bool) error { if len(errors) > 0 { return AddPackageRspMultiError(errors) } - return nil } @@ -1911,7 +1896,6 @@ func (m *GetModuleReq) validate(all bool) error { if len(errors) > 0 { return GetModuleReqMultiError(errors) } - return nil } @@ -2044,7 +2028,6 @@ func (m *GetModuleRsp) validate(all bool) error { if len(errors) > 0 { return GetModuleRspMultiError(errors) } - return nil } diff --git a/proto/pkgdash_micro.pb.go b/proto/pkgdash_micro.pb.go index 84ec3e1..dcd41a1 100644 --- a/proto/pkgdash_micro.pb.go +++ b/proto/pkgdash_micro.pb.go @@ -8,7 +8,8 @@ package pkgdashpb import ( context "context" - client "go.unistack.org/micro/v4/client" + _ "go.unistack.org/micro/v4/client" + options "go.unistack.org/micro/v4/options" emptypb "google.golang.org/protobuf/types/known/emptypb" ) @@ -17,11 +18,11 @@ var ( ) type PkgdashServiceClient interface { - ListPackage(ctx context.Context, req *emptypb.Empty, opts ...client.CallOption) (*ListPackageRsp, error) - UpdatePackage(ctx context.Context, req *UpdatePackageReq, opts ...client.CallOption) (*UpdatePackageRsp, error) - AddComment(ctx context.Context, req *AddCommentReq, opts ...client.CallOption) (*AddCommentRsp, error) - AddPackage(ctx context.Context, req *AddPackageReq, opts ...client.CallOption) (*AddPackageRsp, error) - GetModule(ctx context.Context, req *GetModuleReq, opts ...client.CallOption) (*GetModuleRsp, error) + ListPackage(ctx context.Context, req *emptypb.Empty, opts ...options.Option) (*ListPackageRsp, error) + UpdatePackage(ctx context.Context, req *UpdatePackageReq, opts ...options.Option) (*UpdatePackageRsp, error) + AddComment(ctx context.Context, req *AddCommentReq, opts ...options.Option) (*AddCommentRsp, error) + AddPackage(ctx context.Context, req *AddPackageReq, opts ...options.Option) (*AddPackageRsp, error) + GetModule(ctx context.Context, req *GetModuleReq, opts ...options.Option) (*GetModuleRsp, error) } type PkgdashServiceServer interface { diff --git a/proto/pkgdash_micro_http.pb.go b/proto/pkgdash_micro_http.pb.go index 4787931..e4b2ff0 100644 --- a/proto/pkgdash_micro_http.pb.go +++ b/proto/pkgdash_micro_http.pb.go @@ -9,6 +9,7 @@ import ( v41 "go.unistack.org/micro-client-http/v4" v4 "go.unistack.org/micro-server-http/v4" client "go.unistack.org/micro/v4/client" + options "go.unistack.org/micro/v4/options" server "go.unistack.org/micro/v4/server" emptypb "google.golang.org/protobuf/types/known/emptypb" http "net/http" @@ -63,7 +64,7 @@ func NewPkgdashServiceClient(name string, c client.Client) PkgdashServiceClient return &pkgdashServiceClient{c: c, name: name} } -func (c *pkgdashServiceClient) ListPackage(ctx context.Context, req *emptypb.Empty, opts ...client.CallOption) (*ListPackageRsp, error) { +func (c *pkgdashServiceClient) ListPackage(ctx context.Context, req *emptypb.Empty, opts ...options.Option) (*ListPackageRsp, error) { errmap := make(map[string]interface{}, 1) errmap["default"] = &ErrorRsp{} opts = append(opts, @@ -81,7 +82,7 @@ func (c *pkgdashServiceClient) ListPackage(ctx context.Context, req *emptypb.Emp return rsp, nil } -func (c *pkgdashServiceClient) UpdatePackage(ctx context.Context, req *UpdatePackageReq, opts ...client.CallOption) (*UpdatePackageRsp, error) { +func (c *pkgdashServiceClient) UpdatePackage(ctx context.Context, req *UpdatePackageReq, opts ...options.Option) (*UpdatePackageRsp, error) { errmap := make(map[string]interface{}, 1) errmap["default"] = &ErrorRsp{} opts = append(opts, @@ -100,7 +101,7 @@ func (c *pkgdashServiceClient) UpdatePackage(ctx context.Context, req *UpdatePac return rsp, nil } -func (c *pkgdashServiceClient) AddComment(ctx context.Context, req *AddCommentReq, opts ...client.CallOption) (*AddCommentRsp, error) { +func (c *pkgdashServiceClient) AddComment(ctx context.Context, req *AddCommentReq, opts ...options.Option) (*AddCommentRsp, error) { errmap := make(map[string]interface{}, 1) errmap["default"] = &ErrorRsp{} opts = append(opts, @@ -119,7 +120,7 @@ func (c *pkgdashServiceClient) AddComment(ctx context.Context, req *AddCommentRe return rsp, nil } -func (c *pkgdashServiceClient) AddPackage(ctx context.Context, req *AddPackageReq, opts ...client.CallOption) (*AddPackageRsp, error) { +func (c *pkgdashServiceClient) AddPackage(ctx context.Context, req *AddPackageReq, opts ...options.Option) (*AddPackageRsp, error) { errmap := make(map[string]interface{}, 1) errmap["default"] = &ErrorRsp{} opts = append(opts, @@ -138,7 +139,7 @@ func (c *pkgdashServiceClient) AddPackage(ctx context.Context, req *AddPackageRe return rsp, nil } -func (c *pkgdashServiceClient) GetModule(ctx context.Context, req *GetModuleReq, opts ...client.CallOption) (*GetModuleRsp, error) { +func (c *pkgdashServiceClient) GetModule(ctx context.Context, req *GetModuleReq, opts ...options.Option) (*GetModuleRsp, error) { errmap := make(map[string]interface{}, 1) errmap["default"] = &ErrorRsp{} opts = append(opts, @@ -180,7 +181,7 @@ func (h *pkgdashServiceServer) GetModule(ctx context.Context, req *GetModuleReq, return h.PkgdashServiceServer.GetModule(ctx, req, rsp) } -func RegisterPkgdashServiceServer(s server.Server, sh PkgdashServiceServer, opts ...server.HandlerOption) error { +func RegisterPkgdashServiceServer(s server.Server, sh PkgdashServiceServer, opts ...options.Option) error { type pkgdashService interface { ListPackage(ctx context.Context, req *emptypb.Empty, rsp *ListPackageRsp) error UpdatePackage(ctx context.Context, req *UpdatePackageReq, rsp *UpdatePackageRsp) error @@ -192,7 +193,7 @@ func RegisterPkgdashServiceServer(s server.Server, sh PkgdashServiceServer, opts pkgdashService } h := &pkgdashServiceServer{sh} - var nopts []server.HandlerOption + var nopts []options.Option nopts = append(nopts, v4.HandlerEndpoints(PkgdashServiceServerEndpoints)) - return s.Handle(s.NewHandler(&PkgdashService{h}, append(nopts, opts...)...)) + return s.Handle(&PkgdashService{h}, append(nopts, opts...)...) }