3 Star 0 Fork 0

zhuyi/mu_grpc

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
file_grpc.pb.go 9.57 KB
一键复制 编辑 原始数据 按行查看 历史
翀聪 提交于 2025-07-29 17:28 +08:00 . 文件grpc
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.5.1
// - protoc v6.31.1
// source: file.proto
package file_grpc
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 (
FileGrpcService_GetCredentials_FullMethodName = "/file_grpc.FileGrpcService/GetCredentials"
FileGrpcService_GenerateThumbnail_FullMethodName = "/file_grpc.FileGrpcService/GenerateThumbnail"
FileGrpcService_GetThumbnailStatus_FullMethodName = "/file_grpc.FileGrpcService/GetThumbnailStatus"
FileGrpcService_AddWatermark_FullMethodName = "/file_grpc.FileGrpcService/AddWatermark"
)
// FileGrpcServiceClient is the client API for FileGrpcService 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 FileGrpcServiceClient interface {
GetCredentials(ctx context.Context, in *CredentialsPara, opts ...grpc.CallOption) (*CredentialsResult, error)
GenerateThumbnail(ctx context.Context, in *ThumbnailRequest, opts ...grpc.CallOption) (*ThumbnailResponse, error)
GetThumbnailStatus(ctx context.Context, in *ThumbnailStatusRequest, opts ...grpc.CallOption) (*ThumbnailStatusResponse, error)
AddWatermark(ctx context.Context, in *WatermarkRequest, opts ...grpc.CallOption) (*WatermarkResponse, error)
}
type fileGrpcServiceClient struct {
cc grpc.ClientConnInterface
}
func NewFileGrpcServiceClient(cc grpc.ClientConnInterface) FileGrpcServiceClient {
return &fileGrpcServiceClient{cc}
}
func (c *fileGrpcServiceClient) GetCredentials(ctx context.Context, in *CredentialsPara, opts ...grpc.CallOption) (*CredentialsResult, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(CredentialsResult)
err := c.cc.Invoke(ctx, FileGrpcService_GetCredentials_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *fileGrpcServiceClient) GenerateThumbnail(ctx context.Context, in *ThumbnailRequest, opts ...grpc.CallOption) (*ThumbnailResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ThumbnailResponse)
err := c.cc.Invoke(ctx, FileGrpcService_GenerateThumbnail_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *fileGrpcServiceClient) GetThumbnailStatus(ctx context.Context, in *ThumbnailStatusRequest, opts ...grpc.CallOption) (*ThumbnailStatusResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ThumbnailStatusResponse)
err := c.cc.Invoke(ctx, FileGrpcService_GetThumbnailStatus_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *fileGrpcServiceClient) AddWatermark(ctx context.Context, in *WatermarkRequest, opts ...grpc.CallOption) (*WatermarkResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(WatermarkResponse)
err := c.cc.Invoke(ctx, FileGrpcService_AddWatermark_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// FileGrpcServiceServer is the server API for FileGrpcService service.
// All implementations must embed UnimplementedFileGrpcServiceServer
// for forward compatibility.
type FileGrpcServiceServer interface {
GetCredentials(context.Context, *CredentialsPara) (*CredentialsResult, error)
GenerateThumbnail(context.Context, *ThumbnailRequest) (*ThumbnailResponse, error)
GetThumbnailStatus(context.Context, *ThumbnailStatusRequest) (*ThumbnailStatusResponse, error)
AddWatermark(context.Context, *WatermarkRequest) (*WatermarkResponse, error)
mustEmbedUnimplementedFileGrpcServiceServer()
}
// UnimplementedFileGrpcServiceServer 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 UnimplementedFileGrpcServiceServer struct{}
func (UnimplementedFileGrpcServiceServer) GetCredentials(context.Context, *CredentialsPara) (*CredentialsResult, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetCredentials not implemented")
}
func (UnimplementedFileGrpcServiceServer) GenerateThumbnail(context.Context, *ThumbnailRequest) (*ThumbnailResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GenerateThumbnail not implemented")
}
func (UnimplementedFileGrpcServiceServer) GetThumbnailStatus(context.Context, *ThumbnailStatusRequest) (*ThumbnailStatusResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetThumbnailStatus not implemented")
}
func (UnimplementedFileGrpcServiceServer) AddWatermark(context.Context, *WatermarkRequest) (*WatermarkResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method AddWatermark not implemented")
}
func (UnimplementedFileGrpcServiceServer) mustEmbedUnimplementedFileGrpcServiceServer() {}
func (UnimplementedFileGrpcServiceServer) testEmbeddedByValue() {}
// UnsafeFileGrpcServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to FileGrpcServiceServer will
// result in compilation errors.
type UnsafeFileGrpcServiceServer interface {
mustEmbedUnimplementedFileGrpcServiceServer()
}
func RegisterFileGrpcServiceServer(s grpc.ServiceRegistrar, srv FileGrpcServiceServer) {
// If the following call pancis, it indicates UnimplementedFileGrpcServiceServer 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(&FileGrpcService_ServiceDesc, srv)
}
func _FileGrpcService_GetCredentials_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CredentialsPara)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FileGrpcServiceServer).GetCredentials(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: FileGrpcService_GetCredentials_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FileGrpcServiceServer).GetCredentials(ctx, req.(*CredentialsPara))
}
return interceptor(ctx, in, info, handler)
}
func _FileGrpcService_GenerateThumbnail_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ThumbnailRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FileGrpcServiceServer).GenerateThumbnail(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: FileGrpcService_GenerateThumbnail_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FileGrpcServiceServer).GenerateThumbnail(ctx, req.(*ThumbnailRequest))
}
return interceptor(ctx, in, info, handler)
}
func _FileGrpcService_GetThumbnailStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ThumbnailStatusRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FileGrpcServiceServer).GetThumbnailStatus(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: FileGrpcService_GetThumbnailStatus_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FileGrpcServiceServer).GetThumbnailStatus(ctx, req.(*ThumbnailStatusRequest))
}
return interceptor(ctx, in, info, handler)
}
func _FileGrpcService_AddWatermark_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(WatermarkRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FileGrpcServiceServer).AddWatermark(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: FileGrpcService_AddWatermark_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FileGrpcServiceServer).AddWatermark(ctx, req.(*WatermarkRequest))
}
return interceptor(ctx, in, info, handler)
}
// FileGrpcService_ServiceDesc is the grpc.ServiceDesc for FileGrpcService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var FileGrpcService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "file_grpc.FileGrpcService",
HandlerType: (*FileGrpcServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetCredentials",
Handler: _FileGrpcService_GetCredentials_Handler,
},
{
MethodName: "GenerateThumbnail",
Handler: _FileGrpcService_GenerateThumbnail_Handler,
},
{
MethodName: "GetThumbnailStatus",
Handler: _FileGrpcService_GetThumbnailStatus_Handler,
},
{
MethodName: "AddWatermark",
Handler: _FileGrpcService_AddWatermark_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "file.proto",
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/skew/mu_grpc.git
git@gitee.com:skew/mu_grpc.git
skew
mu_grpc
mu_grpc
v1.9.4

搜索帮助