// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc             v3.19.4
// source: proto/code.proto

package proto

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

// GetCodeClient is the client API for GetCode 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 GetCodeClient interface {
	GetCodeByImgPath(ctx context.Context, in *GetCodebyImgPathReq, opts ...grpc.CallOption) (*GetCodebyImgPathResp, error)
}

type getCodeClient struct {
	cc grpc.ClientConnInterface
}

func NewGetCodeClient(cc grpc.ClientConnInterface) GetCodeClient {
	return &getCodeClient{cc}
}

func (c *getCodeClient) GetCodeByImgPath(ctx context.Context, in *GetCodebyImgPathReq, opts ...grpc.CallOption) (*GetCodebyImgPathResp, error) {
	out := new(GetCodebyImgPathResp)
	err := c.cc.Invoke(ctx, "/proto.GetCode/GetCodeByImgPath", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// GetCodeServer is the server API for GetCode service.
// All implementations must embed UnimplementedGetCodeServer
// for forward compatibility
type GetCodeServer interface {
	GetCodeByImgPath(context.Context, *GetCodebyImgPathReq) (*GetCodebyImgPathResp, error)
	mustEmbedUnimplementedGetCodeServer()
}

// UnimplementedGetCodeServer must be embedded to have forward compatible implementations.
type UnimplementedGetCodeServer struct {
}

func (UnimplementedGetCodeServer) GetCodeByImgPath(context.Context, *GetCodebyImgPathReq) (*GetCodebyImgPathResp, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetCodeByImgPath not implemented")
}
func (UnimplementedGetCodeServer) mustEmbedUnimplementedGetCodeServer() {}

// UnsafeGetCodeServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to GetCodeServer will
// result in compilation errors.
type UnsafeGetCodeServer interface {
	mustEmbedUnimplementedGetCodeServer()
}

func RegisterGetCodeServer(s grpc.ServiceRegistrar, srv GetCodeServer) {
	s.RegisterService(&GetCode_ServiceDesc, srv)
}

func _GetCode_GetCodeByImgPath_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetCodebyImgPathReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(GetCodeServer).GetCodeByImgPath(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/proto.GetCode/GetCodeByImgPath",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(GetCodeServer).GetCodeByImgPath(ctx, req.(*GetCodebyImgPathReq))
	}
	return interceptor(ctx, in, info, handler)
}

// GetCode_ServiceDesc is the grpc.ServiceDesc for GetCode service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var GetCode_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "proto.GetCode",
	HandlerType: (*GetCodeServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetCodeByImgPath",
			Handler:    _GetCode_GetCodeByImgPath_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "proto/code.proto",
}
