add service
All checks were successful
Deploy Smart Search Backend Test / deploy (push) Successful in 2m31s
All checks were successful
Deploy Smart Search Backend Test / deploy (push) Successful in 2m31s
This commit is contained in:
201
pkg/pb/supplier/supplier.pb.go
Normal file
201
pkg/pb/supplier/supplier.pb.go
Normal file
@@ -0,0 +1,201 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.6
|
||||
// protoc v5.29.3
|
||||
// source: supplier/supplier.proto
|
||||
|
||||
package supplier
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
)
|
||||
|
||||
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 ExportExcelRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
|
||||
UserId int64 `protobuf:"varint,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ExportExcelRequest) Reset() {
|
||||
*x = ExportExcelRequest{}
|
||||
mi := &file_supplier_supplier_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ExportExcelRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ExportExcelRequest) ProtoMessage() {}
|
||||
|
||||
func (x *ExportExcelRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_supplier_supplier_proto_msgTypes[0]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ExportExcelRequest.ProtoReflect.Descriptor instead.
|
||||
func (*ExportExcelRequest) Descriptor() ([]byte, []int) {
|
||||
return file_supplier_supplier_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *ExportExcelRequest) GetRequestId() string {
|
||||
if x != nil {
|
||||
return x.RequestId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ExportExcelRequest) GetUserId() int64 {
|
||||
if x != nil {
|
||||
return x.UserId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type ExportExcelResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
FileData []byte `protobuf:"bytes,1,opt,name=file_data,json=fileData,proto3" json:"file_data,omitempty"`
|
||||
FileName string `protobuf:"bytes,2,opt,name=file_name,json=fileName,proto3" json:"file_name,omitempty"`
|
||||
MimeType string `protobuf:"bytes,3,opt,name=mime_type,json=mimeType,proto3" json:"mime_type,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ExportExcelResponse) Reset() {
|
||||
*x = ExportExcelResponse{}
|
||||
mi := &file_supplier_supplier_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ExportExcelResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ExportExcelResponse) ProtoMessage() {}
|
||||
|
||||
func (x *ExportExcelResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_supplier_supplier_proto_msgTypes[1]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ExportExcelResponse.ProtoReflect.Descriptor instead.
|
||||
func (*ExportExcelResponse) Descriptor() ([]byte, []int) {
|
||||
return file_supplier_supplier_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *ExportExcelResponse) GetFileData() []byte {
|
||||
if x != nil {
|
||||
return x.FileData
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *ExportExcelResponse) GetFileName() string {
|
||||
if x != nil {
|
||||
return x.FileName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ExportExcelResponse) GetMimeType() string {
|
||||
if x != nil {
|
||||
return x.MimeType
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
var File_supplier_supplier_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_supplier_supplier_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"\x17supplier/supplier.proto\x12\bsupplier\"L\n" +
|
||||
"\x12ExportExcelRequest\x12\x1d\n" +
|
||||
"\n" +
|
||||
"request_id\x18\x01 \x01(\tR\trequestId\x12\x17\n" +
|
||||
"\auser_id\x18\x02 \x01(\x03R\x06userId\"l\n" +
|
||||
"\x13ExportExcelResponse\x12\x1b\n" +
|
||||
"\tfile_data\x18\x01 \x01(\fR\bfileData\x12\x1b\n" +
|
||||
"\tfile_name\x18\x02 \x01(\tR\bfileName\x12\x1b\n" +
|
||||
"\tmime_type\x18\x03 \x01(\tR\bmimeType2]\n" +
|
||||
"\x0fSupplierService\x12J\n" +
|
||||
"\vExportExcel\x12\x1c.supplier.ExportExcelRequest\x1a\x1d.supplier.ExportExcelResponseB@Z>git.techease.ru/Smart-search/smart-search-back/pkg/pb/supplierb\x06proto3"
|
||||
|
||||
var (
|
||||
file_supplier_supplier_proto_rawDescOnce sync.Once
|
||||
file_supplier_supplier_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_supplier_supplier_proto_rawDescGZIP() []byte {
|
||||
file_supplier_supplier_proto_rawDescOnce.Do(func() {
|
||||
file_supplier_supplier_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_supplier_supplier_proto_rawDesc), len(file_supplier_supplier_proto_rawDesc)))
|
||||
})
|
||||
return file_supplier_supplier_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_supplier_supplier_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||
var file_supplier_supplier_proto_goTypes = []any{
|
||||
(*ExportExcelRequest)(nil), // 0: supplier.ExportExcelRequest
|
||||
(*ExportExcelResponse)(nil), // 1: supplier.ExportExcelResponse
|
||||
}
|
||||
var file_supplier_supplier_proto_depIdxs = []int32{
|
||||
0, // 0: supplier.SupplierService.ExportExcel:input_type -> supplier.ExportExcelRequest
|
||||
1, // 1: supplier.SupplierService.ExportExcel:output_type -> supplier.ExportExcelResponse
|
||||
1, // [1:2] is the sub-list for method output_type
|
||||
0, // [0:1] is the sub-list for method input_type
|
||||
0, // [0:0] is the sub-list for extension type_name
|
||||
0, // [0:0] is the sub-list for extension extendee
|
||||
0, // [0:0] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_supplier_supplier_proto_init() }
|
||||
func file_supplier_supplier_proto_init() {
|
||||
if File_supplier_supplier_proto != nil {
|
||||
return
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_supplier_supplier_proto_rawDesc), len(file_supplier_supplier_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 2,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_supplier_supplier_proto_goTypes,
|
||||
DependencyIndexes: file_supplier_supplier_proto_depIdxs,
|
||||
MessageInfos: file_supplier_supplier_proto_msgTypes,
|
||||
}.Build()
|
||||
File_supplier_supplier_proto = out.File
|
||||
file_supplier_supplier_proto_goTypes = nil
|
||||
file_supplier_supplier_proto_depIdxs = nil
|
||||
}
|
||||
121
pkg/pb/supplier/supplier_grpc.pb.go
Normal file
121
pkg/pb/supplier/supplier_grpc.pb.go
Normal file
@@ -0,0 +1,121 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc v5.29.3
|
||||
// source: supplier/supplier.proto
|
||||
|
||||
package supplier
|
||||
|
||||
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.64.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion9
|
||||
|
||||
const (
|
||||
SupplierService_ExportExcel_FullMethodName = "/supplier.SupplierService/ExportExcel"
|
||||
)
|
||||
|
||||
// SupplierServiceClient is the client API for SupplierService 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 SupplierServiceClient interface {
|
||||
ExportExcel(ctx context.Context, in *ExportExcelRequest, opts ...grpc.CallOption) (*ExportExcelResponse, error)
|
||||
}
|
||||
|
||||
type supplierServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewSupplierServiceClient(cc grpc.ClientConnInterface) SupplierServiceClient {
|
||||
return &supplierServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *supplierServiceClient) ExportExcel(ctx context.Context, in *ExportExcelRequest, opts ...grpc.CallOption) (*ExportExcelResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(ExportExcelResponse)
|
||||
err := c.cc.Invoke(ctx, SupplierService_ExportExcel_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// SupplierServiceServer is the server API for SupplierService service.
|
||||
// All implementations must embed UnimplementedSupplierServiceServer
|
||||
// for forward compatibility.
|
||||
type SupplierServiceServer interface {
|
||||
ExportExcel(context.Context, *ExportExcelRequest) (*ExportExcelResponse, error)
|
||||
mustEmbedUnimplementedSupplierServiceServer()
|
||||
}
|
||||
|
||||
// UnimplementedSupplierServiceServer must be embedded to have
|
||||
// forward compatible implementations.
|
||||
//
|
||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedSupplierServiceServer struct{}
|
||||
|
||||
func (UnimplementedSupplierServiceServer) ExportExcel(context.Context, *ExportExcelRequest) (*ExportExcelResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ExportExcel not implemented")
|
||||
}
|
||||
func (UnimplementedSupplierServiceServer) mustEmbedUnimplementedSupplierServiceServer() {}
|
||||
func (UnimplementedSupplierServiceServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeSupplierServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to SupplierServiceServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeSupplierServiceServer interface {
|
||||
mustEmbedUnimplementedSupplierServiceServer()
|
||||
}
|
||||
|
||||
func RegisterSupplierServiceServer(s grpc.ServiceRegistrar, srv SupplierServiceServer) {
|
||||
// If the following call pancis, it indicates UnimplementedSupplierServiceServer 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.
|
||||
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||||
t.testEmbeddedByValue()
|
||||
}
|
||||
s.RegisterService(&SupplierService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _SupplierService_ExportExcel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ExportExcelRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(SupplierServiceServer).ExportExcel(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: SupplierService_ExportExcel_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(SupplierServiceServer).ExportExcel(ctx, req.(*ExportExcelRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// SupplierService_ServiceDesc is the grpc.ServiceDesc for SupplierService service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var SupplierService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "supplier.SupplierService",
|
||||
HandlerType: (*SupplierServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "ExportExcel",
|
||||
Handler: _SupplierService_ExportExcel_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "supplier/supplier.proto",
|
||||
}
|
||||
Reference in New Issue
Block a user