refactor: centralize protobuf and remove go-zero
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.6
|
||||
// protoc (unknown)
|
||||
// source: address.proto
|
||||
// protoc-gen-go v1.36.11
|
||||
// protoc v7.35.0
|
||||
// source: module/ec/address/proto/address.proto
|
||||
|
||||
package address
|
||||
|
||||
@@ -41,7 +41,7 @@ type AddressItem struct {
|
||||
|
||||
func (x *AddressItem) Reset() {
|
||||
*x = AddressItem{}
|
||||
mi := &file_address_proto_msgTypes[0]
|
||||
mi := &file_module_ec_address_proto_address_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -53,7 +53,7 @@ func (x *AddressItem) String() string {
|
||||
func (*AddressItem) ProtoMessage() {}
|
||||
|
||||
func (x *AddressItem) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_address_proto_msgTypes[0]
|
||||
mi := &file_module_ec_address_proto_address_proto_msgTypes[0]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -66,7 +66,7 @@ func (x *AddressItem) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use AddressItem.ProtoReflect.Descriptor instead.
|
||||
func (*AddressItem) Descriptor() ([]byte, []int) {
|
||||
return file_address_proto_rawDescGZIP(), []int{0}
|
||||
return file_module_ec_address_proto_address_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *AddressItem) GetId() int64 {
|
||||
@@ -162,16 +162,16 @@ type AddressCreateRequest struct {
|
||||
Area string `protobuf:"bytes,5,opt,name=area,proto3" json:"area,omitempty"` // 区
|
||||
Detail string `protobuf:"bytes,6,opt,name=detail,proto3" json:"detail,omitempty"` // 详情地址
|
||||
Contact string `protobuf:"bytes,7,opt,name=contact,proto3" json:"contact,omitempty"` // 联系人
|
||||
Name string `protobuf:"bytes,8,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Pics string `protobuf:"bytes,9,opt,name=pics,proto3" json:"pics,omitempty"`
|
||||
Status int32 `protobuf:"varint,10,opt,name=status,proto3" json:"status,omitempty"` // 状态 -1为删除,1为正常,2为设置成默认
|
||||
Name string `protobuf:"bytes,8,opt,name=name,proto3" json:"name,omitempty"` // 名称
|
||||
Pics string `protobuf:"bytes,9,opt,name=pics,proto3" json:"pics,omitempty"` // 图片
|
||||
Status int32 `protobuf:"varint,10,opt,name=status,proto3" json:"status,omitempty"` // 状态 -1为删除,1为正常,2为设置成默认
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *AddressCreateRequest) Reset() {
|
||||
*x = AddressCreateRequest{}
|
||||
mi := &file_address_proto_msgTypes[1]
|
||||
mi := &file_module_ec_address_proto_address_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -183,7 +183,7 @@ func (x *AddressCreateRequest) String() string {
|
||||
func (*AddressCreateRequest) ProtoMessage() {}
|
||||
|
||||
func (x *AddressCreateRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_address_proto_msgTypes[1]
|
||||
mi := &file_module_ec_address_proto_address_proto_msgTypes[1]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -196,7 +196,7 @@ func (x *AddressCreateRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use AddressCreateRequest.ProtoReflect.Descriptor instead.
|
||||
func (*AddressCreateRequest) Descriptor() ([]byte, []int) {
|
||||
return file_address_proto_rawDescGZIP(), []int{1}
|
||||
return file_module_ec_address_proto_address_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *AddressCreateRequest) GetPhone() string {
|
||||
@@ -280,7 +280,7 @@ type FetchRequest struct {
|
||||
|
||||
func (x *FetchRequest) Reset() {
|
||||
*x = FetchRequest{}
|
||||
mi := &file_address_proto_msgTypes[2]
|
||||
mi := &file_module_ec_address_proto_address_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -292,7 +292,7 @@ func (x *FetchRequest) String() string {
|
||||
func (*FetchRequest) ProtoMessage() {}
|
||||
|
||||
func (x *FetchRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_address_proto_msgTypes[2]
|
||||
mi := &file_module_ec_address_proto_address_proto_msgTypes[2]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -305,7 +305,7 @@ func (x *FetchRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use FetchRequest.ProtoReflect.Descriptor instead.
|
||||
func (*FetchRequest) Descriptor() ([]byte, []int) {
|
||||
return file_address_proto_rawDescGZIP(), []int{2}
|
||||
return file_module_ec_address_proto_address_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *FetchRequest) GetPageNo() int64 {
|
||||
@@ -339,7 +339,7 @@ type IdentRequest struct {
|
||||
|
||||
func (x *IdentRequest) Reset() {
|
||||
*x = IdentRequest{}
|
||||
mi := &file_address_proto_msgTypes[3]
|
||||
mi := &file_module_ec_address_proto_address_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -351,7 +351,7 @@ func (x *IdentRequest) String() string {
|
||||
func (*IdentRequest) ProtoMessage() {}
|
||||
|
||||
func (x *IdentRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_address_proto_msgTypes[3]
|
||||
mi := &file_module_ec_address_proto_address_proto_msgTypes[3]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -364,7 +364,7 @@ func (x *IdentRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use IdentRequest.ProtoReflect.Descriptor instead.
|
||||
func (*IdentRequest) Descriptor() ([]byte, []int) {
|
||||
return file_address_proto_rawDescGZIP(), []int{3}
|
||||
return file_module_ec_address_proto_address_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *IdentRequest) GetId() int64 {
|
||||
@@ -393,7 +393,7 @@ type StatusReply struct {
|
||||
|
||||
func (x *StatusReply) Reset() {
|
||||
*x = StatusReply{}
|
||||
mi := &file_address_proto_msgTypes[4]
|
||||
mi := &file_module_ec_address_proto_address_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -405,7 +405,7 @@ func (x *StatusReply) String() string {
|
||||
func (*StatusReply) ProtoMessage() {}
|
||||
|
||||
func (x *StatusReply) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_address_proto_msgTypes[4]
|
||||
mi := &file_module_ec_address_proto_address_proto_msgTypes[4]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -418,7 +418,7 @@ func (x *StatusReply) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use StatusReply.ProtoReflect.Descriptor instead.
|
||||
func (*StatusReply) Descriptor() ([]byte, []int) {
|
||||
return file_address_proto_rawDescGZIP(), []int{4}
|
||||
return file_module_ec_address_proto_address_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *StatusReply) GetCode() int32 {
|
||||
@@ -458,7 +458,7 @@ type AddressListReply struct {
|
||||
|
||||
func (x *AddressListReply) Reset() {
|
||||
*x = AddressListReply{}
|
||||
mi := &file_address_proto_msgTypes[5]
|
||||
mi := &file_module_ec_address_proto_address_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -470,7 +470,7 @@ func (x *AddressListReply) String() string {
|
||||
func (*AddressListReply) ProtoMessage() {}
|
||||
|
||||
func (x *AddressListReply) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_address_proto_msgTypes[5]
|
||||
mi := &file_module_ec_address_proto_address_proto_msgTypes[5]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -483,7 +483,7 @@ func (x *AddressListReply) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use AddressListReply.ProtoReflect.Descriptor instead.
|
||||
func (*AddressListReply) Descriptor() ([]byte, []int) {
|
||||
return file_address_proto_rawDescGZIP(), []int{5}
|
||||
return file_module_ec_address_proto_address_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
func (x *AddressListReply) GetData() []*AddressItem {
|
||||
@@ -502,7 +502,7 @@ type AddressDeleteRequest struct {
|
||||
|
||||
func (x *AddressDeleteRequest) Reset() {
|
||||
*x = AddressDeleteRequest{}
|
||||
mi := &file_address_proto_msgTypes[6]
|
||||
mi := &file_module_ec_address_proto_address_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -514,7 +514,7 @@ func (x *AddressDeleteRequest) String() string {
|
||||
func (*AddressDeleteRequest) ProtoMessage() {}
|
||||
|
||||
func (x *AddressDeleteRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_address_proto_msgTypes[6]
|
||||
mi := &file_module_ec_address_proto_address_proto_msgTypes[6]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -527,7 +527,7 @@ func (x *AddressDeleteRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use AddressDeleteRequest.ProtoReflect.Descriptor instead.
|
||||
func (*AddressDeleteRequest) Descriptor() ([]byte, []int) {
|
||||
return file_address_proto_rawDescGZIP(), []int{6}
|
||||
return file_module_ec_address_proto_address_proto_rawDescGZIP(), []int{6}
|
||||
}
|
||||
|
||||
func (x *AddressDeleteRequest) GetId() []int64 {
|
||||
@@ -537,11 +537,11 @@ func (x *AddressDeleteRequest) GetId() []int64 {
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_address_proto protoreflect.FileDescriptor
|
||||
var File_module_ec_address_proto_address_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_address_proto_rawDesc = "" +
|
||||
const file_module_ec_address_proto_address_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"\x18ec/address/address.proto\x12\aaddress\"\x9f\x02\n" +
|
||||
"%module/ec/address/proto/address.proto\x12\aaddress\"\x9f\x02\n" +
|
||||
"\vAddressItem\x12\x0e\n" +
|
||||
"\x02id\x18\x01 \x01(\x03R\x02id\x12\x1a\n" +
|
||||
"\bidentity\x18\x02 \x01(\tR\bidentity\x12\x14\n" +
|
||||
@@ -592,22 +592,22 @@ const file_address_proto_rawDesc = "" +
|
||||
"\x06Modify\x12\x14.address.AddressItem\x1a\x14.address.StatusReply\"\x00\x124\n" +
|
||||
"\x03Get\x12\x15.address.IdentRequest\x1a\x14.address.AddressItem\"\x00\x12;\n" +
|
||||
"\x05Fetch\x12\x15.address.IdentRequest\x1a\x19.address.AddressListReply\"\x00\x12?\n" +
|
||||
"\x06Delete\x12\x1d.address.AddressDeleteRequest\x1a\x14.address.StatusReply\"\x00B\vZ\t./addressb\x06proto3"
|
||||
"\x06Delete\x12\x1d.address.AddressDeleteRequest\x1a\x14.address.StatusReply\"\x00B'Z%bsm/full/module/ec/address/pb;addressb\x06proto3"
|
||||
|
||||
var (
|
||||
file_address_proto_rawDescOnce sync.Once
|
||||
file_address_proto_rawDescData []byte
|
||||
file_module_ec_address_proto_address_proto_rawDescOnce sync.Once
|
||||
file_module_ec_address_proto_address_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_address_proto_rawDescGZIP() []byte {
|
||||
file_address_proto_rawDescOnce.Do(func() {
|
||||
file_address_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_address_proto_rawDesc), len(file_address_proto_rawDesc)))
|
||||
func file_module_ec_address_proto_address_proto_rawDescGZIP() []byte {
|
||||
file_module_ec_address_proto_address_proto_rawDescOnce.Do(func() {
|
||||
file_module_ec_address_proto_address_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_module_ec_address_proto_address_proto_rawDesc), len(file_module_ec_address_proto_address_proto_rawDesc)))
|
||||
})
|
||||
return file_address_proto_rawDescData
|
||||
return file_module_ec_address_proto_address_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_address_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
|
||||
var file_address_proto_goTypes = []any{
|
||||
var file_module_ec_address_proto_address_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
|
||||
var file_module_ec_address_proto_address_proto_goTypes = []any{
|
||||
(*AddressItem)(nil), // 0: address.AddressItem
|
||||
(*AddressCreateRequest)(nil), // 1: address.AddressCreateRequest
|
||||
(*FetchRequest)(nil), // 2: address.FetchRequest
|
||||
@@ -617,7 +617,7 @@ var file_address_proto_goTypes = []any{
|
||||
(*AddressDeleteRequest)(nil), // 6: address.AddressDeleteRequest
|
||||
nil, // 7: address.FetchRequest.ParamsEntry
|
||||
}
|
||||
var file_address_proto_depIdxs = []int32{
|
||||
var file_module_ec_address_proto_address_proto_depIdxs = []int32{
|
||||
7, // 0: address.FetchRequest.params:type_name -> address.FetchRequest.ParamsEntry
|
||||
0, // 1: address.AddressListReply.data:type_name -> address.AddressItem
|
||||
1, // 2: address.Library.Create:input_type -> address.AddressCreateRequest
|
||||
@@ -637,26 +637,26 @@ var file_address_proto_depIdxs = []int32{
|
||||
0, // [0:2] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_address_proto_init() }
|
||||
func file_address_proto_init() {
|
||||
if File_address_proto != nil {
|
||||
func init() { file_module_ec_address_proto_address_proto_init() }
|
||||
func file_module_ec_address_proto_address_proto_init() {
|
||||
if File_module_ec_address_proto_address_proto != nil {
|
||||
return
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_address_proto_rawDesc), len(file_address_proto_rawDesc)),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_module_ec_address_proto_address_proto_rawDesc), len(file_module_ec_address_proto_address_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 8,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_address_proto_goTypes,
|
||||
DependencyIndexes: file_address_proto_depIdxs,
|
||||
MessageInfos: file_address_proto_msgTypes,
|
||||
GoTypes: file_module_ec_address_proto_address_proto_goTypes,
|
||||
DependencyIndexes: file_module_ec_address_proto_address_proto_depIdxs,
|
||||
MessageInfos: file_module_ec_address_proto_address_proto_msgTypes,
|
||||
}.Build()
|
||||
File_address_proto = out.File
|
||||
file_address_proto_goTypes = nil
|
||||
file_address_proto_depIdxs = nil
|
||||
File_module_ec_address_proto_address_proto = out.File
|
||||
file_module_ec_address_proto_address_proto_goTypes = nil
|
||||
file_module_ec_address_proto_address_proto_depIdxs = nil
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
|
||||
// source: address.proto
|
||||
// source: module/ec/address/proto/address.proto
|
||||
|
||||
/*
|
||||
Package address is a reverse proxy.
|
||||
@@ -43,6 +43,9 @@ func request_Library_Create_0(ctx context.Context, marshaler runtime.Marshaler,
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
if req.Body != nil {
|
||||
_, _ = io.Copy(io.Discard, req.Body)
|
||||
}
|
||||
msg, err := client.Create(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
}
|
||||
@@ -67,6 +70,9 @@ func request_Library_Modify_0(ctx context.Context, marshaler runtime.Marshaler,
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
if req.Body != nil {
|
||||
_, _ = io.Copy(io.Discard, req.Body)
|
||||
}
|
||||
msg, err := client.Modify(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
}
|
||||
@@ -91,6 +97,9 @@ func request_Library_Get_0(ctx context.Context, marshaler runtime.Marshaler, cli
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
if req.Body != nil {
|
||||
_, _ = io.Copy(io.Discard, req.Body)
|
||||
}
|
||||
msg, err := client.Get(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
}
|
||||
@@ -115,6 +124,9 @@ func request_Library_Fetch_0(ctx context.Context, marshaler runtime.Marshaler, c
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
if req.Body != nil {
|
||||
_, _ = io.Copy(io.Discard, req.Body)
|
||||
}
|
||||
msg, err := client.Fetch(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
}
|
||||
@@ -139,6 +151,9 @@ func request_Library_Delete_0(ctx context.Context, marshaler runtime.Marshaler,
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
if req.Body != nil {
|
||||
_, _ = io.Copy(io.Discard, req.Body)
|
||||
}
|
||||
msg, err := client.Delete(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc (unknown)
|
||||
// source: address.proto
|
||||
// - protoc-gen-go-grpc v1.6.2
|
||||
// - protoc v7.35.0
|
||||
// source: module/ec/address/proto/address.proto
|
||||
|
||||
package address
|
||||
|
||||
@@ -103,7 +103,7 @@ func (c *libraryClient) Delete(ctx context.Context, in *AddressDeleteRequest, op
|
||||
}
|
||||
|
||||
// LibraryServer is the server API for Library service.
|
||||
// All implementations must embed UnimplementedLibraryServer
|
||||
// All implementations should embed UnimplementedLibraryServer
|
||||
// for forward compatibility.
|
||||
//
|
||||
// 地址库
|
||||
@@ -118,10 +118,9 @@ type LibraryServer interface {
|
||||
Fetch(context.Context, *IdentRequest) (*AddressListReply, error)
|
||||
// 删除一个地址
|
||||
Delete(context.Context, *AddressDeleteRequest) (*StatusReply, error)
|
||||
mustEmbedUnimplementedLibraryServer()
|
||||
}
|
||||
|
||||
// UnimplementedLibraryServer must be embedded to have
|
||||
// UnimplementedLibraryServer should be embedded to have
|
||||
// forward compatible implementations.
|
||||
//
|
||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||
@@ -129,22 +128,21 @@ type LibraryServer interface {
|
||||
type UnimplementedLibraryServer struct{}
|
||||
|
||||
func (UnimplementedLibraryServer) Create(context.Context, *AddressCreateRequest) (*StatusReply, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Create not implemented")
|
||||
return nil, status.Error(codes.Unimplemented, "method Create not implemented")
|
||||
}
|
||||
func (UnimplementedLibraryServer) Modify(context.Context, *AddressItem) (*StatusReply, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Modify not implemented")
|
||||
return nil, status.Error(codes.Unimplemented, "method Modify not implemented")
|
||||
}
|
||||
func (UnimplementedLibraryServer) Get(context.Context, *IdentRequest) (*AddressItem, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Get not implemented")
|
||||
return nil, status.Error(codes.Unimplemented, "method Get not implemented")
|
||||
}
|
||||
func (UnimplementedLibraryServer) Fetch(context.Context, *IdentRequest) (*AddressListReply, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Fetch not implemented")
|
||||
return nil, status.Error(codes.Unimplemented, "method Fetch not implemented")
|
||||
}
|
||||
func (UnimplementedLibraryServer) Delete(context.Context, *AddressDeleteRequest) (*StatusReply, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented")
|
||||
return nil, status.Error(codes.Unimplemented, "method Delete not implemented")
|
||||
}
|
||||
func (UnimplementedLibraryServer) mustEmbedUnimplementedLibraryServer() {}
|
||||
func (UnimplementedLibraryServer) testEmbeddedByValue() {}
|
||||
func (UnimplementedLibraryServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeLibraryServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to LibraryServer will
|
||||
@@ -154,7 +152,7 @@ type UnsafeLibraryServer interface {
|
||||
}
|
||||
|
||||
func RegisterLibraryServer(s grpc.ServiceRegistrar, srv LibraryServer) {
|
||||
// If the following call pancis, it indicates UnimplementedLibraryServer was
|
||||
// If the following call panics, it indicates UnimplementedLibraryServer was
|
||||
// embedded by pointer and is nil. This will cause panics if an
|
||||
// unimplemented method is ever invoked, so we test this at initialization
|
||||
// time to prevent it from happening at runtime later due to I/O.
|
||||
@@ -283,5 +281,5 @@ var Library_ServiceDesc = grpc.ServiceDesc{
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "address.proto",
|
||||
Metadata: "module/ec/address/proto/address.proto",
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user