Files
go-grpc/bot_analyzer/bot_analyzer_grpc.pb.go

106 lines
3.6 KiB
Go

// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc v3.21.12
// source: bot_analyzer.proto
package bot_analyzer
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
// BotAnalyzerClient is the client API for BotAnalyzer 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 BotAnalyzerClient interface {
Analyze(ctx context.Context, in *DownloadUrl, opts ...grpc.CallOption) (*AnalysisResponse, error)
}
type botAnalyzerClient struct {
cc grpc.ClientConnInterface
}
func NewBotAnalyzerClient(cc grpc.ClientConnInterface) BotAnalyzerClient {
return &botAnalyzerClient{cc}
}
func (c *botAnalyzerClient) Analyze(ctx context.Context, in *DownloadUrl, opts ...grpc.CallOption) (*AnalysisResponse, error) {
out := new(AnalysisResponse)
err := c.cc.Invoke(ctx, "/bot_analyzer.BotAnalyzer/Analyze", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// BotAnalyzerServer is the server API for BotAnalyzer service.
// All implementations must embed UnimplementedBotAnalyzerServer
// for forward compatibility
type BotAnalyzerServer interface {
Analyze(context.Context, *DownloadUrl) (*AnalysisResponse, error)
mustEmbedUnimplementedBotAnalyzerServer()
}
// UnimplementedBotAnalyzerServer must be embedded to have forward compatible implementations.
type UnimplementedBotAnalyzerServer struct {
}
func (UnimplementedBotAnalyzerServer) Analyze(context.Context, *DownloadUrl) (*AnalysisResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Analyze not implemented")
}
func (UnimplementedBotAnalyzerServer) mustEmbedUnimplementedBotAnalyzerServer() {}
// UnsafeBotAnalyzerServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to BotAnalyzerServer will
// result in compilation errors.
type UnsafeBotAnalyzerServer interface {
mustEmbedUnimplementedBotAnalyzerServer()
}
func RegisterBotAnalyzerServer(s grpc.ServiceRegistrar, srv BotAnalyzerServer) {
s.RegisterService(&BotAnalyzer_ServiceDesc, srv)
}
func _BotAnalyzer_Analyze_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DownloadUrl)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(BotAnalyzerServer).Analyze(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/bot_analyzer.BotAnalyzer/Analyze",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BotAnalyzerServer).Analyze(ctx, req.(*DownloadUrl))
}
return interceptor(ctx, in, info, handler)
}
// BotAnalyzer_ServiceDesc is the grpc.ServiceDesc for BotAnalyzer service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var BotAnalyzer_ServiceDesc = grpc.ServiceDesc{
ServiceName: "bot_analyzer.BotAnalyzer",
HandlerType: (*BotAnalyzerServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Analyze",
Handler: _BotAnalyzer_Analyze_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "bot_analyzer.proto",
}