// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc             (unknown)
// source: ext/function.proto

package ext

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 (
	Function_FunctionCall_FullMethodName = "/ext.Function/FunctionCall"
)

// FunctionClient is the client API for Function 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 FunctionClient interface {
	FunctionCall(ctx context.Context, in *FunctionCallRequest, opts ...grpc.CallOption) (*FunctionCallResponse, error)
}

type functionClient struct {
	cc grpc.ClientConnInterface
}

func NewFunctionClient(cc grpc.ClientConnInterface) FunctionClient {
	return &functionClient{cc}
}

func (c *functionClient) FunctionCall(ctx context.Context, in *FunctionCallRequest, opts ...grpc.CallOption) (*FunctionCallResponse, error) {
	out := new(FunctionCallResponse)
	err := c.cc.Invoke(ctx, Function_FunctionCall_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// FunctionServer is the server API for Function service.
// All implementations must embed UnimplementedFunctionServer
// for forward compatibility
type FunctionServer interface {
	FunctionCall(context.Context, *FunctionCallRequest) (*FunctionCallResponse, error)
	mustEmbedUnimplementedFunctionServer()
}

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

func (UnimplementedFunctionServer) FunctionCall(context.Context, *FunctionCallRequest) (*FunctionCallResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method FunctionCall not implemented")
}
func (UnimplementedFunctionServer) mustEmbedUnimplementedFunctionServer() {}

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

func RegisterFunctionServer(s grpc.ServiceRegistrar, srv FunctionServer) {
	s.RegisterService(&Function_ServiceDesc, srv)
}

func _Function_FunctionCall_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(FunctionCallRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(FunctionServer).FunctionCall(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Function_FunctionCall_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(FunctionServer).FunctionCall(ctx, req.(*FunctionCallRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// Function_ServiceDesc is the grpc.ServiceDesc for Function service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Function_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "ext.Function",
	HandlerType: (*FunctionServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "FunctionCall",
			Handler:    _Function_FunctionCall_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "ext/function.proto",
}
