blob: 31717bd33ab344f605437b956c61f4beb406a77f [file] [log] [blame]
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/api/expr/v1alpha1/cel_service.proto
package expr
import (
context "context"
fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto"
_ "google.golang.org/genproto/googleapis/api/annotations"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
func init() {
proto.RegisterFile("google/api/expr/v1alpha1/cel_service.proto", fileDescriptor_f35b2125e64b6d66)
}
var fileDescriptor_f35b2125e64b6d66 = []byte{
// 287 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x91, 0x31, 0x4b, 0x03, 0x31,
0x14, 0xc7, 0xad, 0x5a, 0x87, 0x88, 0x0a, 0x01, 0x51, 0x0e, 0x27, 0xc1, 0x0a, 0x0e, 0x09, 0xad,
0xa3, 0x2e, 0xd7, 0xe2, 0x7e, 0xe8, 0xd6, 0xa5, 0xc4, 0xf8, 0xcc, 0x1d, 0xe6, 0xf2, 0x62, 0x72,
0x3d, 0xfc, 0x8c, 0x8e, 0x8e, 0xf7, 0x49, 0x1c, 0x25, 0x77, 0x29, 0x55, 0xe4, 0xac, 0x63, 0x92,
0xdf, 0xfb, 0xff, 0xc8, 0xfb, 0x93, 0x2b, 0x85, 0xa8, 0x34, 0x70, 0x61, 0x0b, 0x0e, 0x6f, 0xd6,
0xf1, 0x7a, 0x2c, 0xb4, 0xcd, 0xc5, 0x98, 0x4b, 0xd0, 0x0b, 0x0f, 0xae, 0x2e, 0x24, 0x30, 0xeb,
0xb0, 0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0x25, 0x59, 0x35, 0x64, 0x02, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConnInterface
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion6
// CelServiceClient is the client API for CelService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type CelServiceClient interface {
// Transforms CEL source text into a parsed representation.
Parse(ctx context.Context, in *ParseRequest, opts ...grpc.CallOption) (*ParseResponse, error)
// Runs static checks on a parsed CEL representation and return
// an annotated representation, or a set of issues.
Check(ctx context.Context, in *CheckRequest, opts ...grpc.CallOption) (*CheckResponse, error)
// Evaluates a parsed or annotation CEL representation given
// values of external bindings.
Eval(ctx context.Context, in *EvalRequest, opts ...grpc.CallOption) (*EvalResponse, error)
}
type celServiceClient struct {
cc grpc.ClientConnInterface
}
func NewCelServiceClient(cc grpc.ClientConnInterface) CelServiceClient {
return &celServiceClient{cc}
}
func (c *celServiceClient) Parse(ctx context.Context, in *ParseRequest, opts ...grpc.CallOption) (*ParseResponse, error) {
out := new(ParseResponse)
err := c.cc.Invoke(ctx, "/google.api.expr.v1alpha1.CelService/Parse", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *celServiceClient) Check(ctx context.Context, in *CheckRequest, opts ...grpc.CallOption) (*CheckResponse, error) {
out := new(CheckResponse)
err := c.cc.Invoke(ctx, "/google.api.expr.v1alpha1.CelService/Check", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *celServiceClient) Eval(ctx context.Context, in *EvalRequest, opts ...grpc.CallOption) (*EvalResponse, error) {
out := new(EvalResponse)
err := c.cc.Invoke(ctx, "/google.api.expr.v1alpha1.CelService/Eval", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// CelServiceServer is the server API for CelService service.
type CelServiceServer interface {
// Transforms CEL source text into a parsed representation.
Parse(context.Context, *ParseRequest) (*ParseResponse, error)
// Runs static checks on a parsed CEL representation and return
// an annotated representation, or a set of issues.
Check(context.Context, *CheckRequest) (*CheckResponse, error)
// Evaluates a parsed or annotation CEL representation given
// values of external bindings.
Eval(context.Context, *EvalRequest) (*EvalResponse, error)
}
// UnimplementedCelServiceServer can be embedded to have forward compatible implementations.
type UnimplementedCelServiceServer struct {
}
func (*UnimplementedCelServiceServer) Parse(ctx context.Context, req *ParseRequest) (*ParseResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Parse not implemented")
}
func (*UnimplementedCelServiceServer) Check(ctx context.Context, req *CheckRequest) (*CheckResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Check not implemented")
}
func (*UnimplementedCelServiceServer) Eval(ctx context.Context, req *EvalRequest) (*EvalResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Eval not implemented")
}
func RegisterCelServiceServer(s *grpc.Server, srv CelServiceServer) {
s.RegisterService(&_CelService_serviceDesc, srv)
}
func _CelService_Parse_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ParseRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(CelServiceServer).Parse(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.api.expr.v1alpha1.CelService/Parse",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CelServiceServer).Parse(ctx, req.(*ParseRequest))
}
return interceptor(ctx, in, info, handler)
}
func _CelService_Check_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CheckRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(CelServiceServer).Check(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.api.expr.v1alpha1.CelService/Check",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CelServiceServer).Check(ctx, req.(*CheckRequest))
}
return interceptor(ctx, in, info, handler)
}
func _CelService_Eval_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(EvalRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(CelServiceServer).Eval(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.api.expr.v1alpha1.CelService/Eval",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CelServiceServer).Eval(ctx, req.(*EvalRequest))
}
return interceptor(ctx, in, info, handler)
}
var _CelService_serviceDesc = grpc.ServiceDesc{
ServiceName: "google.api.expr.v1alpha1.CelService",
HandlerType: (*CelServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Parse",
Handler: _CelService_Parse_Handler,
},
{
MethodName: "Check",
Handler: _CelService_Check_Handler,
},
{
MethodName: "Eval",
Handler: _CelService_Eval_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "google/api/expr/v1alpha1/cel_service.proto",
}