Documentation ¶
Index ¶
- Variables
- func RegisterConformanceServiceServer(s *grpc.Server, srv ConformanceServiceServer)
- type CheckRequest
- func (*CheckRequest) Descriptor() ([]byte, []int)deprecated
- 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)deprecated
- 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
- type ConformanceServiceServer
- type EvalRequest
- func (*EvalRequest) Descriptor() ([]byte, []int)deprecated
- 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)deprecated
- 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)deprecated
- func (x *IssueDetails) GetId() int64
- func (x *IssueDetails) GetPosition() *v1alpha1.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)deprecated
- 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)deprecated
- 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)deprecated
- 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 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)
Constants ¶
This section is empty.
Variables ¶
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, } )
Enum value maps for IssueDetails_Severity.
var File_google_api_expr_v1alpha1_conformance_service_proto protoreflect.FileDescriptor
Functions ¶
func RegisterConformanceServiceServer ¶
func RegisterConformanceServiceServer(s *grpc.Server, srv ConformanceServiceServer)
Types ¶
type CheckRequest ¶
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.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 }
Request message for the Check method.
func (*CheckRequest) Descriptor
deprecated
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 ¶
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 }
Response message for the Check method.
func (*CheckResponse) Descriptor
deprecated
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 ¶
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) }
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.
func NewConformanceServiceClient ¶
func NewConformanceServiceClient(cc grpc.ClientConnInterface) ConformanceServiceClient
type ConformanceServiceServer ¶
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) }
ConformanceServiceServer is the server API for ConformanceService service.
type EvalRequest ¶
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.v1alpha1.CheckRequest], if checked. Bindings map[string]*v1alpha1.ExprValue `` /* 157-byte string literal not displayed */ // SHOULD be the same container as used in [CheckRequest][google.api.expr.v1alpha1.CheckRequest], if checked. Container string `protobuf:"bytes,4,opt,name=container,proto3" json:"container,omitempty"` // contains filtered or unexported fields }
Request message for the Eval method.
func (*EvalRequest) Descriptor
deprecated
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 ¶
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][google.api.expr.v1alpha1.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 }
Response message for the Eval method.
func (*EvalResponse) Descriptor
deprecated
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 ¶
type IssueDetails struct { // The severity of the issue. Severity IssueDetails_Severity `protobuf:"varint,1,opt,name=severity,proto3,enum=google.api.expr.v1alpha1.IssueDetails_Severity" json:"severity,omitempty"` // Position in the source, if known. Position *v1alpha1.SourcePosition `protobuf:"bytes,2,opt,name=position,proto3" json:"position,omitempty"` // Expression ID from [Expr][google.api.expr.v1alpha1.Expr], 0 if unknown. Id int64 `protobuf:"varint,3,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
Warnings or errors in service execution are represented by [google.rpc.Status][google.rpc.Status] messages, with the following message in the details field.
func (*IssueDetails) Descriptor
deprecated
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() *v1alpha1.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 ¶
type IssueDetails_Severity int32
Severities of issues.
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
deprecated
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 ¶
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.expr.v1alpha1.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 }
Request message for the Parse method.
func (*ParseRequest) Descriptor
deprecated
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 ¶
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 }
Response message for the Parse method.
func (*ParseResponse) Descriptor
deprecated
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 UnimplementedConformanceServiceServer ¶
type UnimplementedConformanceServiceServer struct { }
UnimplementedConformanceServiceServer can be embedded to have forward compatible implementations.
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)