Documentation
¶
Index ¶
- Constants
- Variables
- type CelExpression
- func (x *CelExpression) ClearCelExprChecked()
- func (x *CelExpression) ClearCelExprParsed()
- func (x *CelExpression) ClearCheckedExpr()deprecated
- func (x *CelExpression) ClearExprSpecifier()
- func (x *CelExpression) ClearParsedExpr()deprecated
- func (x *CelExpression) GetCelExprChecked() *expr.CheckedExpr
- func (x *CelExpression) GetCelExprParsed() *expr.ParsedExpr
- func (x *CelExpression) GetCelExprString() string
- func (x *CelExpression) GetCheckedExpr() *v1alpha1.CheckedExprdeprecated
- func (x *CelExpression) GetExprSpecifier() isCelExpression_ExprSpecifier
- func (x *CelExpression) GetParsedExpr() *v1alpha1.ParsedExprdeprecated
- func (x *CelExpression) HasCelExprChecked() bool
- func (x *CelExpression) HasCelExprParsed() bool
- func (x *CelExpression) HasCheckedExpr() booldeprecated
- func (x *CelExpression) HasExprSpecifier() bool
- func (x *CelExpression) HasParsedExpr() booldeprecated
- func (*CelExpression) ProtoMessage()
- func (x *CelExpression) ProtoReflect() protoreflect.Message
- func (x *CelExpression) Reset()
- func (x *CelExpression) SetCelExprChecked(v *expr.CheckedExpr)
- func (x *CelExpression) SetCelExprParsed(v *expr.ParsedExpr)
- func (x *CelExpression) SetCelExprString(v string)
- func (x *CelExpression) SetCheckedExpr(v *v1alpha1.CheckedExpr)deprecated
- func (x *CelExpression) SetParsedExpr(v *v1alpha1.ParsedExpr)deprecated
- func (x *CelExpression) String() string
- func (x *CelExpression) WhichExprSpecifier() case_CelExpression_ExprSpecifier
- type CelExpression_CheckedExpr
- type CelExpression_ParsedExpr
- type CelExpression_builder
- type CelExtractString
- func (x *CelExtractString) ClearDefaultValue()
- func (x *CelExtractString) ClearExprExtract()
- func (x *CelExtractString) GetDefaultValue() *wrapperspb.StringValue
- func (x *CelExtractString) GetExprExtract() *CelExpression
- func (x *CelExtractString) HasDefaultValue() bool
- func (x *CelExtractString) HasExprExtract() bool
- func (*CelExtractString) ProtoMessage()
- func (x *CelExtractString) ProtoReflect() protoreflect.Message
- func (x *CelExtractString) Reset()
- func (x *CelExtractString) SetDefaultValue(v *wrapperspb.StringValue)
- func (x *CelExtractString) SetExprExtract(v *CelExpression)
- func (x *CelExtractString) String() string
- type CelExtractString_builder
- type DoubleRange
- func (x *DoubleRange) GetEnd() float64
- func (x *DoubleRange) GetStart() float64
- func (*DoubleRange) ProtoMessage()
- func (x *DoubleRange) ProtoReflect() protoreflect.Message
- func (x *DoubleRange) Reset()
- func (x *DoubleRange) SetEnd(v float64)
- func (x *DoubleRange) SetStart(v float64)
- func (x *DoubleRange) String() string
- type DoubleRange_builder
- type Int32Range
- func (x *Int32Range) GetEnd() int32
- func (x *Int32Range) GetStart() int32
- func (*Int32Range) ProtoMessage()
- func (x *Int32Range) ProtoReflect() protoreflect.Message
- func (x *Int32Range) Reset()
- func (x *Int32Range) SetEnd(v int32)
- func (x *Int32Range) SetStart(v int32)
- func (x *Int32Range) String() string
- type Int32Range_builder
- type Int64Range
- func (x *Int64Range) GetEnd() int64
- func (x *Int64Range) GetStart() int64
- func (*Int64Range) ProtoMessage()
- func (x *Int64Range) ProtoReflect() protoreflect.Message
- func (x *Int64Range) Reset()
- func (x *Int64Range) SetEnd(v int64)
- func (x *Int64Range) SetStart(v int64)
- func (x *Int64Range) String() string
- type Int64Range_builder
- type TypedStruct
- func (x *TypedStruct) ClearValue()
- func (x *TypedStruct) GetTypeUrl() string
- func (x *TypedStruct) GetValue() *structpb.Struct
- func (x *TypedStruct) HasValue() bool
- func (*TypedStruct) ProtoMessage()
- func (x *TypedStruct) ProtoReflect() protoreflect.Message
- func (x *TypedStruct) Reset()
- func (x *TypedStruct) SetTypeUrl(v string)
- func (x *TypedStruct) SetValue(v *structpb.Struct)
- func (x *TypedStruct) String() string
- type TypedStruct_builder
Constants ¶
const CelExpression_CheckedExpr_case case_CelExpression_ExprSpecifier = 2
const CelExpression_ExprSpecifier_not_set_case case_CelExpression_ExprSpecifier = 0
const CelExpression_ParsedExpr_case case_CelExpression_ExprSpecifier = 1
Variables ¶
var File_xds_type_v3_cel_proto protoreflect.FileDescriptor
var File_xds_type_v3_range_proto protoreflect.FileDescriptor
var File_xds_type_v3_typed_struct_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type CelExpression ¶
type CelExpression struct {
// Types that are valid to be assigned to ExprSpecifier:
//
// *CelExpression_ParsedExpr
// *CelExpression_CheckedExpr
ExprSpecifier isCelExpression_ExprSpecifier `protobuf_oneof:"expr_specifier"`
// Parsed expression in abstract syntax tree (AST) form.
//
// If “cel_expr_checked“ is set, this field is not used.
CelExprParsed *expr.ParsedExpr `protobuf:"bytes,3,opt,name=cel_expr_parsed,json=celExprParsed,proto3" json:"cel_expr_parsed,omitempty"`
// Parsed expression in abstract syntax tree (AST) form that has been successfully type checked.
//
// If set, takes precedence over “cel_expr_parsed“.
CelExprChecked *expr.CheckedExpr `protobuf:"bytes,4,opt,name=cel_expr_checked,json=celExprChecked,proto3" json:"cel_expr_checked,omitempty"`
// Unparsed expression in string form. For example, “request.headers['x-env'] == 'prod'“ will
// get “x-env“ header value and compare it with “prod“.
// Check the `Common Expression Language <https://github.com/google/cel-spec>`_ for more details.
//
// If set, takes precedence over “cel_expr_parsed“ and “cel_expr_checked“.
CelExprString string `protobuf:"bytes,5,opt,name=cel_expr_string,json=celExprString,proto3" json:"cel_expr_string,omitempty"`
// contains filtered or unexported fields
}
Either parsed or checked representation of the `Common Expression Language <https://github.com/google/cel-spec>`_ (CEL) program.
func (*CelExpression) ClearCelExprChecked ¶
func (x *CelExpression) ClearCelExprChecked()
func (*CelExpression) ClearCelExprParsed ¶
func (x *CelExpression) ClearCelExprParsed()
func (*CelExpression) ClearCheckedExpr
deprecated
func (x *CelExpression) ClearCheckedExpr()
Deprecated: Marked as deprecated in xds/type/v3/cel.proto.
func (*CelExpression) ClearExprSpecifier ¶
func (x *CelExpression) ClearExprSpecifier()
func (*CelExpression) ClearParsedExpr
deprecated
func (x *CelExpression) ClearParsedExpr()
Deprecated: Marked as deprecated in xds/type/v3/cel.proto.
func (*CelExpression) GetCelExprChecked ¶
func (x *CelExpression) GetCelExprChecked() *expr.CheckedExpr
func (*CelExpression) GetCelExprParsed ¶
func (x *CelExpression) GetCelExprParsed() *expr.ParsedExpr
func (*CelExpression) GetCelExprString ¶
func (x *CelExpression) GetCelExprString() string
func (*CelExpression) GetCheckedExpr
deprecated
func (x *CelExpression) GetCheckedExpr() *v1alpha1.CheckedExpr
Deprecated: Marked as deprecated in xds/type/v3/cel.proto.
func (*CelExpression) GetExprSpecifier ¶
func (x *CelExpression) GetExprSpecifier() isCelExpression_ExprSpecifier
func (*CelExpression) GetParsedExpr
deprecated
func (x *CelExpression) GetParsedExpr() *v1alpha1.ParsedExpr
Deprecated: Marked as deprecated in xds/type/v3/cel.proto.
func (*CelExpression) HasCelExprChecked ¶
func (x *CelExpression) HasCelExprChecked() bool
func (*CelExpression) HasCelExprParsed ¶
func (x *CelExpression) HasCelExprParsed() bool
func (*CelExpression) HasCheckedExpr
deprecated
func (x *CelExpression) HasCheckedExpr() bool
Deprecated: Marked as deprecated in xds/type/v3/cel.proto.
func (*CelExpression) HasExprSpecifier ¶
func (x *CelExpression) HasExprSpecifier() bool
func (*CelExpression) HasParsedExpr
deprecated
func (x *CelExpression) HasParsedExpr() bool
Deprecated: Marked as deprecated in xds/type/v3/cel.proto.
func (*CelExpression) ProtoMessage ¶
func (*CelExpression) ProtoMessage()
func (*CelExpression) ProtoReflect ¶
func (x *CelExpression) ProtoReflect() protoreflect.Message
func (*CelExpression) Reset ¶
func (x *CelExpression) Reset()
func (*CelExpression) SetCelExprChecked ¶
func (x *CelExpression) SetCelExprChecked(v *expr.CheckedExpr)
func (*CelExpression) SetCelExprParsed ¶
func (x *CelExpression) SetCelExprParsed(v *expr.ParsedExpr)
func (*CelExpression) SetCelExprString ¶
func (x *CelExpression) SetCelExprString(v string)
func (*CelExpression) SetCheckedExpr
deprecated
func (x *CelExpression) SetCheckedExpr(v *v1alpha1.CheckedExpr)
Deprecated: Marked as deprecated in xds/type/v3/cel.proto.
func (*CelExpression) SetParsedExpr
deprecated
func (x *CelExpression) SetParsedExpr(v *v1alpha1.ParsedExpr)
Deprecated: Marked as deprecated in xds/type/v3/cel.proto.
func (*CelExpression) String ¶
func (x *CelExpression) String() string
func (*CelExpression) WhichExprSpecifier ¶
func (x *CelExpression) WhichExprSpecifier() case_CelExpression_ExprSpecifier
type CelExpression_CheckedExpr ¶
type CelExpression_CheckedExpr struct {
// Parsed expression in abstract syntax tree (AST) form that has been successfully type checked.
//
// Deprecated -- use “cel_expr_checked“ field instead.
// If “cel_expr_parsed“ or “cel_expr_checked“ is set, this field is not used.
//
// Deprecated: Marked as deprecated in xds/type/v3/cel.proto.
CheckedExpr *v1alpha1.CheckedExpr `protobuf:"bytes,2,opt,name=checked_expr,json=checkedExpr,proto3,oneof"`
}
type CelExpression_ParsedExpr ¶
type CelExpression_ParsedExpr struct {
// Parsed expression in abstract syntax tree (AST) form.
//
// Deprecated -- use “cel_expr_parsed“ field instead.
// If “cel_expr_parsed“ or “cel_expr_checked“ is set, this field is not used.
//
// Deprecated: Marked as deprecated in xds/type/v3/cel.proto.
ParsedExpr *v1alpha1.ParsedExpr `protobuf:"bytes,1,opt,name=parsed_expr,json=parsedExpr,proto3,oneof"`
}
type CelExpression_builder ¶
type CelExpression_builder struct {
// Fields of oneof ExprSpecifier:
// Parsed expression in abstract syntax tree (AST) form.
//
// Deprecated -- use “cel_expr_parsed“ field instead.
// If “cel_expr_parsed“ or “cel_expr_checked“ is set, this field is not used.
//
// Deprecated: Marked as deprecated in xds/type/v3/cel.proto.
ParsedExpr *v1alpha1.ParsedExpr
// Parsed expression in abstract syntax tree (AST) form that has been successfully type checked.
//
// Deprecated -- use “cel_expr_checked“ field instead.
// If “cel_expr_parsed“ or “cel_expr_checked“ is set, this field is not used.
//
// Deprecated: Marked as deprecated in xds/type/v3/cel.proto.
CheckedExpr *v1alpha1.CheckedExpr
// -- end of ExprSpecifier
// Parsed expression in abstract syntax tree (AST) form.
//
// If “cel_expr_checked“ is set, this field is not used.
CelExprParsed *expr.ParsedExpr
// Parsed expression in abstract syntax tree (AST) form that has been successfully type checked.
//
// If set, takes precedence over “cel_expr_parsed“.
CelExprChecked *expr.CheckedExpr
// Unparsed expression in string form. For example, “request.headers['x-env'] == 'prod'“ will
// get “x-env“ header value and compare it with “prod“.
// Check the `Common Expression Language <https://github.com/google/cel-spec>`_ for more details.
//
// If set, takes precedence over “cel_expr_parsed“ and “cel_expr_checked“.
CelExprString string
// contains filtered or unexported fields
}
func (CelExpression_builder) Build ¶
func (b0 CelExpression_builder) Build() *CelExpression
type CelExtractString ¶
type CelExtractString struct {
// The CEL expression used to extract a string from the CEL environment.
// the "subject string") that should be replaced.
ExprExtract *CelExpression `protobuf:"bytes,1,opt,name=expr_extract,json=exprExtract,proto3" json:"expr_extract,omitempty"`
// If CEL expression evaluates to an error, this value is be returned to the caller.
// If not set, the error is propagated to the caller.
DefaultValue *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"`
// contains filtered or unexported fields
}
Extracts a string by evaluating a `Common Expression Language <https://github.com/google/cel-spec>`_ (CEL) expression against the standardized set of :ref:`HTTP attributes <arch_overview_attributes>`.
.. attention::
Besides CEL evaluation raising an error explicitly, CEL program returning a type other than the ``string``, or not returning anything, are considered an error as well.
[#comment:TODO(sergiitk): When implemented, add the extension tag.]
func (*CelExtractString) ClearDefaultValue ¶
func (x *CelExtractString) ClearDefaultValue()
func (*CelExtractString) ClearExprExtract ¶
func (x *CelExtractString) ClearExprExtract()
func (*CelExtractString) GetDefaultValue ¶
func (x *CelExtractString) GetDefaultValue() *wrapperspb.StringValue
func (*CelExtractString) GetExprExtract ¶
func (x *CelExtractString) GetExprExtract() *CelExpression
func (*CelExtractString) HasDefaultValue ¶
func (x *CelExtractString) HasDefaultValue() bool
func (*CelExtractString) HasExprExtract ¶
func (x *CelExtractString) HasExprExtract() bool
func (*CelExtractString) ProtoMessage ¶
func (*CelExtractString) ProtoMessage()
func (*CelExtractString) ProtoReflect ¶
func (x *CelExtractString) ProtoReflect() protoreflect.Message
func (*CelExtractString) Reset ¶
func (x *CelExtractString) Reset()
func (*CelExtractString) SetDefaultValue ¶
func (x *CelExtractString) SetDefaultValue(v *wrapperspb.StringValue)
func (*CelExtractString) SetExprExtract ¶
func (x *CelExtractString) SetExprExtract(v *CelExpression)
func (*CelExtractString) String ¶
func (x *CelExtractString) String() string
type CelExtractString_builder ¶
type CelExtractString_builder struct {
// The CEL expression used to extract a string from the CEL environment.
// the "subject string") that should be replaced.
ExprExtract *CelExpression
// If CEL expression evaluates to an error, this value is be returned to the caller.
// If not set, the error is propagated to the caller.
DefaultValue *wrapperspb.StringValue
// contains filtered or unexported fields
}
func (CelExtractString_builder) Build ¶
func (b0 CelExtractString_builder) Build() *CelExtractString
type DoubleRange ¶
type DoubleRange struct {
// start of the range (inclusive)
Start float64 `protobuf:"fixed64,1,opt,name=start,proto3" json:"start,omitempty"`
// end of the range (exclusive)
End float64 `protobuf:"fixed64,2,opt,name=end,proto3" json:"end,omitempty"`
// contains filtered or unexported fields
}
Specifies the double start and end of the range using half-open interval semantics [start, end).
func (*DoubleRange) GetEnd ¶
func (x *DoubleRange) GetEnd() float64
func (*DoubleRange) GetStart ¶
func (x *DoubleRange) GetStart() float64
func (*DoubleRange) ProtoMessage ¶
func (*DoubleRange) ProtoMessage()
func (*DoubleRange) ProtoReflect ¶
func (x *DoubleRange) ProtoReflect() protoreflect.Message
func (*DoubleRange) Reset ¶
func (x *DoubleRange) Reset()
func (*DoubleRange) SetEnd ¶
func (x *DoubleRange) SetEnd(v float64)
func (*DoubleRange) SetStart ¶
func (x *DoubleRange) SetStart(v float64)
func (*DoubleRange) String ¶
func (x *DoubleRange) String() string
type DoubleRange_builder ¶
type DoubleRange_builder struct {
// start of the range (inclusive)
Start float64
// end of the range (exclusive)
End float64
// contains filtered or unexported fields
}
func (DoubleRange_builder) Build ¶
func (b0 DoubleRange_builder) Build() *DoubleRange
type Int32Range ¶
type Int32Range struct {
// start of the range (inclusive)
Start int32 `protobuf:"varint,1,opt,name=start,proto3" json:"start,omitempty"`
// end of the range (exclusive)
End int32 `protobuf:"varint,2,opt,name=end,proto3" json:"end,omitempty"`
// contains filtered or unexported fields
}
Specifies the int32 start and end of the range using half-open interval semantics [start, end).
func (*Int32Range) GetEnd ¶
func (x *Int32Range) GetEnd() int32
func (*Int32Range) GetStart ¶
func (x *Int32Range) GetStart() int32
func (*Int32Range) ProtoMessage ¶
func (*Int32Range) ProtoMessage()
func (*Int32Range) ProtoReflect ¶
func (x *Int32Range) ProtoReflect() protoreflect.Message
func (*Int32Range) Reset ¶
func (x *Int32Range) Reset()
func (*Int32Range) SetEnd ¶
func (x *Int32Range) SetEnd(v int32)
func (*Int32Range) SetStart ¶
func (x *Int32Range) SetStart(v int32)
func (*Int32Range) String ¶
func (x *Int32Range) String() string
type Int32Range_builder ¶
type Int32Range_builder struct {
// start of the range (inclusive)
Start int32
// end of the range (exclusive)
End int32
// contains filtered or unexported fields
}
func (Int32Range_builder) Build ¶
func (b0 Int32Range_builder) Build() *Int32Range
type Int64Range ¶
type Int64Range struct {
// start of the range (inclusive)
Start int64 `protobuf:"varint,1,opt,name=start,proto3" json:"start,omitempty"`
// end of the range (exclusive)
End int64 `protobuf:"varint,2,opt,name=end,proto3" json:"end,omitempty"`
// contains filtered or unexported fields
}
Specifies the int64 start and end of the range using half-open interval semantics [start, end).
func (*Int64Range) GetEnd ¶
func (x *Int64Range) GetEnd() int64
func (*Int64Range) GetStart ¶
func (x *Int64Range) GetStart() int64
func (*Int64Range) ProtoMessage ¶
func (*Int64Range) ProtoMessage()
func (*Int64Range) ProtoReflect ¶
func (x *Int64Range) ProtoReflect() protoreflect.Message
func (*Int64Range) Reset ¶
func (x *Int64Range) Reset()
func (*Int64Range) SetEnd ¶
func (x *Int64Range) SetEnd(v int64)
func (*Int64Range) SetStart ¶
func (x *Int64Range) SetStart(v int64)
func (*Int64Range) String ¶
func (x *Int64Range) String() string
type Int64Range_builder ¶
type Int64Range_builder struct {
// start of the range (inclusive)
Start int64
// end of the range (exclusive)
End int64
// contains filtered or unexported fields
}
func (Int64Range_builder) Build ¶
func (b0 Int64Range_builder) Build() *Int64Range
type TypedStruct ¶
type TypedStruct struct {
// A URL that uniquely identifies the type of the serialize protocol buffer message.
// This has same semantics and format described in google.protobuf.Any:
// https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/any.proto
TypeUrl string `protobuf:"bytes,1,opt,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty"`
// A JSON representation of the above specified type.
Value *structpb.Struct `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
// contains filtered or unexported fields
}
A TypedStruct contains an arbitrary JSON serialized protocol buffer message with a URL that describes the type of the serialized message. This is very similar to google.protobuf.Any, instead of having protocol buffer binary, this employs google.protobuf.Struct as value.
This message is intended to be embedded inside Any, so it shouldn't be directly referred from other UDPA messages.
When packing an opaque extension config, packing the expected type into Any is preferred wherever possible for its efficiency. TypedStruct should be used only if a proto descriptor is not available, for example if:
- A control plane sends opaque message that is originally from external source in human readable format such as JSON or YAML.
- The control plane doesn't have the knowledge of the protocol buffer schema hence it cannot serialize the message in protocol buffer binary format.
- The DPLB doesn't have have the knowledge of the protocol buffer schema its plugin or extension uses. This has to be indicated in the DPLB capability negotiation.
When a DPLB receives a TypedStruct in Any, it should: - Check if the type_url of the TypedStruct matches the type the extension expects. - Convert value to the type described in type_url and perform validation.
TODO(lizan): Figure out how TypeStruct should be used with DPLB extensions that doesn't link protobuf descriptor with DPLB itself, (e.g. gRPC LB Plugin, Envoy WASM extensions).
func (*TypedStruct) ClearValue ¶
func (x *TypedStruct) ClearValue()
func (*TypedStruct) GetTypeUrl ¶
func (x *TypedStruct) GetTypeUrl() string
func (*TypedStruct) GetValue ¶
func (x *TypedStruct) GetValue() *structpb.Struct
func (*TypedStruct) HasValue ¶
func (x *TypedStruct) HasValue() bool
func (*TypedStruct) ProtoMessage ¶
func (*TypedStruct) ProtoMessage()
func (*TypedStruct) ProtoReflect ¶
func (x *TypedStruct) ProtoReflect() protoreflect.Message
func (*TypedStruct) Reset ¶
func (x *TypedStruct) Reset()
func (*TypedStruct) SetTypeUrl ¶
func (x *TypedStruct) SetTypeUrl(v string)
func (*TypedStruct) SetValue ¶
func (x *TypedStruct) SetValue(v *structpb.Struct)
func (*TypedStruct) String ¶
func (x *TypedStruct) String() string
type TypedStruct_builder ¶
type TypedStruct_builder struct {
// A URL that uniquely identifies the type of the serialize protocol buffer message.
// This has same semantics and format described in google.protobuf.Any:
// https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/any.proto
TypeUrl string
// A JSON representation of the above specified type.
Value *structpb.Struct
// contains filtered or unexported fields
}
func (TypedStruct_builder) Build ¶
func (b0 TypedStruct_builder) Build() *TypedStruct
Source Files
¶
- cel.pb.go
- range.pb.go
- typed_struct.pb.go