mirror of
				https://github.com/TeaOSLab/EdgeCommon.git
				synced 2025-11-04 05:00:24 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			188 lines
		
	
	
		
			6.9 KiB
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			188 lines
		
	
	
		
			6.9 KiB
		
	
	
	
		
			Go
		
	
	
	
	
	
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
 | 
						|
// versions:
 | 
						|
// - protoc-gen-go-grpc v1.3.0
 | 
						|
// - protoc             v3.19.4
 | 
						|
// source: service_file.proto
 | 
						|
 | 
						|
package pb
 | 
						|
 | 
						|
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 (
 | 
						|
	FileService_FindEnabledFile_FullMethodName    = "/pb.FileService/findEnabledFile"
 | 
						|
	FileService_CreateFile_FullMethodName         = "/pb.FileService/createFile"
 | 
						|
	FileService_UpdateFileFinished_FullMethodName = "/pb.FileService/updateFileFinished"
 | 
						|
)
 | 
						|
 | 
						|
// FileServiceClient is the client API for FileService 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 FileServiceClient interface {
 | 
						|
	// 查找文件
 | 
						|
	FindEnabledFile(ctx context.Context, in *FindEnabledFileRequest, opts ...grpc.CallOption) (*FindEnabledFileResponse, error)
 | 
						|
	// 创建文件
 | 
						|
	CreateFile(ctx context.Context, in *CreateFileRequest, opts ...grpc.CallOption) (*CreateFileResponse, error)
 | 
						|
	// 将文件置为已完成
 | 
						|
	UpdateFileFinished(ctx context.Context, in *UpdateFileFinishedRequest, opts ...grpc.CallOption) (*RPCSuccess, error)
 | 
						|
}
 | 
						|
 | 
						|
type fileServiceClient struct {
 | 
						|
	cc grpc.ClientConnInterface
 | 
						|
}
 | 
						|
 | 
						|
func NewFileServiceClient(cc grpc.ClientConnInterface) FileServiceClient {
 | 
						|
	return &fileServiceClient{cc}
 | 
						|
}
 | 
						|
 | 
						|
func (c *fileServiceClient) FindEnabledFile(ctx context.Context, in *FindEnabledFileRequest, opts ...grpc.CallOption) (*FindEnabledFileResponse, error) {
 | 
						|
	out := new(FindEnabledFileResponse)
 | 
						|
	err := c.cc.Invoke(ctx, FileService_FindEnabledFile_FullMethodName, in, out, opts...)
 | 
						|
	if err != nil {
 | 
						|
		return nil, err
 | 
						|
	}
 | 
						|
	return out, nil
 | 
						|
}
 | 
						|
 | 
						|
func (c *fileServiceClient) CreateFile(ctx context.Context, in *CreateFileRequest, opts ...grpc.CallOption) (*CreateFileResponse, error) {
 | 
						|
	out := new(CreateFileResponse)
 | 
						|
	err := c.cc.Invoke(ctx, FileService_CreateFile_FullMethodName, in, out, opts...)
 | 
						|
	if err != nil {
 | 
						|
		return nil, err
 | 
						|
	}
 | 
						|
	return out, nil
 | 
						|
}
 | 
						|
 | 
						|
func (c *fileServiceClient) UpdateFileFinished(ctx context.Context, in *UpdateFileFinishedRequest, opts ...grpc.CallOption) (*RPCSuccess, error) {
 | 
						|
	out := new(RPCSuccess)
 | 
						|
	err := c.cc.Invoke(ctx, FileService_UpdateFileFinished_FullMethodName, in, out, opts...)
 | 
						|
	if err != nil {
 | 
						|
		return nil, err
 | 
						|
	}
 | 
						|
	return out, nil
 | 
						|
}
 | 
						|
 | 
						|
// FileServiceServer is the server API for FileService service.
 | 
						|
// All implementations should embed UnimplementedFileServiceServer
 | 
						|
// for forward compatibility
 | 
						|
type FileServiceServer interface {
 | 
						|
	// 查找文件
 | 
						|
	FindEnabledFile(context.Context, *FindEnabledFileRequest) (*FindEnabledFileResponse, error)
 | 
						|
	// 创建文件
 | 
						|
	CreateFile(context.Context, *CreateFileRequest) (*CreateFileResponse, error)
 | 
						|
	// 将文件置为已完成
 | 
						|
	UpdateFileFinished(context.Context, *UpdateFileFinishedRequest) (*RPCSuccess, error)
 | 
						|
}
 | 
						|
 | 
						|
// UnimplementedFileServiceServer should be embedded to have forward compatible implementations.
 | 
						|
type UnimplementedFileServiceServer struct {
 | 
						|
}
 | 
						|
 | 
						|
func (UnimplementedFileServiceServer) FindEnabledFile(context.Context, *FindEnabledFileRequest) (*FindEnabledFileResponse, error) {
 | 
						|
	return nil, status.Errorf(codes.Unimplemented, "method FindEnabledFile not implemented")
 | 
						|
}
 | 
						|
func (UnimplementedFileServiceServer) CreateFile(context.Context, *CreateFileRequest) (*CreateFileResponse, error) {
 | 
						|
	return nil, status.Errorf(codes.Unimplemented, "method CreateFile not implemented")
 | 
						|
}
 | 
						|
func (UnimplementedFileServiceServer) UpdateFileFinished(context.Context, *UpdateFileFinishedRequest) (*RPCSuccess, error) {
 | 
						|
	return nil, status.Errorf(codes.Unimplemented, "method UpdateFileFinished not implemented")
 | 
						|
}
 | 
						|
 | 
						|
// UnsafeFileServiceServer may be embedded to opt out of forward compatibility for this service.
 | 
						|
// Use of this interface is not recommended, as added methods to FileServiceServer will
 | 
						|
// result in compilation errors.
 | 
						|
type UnsafeFileServiceServer interface {
 | 
						|
	mustEmbedUnimplementedFileServiceServer()
 | 
						|
}
 | 
						|
 | 
						|
func RegisterFileServiceServer(s grpc.ServiceRegistrar, srv FileServiceServer) {
 | 
						|
	s.RegisterService(&FileService_ServiceDesc, srv)
 | 
						|
}
 | 
						|
 | 
						|
func _FileService_FindEnabledFile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
 | 
						|
	in := new(FindEnabledFileRequest)
 | 
						|
	if err := dec(in); err != nil {
 | 
						|
		return nil, err
 | 
						|
	}
 | 
						|
	if interceptor == nil {
 | 
						|
		return srv.(FileServiceServer).FindEnabledFile(ctx, in)
 | 
						|
	}
 | 
						|
	info := &grpc.UnaryServerInfo{
 | 
						|
		Server:     srv,
 | 
						|
		FullMethod: FileService_FindEnabledFile_FullMethodName,
 | 
						|
	}
 | 
						|
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 | 
						|
		return srv.(FileServiceServer).FindEnabledFile(ctx, req.(*FindEnabledFileRequest))
 | 
						|
	}
 | 
						|
	return interceptor(ctx, in, info, handler)
 | 
						|
}
 | 
						|
 | 
						|
func _FileService_CreateFile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
 | 
						|
	in := new(CreateFileRequest)
 | 
						|
	if err := dec(in); err != nil {
 | 
						|
		return nil, err
 | 
						|
	}
 | 
						|
	if interceptor == nil {
 | 
						|
		return srv.(FileServiceServer).CreateFile(ctx, in)
 | 
						|
	}
 | 
						|
	info := &grpc.UnaryServerInfo{
 | 
						|
		Server:     srv,
 | 
						|
		FullMethod: FileService_CreateFile_FullMethodName,
 | 
						|
	}
 | 
						|
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 | 
						|
		return srv.(FileServiceServer).CreateFile(ctx, req.(*CreateFileRequest))
 | 
						|
	}
 | 
						|
	return interceptor(ctx, in, info, handler)
 | 
						|
}
 | 
						|
 | 
						|
func _FileService_UpdateFileFinished_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
 | 
						|
	in := new(UpdateFileFinishedRequest)
 | 
						|
	if err := dec(in); err != nil {
 | 
						|
		return nil, err
 | 
						|
	}
 | 
						|
	if interceptor == nil {
 | 
						|
		return srv.(FileServiceServer).UpdateFileFinished(ctx, in)
 | 
						|
	}
 | 
						|
	info := &grpc.UnaryServerInfo{
 | 
						|
		Server:     srv,
 | 
						|
		FullMethod: FileService_UpdateFileFinished_FullMethodName,
 | 
						|
	}
 | 
						|
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 | 
						|
		return srv.(FileServiceServer).UpdateFileFinished(ctx, req.(*UpdateFileFinishedRequest))
 | 
						|
	}
 | 
						|
	return interceptor(ctx, in, info, handler)
 | 
						|
}
 | 
						|
 | 
						|
// FileService_ServiceDesc is the grpc.ServiceDesc for FileService service.
 | 
						|
// It's only intended for direct use with grpc.RegisterService,
 | 
						|
// and not to be introspected or modified (even as a copy)
 | 
						|
var FileService_ServiceDesc = grpc.ServiceDesc{
 | 
						|
	ServiceName: "pb.FileService",
 | 
						|
	HandlerType: (*FileServiceServer)(nil),
 | 
						|
	Methods: []grpc.MethodDesc{
 | 
						|
		{
 | 
						|
			MethodName: "findEnabledFile",
 | 
						|
			Handler:    _FileService_FindEnabledFile_Handler,
 | 
						|
		},
 | 
						|
		{
 | 
						|
			MethodName: "createFile",
 | 
						|
			Handler:    _FileService_CreateFile_Handler,
 | 
						|
		},
 | 
						|
		{
 | 
						|
			MethodName: "updateFileFinished",
 | 
						|
			Handler:    _FileService_UpdateFileFinished_Handler,
 | 
						|
		},
 | 
						|
	},
 | 
						|
	Streams:  []grpc.StreamDesc{},
 | 
						|
	Metadata: "service_file.proto",
 | 
						|
}
 |