confpb

package
v0.0.0-...-e165f0f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 1, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var IssueDetails_Severity_name = map[int32]string{
	0: "SEVERITY_UNSPECIFIED",
	1: "DEPRECATION",
	2: "WARNING",
	3: "ERROR",
}
View Source
var IssueDetails_Severity_value = map[string]int32{
	"SEVERITY_UNSPECIFIED": 0,
	"DEPRECATION":          1,
	"WARNING":              2,
	"ERROR":                3,
}

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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Request message for the Check method.

func (*CheckRequest) Descriptor

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

func (*CheckRequest) GetContainer

func (m *CheckRequest) GetContainer() string

func (*CheckRequest) GetNoStdEnv

func (m *CheckRequest) GetNoStdEnv() bool

func (*CheckRequest) GetParsedExpr

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

func (*CheckRequest) GetTypeEnv

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

func (*CheckRequest) ProtoMessage

func (*CheckRequest) ProtoMessage()

func (*CheckRequest) Reset

func (m *CheckRequest) Reset()

func (*CheckRequest) String

func (m *CheckRequest) String() string

func (*CheckRequest) XXX_DiscardUnknown

func (m *CheckRequest) XXX_DiscardUnknown()

func (*CheckRequest) XXX_Marshal

func (m *CheckRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CheckRequest) XXX_Merge

func (m *CheckRequest) XXX_Merge(src proto.Message)

func (*CheckRequest) XXX_Size

func (m *CheckRequest) XXX_Size() int

func (*CheckRequest) XXX_Unmarshal

func (m *CheckRequest) XXX_Unmarshal(b []byte) error

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"`
	XXX_NoUnkeyedLiteral struct{}         `json:"-"`
	XXX_unrecognized     []byte           `json:"-"`
	XXX_sizecache        int32            `json:"-"`
}

Response message for the Check method.

func (*CheckResponse) Descriptor

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

func (*CheckResponse) GetCheckedExpr

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

func (*CheckResponse) GetIssues

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

func (*CheckResponse) ProtoMessage

func (*CheckResponse) ProtoMessage()

func (*CheckResponse) Reset

func (m *CheckResponse) Reset()

func (*CheckResponse) String

func (m *CheckResponse) String() string

func (*CheckResponse) XXX_DiscardUnknown

func (m *CheckResponse) XXX_DiscardUnknown()

func (*CheckResponse) XXX_Marshal

func (m *CheckResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CheckResponse) XXX_Merge

func (m *CheckResponse) XXX_Merge(src proto.Message)

func (*CheckResponse) XXX_Size

func (m *CheckResponse) XXX_Size() int

func (*CheckResponse) XXX_Unmarshal

func (m *CheckResponse) XXX_Unmarshal(b []byte) error

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.

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 valid to be assigned 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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Request message for the Eval method.

func (*EvalRequest) Descriptor

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

func (*EvalRequest) GetBindings

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

func (*EvalRequest) GetCheckedExpr

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

func (*EvalRequest) GetContainer

func (m *EvalRequest) GetContainer() string

func (*EvalRequest) GetExprKind

func (m *EvalRequest) GetExprKind() isEvalRequest_ExprKind

func (*EvalRequest) GetParsedExpr

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

func (*EvalRequest) ProtoMessage

func (*EvalRequest) ProtoMessage()

func (*EvalRequest) Reset

func (m *EvalRequest) Reset()

func (*EvalRequest) String

func (m *EvalRequest) String() string

func (*EvalRequest) XXX_DiscardUnknown

func (m *EvalRequest) XXX_DiscardUnknown()

func (*EvalRequest) XXX_Marshal

func (m *EvalRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*EvalRequest) XXX_Merge

func (m *EvalRequest) XXX_Merge(src proto.Message)

func (*EvalRequest) XXX_OneofWrappers

func (*EvalRequest) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*EvalRequest) XXX_Size

func (m *EvalRequest) XXX_Size() int

func (*EvalRequest) XXX_Unmarshal

func (m *EvalRequest) XXX_Unmarshal(b []byte) error

type EvalRequest_CheckedExpr

type EvalRequest_CheckedExpr struct {
	CheckedExpr *v1alpha1.CheckedExpr `protobuf:"bytes,2,opt,name=checked_expr,json=checkedExpr,proto3,oneof"`
}

type EvalRequest_ParsedExpr

type EvalRequest_ParsedExpr struct {
	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"`
	XXX_NoUnkeyedLiteral struct{}         `json:"-"`
	XXX_unrecognized     []byte           `json:"-"`
	XXX_sizecache        int32            `json:"-"`
}

Response message for the Eval method.

func (*EvalResponse) Descriptor

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

func (*EvalResponse) GetIssues

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

func (*EvalResponse) GetResult

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

func (*EvalResponse) ProtoMessage

func (*EvalResponse) ProtoMessage()

func (*EvalResponse) Reset

func (m *EvalResponse) Reset()

func (*EvalResponse) String

func (m *EvalResponse) String() string

func (*EvalResponse) XXX_DiscardUnknown

func (m *EvalResponse) XXX_DiscardUnknown()

func (*EvalResponse) XXX_Marshal

func (m *EvalResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*EvalResponse) XXX_Merge

func (m *EvalResponse) XXX_Merge(src proto.Message)

func (*EvalResponse) XXX_Size

func (m *EvalResponse) XXX_Size() int

func (*EvalResponse) XXX_Unmarshal

func (m *EvalResponse) XXX_Unmarshal(b []byte) error

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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

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

func (*IssueDetails) GetId

func (m *IssueDetails) GetId() int64

func (*IssueDetails) GetPosition

func (m *IssueDetails) GetPosition() *v1alpha1.SourcePosition

func (*IssueDetails) GetSeverity

func (m *IssueDetails) GetSeverity() IssueDetails_Severity

func (*IssueDetails) ProtoMessage

func (*IssueDetails) ProtoMessage()

func (*IssueDetails) Reset

func (m *IssueDetails) Reset()

func (*IssueDetails) String

func (m *IssueDetails) String() string

func (*IssueDetails) XXX_DiscardUnknown

func (m *IssueDetails) XXX_DiscardUnknown()

func (*IssueDetails) XXX_Marshal

func (m *IssueDetails) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*IssueDetails) XXX_Merge

func (m *IssueDetails) XXX_Merge(src proto.Message)

func (*IssueDetails) XXX_Size

func (m *IssueDetails) XXX_Size() int

func (*IssueDetails) XXX_Unmarshal

func (m *IssueDetails) XXX_Unmarshal(b []byte) error

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) EnumDescriptor

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

func (IssueDetails_Severity) String

func (x IssueDetails_Severity) String() string

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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Request message for the Parse method.

func (*ParseRequest) Descriptor

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

func (*ParseRequest) GetCelSource

func (m *ParseRequest) GetCelSource() string

func (*ParseRequest) GetDisableMacros

func (m *ParseRequest) GetDisableMacros() bool

func (*ParseRequest) GetSourceLocation

func (m *ParseRequest) GetSourceLocation() string

func (*ParseRequest) GetSyntaxVersion

func (m *ParseRequest) GetSyntaxVersion() string

func (*ParseRequest) ProtoMessage

func (*ParseRequest) ProtoMessage()

func (*ParseRequest) Reset

func (m *ParseRequest) Reset()

func (*ParseRequest) String

func (m *ParseRequest) String() string

func (*ParseRequest) XXX_DiscardUnknown

func (m *ParseRequest) XXX_DiscardUnknown()

func (*ParseRequest) XXX_Marshal

func (m *ParseRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ParseRequest) XXX_Merge

func (m *ParseRequest) XXX_Merge(src proto.Message)

func (*ParseRequest) XXX_Size

func (m *ParseRequest) XXX_Size() int

func (*ParseRequest) XXX_Unmarshal

func (m *ParseRequest) XXX_Unmarshal(b []byte) error

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"`
	XXX_NoUnkeyedLiteral struct{}         `json:"-"`
	XXX_unrecognized     []byte           `json:"-"`
	XXX_sizecache        int32            `json:"-"`
}

Response message for the Parse method.

func (*ParseResponse) Descriptor

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

func (*ParseResponse) GetIssues

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

func (*ParseResponse) GetParsedExpr

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

func (*ParseResponse) ProtoMessage

func (*ParseResponse) ProtoMessage()

func (*ParseResponse) Reset

func (m *ParseResponse) Reset()

func (*ParseResponse) String

func (m *ParseResponse) String() string

func (*ParseResponse) XXX_DiscardUnknown

func (m *ParseResponse) XXX_DiscardUnknown()

func (*ParseResponse) XXX_Marshal

func (m *ParseResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ParseResponse) XXX_Merge

func (m *ParseResponse) XXX_Merge(src proto.Message)

func (*ParseResponse) XXX_Size

func (m *ParseResponse) XXX_Size() int

func (*ParseResponse) XXX_Unmarshal

func (m *ParseResponse) XXX_Unmarshal(b []byte) error

type UnimplementedConformanceServiceServer

type UnimplementedConformanceServiceServer struct {
}

UnimplementedConformanceServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedConformanceServiceServer) Check

func (*UnimplementedConformanceServiceServer) Eval

func (*UnimplementedConformanceServiceServer) Parse

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL