...

Package confpb

import "google.golang.org/genproto/googleapis/api/expr/conformance/v1alpha1"
Overview
Index

Overview ▾

Index ▾

Variables
func RegisterConformanceServiceServer(s *grpc.Server, srv ConformanceServiceServer)
type CheckRequest
    func (*CheckRequest) Descriptor() ([]byte, []int)
    func (x *CheckRequest) GetContainer() string
    func (x *CheckRequest) GetNoStdEnv() bool
    func (x *CheckRequest) GetParsedExpr() *v1alpha1.ParsedExpr
    func (x *CheckRequest) GetTypeEnv() []*v1alpha1.Decl
    func (*CheckRequest) ProtoMessage()
    func (x *CheckRequest) ProtoReflect() protoreflect.Message
    func (x *CheckRequest) Reset()
    func (x *CheckRequest) String() string
type CheckResponse
    func (*CheckResponse) Descriptor() ([]byte, []int)
    func (x *CheckResponse) GetCheckedExpr() *v1alpha1.CheckedExpr
    func (x *CheckResponse) GetIssues() []*status.Status
    func (*CheckResponse) ProtoMessage()
    func (x *CheckResponse) ProtoReflect() protoreflect.Message
    func (x *CheckResponse) Reset()
    func (x *CheckResponse) String() string
type ConformanceServiceClient
    func NewConformanceServiceClient(cc grpc.ClientConnInterface) ConformanceServiceClient
type ConformanceServiceServer
type EvalRequest
    func (*EvalRequest) Descriptor() ([]byte, []int)
    func (x *EvalRequest) GetBindings() map[string]*v1alpha1.ExprValue
    func (x *EvalRequest) GetCheckedExpr() *v1alpha1.CheckedExpr
    func (x *EvalRequest) GetContainer() string
    func (m *EvalRequest) GetExprKind() isEvalRequest_ExprKind
    func (x *EvalRequest) GetParsedExpr() *v1alpha1.ParsedExpr
    func (*EvalRequest) ProtoMessage()
    func (x *EvalRequest) ProtoReflect() protoreflect.Message
    func (x *EvalRequest) Reset()
    func (x *EvalRequest) String() string
type EvalRequest_CheckedExpr
type EvalRequest_ParsedExpr
type EvalResponse
    func (*EvalResponse) Descriptor() ([]byte, []int)
    func (x *EvalResponse) GetIssues() []*status.Status
    func (x *EvalResponse) GetResult() *v1alpha1.ExprValue
    func (*EvalResponse) ProtoMessage()
    func (x *EvalResponse) ProtoReflect() protoreflect.Message
    func (x *EvalResponse) Reset()
    func (x *EvalResponse) String() string
type IssueDetails
    func (*IssueDetails) Descriptor() ([]byte, []int)
    func (x *IssueDetails) GetId() int64
    func (x *IssueDetails) GetPosition() *SourcePosition
    func (x *IssueDetails) GetSeverity() IssueDetails_Severity
    func (*IssueDetails) ProtoMessage()
    func (x *IssueDetails) ProtoReflect() protoreflect.Message
    func (x *IssueDetails) Reset()
    func (x *IssueDetails) String() string
type IssueDetails_Severity
    func (IssueDetails_Severity) Descriptor() protoreflect.EnumDescriptor
    func (x IssueDetails_Severity) Enum() *IssueDetails_Severity
    func (IssueDetails_Severity) EnumDescriptor() ([]byte, []int)
    func (x IssueDetails_Severity) Number() protoreflect.EnumNumber
    func (x IssueDetails_Severity) String() string
    func (IssueDetails_Severity) Type() protoreflect.EnumType
type ParseRequest
    func (*ParseRequest) Descriptor() ([]byte, []int)
    func (x *ParseRequest) GetCelSource() string
    func (x *ParseRequest) GetDisableMacros() bool
    func (x *ParseRequest) GetSourceLocation() string
    func (x *ParseRequest) GetSyntaxVersion() string
    func (*ParseRequest) ProtoMessage()
    func (x *ParseRequest) ProtoReflect() protoreflect.Message
    func (x *ParseRequest) Reset()
    func (x *ParseRequest) String() string
type ParseResponse
    func (*ParseResponse) Descriptor() ([]byte, []int)
    func (x *ParseResponse) GetIssues() []*status.Status
    func (x *ParseResponse) GetParsedExpr() *v1alpha1.ParsedExpr
    func (*ParseResponse) ProtoMessage()
    func (x *ParseResponse) ProtoReflect() protoreflect.Message
    func (x *ParseResponse) Reset()
    func (x *ParseResponse) String() string
type SourcePosition
    func (*SourcePosition) Descriptor() ([]byte, []int)
    func (x *SourcePosition) GetColumn() int32
    func (x *SourcePosition) GetLine() int32
    func (x *SourcePosition) GetLocation() string
    func (x *SourcePosition) GetOffset() int32
    func (*SourcePosition) ProtoMessage()
    func (x *SourcePosition) ProtoReflect() protoreflect.Message
    func (x *SourcePosition) Reset()
    func (x *SourcePosition) String() string
type UnimplementedConformanceServiceServer
    func (*UnimplementedConformanceServiceServer) Check(context.Context, *CheckRequest) (*CheckResponse, error)
    func (*UnimplementedConformanceServiceServer) Eval(context.Context, *EvalRequest) (*EvalResponse, error)
    func (*UnimplementedConformanceServiceServer) Parse(context.Context, *ParseRequest) (*ParseResponse, error)

Package files

conformance_service.pb.go

Variables

Enum value maps for IssueDetails_Severity.

var (
    IssueDetails_Severity_name = map[int32]string{
        0: "SEVERITY_UNSPECIFIED",
        1: "DEPRECATION",
        2: "WARNING",
        3: "ERROR",
    }
    IssueDetails_Severity_value = map[string]int32{
        "SEVERITY_UNSPECIFIED": 0,
        "DEPRECATION":          1,
        "WARNING":              2,
        "ERROR":                3,
    }
)
var File_google_api_expr_conformance_v1alpha1_conformance_service_proto protoreflect.FileDescriptor

func RegisterConformanceServiceServer

func RegisterConformanceServiceServer(s *grpc.Server, srv ConformanceServiceServer)

type CheckRequest

Request message for the Check method.

type CheckRequest struct {

    // Required. The parsed representation of the CEL program.
    ParsedExpr *v1alpha1.ParsedExpr `protobuf:"bytes,1,opt,name=parsed_expr,json=parsedExpr,proto3" json:"parsed_expr,omitempty"`
    // Declarations of types for external variables and functions.
    // Required if program uses external variables or functions
    // not in the default environment.
    TypeEnv []*v1alpha1.Decl `protobuf:"bytes,2,rep,name=type_env,json=typeEnv,proto3" json:"type_env,omitempty"`
    // The protocol buffer context.  See "Name Resolution" in the
    // Language Definition.
    Container string `protobuf:"bytes,3,opt,name=container,proto3" json:"container,omitempty"`
    // If true, use only the declarations in [type_env][google.api.expr.conformance.v1alpha1.CheckRequest.type_env].  If false (default),
    // add declarations for the standard definitions to the type environment.  See
    // "Standard Definitions" in the Language Definition.
    NoStdEnv bool `protobuf:"varint,4,opt,name=no_std_env,json=noStdEnv,proto3" json:"no_std_env,omitempty"`
    // contains filtered or unexported fields
}

func (*CheckRequest) Descriptor

func (*CheckRequest) Descriptor() ([]byte, []int)

Deprecated: Use CheckRequest.ProtoReflect.Descriptor instead.

func (*CheckRequest) GetContainer

func (x *CheckRequest) GetContainer() string

func (*CheckRequest) GetNoStdEnv

func (x *CheckRequest) GetNoStdEnv() bool

func (*CheckRequest) GetParsedExpr

func (x *CheckRequest) GetParsedExpr() *v1alpha1.ParsedExpr

func (*CheckRequest) GetTypeEnv

func (x *CheckRequest) GetTypeEnv() []*v1alpha1.Decl

func (*CheckRequest) ProtoMessage

func (*CheckRequest) ProtoMessage()

func (*CheckRequest) ProtoReflect

func (x *CheckRequest) ProtoReflect() protoreflect.Message

func (*CheckRequest) Reset

func (x *CheckRequest) Reset()

func (*CheckRequest) String

func (x *CheckRequest) String() string

type CheckResponse

Response message for the Check method.

type CheckResponse struct {

    // The annotated representation, or unset if checking failed.
    CheckedExpr *v1alpha1.CheckedExpr `protobuf:"bytes,1,opt,name=checked_expr,json=checkedExpr,proto3" json:"checked_expr,omitempty"`
    // Any number of issues with [StatusDetails][] as the details.
    Issues []*status.Status `protobuf:"bytes,2,rep,name=issues,proto3" json:"issues,omitempty"`
    // contains filtered or unexported fields
}

func (*CheckResponse) Descriptor

func (*CheckResponse) Descriptor() ([]byte, []int)

Deprecated: Use CheckResponse.ProtoReflect.Descriptor instead.

func (*CheckResponse) GetCheckedExpr

func (x *CheckResponse) GetCheckedExpr() *v1alpha1.CheckedExpr

func (*CheckResponse) GetIssues

func (x *CheckResponse) GetIssues() []*status.Status

func (*CheckResponse) ProtoMessage

func (*CheckResponse) ProtoMessage()

func (*CheckResponse) ProtoReflect

func (x *CheckResponse) ProtoReflect() protoreflect.Message

func (*CheckResponse) Reset

func (x *CheckResponse) Reset()

func (*CheckResponse) String

func (x *CheckResponse) String() string

type ConformanceServiceClient

ConformanceServiceClient is the client API for ConformanceService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

type ConformanceServiceClient 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)
}

func NewConformanceServiceClient

func NewConformanceServiceClient(cc grpc.ClientConnInterface) ConformanceServiceClient

type ConformanceServiceServer

ConformanceServiceServer is the server API for ConformanceService service.

type ConformanceServiceServer 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)
}

type EvalRequest

Request message for the Eval method.

type EvalRequest struct {

    // Required. Either the parsed or annotated representation of the CEL program.
    //
    // Types that are assignable to ExprKind:
    //
    //	*EvalRequest_ParsedExpr
    //	*EvalRequest_CheckedExpr
    ExprKind isEvalRequest_ExprKind `protobuf_oneof:"expr_kind"`
    // Bindings for the external variables.  The types SHOULD be compatible
    // with the type environment in [CheckRequest][google.api.expr.conformance.v1alpha1.CheckRequest], if checked.
    Bindings map[string]*v1alpha1.ExprValue `protobuf:"bytes,3,rep,name=bindings,proto3" json:"bindings,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
    // SHOULD be the same container as used in [CheckRequest][google.api.expr.conformance.v1alpha1.CheckRequest], if checked.
    Container string `protobuf:"bytes,4,opt,name=container,proto3" json:"container,omitempty"`
    // contains filtered or unexported fields
}

func (*EvalRequest) Descriptor

func (*EvalRequest) Descriptor() ([]byte, []int)

Deprecated: Use EvalRequest.ProtoReflect.Descriptor instead.

func (*EvalRequest) GetBindings

func (x *EvalRequest) GetBindings() map[string]*v1alpha1.ExprValue

func (*EvalRequest) GetCheckedExpr

func (x *EvalRequest) GetCheckedExpr() *v1alpha1.CheckedExpr

func (*EvalRequest) GetContainer

func (x *EvalRequest) GetContainer() string

func (*EvalRequest) GetExprKind

func (m *EvalRequest) GetExprKind() isEvalRequest_ExprKind

func (*EvalRequest) GetParsedExpr

func (x *EvalRequest) GetParsedExpr() *v1alpha1.ParsedExpr

func (*EvalRequest) ProtoMessage

func (*EvalRequest) ProtoMessage()

func (*EvalRequest) ProtoReflect

func (x *EvalRequest) ProtoReflect() protoreflect.Message

func (*EvalRequest) Reset

func (x *EvalRequest) Reset()

func (*EvalRequest) String

func (x *EvalRequest) String() string

type EvalRequest_CheckedExpr

type EvalRequest_CheckedExpr struct {
    // Evaluate based on the checked representation.
    CheckedExpr *v1alpha1.CheckedExpr `protobuf:"bytes,2,opt,name=checked_expr,json=checkedExpr,proto3,oneof"`
}

type EvalRequest_ParsedExpr

type EvalRequest_ParsedExpr struct {
    // Evaluate based on the parsed representation.
    ParsedExpr *v1alpha1.ParsedExpr `protobuf:"bytes,1,opt,name=parsed_expr,json=parsedExpr,proto3,oneof"`
}

type EvalResponse

Response message for the Eval method.

type EvalResponse struct {

    // The execution result, or unset if execution couldn't start.
    Result *v1alpha1.ExprValue `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"`
    // Any number of issues with [StatusDetails][] as the details.
    // Note that CEL execution errors are reified into [ExprValue][].
    // Nevertheless, we'll allow out-of-band issues to be raised,
    // which also makes the replies more regular.
    Issues []*status.Status `protobuf:"bytes,2,rep,name=issues,proto3" json:"issues,omitempty"`
    // contains filtered or unexported fields
}

func (*EvalResponse) Descriptor

func (*EvalResponse) Descriptor() ([]byte, []int)

Deprecated: Use EvalResponse.ProtoReflect.Descriptor instead.

func (*EvalResponse) GetIssues

func (x *EvalResponse) GetIssues() []*status.Status

func (*EvalResponse) GetResult

func (x *EvalResponse) GetResult() *v1alpha1.ExprValue

func (*EvalResponse) ProtoMessage

func (*EvalResponse) ProtoMessage()

func (*EvalResponse) ProtoReflect

func (x *EvalResponse) ProtoReflect() protoreflect.Message

func (*EvalResponse) Reset

func (x *EvalResponse) Reset()

func (*EvalResponse) String

func (x *EvalResponse) String() string

type IssueDetails

Warnings or errors in service execution are represented by [google.rpc.Status][google.rpc.Status] messages, with the following message in the details field.

type IssueDetails struct {

    // The severity of the issue.
    Severity IssueDetails_Severity `protobuf:"varint,1,opt,name=severity,proto3,enum=google.api.expr.conformance.v1alpha1.IssueDetails_Severity" json:"severity,omitempty"`
    // Position in the source, if known.
    Position *SourcePosition `protobuf:"bytes,2,opt,name=position,proto3" json:"position,omitempty"`
    // Expression ID from [Expr][], 0 if unknown.
    Id int64 `protobuf:"varint,3,opt,name=id,proto3" json:"id,omitempty"`
    // contains filtered or unexported fields
}

func (*IssueDetails) Descriptor

func (*IssueDetails) Descriptor() ([]byte, []int)

Deprecated: Use IssueDetails.ProtoReflect.Descriptor instead.

func (*IssueDetails) GetId

func (x *IssueDetails) GetId() int64

func (*IssueDetails) GetPosition

func (x *IssueDetails) GetPosition() *SourcePosition

func (*IssueDetails) GetSeverity

func (x *IssueDetails) GetSeverity() IssueDetails_Severity

func (*IssueDetails) ProtoMessage

func (*IssueDetails) ProtoMessage()

func (*IssueDetails) ProtoReflect

func (x *IssueDetails) ProtoReflect() protoreflect.Message

func (*IssueDetails) Reset

func (x *IssueDetails) Reset()

func (*IssueDetails) String

func (x *IssueDetails) String() string

type IssueDetails_Severity

Severities of issues.

type IssueDetails_Severity int32
const (
    // An unspecified severity.
    IssueDetails_SEVERITY_UNSPECIFIED IssueDetails_Severity = 0
    // Deprecation issue for statements and method that may no longer be
    // supported or maintained.
    IssueDetails_DEPRECATION IssueDetails_Severity = 1
    // Warnings such as: unused variables.
    IssueDetails_WARNING IssueDetails_Severity = 2
    // Errors such as: unmatched curly braces or variable redefinition.
    IssueDetails_ERROR IssueDetails_Severity = 3
)

func (IssueDetails_Severity) Descriptor

func (IssueDetails_Severity) Descriptor() protoreflect.EnumDescriptor

func (IssueDetails_Severity) Enum

func (x IssueDetails_Severity) Enum() *IssueDetails_Severity

func (IssueDetails_Severity) EnumDescriptor

func (IssueDetails_Severity) EnumDescriptor() ([]byte, []int)

Deprecated: Use IssueDetails_Severity.Descriptor instead.

func (IssueDetails_Severity) Number

func (x IssueDetails_Severity) Number() protoreflect.EnumNumber

func (IssueDetails_Severity) String

func (x IssueDetails_Severity) String() string

func (IssueDetails_Severity) Type

func (IssueDetails_Severity) Type() protoreflect.EnumType

type ParseRequest

Request message for the Parse method.

type ParseRequest struct {

    // Required. Source text in CEL syntax.
    CelSource string `protobuf:"bytes,1,opt,name=cel_source,json=celSource,proto3" json:"cel_source,omitempty"`
    // Tag for version of CEL syntax, for future use.
    SyntaxVersion string `protobuf:"bytes,2,opt,name=syntax_version,json=syntaxVersion,proto3" json:"syntax_version,omitempty"`
    // File or resource for source text, used in [SourceInfo][google.api.SourceInfo].
    SourceLocation string `protobuf:"bytes,3,opt,name=source_location,json=sourceLocation,proto3" json:"source_location,omitempty"`
    // Prevent macro expansion.  See "Macros" in Language Defiinition.
    DisableMacros bool `protobuf:"varint,4,opt,name=disable_macros,json=disableMacros,proto3" json:"disable_macros,omitempty"`
    // contains filtered or unexported fields
}

func (*ParseRequest) Descriptor

func (*ParseRequest) Descriptor() ([]byte, []int)

Deprecated: Use ParseRequest.ProtoReflect.Descriptor instead.

func (*ParseRequest) GetCelSource

func (x *ParseRequest) GetCelSource() string

func (*ParseRequest) GetDisableMacros

func (x *ParseRequest) GetDisableMacros() bool

func (*ParseRequest) GetSourceLocation

func (x *ParseRequest) GetSourceLocation() string

func (*ParseRequest) GetSyntaxVersion

func (x *ParseRequest) GetSyntaxVersion() string

func (*ParseRequest) ProtoMessage

func (*ParseRequest) ProtoMessage()

func (*ParseRequest) ProtoReflect

func (x *ParseRequest) ProtoReflect() protoreflect.Message

func (*ParseRequest) Reset

func (x *ParseRequest) Reset()

func (*ParseRequest) String

func (x *ParseRequest) String() string

type ParseResponse

Response message for the Parse method.

type ParseResponse struct {

    // The parsed representation, or unset if parsing failed.
    ParsedExpr *v1alpha1.ParsedExpr `protobuf:"bytes,1,opt,name=parsed_expr,json=parsedExpr,proto3" json:"parsed_expr,omitempty"`
    // Any number of issues with [StatusDetails][] as the details.
    Issues []*status.Status `protobuf:"bytes,2,rep,name=issues,proto3" json:"issues,omitempty"`
    // contains filtered or unexported fields
}

func (*ParseResponse) Descriptor

func (*ParseResponse) Descriptor() ([]byte, []int)

Deprecated: Use ParseResponse.ProtoReflect.Descriptor instead.

func (*ParseResponse) GetIssues

func (x *ParseResponse) GetIssues() []*status.Status

func (*ParseResponse) GetParsedExpr

func (x *ParseResponse) GetParsedExpr() *v1alpha1.ParsedExpr

func (*ParseResponse) ProtoMessage

func (*ParseResponse) ProtoMessage()

func (*ParseResponse) ProtoReflect

func (x *ParseResponse) ProtoReflect() protoreflect.Message

func (*ParseResponse) Reset

func (x *ParseResponse) Reset()

func (*ParseResponse) String

func (x *ParseResponse) String() string

type SourcePosition

A specific position in source.

type SourcePosition struct {

    // The source location name (e.g. file name).
    Location string `protobuf:"bytes,1,opt,name=location,proto3" json:"location,omitempty"`
    // The UTF-8 code unit offset.
    Offset int32 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"`
    // The 1-based index of the starting line in the source text
    // where the issue occurs, or 0 if unknown.
    Line int32 `protobuf:"varint,3,opt,name=line,proto3" json:"line,omitempty"`
    // The 0-based index of the starting position within the line of source text
    // where the issue occurs.  Only meaningful if line is nonzero.
    Column int32 `protobuf:"varint,4,opt,name=column,proto3" json:"column,omitempty"`
    // contains filtered or unexported fields
}

func (*SourcePosition) Descriptor

func (*SourcePosition) Descriptor() ([]byte, []int)

Deprecated: Use SourcePosition.ProtoReflect.Descriptor instead.

func (*SourcePosition) GetColumn

func (x *SourcePosition) GetColumn() int32

func (*SourcePosition) GetLine

func (x *SourcePosition) GetLine() int32

func (*SourcePosition) GetLocation

func (x *SourcePosition) GetLocation() string

func (*SourcePosition) GetOffset

func (x *SourcePosition) GetOffset() int32

func (*SourcePosition) ProtoMessage

func (*SourcePosition) ProtoMessage()

func (*SourcePosition) ProtoReflect

func (x *SourcePosition) ProtoReflect() protoreflect.Message

func (*SourcePosition) Reset

func (x *SourcePosition) Reset()

func (*SourcePosition) String

func (x *SourcePosition) String() string

type UnimplementedConformanceServiceServer

UnimplementedConformanceServiceServer can be embedded to have forward compatible implementations.

type UnimplementedConformanceServiceServer struct {
}

func (*UnimplementedConformanceServiceServer) Check

func (*UnimplementedConformanceServiceServer) Check(context.Context, *CheckRequest) (*CheckResponse, error)

func (*UnimplementedConformanceServiceServer) Eval

func (*UnimplementedConformanceServiceServer) Eval(context.Context, *EvalRequest) (*EvalResponse, error)

func (*UnimplementedConformanceServiceServer) Parse

func (*UnimplementedConformanceServiceServer) Parse(context.Context, *ParseRequest) (*ParseResponse, error)