From ec032639b46a9dd1e5686e08433f8ff78922bf62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E9=A2=A2=E7=90=A6?= <13436010+shizuizaodezaoan@user.noreply.gitee.com> Date: Tue, 26 Mar 2024 17:46:30 +0800 Subject: [PATCH 1/8] first commit --- .gitignore | 2 + discover.go | 39 ++ discover.proto | 51 ++ discover/discover.pb.go | 684 +++++++++++++++++++ discover/discover_grpc.pb.go | 183 +++++ discoverclient/discover.go | 55 ++ etc/discover.yaml | 6 + go.sum | 306 +++++++++ internal/config/config.go | 7 + internal/logic/createdetaillogic.go | 57 ++ internal/logic/createproductdiscoverlogic.go | 60 ++ internal/logic/pinglogic.go | 30 + internal/server/discoverserver.go | 38 ++ internal/svc/servicecontext.go | 13 + 14 files changed, 1531 insertions(+) create mode 100644 .gitignore create mode 100644 discover.go create mode 100644 discover.proto create mode 100644 discover/discover.pb.go create mode 100644 discover/discover_grpc.pb.go create mode 100644 discoverclient/discover.go create mode 100644 etc/discover.yaml create mode 100644 go.sum create mode 100755 internal/config/config.go create mode 100644 internal/logic/createdetaillogic.go create mode 100644 internal/logic/createproductdiscoverlogic.go create mode 100644 internal/logic/pinglogic.go create mode 100644 internal/server/discoverserver.go create mode 100644 internal/svc/servicecontext.go diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b8edb94 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +model +go.mod \ No newline at end of file diff --git a/discover.go b/discover.go new file mode 100644 index 0000000..243ebfd --- /dev/null +++ b/discover.go @@ -0,0 +1,39 @@ +package main + +import ( + "flag" + "fmt" + + "github.com/zeromicro/go-zero/core/conf" + "github.com/zeromicro/go-zero/core/service" + "github.com/zeromicro/go-zero/zrpc" + "google.golang.org/grpc" + "google.golang.org/grpc/reflection" + + "discover-rpc/discover" + "discover-rpc/internal/config" + "discover-rpc/internal/server" + "discover-rpc/internal/svc" +) + +var configFile = flag.String("f", "etc/discover.yaml", "the config file") + +func main() { + flag.Parse() + + var c config.Config + conf.MustLoad(*configFile, &c) + ctx := svc.NewServiceContext(c) + + s := zrpc.MustNewServer(c.RpcServerConf, func(grpcServer *grpc.Server) { + discover.RegisterDiscoverServer(grpcServer, server.NewDiscoverServer(ctx)) + + if c.Mode == service.DevMode || c.Mode == service.TestMode { + reflection.Register(grpcServer) + } + }) + defer s.Stop() + + fmt.Printf("Starting rpc server at %s...\n", c.ListenOn) + s.Start() +} diff --git a/discover.proto b/discover.proto new file mode 100644 index 0000000..a954bfb --- /dev/null +++ b/discover.proto @@ -0,0 +1,51 @@ +syntax = "proto3"; + +package discover; +option go_package="./discover"; + +message Request { + string ping = 1; +} + +message Response { + string pong = 1; +} + +message ProductDiscover{ + int64 ID = 1; + string Content = 2; + string Images = 3; + string Viewers = 4; + int64 Favorites = 5; +} + +message Detail{ + int64 ID = 1; + int64 ProductDiscoverID = 2; + string DetailName = 3; + string DetailSubstance = 4; +} + +message CreateProductDiscoverRequest { + ProductDiscover productDiscover = 1; +} + +message CreateProductDiscoverResponse { + ProductDiscover productDiscover = 1; +} + +message CreateDetailRequest { + Detail detail = 1; +} + +message CreateDetailResponse { + Detail detail = 1; +} + +service Discover { + rpc Ping(Request) returns(Response); + + rpc CreateProductDiscover(CreateProductDiscoverRequest) returns(CreateProductDiscoverResponse); + + rpc CreateDetail(CreateDetailRequest) returns(CreateDetailResponse); +} diff --git a/discover/discover.pb.go b/discover/discover.pb.go new file mode 100644 index 0000000..3680cdd --- /dev/null +++ b/discover/discover.pb.go @@ -0,0 +1,684 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.32.0 +// protoc v3.21.11 +// source: discover.proto + +package discover + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type Request struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Ping string `protobuf:"bytes,1,opt,name=ping,proto3" json:"ping,omitempty"` +} + +func (x *Request) Reset() { + *x = Request{} + if protoimpl.UnsafeEnabled { + mi := &file_discover_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Request) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Request) ProtoMessage() {} + +func (x *Request) ProtoReflect() protoreflect.Message { + mi := &file_discover_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Request.ProtoReflect.Descriptor instead. +func (*Request) Descriptor() ([]byte, []int) { + return file_discover_proto_rawDescGZIP(), []int{0} +} + +func (x *Request) GetPing() string { + if x != nil { + return x.Ping + } + return "" +} + +type Response struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Pong string `protobuf:"bytes,1,opt,name=pong,proto3" json:"pong,omitempty"` +} + +func (x *Response) Reset() { + *x = Response{} + if protoimpl.UnsafeEnabled { + mi := &file_discover_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Response) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Response) ProtoMessage() {} + +func (x *Response) ProtoReflect() protoreflect.Message { + mi := &file_discover_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Response.ProtoReflect.Descriptor instead. +func (*Response) Descriptor() ([]byte, []int) { + return file_discover_proto_rawDescGZIP(), []int{1} +} + +func (x *Response) GetPong() string { + if x != nil { + return x.Pong + } + return "" +} + +type ProductDiscover struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ID int64 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"` + Content string `protobuf:"bytes,2,opt,name=Content,proto3" json:"Content,omitempty"` + Images string `protobuf:"bytes,3,opt,name=Images,proto3" json:"Images,omitempty"` + Viewers string `protobuf:"bytes,4,opt,name=Viewers,proto3" json:"Viewers,omitempty"` + Favorites int64 `protobuf:"varint,5,opt,name=Favorites,proto3" json:"Favorites,omitempty"` +} + +func (x *ProductDiscover) Reset() { + *x = ProductDiscover{} + if protoimpl.UnsafeEnabled { + mi := &file_discover_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ProductDiscover) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ProductDiscover) ProtoMessage() {} + +func (x *ProductDiscover) ProtoReflect() protoreflect.Message { + mi := &file_discover_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ProductDiscover.ProtoReflect.Descriptor instead. +func (*ProductDiscover) Descriptor() ([]byte, []int) { + return file_discover_proto_rawDescGZIP(), []int{2} +} + +func (x *ProductDiscover) GetID() int64 { + if x != nil { + return x.ID + } + return 0 +} + +func (x *ProductDiscover) GetContent() string { + if x != nil { + return x.Content + } + return "" +} + +func (x *ProductDiscover) GetImages() string { + if x != nil { + return x.Images + } + return "" +} + +func (x *ProductDiscover) GetViewers() string { + if x != nil { + return x.Viewers + } + return "" +} + +func (x *ProductDiscover) GetFavorites() int64 { + if x != nil { + return x.Favorites + } + return 0 +} + +type Detail struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ID int64 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"` + ProductDiscoverID int64 `protobuf:"varint,2,opt,name=ProductDiscoverID,proto3" json:"ProductDiscoverID,omitempty"` + DetailName string `protobuf:"bytes,3,opt,name=DetailName,proto3" json:"DetailName,omitempty"` + DetailSubstance string `protobuf:"bytes,4,opt,name=DetailSubstance,proto3" json:"DetailSubstance,omitempty"` +} + +func (x *Detail) Reset() { + *x = Detail{} + if protoimpl.UnsafeEnabled { + mi := &file_discover_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Detail) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Detail) ProtoMessage() {} + +func (x *Detail) ProtoReflect() protoreflect.Message { + mi := &file_discover_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Detail.ProtoReflect.Descriptor instead. +func (*Detail) Descriptor() ([]byte, []int) { + return file_discover_proto_rawDescGZIP(), []int{3} +} + +func (x *Detail) GetID() int64 { + if x != nil { + return x.ID + } + return 0 +} + +func (x *Detail) GetProductDiscoverID() int64 { + if x != nil { + return x.ProductDiscoverID + } + return 0 +} + +func (x *Detail) GetDetailName() string { + if x != nil { + return x.DetailName + } + return "" +} + +func (x *Detail) GetDetailSubstance() string { + if x != nil { + return x.DetailSubstance + } + return "" +} + +type CreateProductDiscoverRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ProductDiscover *ProductDiscover `protobuf:"bytes,1,opt,name=productDiscover,proto3" json:"productDiscover,omitempty"` +} + +func (x *CreateProductDiscoverRequest) Reset() { + *x = CreateProductDiscoverRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_discover_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateProductDiscoverRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateProductDiscoverRequest) ProtoMessage() {} + +func (x *CreateProductDiscoverRequest) ProtoReflect() protoreflect.Message { + mi := &file_discover_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateProductDiscoverRequest.ProtoReflect.Descriptor instead. +func (*CreateProductDiscoverRequest) Descriptor() ([]byte, []int) { + return file_discover_proto_rawDescGZIP(), []int{4} +} + +func (x *CreateProductDiscoverRequest) GetProductDiscover() *ProductDiscover { + if x != nil { + return x.ProductDiscover + } + return nil +} + +type CreateProductDiscoverResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ProductDiscover *ProductDiscover `protobuf:"bytes,1,opt,name=productDiscover,proto3" json:"productDiscover,omitempty"` +} + +func (x *CreateProductDiscoverResponse) Reset() { + *x = CreateProductDiscoverResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_discover_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateProductDiscoverResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateProductDiscoverResponse) ProtoMessage() {} + +func (x *CreateProductDiscoverResponse) ProtoReflect() protoreflect.Message { + mi := &file_discover_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateProductDiscoverResponse.ProtoReflect.Descriptor instead. +func (*CreateProductDiscoverResponse) Descriptor() ([]byte, []int) { + return file_discover_proto_rawDescGZIP(), []int{5} +} + +func (x *CreateProductDiscoverResponse) GetProductDiscover() *ProductDiscover { + if x != nil { + return x.ProductDiscover + } + return nil +} + +type CreateDetailRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Detail *Detail `protobuf:"bytes,1,opt,name=detail,proto3" json:"detail,omitempty"` +} + +func (x *CreateDetailRequest) Reset() { + *x = CreateDetailRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_discover_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateDetailRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateDetailRequest) ProtoMessage() {} + +func (x *CreateDetailRequest) ProtoReflect() protoreflect.Message { + mi := &file_discover_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateDetailRequest.ProtoReflect.Descriptor instead. +func (*CreateDetailRequest) Descriptor() ([]byte, []int) { + return file_discover_proto_rawDescGZIP(), []int{6} +} + +func (x *CreateDetailRequest) GetDetail() *Detail { + if x != nil { + return x.Detail + } + return nil +} + +type CreateDetailResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Detail *Detail `protobuf:"bytes,1,opt,name=detail,proto3" json:"detail,omitempty"` +} + +func (x *CreateDetailResponse) Reset() { + *x = CreateDetailResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_discover_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateDetailResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateDetailResponse) ProtoMessage() {} + +func (x *CreateDetailResponse) ProtoReflect() protoreflect.Message { + mi := &file_discover_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateDetailResponse.ProtoReflect.Descriptor instead. +func (*CreateDetailResponse) Descriptor() ([]byte, []int) { + return file_discover_proto_rawDescGZIP(), []int{7} +} + +func (x *CreateDetailResponse) GetDetail() *Detail { + if x != nil { + return x.Detail + } + return nil +} + +var File_discover_proto protoreflect.FileDescriptor + +var file_discover_proto_rawDesc = []byte{ + 0x0a, 0x0e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x08, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x22, 0x1d, 0x0a, 0x07, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x69, 0x6e, 0x67, 0x22, 0x1e, 0x0a, 0x08, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x6e, 0x67, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x6f, 0x6e, 0x67, 0x22, 0x8b, 0x01, 0x0a, 0x0f, 0x50, 0x72, + 0x6f, 0x64, 0x75, 0x63, 0x74, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x12, 0x0e, 0x0a, + 0x02, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x49, 0x44, 0x12, 0x18, 0x0a, + 0x07, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x49, 0x6d, 0x61, 0x67, 0x65, + 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x12, + 0x18, 0x0a, 0x07, 0x56, 0x69, 0x65, 0x77, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x56, 0x69, 0x65, 0x77, 0x65, 0x72, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x46, 0x61, 0x76, + 0x6f, 0x72, 0x69, 0x74, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x46, 0x61, + 0x76, 0x6f, 0x72, 0x69, 0x74, 0x65, 0x73, 0x22, 0x90, 0x01, 0x0a, 0x06, 0x44, 0x65, 0x74, 0x61, + 0x69, 0x6c, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, + 0x49, 0x44, 0x12, 0x2c, 0x0a, 0x11, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x44, 0x69, 0x73, + 0x63, 0x6f, 0x76, 0x65, 0x72, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x11, 0x50, + 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x49, 0x44, + 0x12, 0x1e, 0x0a, 0x0a, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x4e, 0x61, 0x6d, 0x65, + 0x12, 0x28, 0x0a, 0x0f, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x53, 0x75, 0x62, 0x73, 0x74, 0x61, + 0x6e, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x44, 0x65, 0x74, 0x61, 0x69, + 0x6c, 0x53, 0x75, 0x62, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x63, 0x0a, 0x1c, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x44, 0x69, 0x73, 0x63, 0x6f, + 0x76, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x43, 0x0a, 0x0f, 0x70, 0x72, + 0x6f, 0x64, 0x75, 0x63, 0x74, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x2e, 0x50, + 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x52, 0x0f, + 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x22, + 0x64, 0x0a, 0x1d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, + 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x43, 0x0a, 0x0f, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x44, 0x69, 0x73, 0x63, 0x6f, + 0x76, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x69, 0x73, 0x63, + 0x6f, 0x76, 0x65, 0x72, 0x2e, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x44, 0x69, 0x73, 0x63, + 0x6f, 0x76, 0x65, 0x72, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x44, 0x69, 0x73, + 0x63, 0x6f, 0x76, 0x65, 0x72, 0x22, 0x3f, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, + 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x06, + 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x64, + 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x2e, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x06, + 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x22, 0x40, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x28, + 0x0a, 0x06, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, + 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x2e, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, + 0x52, 0x06, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x32, 0xf2, 0x01, 0x0a, 0x08, 0x44, 0x69, 0x73, + 0x63, 0x6f, 0x76, 0x65, 0x72, 0x12, 0x2d, 0x0a, 0x04, 0x50, 0x69, 0x6e, 0x67, 0x12, 0x11, 0x2e, + 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x12, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x68, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x72, + 0x6f, 0x64, 0x75, 0x63, 0x74, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x12, 0x26, 0x2e, + 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, + 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, + 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x44, 0x69, + 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, + 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x1d, + 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, + 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, + 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x0c, 0x5a, + 0x0a, 0x2e, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +} + +var ( + file_discover_proto_rawDescOnce sync.Once + file_discover_proto_rawDescData = file_discover_proto_rawDesc +) + +func file_discover_proto_rawDescGZIP() []byte { + file_discover_proto_rawDescOnce.Do(func() { + file_discover_proto_rawDescData = protoimpl.X.CompressGZIP(file_discover_proto_rawDescData) + }) + return file_discover_proto_rawDescData +} + +var file_discover_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_discover_proto_goTypes = []interface{}{ + (*Request)(nil), // 0: discover.Request + (*Response)(nil), // 1: discover.Response + (*ProductDiscover)(nil), // 2: discover.ProductDiscover + (*Detail)(nil), // 3: discover.Detail + (*CreateProductDiscoverRequest)(nil), // 4: discover.CreateProductDiscoverRequest + (*CreateProductDiscoverResponse)(nil), // 5: discover.CreateProductDiscoverResponse + (*CreateDetailRequest)(nil), // 6: discover.CreateDetailRequest + (*CreateDetailResponse)(nil), // 7: discover.CreateDetailResponse +} +var file_discover_proto_depIdxs = []int32{ + 2, // 0: discover.CreateProductDiscoverRequest.productDiscover:type_name -> discover.ProductDiscover + 2, // 1: discover.CreateProductDiscoverResponse.productDiscover:type_name -> discover.ProductDiscover + 3, // 2: discover.CreateDetailRequest.detail:type_name -> discover.Detail + 3, // 3: discover.CreateDetailResponse.detail:type_name -> discover.Detail + 0, // 4: discover.Discover.Ping:input_type -> discover.Request + 4, // 5: discover.Discover.CreateProductDiscover:input_type -> discover.CreateProductDiscoverRequest + 6, // 6: discover.Discover.CreateDetail:input_type -> discover.CreateDetailRequest + 1, // 7: discover.Discover.Ping:output_type -> discover.Response + 5, // 8: discover.Discover.CreateProductDiscover:output_type -> discover.CreateProductDiscoverResponse + 7, // 9: discover.Discover.CreateDetail:output_type -> discover.CreateDetailResponse + 7, // [7:10] is the sub-list for method output_type + 4, // [4:7] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_discover_proto_init() } +func file_discover_proto_init() { + if File_discover_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_discover_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Request); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_discover_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Response); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_discover_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ProductDiscover); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_discover_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Detail); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_discover_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateProductDiscoverRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_discover_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateProductDiscoverResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_discover_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateDetailRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_discover_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateDetailResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_discover_proto_rawDesc, + NumEnums: 0, + NumMessages: 8, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_discover_proto_goTypes, + DependencyIndexes: file_discover_proto_depIdxs, + MessageInfos: file_discover_proto_msgTypes, + }.Build() + File_discover_proto = out.File + file_discover_proto_rawDesc = nil + file_discover_proto_goTypes = nil + file_discover_proto_depIdxs = nil +} diff --git a/discover/discover_grpc.pb.go b/discover/discover_grpc.pb.go new file mode 100644 index 0000000..93e7e79 --- /dev/null +++ b/discover/discover_grpc.pb.go @@ -0,0 +1,183 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v3.21.11 +// source: discover.proto + +package discover + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + Discover_Ping_FullMethodName = "/discover.Discover/Ping" + Discover_CreateProductDiscover_FullMethodName = "/discover.Discover/CreateProductDiscover" + Discover_CreateDetail_FullMethodName = "/discover.Discover/CreateDetail" +) + +// DiscoverClient is the client API for Discover service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type DiscoverClient interface { + Ping(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) + CreateProductDiscover(ctx context.Context, in *CreateProductDiscoverRequest, opts ...grpc.CallOption) (*CreateProductDiscoverResponse, error) + CreateDetail(ctx context.Context, in *CreateDetailRequest, opts ...grpc.CallOption) (*CreateDetailResponse, error) +} + +type discoverClient struct { + cc grpc.ClientConnInterface +} + +func NewDiscoverClient(cc grpc.ClientConnInterface) DiscoverClient { + return &discoverClient{cc} +} + +func (c *discoverClient) Ping(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) { + out := new(Response) + err := c.cc.Invoke(ctx, Discover_Ping_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *discoverClient) CreateProductDiscover(ctx context.Context, in *CreateProductDiscoverRequest, opts ...grpc.CallOption) (*CreateProductDiscoverResponse, error) { + out := new(CreateProductDiscoverResponse) + err := c.cc.Invoke(ctx, Discover_CreateProductDiscover_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *discoverClient) CreateDetail(ctx context.Context, in *CreateDetailRequest, opts ...grpc.CallOption) (*CreateDetailResponse, error) { + out := new(CreateDetailResponse) + err := c.cc.Invoke(ctx, Discover_CreateDetail_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// DiscoverServer is the server API for Discover service. +// All implementations must embed UnimplementedDiscoverServer +// for forward compatibility +type DiscoverServer interface { + Ping(context.Context, *Request) (*Response, error) + CreateProductDiscover(context.Context, *CreateProductDiscoverRequest) (*CreateProductDiscoverResponse, error) + CreateDetail(context.Context, *CreateDetailRequest) (*CreateDetailResponse, error) + mustEmbedUnimplementedDiscoverServer() +} + +// UnimplementedDiscoverServer must be embedded to have forward compatible implementations. +type UnimplementedDiscoverServer struct { +} + +func (UnimplementedDiscoverServer) Ping(context.Context, *Request) (*Response, error) { + return nil, status.Errorf(codes.Unimplemented, "method Ping not implemented") +} +func (UnimplementedDiscoverServer) CreateProductDiscover(context.Context, *CreateProductDiscoverRequest) (*CreateProductDiscoverResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateProductDiscover not implemented") +} +func (UnimplementedDiscoverServer) CreateDetail(context.Context, *CreateDetailRequest) (*CreateDetailResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateDetail not implemented") +} +func (UnimplementedDiscoverServer) mustEmbedUnimplementedDiscoverServer() {} + +// UnsafeDiscoverServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to DiscoverServer will +// result in compilation errors. +type UnsafeDiscoverServer interface { + mustEmbedUnimplementedDiscoverServer() +} + +func RegisterDiscoverServer(s grpc.ServiceRegistrar, srv DiscoverServer) { + s.RegisterService(&Discover_ServiceDesc, srv) +} + +func _Discover_Ping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Request) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DiscoverServer).Ping(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Discover_Ping_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DiscoverServer).Ping(ctx, req.(*Request)) + } + return interceptor(ctx, in, info, handler) +} + +func _Discover_CreateProductDiscover_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateProductDiscoverRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DiscoverServer).CreateProductDiscover(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Discover_CreateProductDiscover_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DiscoverServer).CreateProductDiscover(ctx, req.(*CreateProductDiscoverRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Discover_CreateDetail_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateDetailRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DiscoverServer).CreateDetail(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Discover_CreateDetail_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DiscoverServer).CreateDetail(ctx, req.(*CreateDetailRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// Discover_ServiceDesc is the grpc.ServiceDesc for Discover service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Discover_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "discover.Discover", + HandlerType: (*DiscoverServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Ping", + Handler: _Discover_Ping_Handler, + }, + { + MethodName: "CreateProductDiscover", + Handler: _Discover_CreateProductDiscover_Handler, + }, + { + MethodName: "CreateDetail", + Handler: _Discover_CreateDetail_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "discover.proto", +} diff --git a/discoverclient/discover.go b/discoverclient/discover.go new file mode 100644 index 0000000..5c79e7f --- /dev/null +++ b/discoverclient/discover.go @@ -0,0 +1,55 @@ +// Code generated by goctl. DO NOT EDIT. +// Source: discover.proto + +package discoverclient + +import ( + "context" + + "discover-rpc/discover" + + "github.com/zeromicro/go-zero/zrpc" + "google.golang.org/grpc" +) + +type ( + CreateDetailRequest = discover.CreateDetailRequest + CreateDetailResponse = discover.CreateDetailResponse + CreateProductDiscoverRequest = discover.CreateProductDiscoverRequest + CreateProductDiscoverResponse = discover.CreateProductDiscoverResponse + Detail = discover.Detail + ProductDiscover = discover.ProductDiscover + Request = discover.Request + Response = discover.Response + + Discover interface { + Ping(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) + CreateProductDiscover(ctx context.Context, in *CreateProductDiscoverRequest, opts ...grpc.CallOption) (*CreateProductDiscoverResponse, error) + CreateDetail(ctx context.Context, in *CreateDetailRequest, opts ...grpc.CallOption) (*CreateDetailResponse, error) + } + + defaultDiscover struct { + cli zrpc.Client + } +) + +func NewDiscover(cli zrpc.Client) Discover { + return &defaultDiscover{ + cli: cli, + } +} + +func (m *defaultDiscover) Ping(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) { + client := discover.NewDiscoverClient(m.cli.Conn()) + return client.Ping(ctx, in, opts...) +} + +func (m *defaultDiscover) CreateProductDiscover(ctx context.Context, in *CreateProductDiscoverRequest, opts ...grpc.CallOption) (*CreateProductDiscoverResponse, error) { + client := discover.NewDiscoverClient(m.cli.Conn()) + return client.CreateProductDiscover(ctx, in, opts...) +} + +func (m *defaultDiscover) CreateDetail(ctx context.Context, in *CreateDetailRequest, opts ...grpc.CallOption) (*CreateDetailResponse, error) { + client := discover.NewDiscoverClient(m.cli.Conn()) + return client.CreateDetail(ctx, in, opts...) +} diff --git a/etc/discover.yaml b/etc/discover.yaml new file mode 100644 index 0000000..d3ddee2 --- /dev/null +++ b/etc/discover.yaml @@ -0,0 +1,6 @@ +Name: discover.rpc +ListenOn: 0.0.0.0:8085 +Etcd: + Hosts: + - 127.0.0.1:2379 + Key: discover.rpc diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..ca21cc5 --- /dev/null +++ b/go.sum @@ -0,0 +1,306 @@ +github.com/alicebob/gopher-json v0.0.0-20230218143504-906a9b012302 h1:uvdUDbHQHO85qeSydJtItA4T55Pw6BtAejd0APRJOCE= +github.com/alicebob/gopher-json v0.0.0-20230218143504-906a9b012302/go.mod h1:SGnFV6hVsYE877CKEZ6tDNTjaSXYUk6QqoIK6PrAtcc= +github.com/alicebob/miniredis/v2 v2.31.1 h1:7XAt0uUg3DtwEKW5ZAGa+K7FZV2DdKQo5K/6TTnfX8Y= +github.com/alicebob/miniredis/v2 v2.31.1/go.mod h1:UB/T2Uztp7MlFSDakaX1sTXUv5CASoprx0wulRT6HBg= +github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= +github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/bsm/ginkgo/v2 v2.12.0 h1:Ny8MWAHyOepLGlLKYmXG4IEkioBysk6GpaRTLC8zwWs= +github.com/bsm/ginkgo/v2 v2.12.0/go.mod h1:SwYbGRRDovPVboqFv0tPTcG1sN61LM1Z4ARdbAV9g4c= +github.com/bsm/gomega v1.27.10 h1:yeMWxP2pV2fG3FgAODIY8EiRE3dy0aeFYt4l7wh6yKA= +github.com/bsm/gomega v1.27.10/go.mod h1:JyEr/xRbxbtgWNi8tIEVPUYZ5Dzef52k01W3YH0H+O0= +github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= +github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= +github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/coreos/go-semver v0.3.1 h1:yi21YpKnrx1gt5R+la8n5WgS0kCrsPp33dmEyHReZr4= +github.com/coreos/go-semver v0.3.1/go.mod h1:irMmmIw/7yzSRPWryHsK7EYSg09caPQL03VsM8rvUec= +github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs= +github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78= +github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= +github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= +github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= +github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= +github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= +github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= +github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= +github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= +github.com/go-openapi/swag v0.22.4 h1:QLMzNJnMGPRNDCbySlcj1x01tzU8/9LTTL9hZZZogBU= +github.com/go-openapi/swag v0.22.4/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= +github.com/go-sql-driver/mysql v1.7.0/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI= +github.com/go-sql-driver/mysql v1.7.1 h1:lUIinVbN1DY0xBg0eMOzmmtGoHwWBbvnWubQUrtU8EI= +github.com/go-sql-driver/mysql v1.7.1/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= +github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang/glog v1.2.0 h1:uCdmnmatrKCgMBlM4rMuJZWOkPDqdbZPnrMXDY4gI68= +github.com/golang/glog v1.2.0/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= +github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= +github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= +github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= +github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec= +github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.0 h1:RtRsiaGvWxcwd8y3BiRZxsylPT8hLWZ5SPcfI+3IDNk= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.0/go.mod h1:TzP6duP4Py2pHLVPPQp42aoYI92+PCrVotyR5e8Vqlk= +github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542 h1:2VTzZjLZBgl62/EtslCrtky5vbi9dd7HrQPQIx6wqiw= +github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542/go.mod h1:Ow0tF8D4Kplbc8s8sSb3V2oUCygFHVp8gC3Dn6U4MNI= +github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E= +github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= +github.com/jinzhu/now v1.1.5 h1:/o9tlHleP7gOFmsnYNz3RGnqzefHA47wQpKrrdTIwXQ= +github.com/jinzhu/now v1.1.5/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= +github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= +github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +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/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= +github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= +github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= +github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= +github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/onsi/ginkgo/v2 v2.13.0 h1:0jY9lJquiL8fcf3M4LAXN5aMlS/b2BV86HFFPCPMgE4= +github.com/onsi/ginkgo/v2 v2.13.0/go.mod h1:TE309ZR8s5FsKKpuB1YAQYBzCaAfUgatB/xlT/ETL/o= +github.com/onsi/gomega v1.29.0 h1:KIA/t2t5UBzoirT4H9tsML45GEbo3ouUnBHsCfD2tVg= +github.com/onsi/gomega v1.29.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ= +github.com/openzipkin/zipkin-go v0.4.2 h1:zjqfqHjUpPmB3c1GlCvvgsM1G4LkvqQbBDueDOCg/jA= +github.com/openzipkin/zipkin-go v0.4.2/go.mod h1:ZeVkFjuuBiSy13y8vpSDCjMi9GoI3hPpCJSBx/EYFhY= +github.com/pelletier/go-toml/v2 v2.1.1 h1:LWAJwfNvjQZCFIDKWYQaM62NcYeYViCmWIwmOStowAI= +github.com/pelletier/go-toml/v2 v2.1.1/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4g= +github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U= +github.com/prometheus/client_golang v1.18.0 h1:HzFfmkOzH5Q8L8G+kSJKUx5dtG87sewO+FoDDqP5Tbk= +github.com/prometheus/client_golang v1.18.0/go.mod h1:T+GXkCk5wSJyOqMIzVgvvjFDlkOQntgjkJWKrN5txjA= +github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw= +github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI= +github.com/prometheus/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= +github.com/prometheus/common v0.45.0/go.mod h1:YJmSTw9BoKxJplESWWxlbyttQR4uaEcGyv9MZjVOJsY= +github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= +github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= +github.com/redis/go-redis/v9 v9.4.0 h1:Yzoz33UZw9I/mFhx4MNrB6Fk+XHO1VukNcCa1+lwyKk= +github.com/redis/go-redis/v9 v9.4.0/go.mod h1:hdY0cQFCN4fnSYT6TkisLufl/4W5UIXyv0b/CLO2V2M= +github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= +github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +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/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +github.com/yuin/gopher-lua v1.1.0 h1:BojcDhfyDWgU2f2TOzYK/g5p2gxMrku8oupLDqlnSqE= +github.com/yuin/gopher-lua v1.1.0/go.mod h1:GBR0iDaNXjAgGg9zfCvksxSRnQx76gclCIb7kdAd1Pw= +github.com/zeromicro/go-zero v1.6.3 h1:OL0NnHD5LdRNDolfcK9vUkJt7K8TcBE3RkzfM8poOVw= +github.com/zeromicro/go-zero v1.6.3/go.mod h1:XZL435ZxVi9MSXXtw2MRQhHgx6OoX3++MRMOE9xU70c= +go.etcd.io/etcd/api/v3 v3.5.12 h1:W4sw5ZoU2Juc9gBWuLk5U6fHfNVyY1WC5g9uiXZio/c= +go.etcd.io/etcd/api/v3 v3.5.12/go.mod h1:Ot+o0SWSyT6uHhA56al1oCED0JImsRiU9Dc26+C2a+4= +go.etcd.io/etcd/client/pkg/v3 v3.5.12 h1:EYDL6pWwyOsylrQyLp2w+HkQ46ATiOvoEdMarindU2A= +go.etcd.io/etcd/client/pkg/v3 v3.5.12/go.mod h1:seTzl2d9APP8R5Y2hFL3NVlD6qC/dOT+3kvrqPyTas4= +go.etcd.io/etcd/client/v3 v3.5.12 h1:v5lCPXn1pf1Uu3M4laUE2hp/geOTc5uPcYYsNe1lDxg= +go.etcd.io/etcd/client/v3 v3.5.12/go.mod h1:tSbBCakoWmmddL+BKVAJHa9km+O/E+bumDe9mSbPiqw= +go.opentelemetry.io/otel v1.19.0 h1:MuS/TNf4/j4IXsZuJegVzI1cwut7Qc00344rgH7p8bs= +go.opentelemetry.io/otel v1.19.0/go.mod h1:i0QyjOq3UPoTzff0PJB2N66fb4S0+rSbSB15/oyH9fY= +go.opentelemetry.io/otel/exporters/jaeger v1.17.0 h1:D7UpUy2Xc2wsi1Ras6V40q806WM07rqoCWzXu7Sqy+4= +go.opentelemetry.io/otel/exporters/jaeger v1.17.0/go.mod h1:nPCqOnEH9rNLKqH/+rrUjiMzHJdV1BlpKcTwRTyKkKI= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0 h1:Mne5On7VWdx7omSrSSZvM4Kw7cS7NQkOOmLcgscI51U= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0/go.mod h1:IPtUMKL4O3tH5y+iXVyAXqpAwMuzC1IrxVS81rummfE= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.19.0 h1:3d+S281UTjM+AbF31XSOYn1qXn3BgIdWl8HNEpx08Jk= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.19.0/go.mod h1:0+KuTDyKL4gjKCF75pHOX4wuzYDUZYfAQdSu43o+Z2I= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.19.0 h1:IeMeyr1aBvBiPVYihXIaeIZba6b8E1bYp7lbdxK8CQg= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.19.0/go.mod h1:oVdCUtjq9MK9BlS7TtucsQwUcXcymNiEDjgDD2jMtZU= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.19.0 h1:Nw7Dv4lwvGrI68+wULbcq7su9K2cebeCUrDjVrUJHxM= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.19.0/go.mod h1:1MsF6Y7gTqosgoZvHlzcaaM8DIMNZgJh87ykokoNH7Y= +go.opentelemetry.io/otel/exporters/zipkin v1.19.0 h1:EGY0h5mGliP9o/nIkVuLI0vRiQqmsYOcbwCuotksO1o= +go.opentelemetry.io/otel/exporters/zipkin v1.19.0/go.mod h1:JQgTGJP11yi3o4GHzIWYodhPisxANdqxF1eHwDSnJrI= +go.opentelemetry.io/otel/metric v1.19.0 h1:aTzpGtV0ar9wlV4Sna9sdJyII5jTVJEvKETPiOKwvpE= +go.opentelemetry.io/otel/metric v1.19.0/go.mod h1:L5rUsV9kM1IxCj1MmSdS+JQAcVm319EUrDVLrt7jqt8= +go.opentelemetry.io/otel/sdk v1.19.0 h1:6USY6zH+L8uMH8L3t1enZPR3WFEmSTADlqldyHtJi3o= +go.opentelemetry.io/otel/sdk v1.19.0/go.mod h1:NedEbbS4w3C6zElbLdPJKOpJQOrGUJ+GfzpjUvI0v1A= +go.opentelemetry.io/otel/trace v1.19.0 h1:DFVQmlVbfVeOuBRrwdtaehRrWiL1JoVs9CPIQ1Dzxpg= +go.opentelemetry.io/otel/trace v1.19.0/go.mod h1:mfaSyvGyEJEI0nyV2I4qhNQnbBOUUmYZpYojqMnX2vo= +go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I= +go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM= +go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= +go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= +go.uber.org/automaxprocs v1.5.3 h1:kWazyxZUrS3Gs4qUpbwo5kEIMGe/DAvi5Z4tl2NW4j8= +go.uber.org/automaxprocs v1.5.3/go.mod h1:eRbA25aqJrxAbsLO0xy5jVwPt7FQnRgjW+efnwa1WM0= +go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.uber.org/goleak v1.2.1/go.mod h1:qlT2yGI9QafXHhZZLxlSuNsMw3FFLxBr+tBRlmO1xH4= +go.uber.org/multierr v1.9.0 h1:7fIwc/ZtS0q++VgcfqFDxSBZVv/Xo49/SYnDFupUwlI= +go.uber.org/multierr v1.9.0/go.mod h1:X2jQV1h+kxSjClGpnseKVIxpmcjrj7MNnI0bnlfKTVQ= +go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60= +go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= +golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/oauth2 v0.16.0 h1:aDkGMBSYxElaoP81NpoUoz2oo2R2wHdZpGToUxfyQrQ= +golang.org/x/oauth2 v0.16.0/go.mod h1:hqZ+0LWXsiVoZpeld6jVt06P3adbS2Uu911W1SsJv2o= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.17.0 h1:mkTF7LCd6WGJNL3K1Ad7kwxNfYAW6a8a8QqtMblp/4U= +golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= +golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.16.1 h1:TLyB3WofjdOEepBHAU20JdNC1Zbg87elYofWYAY5oZA= +golang.org/x/tools v0.16.1/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= +google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= +google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80 h1:KAeGQVN3M9nD0/bQXnr/ClcEMJ968gUXJQ9pwfSynuQ= +google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80/go.mod h1:cc8bqMqtv9gMOr0zHg2Vzff5ULhhL2IXP4sbcn32Dro= +google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 h1:Lj5rbfG876hIAYFjqiJnPHfhXbv+nzTWfm04Fg/XSVU= +google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80/go.mod h1:4jWUdICTdgc3Ibxmr8nAJiiLHwQBY0UI0XZcEMaFKaA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/h2non/gock.v1 v1.1.2 h1:jBbHXgGBK/AoPVfJh5x4r/WxIrElvbLel8TCZkkZJoY= +gopkg.in/h2non/gock.v1 v1.1.2/go.mod h1:n7UGz/ckNChHiK05rDoiC4MYSunEC/lyaUm2WWaDva0= +gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= +gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gorm.io/driver/mysql v1.5.6 h1:Ld4mkIickM+EliaQZQx3uOJDJHtrd70MxAUqWqlx3Y8= +gorm.io/driver/mysql v1.5.6/go.mod h1:sEtPWMiqiN1N1cMXoXmBbd8C6/l+TESwriotuRRpkDM= +gorm.io/gorm v1.25.7/go.mod h1:hbnx/Oo0ChWMn1BIhpy1oYozzpM15i4YPuHDmfYtwg8= +gorm.io/gorm v1.25.8 h1:WAGEZ/aEcznN4D03laj8DKnehe1e9gYQAjW8xyPRdeo= +gorm.io/gorm v1.25.8/go.mod h1:hbnx/Oo0ChWMn1BIhpy1oYozzpM15i4YPuHDmfYtwg8= +k8s.io/api v0.29.2 h1:hBC7B9+MU+ptchxEqTNW2DkUosJpp1P+Wn6YncZ474A= +k8s.io/api v0.29.2/go.mod h1:sdIaaKuU7P44aoyyLlikSLayT6Vb7bvJNCX105xZXY0= +k8s.io/apimachinery v0.29.2 h1:EWGpfJ856oj11C52NRCHuU7rFDwxev48z+6DSlGNsV8= +k8s.io/apimachinery v0.29.2/go.mod h1:6HVkd1FwxIagpYrHSwJlQqZI3G9LfYWRPAkUvLnXTKU= +k8s.io/client-go v0.29.2 h1:FEg85el1TeZp+/vYJM7hkDlSTFZ+c5nnK44DJ4FyoRg= +k8s.io/client-go v0.29.2/go.mod h1:knlvFZE58VpqbQpJNbCbctTVXcd35mMyAAwBdpt4jrA= +k8s.io/klog/v2 v2.110.1 h1:U/Af64HJf7FcwMcXyKm2RPM22WZzyR7OSpYj5tg3cL0= +k8s.io/klog/v2 v2.110.1/go.mod h1:YGtd1984u+GgbuZ7e08/yBuAfKLSO0+uR1Fhi6ExXjo= +k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 h1:aVUu9fTY98ivBPKR9Y5w/AuzbMm96cd3YHRTU83I780= +k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA= +k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= +k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= +sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= +sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= +sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= diff --git a/internal/config/config.go b/internal/config/config.go new file mode 100755 index 0000000..c1f85b9 --- /dev/null +++ b/internal/config/config.go @@ -0,0 +1,7 @@ +package config + +import "github.com/zeromicro/go-zero/zrpc" + +type Config struct { + zrpc.RpcServerConf +} diff --git a/internal/logic/createdetaillogic.go b/internal/logic/createdetaillogic.go new file mode 100644 index 0000000..ac0d770 --- /dev/null +++ b/internal/logic/createdetaillogic.go @@ -0,0 +1,57 @@ +package logic + +import ( + "context" + "net/http" + + "discover-rpc/discover" + "discover-rpc/internal/svc" + "discover-rpc/model" + + "github.com/zeromicro/go-zero/core/logx" + "google.golang.org/grpc/status" +) + +type CreateDetailLogic struct { + ctx context.Context + svcCtx *svc.ServiceContext + logx.Logger +} + +func NewCreateDetailLogic(ctx context.Context, svcCtx *svc.ServiceContext) *CreateDetailLogic { + return &CreateDetailLogic{ + ctx: ctx, + svcCtx: svcCtx, + Logger: logx.WithContext(ctx), + } +} + +func (l *CreateDetailLogic) CreateDetail(in *discover.CreateDetailRequest) (*discover.CreateDetailResponse, error) { + productDiscoverID := in.Detail.ProductDiscoverID + detailName := in.Detail.DetailName + detailSubstance := in.Detail.DetailSubstance + + if productDiscoverID <= 0 || detailName == "" || detailSubstance == "" { + return nil, status.Errorf(http.StatusBadRequest, "请求参数不完整", nil) + } + + arr := model.Detail{ + ProductDiscoverID: int(productDiscoverID), + DetailName: detailName, + DetailSubstance: detailSubstance, + } + + res := model.CreateDetail(arr) + if res.ID == 0 { + return nil, status.Errorf(http.StatusInternalServerError, "添加失败", nil) + } + + return &discover.CreateDetailResponse{ + Detail: &discover.Detail{ + ID: int64(arr.ID), + ProductDiscoverID: int64(arr.ProductDiscoverID), + DetailName: arr.DetailName, + DetailSubstance: arr.DetailSubstance, + }, + }, nil +} diff --git a/internal/logic/createproductdiscoverlogic.go b/internal/logic/createproductdiscoverlogic.go new file mode 100644 index 0000000..4b1642f --- /dev/null +++ b/internal/logic/createproductdiscoverlogic.go @@ -0,0 +1,60 @@ +package logic + +import ( + "context" + "net/http" + + "discover-rpc/discover" + "discover-rpc/internal/svc" + "discover-rpc/model" + + "github.com/zeromicro/go-zero/core/logx" + "google.golang.org/grpc/status" +) + +type CreateProductDiscoverLogic struct { + ctx context.Context + svcCtx *svc.ServiceContext + logx.Logger +} + +func NewCreateProductDiscoverLogic(ctx context.Context, svcCtx *svc.ServiceContext) *CreateProductDiscoverLogic { + return &CreateProductDiscoverLogic{ + ctx: ctx, + svcCtx: svcCtx, + Logger: logx.WithContext(ctx), + } +} + +func (l *CreateProductDiscoverLogic) CreateProductDiscover(in *discover.CreateProductDiscoverRequest) (*discover.CreateProductDiscoverResponse, error) { + content := in.ProductDiscover.Content + images := in.ProductDiscover.Images + viewers := in.ProductDiscover.Viewers + favorites := in.ProductDiscover.Favorites + + if content == "" || images == "" || viewers == "" || favorites <= 0 { + return nil, status.Errorf(http.StatusBadRequest, "请求参数不完整", nil) + } + + arr := model.ProductDiscover{ + Content: content, + Images: images, + Viewers: viewers, + Favorites: int(favorites), + } + + res := model.CreateDiscoverProductDiscover(arr) + if res.ID == 0 { + return nil, status.Errorf(http.StatusInternalServerError, "添加失败", nil) + } + + return &discover.CreateProductDiscoverResponse{ + ProductDiscover: &discover.ProductDiscover{ + ID: int64(arr.ID), + Content: arr.Content, + Images: arr.Images, + Viewers: arr.Viewers, + Favorites: int64(arr.Favorites), + }, + }, nil +} diff --git a/internal/logic/pinglogic.go b/internal/logic/pinglogic.go new file mode 100644 index 0000000..168b996 --- /dev/null +++ b/internal/logic/pinglogic.go @@ -0,0 +1,30 @@ +package logic + +import ( + "context" + + "github.com/zeromicro/go-zero/core/logx" + + "discover-rpc/discover" + "discover-rpc/internal/svc" +) + +type PingLogic struct { + ctx context.Context + svcCtx *svc.ServiceContext + logx.Logger +} + +func NewPingLogic(ctx context.Context, svcCtx *svc.ServiceContext) *PingLogic { + return &PingLogic{ + ctx: ctx, + svcCtx: svcCtx, + Logger: logx.WithContext(ctx), + } +} + +func (l *PingLogic) Ping(in *discover.Request) (*discover.Response, error) { + // todo: add your logic here and delete this line + + return &discover.Response{}, nil +} diff --git a/internal/server/discoverserver.go b/internal/server/discoverserver.go new file mode 100644 index 0000000..bcdd9ad --- /dev/null +++ b/internal/server/discoverserver.go @@ -0,0 +1,38 @@ +// Code generated by goctl. DO NOT EDIT. +// Source: discover.proto + +package server + +import ( + "context" + + "discover-rpc/discover" + "discover-rpc/internal/logic" + "discover-rpc/internal/svc" +) + +type DiscoverServer struct { + svcCtx *svc.ServiceContext + discover.UnimplementedDiscoverServer +} + +func NewDiscoverServer(svcCtx *svc.ServiceContext) *DiscoverServer { + return &DiscoverServer{ + svcCtx: svcCtx, + } +} + +func (s *DiscoverServer) Ping(ctx context.Context, in *discover.Request) (*discover.Response, error) { + l := logic.NewPingLogic(ctx, s.svcCtx) + return l.Ping(in) +} + +func (s *DiscoverServer) CreateProductDiscover(ctx context.Context, in *discover.CreateProductDiscoverRequest) (*discover.CreateProductDiscoverResponse, error) { + l := logic.NewCreateProductDiscoverLogic(ctx, s.svcCtx) + return l.CreateProductDiscover(in) +} + +func (s *DiscoverServer) CreateDetail(ctx context.Context, in *discover.CreateDetailRequest) (*discover.CreateDetailResponse, error) { + l := logic.NewCreateDetailLogic(ctx, s.svcCtx) + return l.CreateDetail(in) +} diff --git a/internal/svc/servicecontext.go b/internal/svc/servicecontext.go new file mode 100644 index 0000000..fc1ba41 --- /dev/null +++ b/internal/svc/servicecontext.go @@ -0,0 +1,13 @@ +package svc + +import "discover-rpc/internal/config" + +type ServiceContext struct { + Config config.Config +} + +func NewServiceContext(c config.Config) *ServiceContext { + return &ServiceContext{ + Config: c, + } +} -- Gitee From aaf3c0063e5a4033f3d598e00be8744c5e7e4484 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E9=A2=A2=E7=90=A6?= <13436010+shizuizaodezaoan@user.noreply.gitee.com> Date: Wed, 27 Mar 2024 09:11:30 +0800 Subject: [PATCH 2/8] two commit --- .gitignore | 4 +- discover.proto | 14 +- discover/discover.pb.go | 222 +++++++++--------- discover/discover_grpc.pb.go | 34 +-- discoverclient/discover.go | 22 +- etc/discover.yaml | 7 + go.sum | 2 + internal/logic/createdetaillogic.go | 18 +- ...erlogic.go => creategoodsdiscoverlogic.go} | 25 +- internal/server/discoverserver.go | 6 +- service/service.go | 30 +++ 11 files changed, 212 insertions(+), 172 deletions(-) rename internal/logic/{createproductdiscoverlogic.go => creategoodsdiscoverlogic.go} (59%) create mode 100644 service/service.go diff --git a/.gitignore b/.gitignore index b8edb94..53d75f5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ model -go.mod \ No newline at end of file +go.mod +go.sum +etc \ No newline at end of file diff --git a/discover.proto b/discover.proto index a954bfb..8208248 100644 --- a/discover.proto +++ b/discover.proto @@ -11,7 +11,7 @@ message Response { string pong = 1; } -message ProductDiscover{ +message GoodsDiscover{ int64 ID = 1; string Content = 2; string Images = 3; @@ -21,17 +21,17 @@ message ProductDiscover{ message Detail{ int64 ID = 1; - int64 ProductDiscoverID = 2; + int64 GoodsDiscoverID = 2; string DetailName = 3; string DetailSubstance = 4; } -message CreateProductDiscoverRequest { - ProductDiscover productDiscover = 1; +message CreateGoodsDiscoverRequest { + GoodsDiscover goodsDiscover = 1; } -message CreateProductDiscoverResponse { - ProductDiscover productDiscover = 1; +message CreateGoodsDiscoverResponse { + GoodsDiscover goodsDiscover = 1; } message CreateDetailRequest { @@ -45,7 +45,7 @@ message CreateDetailResponse { service Discover { rpc Ping(Request) returns(Response); - rpc CreateProductDiscover(CreateProductDiscoverRequest) returns(CreateProductDiscoverResponse); + rpc CreateGoodsDiscover(CreateGoodsDiscoverRequest) returns(CreateGoodsDiscoverResponse); rpc CreateDetail(CreateDetailRequest) returns(CreateDetailResponse); } diff --git a/discover/discover.pb.go b/discover/discover.pb.go index 3680cdd..59e53ee 100644 --- a/discover/discover.pb.go +++ b/discover/discover.pb.go @@ -114,7 +114,7 @@ func (x *Response) GetPong() string { return "" } -type ProductDiscover struct { +type GoodsDiscover struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -126,8 +126,8 @@ type ProductDiscover struct { Favorites int64 `protobuf:"varint,5,opt,name=Favorites,proto3" json:"Favorites,omitempty"` } -func (x *ProductDiscover) Reset() { - *x = ProductDiscover{} +func (x *GoodsDiscover) Reset() { + *x = GoodsDiscover{} if protoimpl.UnsafeEnabled { mi := &file_discover_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -135,13 +135,13 @@ func (x *ProductDiscover) Reset() { } } -func (x *ProductDiscover) String() string { +func (x *GoodsDiscover) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ProductDiscover) ProtoMessage() {} +func (*GoodsDiscover) ProtoMessage() {} -func (x *ProductDiscover) ProtoReflect() protoreflect.Message { +func (x *GoodsDiscover) ProtoReflect() protoreflect.Message { mi := &file_discover_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -153,40 +153,40 @@ func (x *ProductDiscover) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ProductDiscover.ProtoReflect.Descriptor instead. -func (*ProductDiscover) Descriptor() ([]byte, []int) { +// Deprecated: Use GoodsDiscover.ProtoReflect.Descriptor instead. +func (*GoodsDiscover) Descriptor() ([]byte, []int) { return file_discover_proto_rawDescGZIP(), []int{2} } -func (x *ProductDiscover) GetID() int64 { +func (x *GoodsDiscover) GetID() int64 { if x != nil { return x.ID } return 0 } -func (x *ProductDiscover) GetContent() string { +func (x *GoodsDiscover) GetContent() string { if x != nil { return x.Content } return "" } -func (x *ProductDiscover) GetImages() string { +func (x *GoodsDiscover) GetImages() string { if x != nil { return x.Images } return "" } -func (x *ProductDiscover) GetViewers() string { +func (x *GoodsDiscover) GetViewers() string { if x != nil { return x.Viewers } return "" } -func (x *ProductDiscover) GetFavorites() int64 { +func (x *GoodsDiscover) GetFavorites() int64 { if x != nil { return x.Favorites } @@ -198,10 +198,10 @@ type Detail struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - ID int64 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"` - ProductDiscoverID int64 `protobuf:"varint,2,opt,name=ProductDiscoverID,proto3" json:"ProductDiscoverID,omitempty"` - DetailName string `protobuf:"bytes,3,opt,name=DetailName,proto3" json:"DetailName,omitempty"` - DetailSubstance string `protobuf:"bytes,4,opt,name=DetailSubstance,proto3" json:"DetailSubstance,omitempty"` + ID int64 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"` + GoodsDiscoverID int64 `protobuf:"varint,2,opt,name=GoodsDiscoverID,proto3" json:"GoodsDiscoverID,omitempty"` + DetailName string `protobuf:"bytes,3,opt,name=DetailName,proto3" json:"DetailName,omitempty"` + DetailSubstance string `protobuf:"bytes,4,opt,name=DetailSubstance,proto3" json:"DetailSubstance,omitempty"` } func (x *Detail) Reset() { @@ -243,9 +243,9 @@ func (x *Detail) GetID() int64 { return 0 } -func (x *Detail) GetProductDiscoverID() int64 { +func (x *Detail) GetGoodsDiscoverID() int64 { if x != nil { - return x.ProductDiscoverID + return x.GoodsDiscoverID } return 0 } @@ -264,16 +264,16 @@ func (x *Detail) GetDetailSubstance() string { return "" } -type CreateProductDiscoverRequest struct { +type CreateGoodsDiscoverRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - ProductDiscover *ProductDiscover `protobuf:"bytes,1,opt,name=productDiscover,proto3" json:"productDiscover,omitempty"` + GoodsDiscover *GoodsDiscover `protobuf:"bytes,1,opt,name=goodsDiscover,proto3" json:"goodsDiscover,omitempty"` } -func (x *CreateProductDiscoverRequest) Reset() { - *x = CreateProductDiscoverRequest{} +func (x *CreateGoodsDiscoverRequest) Reset() { + *x = CreateGoodsDiscoverRequest{} if protoimpl.UnsafeEnabled { mi := &file_discover_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -281,13 +281,13 @@ func (x *CreateProductDiscoverRequest) Reset() { } } -func (x *CreateProductDiscoverRequest) String() string { +func (x *CreateGoodsDiscoverRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*CreateProductDiscoverRequest) ProtoMessage() {} +func (*CreateGoodsDiscoverRequest) ProtoMessage() {} -func (x *CreateProductDiscoverRequest) ProtoReflect() protoreflect.Message { +func (x *CreateGoodsDiscoverRequest) ProtoReflect() protoreflect.Message { mi := &file_discover_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -299,28 +299,28 @@ func (x *CreateProductDiscoverRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use CreateProductDiscoverRequest.ProtoReflect.Descriptor instead. -func (*CreateProductDiscoverRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use CreateGoodsDiscoverRequest.ProtoReflect.Descriptor instead. +func (*CreateGoodsDiscoverRequest) Descriptor() ([]byte, []int) { return file_discover_proto_rawDescGZIP(), []int{4} } -func (x *CreateProductDiscoverRequest) GetProductDiscover() *ProductDiscover { +func (x *CreateGoodsDiscoverRequest) GetGoodsDiscover() *GoodsDiscover { if x != nil { - return x.ProductDiscover + return x.GoodsDiscover } return nil } -type CreateProductDiscoverResponse struct { +type CreateGoodsDiscoverResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - ProductDiscover *ProductDiscover `protobuf:"bytes,1,opt,name=productDiscover,proto3" json:"productDiscover,omitempty"` + GoodsDiscover *GoodsDiscover `protobuf:"bytes,1,opt,name=goodsDiscover,proto3" json:"goodsDiscover,omitempty"` } -func (x *CreateProductDiscoverResponse) Reset() { - *x = CreateProductDiscoverResponse{} +func (x *CreateGoodsDiscoverResponse) Reset() { + *x = CreateGoodsDiscoverResponse{} if protoimpl.UnsafeEnabled { mi := &file_discover_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -328,13 +328,13 @@ func (x *CreateProductDiscoverResponse) Reset() { } } -func (x *CreateProductDiscoverResponse) String() string { +func (x *CreateGoodsDiscoverResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*CreateProductDiscoverResponse) ProtoMessage() {} +func (*CreateGoodsDiscoverResponse) ProtoMessage() {} -func (x *CreateProductDiscoverResponse) ProtoReflect() protoreflect.Message { +func (x *CreateGoodsDiscoverResponse) ProtoReflect() protoreflect.Message { mi := &file_discover_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -346,14 +346,14 @@ func (x *CreateProductDiscoverResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use CreateProductDiscoverResponse.ProtoReflect.Descriptor instead. -func (*CreateProductDiscoverResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use CreateGoodsDiscoverResponse.ProtoReflect.Descriptor instead. +func (*CreateGoodsDiscoverResponse) Descriptor() ([]byte, []int) { return file_discover_proto_rawDescGZIP(), []int{5} } -func (x *CreateProductDiscoverResponse) GetProductDiscover() *ProductDiscover { +func (x *CreateGoodsDiscoverResponse) GetGoodsDiscover() *GoodsDiscover { if x != nil { - return x.ProductDiscover + return x.GoodsDiscover } return nil } @@ -460,63 +460,61 @@ var file_discover_proto_rawDesc = []byte{ 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x69, 0x6e, 0x67, 0x22, 0x1e, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x6e, 0x67, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x6f, 0x6e, 0x67, 0x22, 0x8b, 0x01, 0x0a, 0x0f, 0x50, 0x72, - 0x6f, 0x64, 0x75, 0x63, 0x74, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x12, 0x0e, 0x0a, - 0x02, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x49, 0x44, 0x12, 0x18, 0x0a, - 0x07, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x49, 0x6d, 0x61, 0x67, 0x65, - 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x12, - 0x18, 0x0a, 0x07, 0x56, 0x69, 0x65, 0x77, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x56, 0x69, 0x65, 0x77, 0x65, 0x72, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x46, 0x61, 0x76, - 0x6f, 0x72, 0x69, 0x74, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x46, 0x61, - 0x76, 0x6f, 0x72, 0x69, 0x74, 0x65, 0x73, 0x22, 0x90, 0x01, 0x0a, 0x06, 0x44, 0x65, 0x74, 0x61, - 0x69, 0x6c, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, - 0x49, 0x44, 0x12, 0x2c, 0x0a, 0x11, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x44, 0x69, 0x73, - 0x63, 0x6f, 0x76, 0x65, 0x72, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x11, 0x50, - 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x49, 0x44, - 0x12, 0x1e, 0x0a, 0x0a, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x4e, 0x61, 0x6d, 0x65, - 0x12, 0x28, 0x0a, 0x0f, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x53, 0x75, 0x62, 0x73, 0x74, 0x61, - 0x6e, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x44, 0x65, 0x74, 0x61, 0x69, - 0x6c, 0x53, 0x75, 0x62, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x63, 0x0a, 0x1c, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x44, 0x69, 0x73, 0x63, 0x6f, - 0x76, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x43, 0x0a, 0x0f, 0x70, 0x72, - 0x6f, 0x64, 0x75, 0x63, 0x74, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x2e, 0x50, - 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x52, 0x0f, - 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x22, - 0x64, 0x0a, 0x1d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x6f, 0x6e, 0x67, 0x22, 0x89, 0x01, 0x0a, 0x0d, 0x47, 0x6f, + 0x6f, 0x64, 0x73, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x49, + 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x49, 0x44, 0x12, 0x18, 0x0a, 0x07, 0x43, + 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x43, 0x6f, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x12, 0x18, 0x0a, + 0x07, 0x56, 0x69, 0x65, 0x77, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x56, 0x69, 0x65, 0x77, 0x65, 0x72, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x46, 0x61, 0x76, 0x6f, 0x72, + 0x69, 0x74, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x46, 0x61, 0x76, 0x6f, + 0x72, 0x69, 0x74, 0x65, 0x73, 0x22, 0x8c, 0x01, 0x0a, 0x06, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, + 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x49, 0x44, + 0x12, 0x28, 0x0a, 0x0f, 0x47, 0x6f, 0x6f, 0x64, 0x73, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, + 0x72, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x47, 0x6f, 0x6f, 0x64, 0x73, + 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x49, 0x44, 0x12, 0x1e, 0x0a, 0x0a, 0x44, 0x65, + 0x74, 0x61, 0x69, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, + 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x28, 0x0a, 0x0f, 0x44, 0x65, + 0x74, 0x61, 0x69, 0x6c, 0x53, 0x75, 0x62, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0f, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x53, 0x75, 0x62, 0x73, 0x74, + 0x61, 0x6e, 0x63, 0x65, 0x22, 0x5b, 0x0a, 0x1a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x6f, + 0x6f, 0x64, 0x73, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x0d, 0x67, 0x6f, 0x6f, 0x64, 0x73, 0x44, 0x69, 0x73, 0x63, 0x6f, + 0x76, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x64, 0x69, 0x73, 0x63, + 0x6f, 0x76, 0x65, 0x72, 0x2e, 0x47, 0x6f, 0x6f, 0x64, 0x73, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, + 0x65, 0x72, 0x52, 0x0d, 0x67, 0x6f, 0x6f, 0x64, 0x73, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, + 0x72, 0x22, 0x5c, 0x0a, 0x1b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x6f, 0x6f, 0x64, 0x73, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x43, 0x0a, 0x0f, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x44, 0x69, 0x73, 0x63, 0x6f, - 0x76, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x69, 0x73, 0x63, - 0x6f, 0x76, 0x65, 0x72, 0x2e, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x44, 0x69, 0x73, 0x63, - 0x6f, 0x76, 0x65, 0x72, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x44, 0x69, 0x73, - 0x63, 0x6f, 0x76, 0x65, 0x72, 0x22, 0x3f, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, - 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x06, - 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x64, - 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x2e, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x06, - 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x22, 0x40, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x28, - 0x0a, 0x06, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, - 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x2e, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, - 0x52, 0x06, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x32, 0xf2, 0x01, 0x0a, 0x08, 0x44, 0x69, 0x73, - 0x63, 0x6f, 0x76, 0x65, 0x72, 0x12, 0x2d, 0x0a, 0x04, 0x50, 0x69, 0x6e, 0x67, 0x12, 0x11, 0x2e, - 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x12, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x68, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x72, - 0x6f, 0x64, 0x75, 0x63, 0x74, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x12, 0x26, 0x2e, - 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, - 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, - 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x44, 0x69, - 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, - 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x1d, - 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, - 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, - 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x0c, 0x5a, - 0x0a, 0x2e, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x12, 0x3d, 0x0a, 0x0d, 0x67, 0x6f, 0x6f, 0x64, 0x73, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, + 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, + 0x65, 0x72, 0x2e, 0x47, 0x6f, 0x6f, 0x64, 0x73, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, + 0x52, 0x0d, 0x67, 0x6f, 0x6f, 0x64, 0x73, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x22, + 0x3f, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x06, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, + 0x72, 0x2e, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x06, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, + 0x22, 0x40, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x28, 0x0a, 0x06, 0x64, 0x65, 0x74, 0x61, + 0x69, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, + 0x76, 0x65, 0x72, 0x2e, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x06, 0x64, 0x65, 0x74, 0x61, + 0x69, 0x6c, 0x32, 0xec, 0x01, 0x0a, 0x08, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x12, + 0x2d, 0x0a, 0x04, 0x50, 0x69, 0x6e, 0x67, 0x12, 0x11, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, + 0x65, 0x72, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x64, 0x69, 0x73, + 0x63, 0x6f, 0x76, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x62, + 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x6f, 0x6f, 0x64, 0x73, 0x44, 0x69, 0x73, + 0x63, 0x6f, 0x76, 0x65, 0x72, 0x12, 0x24, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, + 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x6f, 0x6f, 0x64, 0x73, 0x44, 0x69, 0x73, 0x63, + 0x6f, 0x76, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x64, 0x69, + 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x6f, 0x6f, + 0x64, 0x73, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x74, 0x61, + 0x69, 0x6c, 0x12, 0x1d, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x2e, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1e, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x2e, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x42, 0x0c, 0x5a, 0x0a, 0x2e, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -533,25 +531,25 @@ func file_discover_proto_rawDescGZIP() []byte { var file_discover_proto_msgTypes = make([]protoimpl.MessageInfo, 8) var file_discover_proto_goTypes = []interface{}{ - (*Request)(nil), // 0: discover.Request - (*Response)(nil), // 1: discover.Response - (*ProductDiscover)(nil), // 2: discover.ProductDiscover - (*Detail)(nil), // 3: discover.Detail - (*CreateProductDiscoverRequest)(nil), // 4: discover.CreateProductDiscoverRequest - (*CreateProductDiscoverResponse)(nil), // 5: discover.CreateProductDiscoverResponse - (*CreateDetailRequest)(nil), // 6: discover.CreateDetailRequest - (*CreateDetailResponse)(nil), // 7: discover.CreateDetailResponse + (*Request)(nil), // 0: discover.Request + (*Response)(nil), // 1: discover.Response + (*GoodsDiscover)(nil), // 2: discover.GoodsDiscover + (*Detail)(nil), // 3: discover.Detail + (*CreateGoodsDiscoverRequest)(nil), // 4: discover.CreateGoodsDiscoverRequest + (*CreateGoodsDiscoverResponse)(nil), // 5: discover.CreateGoodsDiscoverResponse + (*CreateDetailRequest)(nil), // 6: discover.CreateDetailRequest + (*CreateDetailResponse)(nil), // 7: discover.CreateDetailResponse } var file_discover_proto_depIdxs = []int32{ - 2, // 0: discover.CreateProductDiscoverRequest.productDiscover:type_name -> discover.ProductDiscover - 2, // 1: discover.CreateProductDiscoverResponse.productDiscover:type_name -> discover.ProductDiscover + 2, // 0: discover.CreateGoodsDiscoverRequest.goodsDiscover:type_name -> discover.GoodsDiscover + 2, // 1: discover.CreateGoodsDiscoverResponse.goodsDiscover:type_name -> discover.GoodsDiscover 3, // 2: discover.CreateDetailRequest.detail:type_name -> discover.Detail 3, // 3: discover.CreateDetailResponse.detail:type_name -> discover.Detail 0, // 4: discover.Discover.Ping:input_type -> discover.Request - 4, // 5: discover.Discover.CreateProductDiscover:input_type -> discover.CreateProductDiscoverRequest + 4, // 5: discover.Discover.CreateGoodsDiscover:input_type -> discover.CreateGoodsDiscoverRequest 6, // 6: discover.Discover.CreateDetail:input_type -> discover.CreateDetailRequest 1, // 7: discover.Discover.Ping:output_type -> discover.Response - 5, // 8: discover.Discover.CreateProductDiscover:output_type -> discover.CreateProductDiscoverResponse + 5, // 8: discover.Discover.CreateGoodsDiscover:output_type -> discover.CreateGoodsDiscoverResponse 7, // 9: discover.Discover.CreateDetail:output_type -> discover.CreateDetailResponse 7, // [7:10] is the sub-list for method output_type 4, // [4:7] is the sub-list for method input_type @@ -591,7 +589,7 @@ func file_discover_proto_init() { } } file_discover_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ProductDiscover); i { + switch v := v.(*GoodsDiscover); i { case 0: return &v.state case 1: @@ -615,7 +613,7 @@ func file_discover_proto_init() { } } file_discover_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateProductDiscoverRequest); i { + switch v := v.(*CreateGoodsDiscoverRequest); i { case 0: return &v.state case 1: @@ -627,7 +625,7 @@ func file_discover_proto_init() { } } file_discover_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateProductDiscoverResponse); i { + switch v := v.(*CreateGoodsDiscoverResponse); i { case 0: return &v.state case 1: diff --git a/discover/discover_grpc.pb.go b/discover/discover_grpc.pb.go index 93e7e79..9606a2d 100644 --- a/discover/discover_grpc.pb.go +++ b/discover/discover_grpc.pb.go @@ -19,9 +19,9 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - Discover_Ping_FullMethodName = "/discover.Discover/Ping" - Discover_CreateProductDiscover_FullMethodName = "/discover.Discover/CreateProductDiscover" - Discover_CreateDetail_FullMethodName = "/discover.Discover/CreateDetail" + Discover_Ping_FullMethodName = "/discover.Discover/Ping" + Discover_CreateGoodsDiscover_FullMethodName = "/discover.Discover/CreateGoodsDiscover" + Discover_CreateDetail_FullMethodName = "/discover.Discover/CreateDetail" ) // DiscoverClient is the client API for Discover service. @@ -29,7 +29,7 @@ const ( // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type DiscoverClient interface { Ping(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) - CreateProductDiscover(ctx context.Context, in *CreateProductDiscoverRequest, opts ...grpc.CallOption) (*CreateProductDiscoverResponse, error) + CreateGoodsDiscover(ctx context.Context, in *CreateGoodsDiscoverRequest, opts ...grpc.CallOption) (*CreateGoodsDiscoverResponse, error) CreateDetail(ctx context.Context, in *CreateDetailRequest, opts ...grpc.CallOption) (*CreateDetailResponse, error) } @@ -50,9 +50,9 @@ func (c *discoverClient) Ping(ctx context.Context, in *Request, opts ...grpc.Cal return out, nil } -func (c *discoverClient) CreateProductDiscover(ctx context.Context, in *CreateProductDiscoverRequest, opts ...grpc.CallOption) (*CreateProductDiscoverResponse, error) { - out := new(CreateProductDiscoverResponse) - err := c.cc.Invoke(ctx, Discover_CreateProductDiscover_FullMethodName, in, out, opts...) +func (c *discoverClient) CreateGoodsDiscover(ctx context.Context, in *CreateGoodsDiscoverRequest, opts ...grpc.CallOption) (*CreateGoodsDiscoverResponse, error) { + out := new(CreateGoodsDiscoverResponse) + err := c.cc.Invoke(ctx, Discover_CreateGoodsDiscover_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -73,7 +73,7 @@ func (c *discoverClient) CreateDetail(ctx context.Context, in *CreateDetailReque // for forward compatibility type DiscoverServer interface { Ping(context.Context, *Request) (*Response, error) - CreateProductDiscover(context.Context, *CreateProductDiscoverRequest) (*CreateProductDiscoverResponse, error) + CreateGoodsDiscover(context.Context, *CreateGoodsDiscoverRequest) (*CreateGoodsDiscoverResponse, error) CreateDetail(context.Context, *CreateDetailRequest) (*CreateDetailResponse, error) mustEmbedUnimplementedDiscoverServer() } @@ -85,8 +85,8 @@ type UnimplementedDiscoverServer struct { func (UnimplementedDiscoverServer) Ping(context.Context, *Request) (*Response, error) { return nil, status.Errorf(codes.Unimplemented, "method Ping not implemented") } -func (UnimplementedDiscoverServer) CreateProductDiscover(context.Context, *CreateProductDiscoverRequest) (*CreateProductDiscoverResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateProductDiscover not implemented") +func (UnimplementedDiscoverServer) CreateGoodsDiscover(context.Context, *CreateGoodsDiscoverRequest) (*CreateGoodsDiscoverResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateGoodsDiscover not implemented") } func (UnimplementedDiscoverServer) CreateDetail(context.Context, *CreateDetailRequest) (*CreateDetailResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateDetail not implemented") @@ -122,20 +122,20 @@ func _Discover_Ping_Handler(srv interface{}, ctx context.Context, dec func(inter return interceptor(ctx, in, info, handler) } -func _Discover_CreateProductDiscover_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateProductDiscoverRequest) +func _Discover_CreateGoodsDiscover_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateGoodsDiscoverRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(DiscoverServer).CreateProductDiscover(ctx, in) + return srv.(DiscoverServer).CreateGoodsDiscover(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Discover_CreateProductDiscover_FullMethodName, + FullMethod: Discover_CreateGoodsDiscover_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DiscoverServer).CreateProductDiscover(ctx, req.(*CreateProductDiscoverRequest)) + return srv.(DiscoverServer).CreateGoodsDiscover(ctx, req.(*CreateGoodsDiscoverRequest)) } return interceptor(ctx, in, info, handler) } @@ -170,8 +170,8 @@ var Discover_ServiceDesc = grpc.ServiceDesc{ Handler: _Discover_Ping_Handler, }, { - MethodName: "CreateProductDiscover", - Handler: _Discover_CreateProductDiscover_Handler, + MethodName: "CreateGoodsDiscover", + Handler: _Discover_CreateGoodsDiscover_Handler, }, { MethodName: "CreateDetail", diff --git a/discoverclient/discover.go b/discoverclient/discover.go index 5c79e7f..ef5d052 100644 --- a/discoverclient/discover.go +++ b/discoverclient/discover.go @@ -13,18 +13,18 @@ import ( ) type ( - CreateDetailRequest = discover.CreateDetailRequest - CreateDetailResponse = discover.CreateDetailResponse - CreateProductDiscoverRequest = discover.CreateProductDiscoverRequest - CreateProductDiscoverResponse = discover.CreateProductDiscoverResponse - Detail = discover.Detail - ProductDiscover = discover.ProductDiscover - Request = discover.Request - Response = discover.Response + CreateDetailRequest = discover.CreateDetailRequest + CreateDetailResponse = discover.CreateDetailResponse + CreateGoodsDiscoverRequest = discover.CreateGoodsDiscoverRequest + CreateGoodsDiscoverResponse = discover.CreateGoodsDiscoverResponse + Detail = discover.Detail + GoodsDiscover = discover.GoodsDiscover + Request = discover.Request + Response = discover.Response Discover interface { Ping(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) - CreateProductDiscover(ctx context.Context, in *CreateProductDiscoverRequest, opts ...grpc.CallOption) (*CreateProductDiscoverResponse, error) + CreateGoodsDiscover(ctx context.Context, in *CreateGoodsDiscoverRequest, opts ...grpc.CallOption) (*CreateGoodsDiscoverResponse, error) CreateDetail(ctx context.Context, in *CreateDetailRequest, opts ...grpc.CallOption) (*CreateDetailResponse, error) } @@ -44,9 +44,9 @@ func (m *defaultDiscover) Ping(ctx context.Context, in *Request, opts ...grpc.Ca return client.Ping(ctx, in, opts...) } -func (m *defaultDiscover) CreateProductDiscover(ctx context.Context, in *CreateProductDiscoverRequest, opts ...grpc.CallOption) (*CreateProductDiscoverResponse, error) { +func (m *defaultDiscover) CreateGoodsDiscover(ctx context.Context, in *CreateGoodsDiscoverRequest, opts ...grpc.CallOption) (*CreateGoodsDiscoverResponse, error) { client := discover.NewDiscoverClient(m.cli.Conn()) - return client.CreateProductDiscover(ctx, in, opts...) + return client.CreateGoodsDiscover(ctx, in, opts...) } func (m *defaultDiscover) CreateDetail(ctx context.Context, in *CreateDetailRequest, opts ...grpc.CallOption) (*CreateDetailResponse, error) { diff --git a/etc/discover.yaml b/etc/discover.yaml index d3ddee2..1329c70 100644 --- a/etc/discover.yaml +++ b/etc/discover.yaml @@ -4,3 +4,10 @@ Etcd: Hosts: - 127.0.0.1:2379 Key: discover.rpc + +Database: + username: root + password: yuling + host: lingdyl.cn + port: 3304 + name: Amazon diff --git a/go.sum b/go.sum index ca21cc5..feb5260 100644 --- a/go.sum +++ b/go.sum @@ -28,6 +28,8 @@ github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxER github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= +github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= diff --git a/internal/logic/createdetaillogic.go b/internal/logic/createdetaillogic.go index ac0d770..c6f2a2f 100644 --- a/internal/logic/createdetaillogic.go +++ b/internal/logic/createdetaillogic.go @@ -7,7 +7,7 @@ import ( "discover-rpc/discover" "discover-rpc/internal/svc" "discover-rpc/model" - + "github.com/zeromicro/go-zero/core/logx" "google.golang.org/grpc/status" ) @@ -27,7 +27,7 @@ func NewCreateDetailLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Crea } func (l *CreateDetailLogic) CreateDetail(in *discover.CreateDetailRequest) (*discover.CreateDetailResponse, error) { - productDiscoverID := in.Detail.ProductDiscoverID + productDiscoverID := in.Detail.GoodsDiscoverID detailName := in.Detail.DetailName detailSubstance := in.Detail.DetailSubstance @@ -36,9 +36,9 @@ func (l *CreateDetailLogic) CreateDetail(in *discover.CreateDetailRequest) (*dis } arr := model.Detail{ - ProductDiscoverID: int(productDiscoverID), - DetailName: detailName, - DetailSubstance: detailSubstance, + GoodsDiscoverID: int(productDiscoverID), + DetailName: detailName, + DetailSubstance: detailSubstance, } res := model.CreateDetail(arr) @@ -48,10 +48,10 @@ func (l *CreateDetailLogic) CreateDetail(in *discover.CreateDetailRequest) (*dis return &discover.CreateDetailResponse{ Detail: &discover.Detail{ - ID: int64(arr.ID), - ProductDiscoverID: int64(arr.ProductDiscoverID), - DetailName: arr.DetailName, - DetailSubstance: arr.DetailSubstance, + ID: int64(arr.ID), + GoodsDiscoverID: int64(arr.GoodsDiscoverID), + DetailName: arr.DetailName, + DetailSubstance: arr.DetailSubstance, }, }, nil } diff --git a/internal/logic/createproductdiscoverlogic.go b/internal/logic/creategoodsdiscoverlogic.go similarity index 59% rename from internal/logic/createproductdiscoverlogic.go rename to internal/logic/creategoodsdiscoverlogic.go index 4b1642f..832113a 100644 --- a/internal/logic/createproductdiscoverlogic.go +++ b/internal/logic/creategoodsdiscoverlogic.go @@ -4,39 +4,40 @@ import ( "context" "net/http" + "google.golang.org/grpc/status" + "discover-rpc/discover" "discover-rpc/internal/svc" "discover-rpc/model" "github.com/zeromicro/go-zero/core/logx" - "google.golang.org/grpc/status" ) -type CreateProductDiscoverLogic struct { +type CreateGoodsDiscoverLogic struct { ctx context.Context svcCtx *svc.ServiceContext logx.Logger } -func NewCreateProductDiscoverLogic(ctx context.Context, svcCtx *svc.ServiceContext) *CreateProductDiscoverLogic { - return &CreateProductDiscoverLogic{ +func NewCreateGoodsDiscoverLogic(ctx context.Context, svcCtx *svc.ServiceContext) *CreateGoodsDiscoverLogic { + return &CreateGoodsDiscoverLogic{ ctx: ctx, svcCtx: svcCtx, Logger: logx.WithContext(ctx), } } -func (l *CreateProductDiscoverLogic) CreateProductDiscover(in *discover.CreateProductDiscoverRequest) (*discover.CreateProductDiscoverResponse, error) { - content := in.ProductDiscover.Content - images := in.ProductDiscover.Images - viewers := in.ProductDiscover.Viewers - favorites := in.ProductDiscover.Favorites +func (l *CreateGoodsDiscoverLogic) CreateGoodsDiscover(in *discover.CreateGoodsDiscoverRequest) (*discover.CreateGoodsDiscoverResponse, error) { + content := in.GoodsDiscover.Content + images := in.GoodsDiscover.Images + viewers := in.GoodsDiscover.Viewers + favorites := in.GoodsDiscover.Favorites if content == "" || images == "" || viewers == "" || favorites <= 0 { return nil, status.Errorf(http.StatusBadRequest, "请求参数不完整", nil) } - arr := model.ProductDiscover{ + arr := model.GoodsDiscover{ Content: content, Images: images, Viewers: viewers, @@ -48,8 +49,8 @@ func (l *CreateProductDiscoverLogic) CreateProductDiscover(in *discover.CreatePr return nil, status.Errorf(http.StatusInternalServerError, "添加失败", nil) } - return &discover.CreateProductDiscoverResponse{ - ProductDiscover: &discover.ProductDiscover{ + return &discover.CreateGoodsDiscoverResponse{ + GoodsDiscover: &discover.GoodsDiscover{ ID: int64(arr.ID), Content: arr.Content, Images: arr.Images, diff --git a/internal/server/discoverserver.go b/internal/server/discoverserver.go index bcdd9ad..d01ad19 100644 --- a/internal/server/discoverserver.go +++ b/internal/server/discoverserver.go @@ -27,9 +27,9 @@ func (s *DiscoverServer) Ping(ctx context.Context, in *discover.Request) (*disco return l.Ping(in) } -func (s *DiscoverServer) CreateProductDiscover(ctx context.Context, in *discover.CreateProductDiscoverRequest) (*discover.CreateProductDiscoverResponse, error) { - l := logic.NewCreateProductDiscoverLogic(ctx, s.svcCtx) - return l.CreateProductDiscover(in) +func (s *DiscoverServer) CreateGoodsDiscover(ctx context.Context, in *discover.CreateGoodsDiscoverRequest) (*discover.CreateGoodsDiscoverResponse, error) { + l := logic.NewCreateGoodsDiscoverLogic(ctx, s.svcCtx) + return l.CreateGoodsDiscover(in) } func (s *DiscoverServer) CreateDetail(ctx context.Context, in *discover.CreateDetailRequest) (*discover.CreateDetailResponse, error) { diff --git a/service/service.go b/service/service.go new file mode 100644 index 0000000..4395fa3 --- /dev/null +++ b/service/service.go @@ -0,0 +1,30 @@ +package service + +import ( + "io/ioutil" + + "github.com/ghodss/yaml" +) + +type Config struct { + Database struct { + Username string `yaml:"username"` + Password string `yaml:"password"` + Host string `yaml:"host"` + Port int `yaml:"port"` + Name string `yaml:"name"` + } `yaml:"Database"` +} + +func LoadConfig(filename string) (Config, error) { + var config Config + data, err := ioutil.ReadFile(filename) + if err != nil { + return config, err + } + err = yaml.Unmarshal(data, &config) + if err != nil { + return config, err + } + return config, nil +} -- Gitee From 07a28b092b28fd6da2c9133e39641612e9a29319 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E9=A2=A2=E7=90=A6?= <13436010+shizuizaodezaoan@user.noreply.gitee.com> Date: Wed, 27 Mar 2024 09:14:46 +0800 Subject: [PATCH 3/8] three commit --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 53d75f5..e6167a9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ model go.mod go.sum -etc \ No newline at end of file +etc/discover.yaml \ No newline at end of file -- Gitee From 3f7b58fe2bd7091aeb545229ccbb594b0468696a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E9=A2=A2=E7=90=A6?= <13436010+shizuizaodezaoan@user.noreply.gitee.com> Date: Wed, 27 Mar 2024 01:17:52 +0000 Subject: [PATCH 4/8] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=20etc?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- etc/discover.yaml | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 etc/discover.yaml diff --git a/etc/discover.yaml b/etc/discover.yaml deleted file mode 100644 index 1329c70..0000000 --- a/etc/discover.yaml +++ /dev/null @@ -1,13 +0,0 @@ -Name: discover.rpc -ListenOn: 0.0.0.0:8085 -Etcd: - Hosts: - - 127.0.0.1:2379 - Key: discover.rpc - -Database: - username: root - password: yuling - host: lingdyl.cn - port: 3304 - name: Amazon -- Gitee From e2ad85b9acb3de56aecaaad19d3228b793056565 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E9=A2=A2=E7=90=A6?= <13436010+shizuizaodezaoan@user.noreply.gitee.com> Date: Wed, 27 Mar 2024 09:18:08 +0800 Subject: [PATCH 5/8] three commit --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index e6167a9..53d75f5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ model go.mod go.sum -etc/discover.yaml \ No newline at end of file +etc \ No newline at end of file -- Gitee From 053db56390d9cbb33d8f78828a1e61b300c55eb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E9=A2=A2=E7=90=A6?= <13436010+shizuizaodezaoan@user.noreply.gitee.com> Date: Thu, 28 Mar 2024 08:56:01 +0800 Subject: [PATCH 6/8] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/logic/creategoodsdiscoverlogic.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/logic/creategoodsdiscoverlogic.go b/internal/logic/creategoodsdiscoverlogic.go index 832113a..2a8f3fc 100644 --- a/internal/logic/creategoodsdiscoverlogic.go +++ b/internal/logic/creategoodsdiscoverlogic.go @@ -44,7 +44,7 @@ func (l *CreateGoodsDiscoverLogic) CreateGoodsDiscover(in *discover.CreateGoodsD Favorites: int(favorites), } - res := model.CreateDiscoverProductDiscover(arr) + res := model.CreateGoodsDiscover(arr) if res.ID == 0 { return nil, status.Errorf(http.StatusInternalServerError, "添加失败", nil) } -- Gitee From cdd3fcb7c222b318666c13c8e243f366a979fb9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E9=A2=A2=E7=90=A6?= <13436010+shizuizaodezaoan@user.noreply.gitee.com> Date: Thu, 28 Mar 2024 02:30:09 +0000 Subject: [PATCH 7/8] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=20serv?= =?UTF-8?q?ice?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- service/service.go | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100644 service/service.go diff --git a/service/service.go b/service/service.go deleted file mode 100644 index 4395fa3..0000000 --- a/service/service.go +++ /dev/null @@ -1,30 +0,0 @@ -package service - -import ( - "io/ioutil" - - "github.com/ghodss/yaml" -) - -type Config struct { - Database struct { - Username string `yaml:"username"` - Password string `yaml:"password"` - Host string `yaml:"host"` - Port int `yaml:"port"` - Name string `yaml:"name"` - } `yaml:"Database"` -} - -func LoadConfig(filename string) (Config, error) { - var config Config - data, err := ioutil.ReadFile(filename) - if err != nil { - return config, err - } - err = yaml.Unmarshal(data, &config) - if err != nil { - return config, err - } - return config, nil -} -- Gitee From 06408fd66c188861303adcacdd5a8207a3bc0414 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E9=A2=A2=E7=90=A6?= <13436010+shizuizaodezaoan@user.noreply.gitee.com> Date: Thu, 28 Mar 2024 10:30:20 +0800 Subject: [PATCH 8/8] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 53d75f5..0a8d183 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ model go.mod go.sum -etc \ No newline at end of file +etc +service \ No newline at end of file -- Gitee