204 lines
7.9 KiB
Go
204 lines
7.9 KiB
Go
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|
// versions:
|
|
// - protoc-gen-go-grpc v1.5.1
|
|
// - protoc v3.19.4
|
|
// source: aisvc.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.64.0 or later.
|
|
const _ = grpc.SupportPackageIsVersion9
|
|
|
|
const (
|
|
AiService_FaceRecognition_FullMethodName = "/ai.AiService/FaceRecognition"
|
|
AiService_TfClassification_FullMethodName = "/ai.AiService/TfClassification"
|
|
AiService_CaffeClassification_FullMethodName = "/ai.AiService/CaffeClassification"
|
|
)
|
|
|
|
// AiServiceClient is the client API for AiService 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 AiServiceClient interface {
|
|
// FaceRecognition
|
|
FaceRecognition(ctx context.Context, in *FaceRecognitionRequest, opts ...grpc.CallOption) (*FaceRecognitionResponse, error)
|
|
// TfClassification
|
|
TfClassification(ctx context.Context, in *TfClassificationRequest, opts ...grpc.CallOption) (*TfClassificationResponse, error)
|
|
// CaffeClassification
|
|
CaffeClassification(ctx context.Context, in *CaffeClassificationRequest, opts ...grpc.CallOption) (*CaffeClassificationResponse, error)
|
|
}
|
|
|
|
type aiServiceClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewAiServiceClient(cc grpc.ClientConnInterface) AiServiceClient {
|
|
return &aiServiceClient{cc}
|
|
}
|
|
|
|
func (c *aiServiceClient) FaceRecognition(ctx context.Context, in *FaceRecognitionRequest, opts ...grpc.CallOption) (*FaceRecognitionResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(FaceRecognitionResponse)
|
|
err := c.cc.Invoke(ctx, AiService_FaceRecognition_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *aiServiceClient) TfClassification(ctx context.Context, in *TfClassificationRequest, opts ...grpc.CallOption) (*TfClassificationResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(TfClassificationResponse)
|
|
err := c.cc.Invoke(ctx, AiService_TfClassification_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *aiServiceClient) CaffeClassification(ctx context.Context, in *CaffeClassificationRequest, opts ...grpc.CallOption) (*CaffeClassificationResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(CaffeClassificationResponse)
|
|
err := c.cc.Invoke(ctx, AiService_CaffeClassification_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// AiServiceServer is the server API for AiService service.
|
|
// All implementations must embed UnimplementedAiServiceServer
|
|
// for forward compatibility.
|
|
type AiServiceServer interface {
|
|
// FaceRecognition
|
|
FaceRecognition(context.Context, *FaceRecognitionRequest) (*FaceRecognitionResponse, error)
|
|
// TfClassification
|
|
TfClassification(context.Context, *TfClassificationRequest) (*TfClassificationResponse, error)
|
|
// CaffeClassification
|
|
CaffeClassification(context.Context, *CaffeClassificationRequest) (*CaffeClassificationResponse, error)
|
|
mustEmbedUnimplementedAiServiceServer()
|
|
}
|
|
|
|
// UnimplementedAiServiceServer 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 UnimplementedAiServiceServer struct{}
|
|
|
|
func (UnimplementedAiServiceServer) FaceRecognition(context.Context, *FaceRecognitionRequest) (*FaceRecognitionResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method FaceRecognition not implemented")
|
|
}
|
|
func (UnimplementedAiServiceServer) TfClassification(context.Context, *TfClassificationRequest) (*TfClassificationResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method TfClassification not implemented")
|
|
}
|
|
func (UnimplementedAiServiceServer) CaffeClassification(context.Context, *CaffeClassificationRequest) (*CaffeClassificationResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method CaffeClassification not implemented")
|
|
}
|
|
func (UnimplementedAiServiceServer) mustEmbedUnimplementedAiServiceServer() {}
|
|
func (UnimplementedAiServiceServer) testEmbeddedByValue() {}
|
|
|
|
// UnsafeAiServiceServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to AiServiceServer will
|
|
// result in compilation errors.
|
|
type UnsafeAiServiceServer interface {
|
|
mustEmbedUnimplementedAiServiceServer()
|
|
}
|
|
|
|
func RegisterAiServiceServer(s grpc.ServiceRegistrar, srv AiServiceServer) {
|
|
// If the following call pancis, it indicates UnimplementedAiServiceServer 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(&AiService_ServiceDesc, srv)
|
|
}
|
|
|
|
func _AiService_FaceRecognition_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(FaceRecognitionRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AiServiceServer).FaceRecognition(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: AiService_FaceRecognition_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AiServiceServer).FaceRecognition(ctx, req.(*FaceRecognitionRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _AiService_TfClassification_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(TfClassificationRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AiServiceServer).TfClassification(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: AiService_TfClassification_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AiServiceServer).TfClassification(ctx, req.(*TfClassificationRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _AiService_CaffeClassification_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(CaffeClassificationRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AiServiceServer).CaffeClassification(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: AiService_CaffeClassification_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AiServiceServer).CaffeClassification(ctx, req.(*CaffeClassificationRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// AiService_ServiceDesc is the grpc.ServiceDesc for AiService service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var AiService_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "ai.AiService",
|
|
HandlerType: (*AiServiceServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "FaceRecognition",
|
|
Handler: _AiService_FaceRecognition_Handler,
|
|
},
|
|
{
|
|
MethodName: "TfClassification",
|
|
Handler: _AiService_TfClassification_Handler,
|
|
},
|
|
{
|
|
MethodName: "CaffeClassification",
|
|
Handler: _AiService_CaffeClassification_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "aisvc.proto",
|
|
}
|