Documentation ¶
Index ¶
- Constants
- Variables
- func BadRequest(ctx context.Context, value localValue, violations []*BadRequestFieldViolation) *errdetails.BadRequest
- func CustomMessage(ctx context.Context, param *CustomMessageParam) protoadapt.MessageV1
- func DecodeCELPluginRequest(v []byte) (*celplugin.CELPluginRequest, error)
- func EncodeCELPluginResponse(v *celplugin.CELPluginResponse) ([]byte, error)
- func EncodeCELPluginVersion(v CELPluginVersionSchema) ([]byte, error)
- func EnumAccessorOptions(enumName string, nameToValue map[string]int32, valueToName map[int32]string) []cel.EnvOption
- func EvalCEL(ctx context.Context, req *EvalCELRequest) (any, error)
- func EvalDef[T any, U localValue](ctx context.Context, value U, def Def[T, U]) error
- func EvalDefMap[T any, U any, V localValue](ctx context.Context, value V, def DefMap[T, U, V]) error
- func GoWithRecover(eg *errgroup.Group, fn func() (any, error))
- func If[T localValue](ctx context.Context, param *IfParam[T]) error
- func IgnoreAndResponse[T any, U localValue](ctx context.Context, value U, def Def[T, U]) error
- func Int32ToUint32(v int32) (uint32, error)
- func Int32ToUint64(v int32) (uint64, error)
- func Int64ToInt32(v int64) (int32, error)
- func Int64ToUint32(v int64) (uint32, error)
- func Int64ToUint64(v int64) (uint64, error)
- func LocalizedMessage(ctx context.Context, param *LocalizedMessageParam) *errdetails.LocalizedMessage
- func LogAttrs(ctx context.Context) []slog.Attr
- func Logger(ctx context.Context) *slog.Logger
- func NewCELFieldType(typ *celtypes.Type, fieldName string) *celtypes.FieldType
- func NewDefaultEnvOptions(celHelper *CELTypeHelper) []cel.EnvOption
- func NewErrorWithLogAttrs(err error, level slog.Level, attrs []slog.Attr) error
- func NewOneofSelectorFieldType(typ *celtypes.Type, fieldName string, oneofTypes []reflect.Type, ...) *celtypes.FieldType
- func OutputErrorLog(ctx context.Context, err error)
- func PreconditionFailure(ctx context.Context, value localValue, ...) *errdetails.PreconditionFailure
- func RecordErrorToSpan(ctx context.Context, err error)
- func SetCELValue[T any](ctx context.Context, param *SetCELValueParam[T]) error
- func SetGRPCError(ctx context.Context, value localValue, err error)
- func SetLogger(ctx context.Context, logger *slog.Logger)
- func ToBool(v *celplugin.CELPluginValue) (bool, error)
- func ToBoolCELPluginResponse(v bool) (*celplugin.CELPluginResponse, error)
- func ToBytes(v *celplugin.CELPluginValue) ([]byte, error)
- func ToBytesCELPluginResponse(v []byte) (*celplugin.CELPluginResponse, error)
- func ToEnum[T ~int32](v *celplugin.CELPluginValue) (T, error)
- func ToErrorCELPluginResponse(v error) *celplugin.CELPluginResponse
- func ToFloat32(v *celplugin.CELPluginValue) (float32, error)
- func ToFloat32CELPluginResponse(v float32) (*celplugin.CELPluginResponse, error)
- func ToFloat64(v *celplugin.CELPluginValue) (float64, error)
- func ToFloat64CELPluginResponse(v float64) (*celplugin.CELPluginResponse, error)
- func ToInt32(v *celplugin.CELPluginValue) (int32, error)
- func ToInt32CELPluginResponse(v int32) (*celplugin.CELPluginResponse, error)
- func ToInt64(v *celplugin.CELPluginValue) (int64, error)
- func ToInt64CELPluginResponse(v int64) (*celplugin.CELPluginResponse, error)
- func ToLogAttrKey(v any) string
- func ToMessage[T proto.Message](v *celplugin.CELPluginValue) (T, error)
- func ToMessageCELPluginResponse[T proto.Message](v T) (*celplugin.CELPluginResponse, error)
- func ToString(v *celplugin.CELPluginValue) (string, error)
- func ToStringCELPluginResponse(v string) (*celplugin.CELPluginResponse, error)
- func ToUint32(v *celplugin.CELPluginValue) (uint32, error)
- func ToUint32CELPluginResponse(v uint32) (*celplugin.CELPluginResponse, error)
- func ToUint64(v *celplugin.CELPluginValue) (uint64, error)
- func ToUint64CELPluginResponse(v uint64) (*celplugin.CELPluginResponse, error)
- func Uint32ToInt32(v uint32) (int32, error)
- func Uint64ToInt32(v uint64) (int32, error)
- func Uint64ToInt64(v uint64) (int64, error)
- func Uint64ToUint32(v uint64) (uint32, error)
- func WithCELCacheMap(ctx context.Context, celCacheMap *CELCacheMap) context.Context
- func WithLogger(ctx context.Context, logger *slog.Logger, attrs ...slog.Attr) context.Context
- func WithRetry[T any](ctx context.Context, param *RetryParam[T]) (*T, error)
- func WithTimeout[T any](ctx context.Context, method string, timeout time.Duration, ...) (*T, error)
- type Argument
- func (*Argument) Descriptor() ([]byte, []int)deprecated
- func (x *Argument) GetBy() string
- func (x *Argument) GetInline() string
- func (x *Argument) GetName() string
- func (*Argument) ProtoMessage()
- func (x *Argument) ProtoReflect() protoreflect.Message
- func (x *Argument) Reset()
- func (x *Argument) String() string
- type BackOff
- type BadRequestFieldViolation
- type CELCache
- type CELCacheMap
- type CELEnv
- type CELEnvOption
- type CELFieldType
- type CELFunction
- func (*CELFunction) Descriptor() ([]byte, []int)deprecated
- func (x *CELFunction) GetArgs() []*CELFunctionArgument
- func (x *CELFunction) GetDesc() string
- func (x *CELFunction) GetName() string
- func (x *CELFunction) GetReturn() *CELType
- func (*CELFunction) ProtoMessage()
- func (x *CELFunction) ProtoReflect() protoreflect.Message
- func (x *CELFunction) Reset()
- func (x *CELFunction) String() string
- type CELFunctionArgument
- func (*CELFunctionArgument) Descriptor() ([]byte, []int)deprecated
- func (x *CELFunctionArgument) GetDesc() string
- func (x *CELFunctionArgument) GetName() string
- func (x *CELFunctionArgument) GetType() *CELType
- func (*CELFunctionArgument) ProtoMessage()
- func (x *CELFunctionArgument) ProtoReflect() protoreflect.Message
- func (x *CELFunctionArgument) Reset()
- func (x *CELFunctionArgument) String() string
- type CELMapType
- type CELPlugin
- type CELPluginExport
- func (*CELPluginExport) Descriptor() ([]byte, []int)deprecated
- func (x *CELPluginExport) GetDesc() string
- func (x *CELPluginExport) GetFunctions() []*CELFunction
- func (x *CELPluginExport) GetName() string
- func (x *CELPluginExport) GetTypes() []*CELReceiverType
- func (x *CELPluginExport) GetVariables() []*CELVariable
- func (*CELPluginExport) ProtoMessage()
- func (x *CELPluginExport) ProtoReflect() protoreflect.Message
- func (x *CELPluginExport) Reset()
- func (x *CELPluginExport) String() string
- type CELPluginRequest
- type CELPluginResponse
- type CELPluginVersionSchema
- type CELReceiverType
- func (*CELReceiverType) Descriptor() ([]byte, []int)deprecated
- func (x *CELReceiverType) GetDesc() string
- func (x *CELReceiverType) GetMethods() []*CELFunction
- func (x *CELReceiverType) GetName() string
- func (*CELReceiverType) ProtoMessage()
- func (x *CELReceiverType) ProtoReflect() protoreflect.Message
- func (x *CELReceiverType) Reset()
- func (x *CELReceiverType) String() string
- type CELType
- func (*CELType) Descriptor() ([]byte, []int)deprecated
- func (x *CELType) GetEnum() string
- func (x *CELType) GetKind() TypeKind
- func (x *CELType) GetMap() *CELMapType
- func (x *CELType) GetMessage() string
- func (x *CELType) GetRepeated() *CELType
- func (m *CELType) GetType() isCELType_Type
- func (*CELType) ProtoMessage()
- func (x *CELType) ProtoReflect() protoreflect.Message
- func (x *CELType) Reset()
- func (x *CELType) String() string
- type CELTypeDeclare
- type CELTypeHelper
- func (h *CELTypeHelper) CELRegistry() *celtypes.Registry
- func (h *CELTypeHelper) EnumValue(enumName string) ref.Val
- func (h *CELTypeHelper) FindIdent(identName string) (ref.Val, bool)
- func (h *CELTypeHelper) FindStructFieldNames(structType string) ([]string, bool)
- func (h *CELTypeHelper) FindStructFieldType(structType, fieldName string) (*celtypes.FieldType, bool)
- func (h *CELTypeHelper) FindStructType(structType string) (*celtypes.Type, bool)
- func (h *CELTypeHelper) NewValue(structType string, fields map[string]ref.Val) ref.Val
- func (h *CELTypeHelper) RegisterType(types ...ref.Type) error
- func (h *CELTypeHelper) TypeAdapter() celtypes.Adapter
- func (h *CELTypeHelper) TypeProvider() celtypes.Provider
- type CELTypeHelperFieldMap
- type CELType_Enum
- type CELType_Kind
- type CELType_Map
- type CELType_Message
- type CELType_Repeated
- type CELVariable
- func (*CELVariable) Descriptor() ([]byte, []int)deprecated
- func (x *CELVariable) GetDesc() string
- func (x *CELVariable) GetName() string
- func (x *CELVariable) GetType() *CELType
- func (*CELVariable) ProtoMessage()
- func (x *CELVariable) ProtoReflect() protoreflect.Message
- func (x *CELVariable) Reset()
- func (x *CELVariable) String() string
- type CallExpr
- func (*CallExpr) Descriptor() ([]byte, []int)deprecated
- func (x *CallExpr) GetError() []*GRPCError
- func (x *CallExpr) GetMethod() string
- func (x *CallExpr) GetRequest() []*MethodRequest
- func (x *CallExpr) GetRetry() *RetryPolicy
- func (x *CallExpr) GetTimeout() string
- func (*CallExpr) ProtoMessage()
- func (x *CallExpr) ProtoReflect() protoreflect.Message
- func (x *CallExpr) Reset()
- func (x *CallExpr) String() string
- type Code
- type CustomMessageParam
- type Def
- type DefMap
- type Duration
- type EnumRule
- type EnumValueRule
- func (*EnumValueRule) Descriptor() ([]byte, []int)deprecated
- func (x *EnumValueRule) GetAlias() []string
- func (x *EnumValueRule) GetDefault() bool
- func (*EnumValueRule) ProtoMessage()
- func (x *EnumValueRule) ProtoReflect() protoreflect.Message
- func (x *EnumValueRule) Reset()
- func (x *EnumValueRule) String() string
- type Env
- type EnvMapType
- type EnvType
- func (*EnvType) Descriptor() ([]byte, []int)deprecated
- func (x *EnvType) GetKind() TypeKind
- func (x *EnvType) GetMap() *EnvMapType
- func (x *EnvType) GetRepeated() *EnvType
- func (m *EnvType) GetType() isEnvType_Type
- func (*EnvType) ProtoMessage()
- func (x *EnvType) ProtoReflect() protoreflect.Message
- func (x *EnvType) Reset()
- func (x *EnvType) String() string
- type EnvType_Kind
- type EnvType_Map
- type EnvType_Repeated
- type EnvVar
- func (*EnvVar) Descriptor() ([]byte, []int)deprecated
- func (x *EnvVar) GetName() string
- func (x *EnvVar) GetOption() *EnvVarOption
- func (x *EnvVar) GetType() *EnvType
- func (*EnvVar) ProtoMessage()
- func (x *EnvVar) ProtoReflect() protoreflect.Message
- func (x *EnvVar) Reset()
- func (x *EnvVar) String() string
- type EnvVarOption
- func (*EnvVarOption) Descriptor() ([]byte, []int)deprecated
- func (x *EnvVarOption) GetAlternate() string
- func (x *EnvVarOption) GetDefault() string
- func (x *EnvVarOption) GetIgnored() bool
- func (x *EnvVarOption) GetRequired() bool
- func (*EnvVarOption) ProtoMessage()
- func (x *EnvVarOption) ProtoReflect() protoreflect.Message
- func (x *EnvVarOption) Reset()
- func (x *EnvVarOption) String() string
- type ErrorGroup
- type ErrorHandler
- type ErrorWithLogAttrs
- type EvalCELRequest
- type ExponentialBackOffConfig
- type FieldOneof
- func (*FieldOneof) Descriptor() ([]byte, []int)deprecated
- func (x *FieldOneof) GetBy() string
- func (m *FieldOneof) GetCond() isFieldOneof_Cond
- func (x *FieldOneof) GetDef() []*VariableDefinition
- func (x *FieldOneof) GetDefault() bool
- func (x *FieldOneof) GetIf() string
- func (*FieldOneof) ProtoMessage()
- func (x *FieldOneof) ProtoReflect() protoreflect.Message
- func (x *FieldOneof) Reset()
- func (x *FieldOneof) String() string
- type FieldOneof_Default
- type FieldOneof_If
- type FieldRule
- func (*FieldRule) Descriptor() ([]byte, []int)deprecated
- func (x *FieldRule) GetAlias() string
- func (x *FieldRule) GetBy() string
- func (x *FieldRule) GetCustomResolver() bool
- func (x *FieldRule) GetEnv() *EnvVarOption
- func (x *FieldRule) GetOneof() *FieldOneof
- func (*FieldRule) ProtoMessage()
- func (x *FieldRule) ProtoReflect() protoreflect.Message
- func (x *FieldRule) Reset()
- func (x *FieldRule) String() string
- type FileRule
- type GRPCError
- func (*GRPCError) Descriptor() ([]byte, []int)deprecated
- func (x *GRPCError) GetCode() code.Code
- func (x *GRPCError) GetDef() []*VariableDefinition
- func (x *GRPCError) GetDetails() []*GRPCErrorDetail
- func (x *GRPCError) GetIf() string
- func (x *GRPCError) GetIgnore() bool
- func (x *GRPCError) GetIgnoreAndResponse() string
- func (x *GRPCError) GetLogLevel() GRPCError_LogLevel
- func (x *GRPCError) GetMessage() string
- func (*GRPCError) ProtoMessage()
- func (x *GRPCError) ProtoReflect() protoreflect.Message
- func (x *GRPCError) Reset()
- func (x *GRPCError) String() string
- type GRPCErrorDetail
- func (*GRPCErrorDetail) Descriptor() ([]byte, []int)deprecated
- func (x *GRPCErrorDetail) GetBadRequest() []*errdetails.BadRequest
- func (x *GRPCErrorDetail) GetBy() []string
- func (x *GRPCErrorDetail) GetDebugInfo() []*errdetails.DebugInfo
- func (x *GRPCErrorDetail) GetDef() []*VariableDefinition
- func (x *GRPCErrorDetail) GetErrorInfo() []*errdetails.ErrorInfo
- func (x *GRPCErrorDetail) GetHelp() []*errdetails.Help
- func (x *GRPCErrorDetail) GetIf() string
- func (x *GRPCErrorDetail) GetLocalizedMessage() []*errdetails.LocalizedMessage
- func (x *GRPCErrorDetail) GetMessage() []*MessageExpr
- func (x *GRPCErrorDetail) GetPreconditionFailure() []*errdetails.PreconditionFailure
- func (x *GRPCErrorDetail) GetQuotaFailure() []*errdetails.QuotaFailure
- func (x *GRPCErrorDetail) GetRequestInfo() []*errdetails.RequestInfo
- func (x *GRPCErrorDetail) GetResourceInfo() []*errdetails.ResourceInfo
- func (x *GRPCErrorDetail) GetRetryInfo() []*errdetails.RetryInfo
- func (*GRPCErrorDetail) ProtoMessage()
- func (x *GRPCErrorDetail) ProtoReflect() protoreflect.Message
- func (x *GRPCErrorDetail) Reset()
- func (x *GRPCErrorDetail) String() string
- type GRPCError_LogLevel
- func (GRPCError_LogLevel) Descriptor() protoreflect.EnumDescriptor
- func (x GRPCError_LogLevel) Enum() *GRPCError_LogLevel
- func (GRPCError_LogLevel) EnumDescriptor() ([]byte, []int)deprecated
- func (x GRPCError_LogLevel) Number() protoreflect.EnumNumber
- func (x GRPCError_LogLevel) String() string
- func (GRPCError_LogLevel) Type() protoreflect.EnumType
- type IfParam
- type Iterator
- type LocalValue
- type LocalizedMessageParam
- type MapExpr
- func (*MapExpr) Descriptor() ([]byte, []int)deprecated
- func (x *MapExpr) GetBy() string
- func (m *MapExpr) GetExpr() isMapExpr_Expr
- func (x *MapExpr) GetIterator() *Iterator
- func (x *MapExpr) GetMessage() *MessageExpr
- func (*MapExpr) ProtoMessage()
- func (x *MapExpr) ProtoReflect() protoreflect.Message
- func (x *MapExpr) Reset()
- func (x *MapExpr) String() string
- type MapExpr_By
- type MapExpr_Message
- type MapIteratorValue
- type MessageExpr
- func (*MessageExpr) Descriptor() ([]byte, []int)deprecated
- func (x *MessageExpr) GetArgs() []*Argument
- func (x *MessageExpr) GetName() string
- func (*MessageExpr) ProtoMessage()
- func (x *MessageExpr) ProtoReflect() protoreflect.Message
- func (x *MessageExpr) Reset()
- func (x *MessageExpr) String() string
- type MessageRule
- func (*MessageRule) Descriptor() ([]byte, []int)deprecated
- func (x *MessageRule) GetAlias() []string
- func (x *MessageRule) GetCustomResolver() bool
- func (x *MessageRule) GetDef() []*VariableDefinition
- func (*MessageRule) ProtoMessage()
- func (x *MessageRule) ProtoReflect() protoreflect.Message
- func (x *MessageRule) Reset()
- func (x *MessageRule) String() string
- type MethodRequest
- func (*MethodRequest) Descriptor() ([]byte, []int)deprecated
- func (x *MethodRequest) GetBy() string
- func (x *MethodRequest) GetField() string
- func (x *MethodRequest) GetIf() string
- func (*MethodRequest) ProtoMessage()
- func (x *MethodRequest) ProtoReflect() protoreflect.Message
- func (x *MethodRequest) Reset()
- func (x *MethodRequest) String() string
- type MethodResponse
- func (*MethodResponse) Descriptor() ([]byte, []int)deprecated
- func (x *MethodResponse) GetAutobind() bool
- func (x *MethodResponse) GetField() string
- func (x *MethodResponse) GetName() string
- func (*MethodResponse) ProtoMessage()
- func (x *MethodResponse) ProtoReflect() protoreflect.Message
- func (x *MethodResponse) Reset()
- func (x *MethodResponse) String() string
- type MethodRule
- type OneofRule
- type PreconditionFailureViolation
- type ProtoMessage
- type RWMutex
- type RecoveredError
- type RetryParam
- type RetryPolicy
- func (*RetryPolicy) Descriptor() ([]byte, []int)deprecated
- func (x *RetryPolicy) GetConstant() *RetryPolicyConstant
- func (x *RetryPolicy) GetExponential() *RetryPolicyExponential
- func (x *RetryPolicy) GetIf() string
- func (m *RetryPolicy) GetPolicy() isRetryPolicy_Policy
- func (*RetryPolicy) ProtoMessage()
- func (x *RetryPolicy) ProtoReflect() protoreflect.Message
- func (x *RetryPolicy) Reset()
- func (x *RetryPolicy) String() string
- type RetryPolicyConstant
- func (*RetryPolicyConstant) Descriptor() ([]byte, []int)deprecated
- func (x *RetryPolicyConstant) GetInterval() string
- func (x *RetryPolicyConstant) GetMaxRetries() uint64
- func (*RetryPolicyConstant) ProtoMessage()
- func (x *RetryPolicyConstant) ProtoReflect() protoreflect.Message
- func (x *RetryPolicyConstant) Reset()
- func (x *RetryPolicyConstant) String() string
- type RetryPolicyExponential
- func (*RetryPolicyExponential) Descriptor() ([]byte, []int)deprecated
- func (x *RetryPolicyExponential) GetInitialInterval() string
- func (x *RetryPolicyExponential) GetMaxInterval() string
- func (x *RetryPolicyExponential) GetMaxRetries() uint64
- func (x *RetryPolicyExponential) GetMultiplier() float64
- func (x *RetryPolicyExponential) GetRandomizationFactor() float64
- func (*RetryPolicyExponential) ProtoMessage()
- func (x *RetryPolicyExponential) ProtoReflect() protoreflect.Message
- func (x *RetryPolicyExponential) Reset()
- func (x *RetryPolicyExponential) String() string
- type RetryPolicy_Constant
- type RetryPolicy_Exponential
- type ServiceRule
- type SetCELValueParam
- type Status
- type TypeKind
- type ValidationExpr
- func (*ValidationExpr) Descriptor() ([]byte, []int)deprecated
- func (x *ValidationExpr) GetError() *GRPCError
- func (x *ValidationExpr) GetName() string
- func (*ValidationExpr) ProtoMessage()
- func (x *ValidationExpr) ProtoReflect() protoreflect.Message
- func (x *ValidationExpr) Reset()
- func (x *ValidationExpr) String() string
- type VariableDefinition
- func (*VariableDefinition) Descriptor() ([]byte, []int)deprecated
- func (x *VariableDefinition) GetAutobind() bool
- func (x *VariableDefinition) GetBy() string
- func (x *VariableDefinition) GetCall() *CallExpr
- func (m *VariableDefinition) GetExpr() isVariableDefinition_Expr
- func (x *VariableDefinition) GetIf() string
- func (x *VariableDefinition) GetMap() *MapExpr
- func (x *VariableDefinition) GetMessage() *MessageExpr
- func (x *VariableDefinition) GetName() string
- func (x *VariableDefinition) GetValidation() *ValidationExpr
- func (*VariableDefinition) ProtoMessage()
- func (x *VariableDefinition) ProtoReflect() protoreflect.Message
- func (x *VariableDefinition) Reset()
- func (x *VariableDefinition) String() string
- type VariableDefinition_By
- type VariableDefinition_Call
- type VariableDefinition_Map
- type VariableDefinition_Message
- type VariableDefinition_Validation
Constants ¶
const ( PrivatePackageName = "grpc.federation.private" MessageArgumentVariableName = "__ARG__" ContextVariableName = grpcfedcel.ContextVariableName ContextTypeName = grpcfedcel.ContextTypeName )
const CELPluginProtocolVersion = cel.PluginProtocolVersion
Variables ¶
var ( StackTrace = debug.Stack LoadEnv = envconfig.Process Getenv = os.Getenv GRPCErrorf = status.Errorf NewGRPCStatus = status.New ErrorGroupWithContext = errgroup.WithContext NewCELEnv = cel.NewCustomEnv NewCELVariable = cel.Variable CELLib = cel.Lib CELDoubleType = types.DoubleType CELIntType = types.IntType CELUintType = types.UintType CELBoolType = types.BoolType CELStringType = types.StringType CELBytesType = types.BytesType CELDurationType = types.DurationType CELObjectType = cel.ObjectType CELListType = cel.ListType CELNullType = cel.NullType NewCELListType = types.NewListType NewCELObjectType = types.NewObjectType NewCELMapType = types.NewMapType )
var ( ErrClientConfig = errors.New("grpc-federation: Client field is not set. this field must be set") ErrResolverConfig = errors.New("grpc-federation: Resolver field is not set. this field must be set") ErrCELPluginConfig = errors.New("grpc-federation: CELPlugin field is not set. this field must be set") ErrCELCacheMap = errors.New("grpc-federation: CELCacheMap is not found") ErrCELCacheIndex = errors.New("grpc-federation: CELCacheIndex is not set") ErrOverflowTypeConversion = errors.New("grpc-federation: overflow type conversion was detected") )
var ( TypeKind_name = map[int32]string{ 0: "UNKNOWN", 1: "STRING", 2: "BOOL", 3: "INT64", 4: "UINT64", 5: "DOUBLE", 6: "DURATION", } TypeKind_value = map[string]int32{ "UNKNOWN": 0, "STRING": 1, "BOOL": 2, "INT64": 3, "UINT64": 4, "DOUBLE": 5, "DURATION": 6, } )
Enum value maps for TypeKind.
var ( GRPCError_LogLevel_name = map[int32]string{ 0: "UNKNOWN", 1: "DEBUG", 2: "INFO", 3: "WARN", 4: "ERROR", } GRPCError_LogLevel_value = map[string]int32{ "UNKNOWN": 0, "DEBUG": 1, "INFO": 2, "WARN": 3, "ERROR": 4, } )
Enum value maps for GRPCError_LogLevel.
var (
// optional grpc.federation.EnumRule enum = 1187;
E_Enum = &file_grpc_federation_federation_proto_extTypes[5]
)
Extension fields to descriptorpb.EnumOptions.
var (
// optional grpc.federation.EnumValueRule enum_value = 1187;
E_EnumValue = &file_grpc_federation_federation_proto_extTypes[6]
)
Extension fields to descriptorpb.EnumValueOptions.
var (
// optional grpc.federation.FieldRule field = 1187;
E_Field = &file_grpc_federation_federation_proto_extTypes[4]
)
Extension fields to descriptorpb.FieldOptions.
var (
// optional grpc.federation.FileRule file = 1187;
E_File = &file_grpc_federation_federation_proto_extTypes[0]
)
Extension fields to descriptorpb.FileOptions.
var (
// optional grpc.federation.MessageRule message = 1187;
E_Message = &file_grpc_federation_federation_proto_extTypes[3]
)
Extension fields to descriptorpb.MessageOptions.
var (
// optional grpc.federation.MethodRule method = 1187;
E_Method = &file_grpc_federation_federation_proto_extTypes[2]
)
Extension fields to descriptorpb.MethodOptions.
var (
// optional grpc.federation.OneofRule oneof = 1187;
E_Oneof = &file_grpc_federation_federation_proto_extTypes[7]
)
Extension fields to descriptorpb.OneofOptions.
var (
// optional grpc.federation.ServiceRule service = 1187;
E_Service = &file_grpc_federation_federation_proto_extTypes[1]
)
Extension fields to descriptorpb.ServiceOptions.
var File_grpc_federation_federation_proto protoreflect.FileDescriptor
var Version string = "dev"
Functions ¶
func BadRequest ¶ added in v0.10.0
func BadRequest(ctx context.Context, value localValue, violations []*BadRequestFieldViolation) *errdetails.BadRequest
func CustomMessage ¶ added in v0.10.0
func CustomMessage(ctx context.Context, param *CustomMessageParam) protoadapt.MessageV1
func DecodeCELPluginRequest ¶ added in v0.13.8
func DecodeCELPluginRequest(v []byte) (*celplugin.CELPluginRequest, error)
func EncodeCELPluginResponse ¶ added in v0.13.8
func EncodeCELPluginResponse(v *celplugin.CELPluginResponse) ([]byte, error)
func EncodeCELPluginVersion ¶ added in v0.15.0
func EncodeCELPluginVersion(v CELPluginVersionSchema) ([]byte, error)
func EnumAccessorOptions ¶ added in v0.13.0
func EvalDefMap ¶ added in v0.10.0
func IgnoreAndResponse ¶ added in v1.3.0
func Int32ToUint32 ¶ added in v0.17.0
func Int32ToUint64 ¶ added in v0.17.0
func Int64ToInt32 ¶ added in v0.17.0
func Int64ToUint32 ¶ added in v0.17.0
func Int64ToUint64 ¶ added in v0.17.0
func LocalizedMessage ¶ added in v0.10.0
func LocalizedMessage(ctx context.Context, param *LocalizedMessageParam) *errdetails.LocalizedMessage
func NewCELFieldType ¶ added in v0.4.0
func NewDefaultEnvOptions ¶ added in v0.10.0
func NewDefaultEnvOptions(celHelper *CELTypeHelper) []cel.EnvOption
func NewErrorWithLogAttrs ¶ added in v1.0.3
func NewOneofSelectorFieldType ¶ added in v0.4.0
func OutputErrorLog ¶ added in v0.4.0
func PreconditionFailure ¶ added in v0.10.0
func PreconditionFailure(ctx context.Context, value localValue, violations []*PreconditionFailureViolation) *errdetails.PreconditionFailure
func RecordErrorToSpan ¶ added in v0.5.0
func SetCELValue ¶ added in v0.10.0
func SetCELValue[T any](ctx context.Context, param *SetCELValueParam[T]) error
func SetGRPCError ¶ added in v0.13.0
func ToBoolCELPluginResponse ¶ added in v0.13.8
func ToBoolCELPluginResponse(v bool) (*celplugin.CELPluginResponse, error)
func ToBytesCELPluginResponse ¶ added in v0.13.8
func ToBytesCELPluginResponse(v []byte) (*celplugin.CELPluginResponse, error)
func ToErrorCELPluginResponse ¶ added in v0.13.8
func ToErrorCELPluginResponse(v error) *celplugin.CELPluginResponse
func ToFloat32CELPluginResponse ¶ added in v0.13.8
func ToFloat32CELPluginResponse(v float32) (*celplugin.CELPluginResponse, error)
func ToFloat64CELPluginResponse ¶ added in v0.13.8
func ToFloat64CELPluginResponse(v float64) (*celplugin.CELPluginResponse, error)
func ToInt32CELPluginResponse ¶ added in v0.13.8
func ToInt32CELPluginResponse(v int32) (*celplugin.CELPluginResponse, error)
func ToInt64CELPluginResponse ¶ added in v0.13.8
func ToInt64CELPluginResponse(v int64) (*celplugin.CELPluginResponse, error)
func ToLogAttrKey ¶ added in v0.10.0
func ToMessage ¶ added in v0.10.0
func ToMessage[T proto.Message](v *celplugin.CELPluginValue) (T, error)
func ToMessageCELPluginResponse ¶ added in v0.13.8
func ToMessageCELPluginResponse[T proto.Message](v T) (*celplugin.CELPluginResponse, error)
func ToStringCELPluginResponse ¶ added in v0.13.8
func ToStringCELPluginResponse(v string) (*celplugin.CELPluginResponse, error)
func ToUint32CELPluginResponse ¶ added in v0.13.8
func ToUint32CELPluginResponse(v uint32) (*celplugin.CELPluginResponse, error)
func ToUint64CELPluginResponse ¶ added in v0.13.8
func ToUint64CELPluginResponse(v uint64) (*celplugin.CELPluginResponse, error)
func Uint32ToInt32 ¶ added in v0.17.0
func Uint64ToInt32 ¶ added in v0.17.0
func Uint64ToInt64 ¶ added in v0.17.0
func Uint64ToUint32 ¶ added in v0.17.0
func WithCELCacheMap ¶ added in v0.13.8
func WithCELCacheMap(ctx context.Context, celCacheMap *CELCacheMap) context.Context
func WithLogger ¶ added in v0.4.0
Types ¶
type Argument ¶
type Argument struct { // name of the message argument. // Use this name to refer to the message argument. // For example, if `foo` is specified as the name, it is referenced by `$.foo`. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // by used to refer to a name or message argument defined in a MessageRule, use `$.` to refer to the message argument. // Use CEL (https://github.com/google/cel-spec) to evaluate the expression. // Variables are already defined in MessageRule can be used. By *string `protobuf:"bytes,2,opt,name=by,proto3,oneof" json:"by,omitempty"` // inline like by, it refers to the specified value and expands all fields beyond it. // For this reason, the referenced value must always be of message type. Inline *string `protobuf:"bytes,3,opt,name=inline,proto3,oneof" json:"inline,omitempty"` // contains filtered or unexported fields }
Argument define message argument.
func (*Argument) Descriptor
deprecated
func (*Argument) ProtoMessage ¶
func (*Argument) ProtoMessage()
func (*Argument) ProtoReflect ¶
func (x *Argument) ProtoReflect() protoreflect.Message
type BackOff ¶ added in v0.10.0
type BackOff struct {
backoff.BackOff
}
func BackOffWithContext ¶ added in v0.10.0
func BackOffWithMaxRetries ¶ added in v0.10.0
func NewConstantBackOff ¶ added in v0.10.0
func NewExponentialBackOff ¶ added in v0.10.0
func NewExponentialBackOff(cfg *ExponentialBackOffConfig) *BackOff
type BadRequestFieldViolation ¶ added in v0.10.0
type CELCache ¶ added in v0.13.8
type CELCache struct {
// contains filtered or unexported fields
}
CELCache used to speed up CEL evaluation from the second time onward. cel.Program cannot be reused to evaluate contextual libraries or plugins, so cel.Ast is reused to speed up the process.
type CELCacheMap ¶ added in v0.13.8
type CELCacheMap struct {
// contains filtered or unexported fields
}
CELCacheMap service-wide in-memory cache store for CEL evaluation. The cache key is a constant value created by code-generation.
func NewCELCacheMap ¶ added in v0.13.8
func NewCELCacheMap() *CELCacheMap
NewCELCacheMap creates CELCacheMap instance.
type CELEnvOption ¶ added in v0.13.8
type CELFieldType ¶ added in v0.10.0
type CELFunction ¶ added in v0.10.0
type CELFunction struct { // name is the function name. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // desc is the description of function. // This description is used as documentation at code generation. Desc string `protobuf:"bytes,2,opt,name=desc,proto3" json:"desc,omitempty"` // args describe the definition of the function argument. Args []*CELFunctionArgument `protobuf:"bytes,3,rep,name=args,proto3" json:"args,omitempty"` // return describe the definition of return type of function. Return *CELType `protobuf:"bytes,4,opt,name=return,proto3" json:"return,omitempty"` // contains filtered or unexported fields }
CELFunction represents the CEL function definition.
func (*CELFunction) Descriptor
deprecated
added in
v0.10.0
func (*CELFunction) Descriptor() ([]byte, []int)
Deprecated: Use CELFunction.ProtoReflect.Descriptor instead.
func (*CELFunction) GetArgs ¶ added in v0.10.0
func (x *CELFunction) GetArgs() []*CELFunctionArgument
func (*CELFunction) GetDesc ¶ added in v0.10.0
func (x *CELFunction) GetDesc() string
func (*CELFunction) GetName ¶ added in v0.10.0
func (x *CELFunction) GetName() string
func (*CELFunction) GetReturn ¶ added in v0.10.0
func (x *CELFunction) GetReturn() *CELType
func (*CELFunction) ProtoMessage ¶ added in v0.10.0
func (*CELFunction) ProtoMessage()
func (*CELFunction) ProtoReflect ¶ added in v0.10.0
func (x *CELFunction) ProtoReflect() protoreflect.Message
func (*CELFunction) Reset ¶ added in v0.10.0
func (x *CELFunction) Reset()
func (*CELFunction) String ¶ added in v0.10.0
func (x *CELFunction) String() string
type CELFunctionArgument ¶ added in v0.10.0
type CELFunctionArgument struct { // name is the argument value name. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // desc is the description of plugin. // This description is used as documentation at code generation. Desc string `protobuf:"bytes,2,opt,name=desc,proto3" json:"desc,omitempty"` // type is the argument type. Type *CELType `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"` // contains filtered or unexported fields }
CELFunctionArgument represents the function argument.
func (*CELFunctionArgument) Descriptor
deprecated
added in
v0.10.0
func (*CELFunctionArgument) Descriptor() ([]byte, []int)
Deprecated: Use CELFunctionArgument.ProtoReflect.Descriptor instead.
func (*CELFunctionArgument) GetDesc ¶ added in v0.10.0
func (x *CELFunctionArgument) GetDesc() string
func (*CELFunctionArgument) GetName ¶ added in v0.10.0
func (x *CELFunctionArgument) GetName() string
func (*CELFunctionArgument) GetType ¶ added in v0.10.0
func (x *CELFunctionArgument) GetType() *CELType
func (*CELFunctionArgument) ProtoMessage ¶ added in v0.10.0
func (*CELFunctionArgument) ProtoMessage()
func (*CELFunctionArgument) ProtoReflect ¶ added in v0.10.0
func (x *CELFunctionArgument) ProtoReflect() protoreflect.Message
func (*CELFunctionArgument) Reset ¶ added in v0.10.0
func (x *CELFunctionArgument) Reset()
func (*CELFunctionArgument) String ¶ added in v0.10.0
func (x *CELFunctionArgument) String() string
type CELMapType ¶ added in v0.17.3
type CELMapType struct { // key represents map's key type. Key *CELType `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` // value represents map's value type. Value *CELType `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
CELMapType represents map type.
func (*CELMapType) Descriptor
deprecated
added in
v1.0.0
func (*CELMapType) Descriptor() ([]byte, []int)
Deprecated: Use CELMapType.ProtoReflect.Descriptor instead.
func (*CELMapType) GetKey ¶ added in v1.0.0
func (x *CELMapType) GetKey() *CELType
func (*CELMapType) GetValue ¶ added in v1.0.0
func (x *CELMapType) GetValue() *CELType
func (*CELMapType) ProtoMessage ¶ added in v1.0.0
func (*CELMapType) ProtoMessage()
func (*CELMapType) ProtoReflect ¶ added in v1.0.0
func (x *CELMapType) ProtoReflect() protoreflect.Message
func (*CELMapType) Reset ¶ added in v1.0.0
func (x *CELMapType) Reset()
func (*CELMapType) String ¶ added in v1.0.0
func (x *CELMapType) String() string
type CELPlugin ¶ added in v1.0.0
type CELPlugin struct { Export []*CELPluginExport `protobuf:"bytes,1,rep,name=export,proto3" json:"export,omitempty"` // contains filtered or unexported fields }
CELPlugin define schema of CEL plugin.
func (*CELPlugin) Descriptor
deprecated
added in
v1.0.0
func (*CELPlugin) GetExport ¶ added in v1.0.0
func (x *CELPlugin) GetExport() []*CELPluginExport
func (*CELPlugin) ProtoMessage ¶ added in v1.0.0
func (*CELPlugin) ProtoMessage()
func (*CELPlugin) ProtoReflect ¶ added in v1.0.0
func (x *CELPlugin) ProtoReflect() protoreflect.Message
type CELPluginExport ¶ added in v1.0.0
type CELPluginExport struct { // name is the plugin name. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // desc is the description of plugin. // This description is used as documentation at code generation. Desc string `protobuf:"bytes,2,opt,name=desc,proto3" json:"desc,omitempty"` // types describe the message type you want to expose. Types []*CELReceiverType `protobuf:"bytes,3,rep,name=types,proto3" json:"types,omitempty"` // functions describe the definition of the function you want to expose. Functions []*CELFunction `protobuf:"bytes,4,rep,name=functions,proto3" json:"functions,omitempty"` // variables describe the definition of the variable you want to expose. Variables []*CELVariable `protobuf:"bytes,5,rep,name=variables,proto3" json:"variables,omitempty"` // contains filtered or unexported fields }
CELPluginExport describe the schema to be exposed as a CEL plugin.
func (*CELPluginExport) Descriptor
deprecated
added in
v1.0.0
func (*CELPluginExport) Descriptor() ([]byte, []int)
Deprecated: Use CELPluginExport.ProtoReflect.Descriptor instead.
func (*CELPluginExport) GetDesc ¶ added in v1.0.0
func (x *CELPluginExport) GetDesc() string
func (*CELPluginExport) GetFunctions ¶ added in v1.0.0
func (x *CELPluginExport) GetFunctions() []*CELFunction
func (*CELPluginExport) GetName ¶ added in v1.0.0
func (x *CELPluginExport) GetName() string
func (*CELPluginExport) GetTypes ¶ added in v1.0.0
func (x *CELPluginExport) GetTypes() []*CELReceiverType
func (*CELPluginExport) GetVariables ¶ added in v1.0.0
func (x *CELPluginExport) GetVariables() []*CELVariable
func (*CELPluginExport) ProtoMessage ¶ added in v1.0.0
func (*CELPluginExport) ProtoMessage()
func (*CELPluginExport) ProtoReflect ¶ added in v1.0.0
func (x *CELPluginExport) ProtoReflect() protoreflect.Message
func (*CELPluginExport) Reset ¶ added in v1.0.0
func (x *CELPluginExport) Reset()
func (*CELPluginExport) String ¶ added in v1.0.0
func (x *CELPluginExport) String() string
type CELPluginRequest ¶ added in v0.13.8
type CELPluginRequest = celplugin.CELPluginRequest
type CELPluginResponse ¶ added in v0.13.8
type CELPluginResponse = celplugin.CELPluginResponse
type CELPluginVersionSchema ¶ added in v0.15.0
type CELPluginVersionSchema = cel.PluginVersionSchema
type CELReceiverType ¶ added in v1.0.0
type CELReceiverType struct { // name is the message name. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // desc is the description of plugin. // This description is used as documentation at code generation. Desc string `protobuf:"bytes,2,opt,name=desc,proto3" json:"desc,omitempty"` // methods describe the definition of the method for the message. Methods []*CELFunction `protobuf:"bytes,3,rep,name=methods,proto3" json:"methods,omitempty"` // contains filtered or unexported fields }
CELReceiverType represents methods tied to the message.
func (*CELReceiverType) Descriptor
deprecated
added in
v1.0.0
func (*CELReceiverType) Descriptor() ([]byte, []int)
Deprecated: Use CELReceiverType.ProtoReflect.Descriptor instead.
func (*CELReceiverType) GetDesc ¶ added in v1.0.0
func (x *CELReceiverType) GetDesc() string
func (*CELReceiverType) GetMethods ¶ added in v1.0.0
func (x *CELReceiverType) GetMethods() []*CELFunction
func (*CELReceiverType) GetName ¶ added in v1.0.0
func (x *CELReceiverType) GetName() string
func (*CELReceiverType) ProtoMessage ¶ added in v1.0.0
func (*CELReceiverType) ProtoMessage()
func (*CELReceiverType) ProtoReflect ¶ added in v1.0.0
func (x *CELReceiverType) ProtoReflect() protoreflect.Message
func (*CELReceiverType) Reset ¶ added in v1.0.0
func (x *CELReceiverType) Reset()
func (*CELReceiverType) String ¶ added in v1.0.0
func (x *CELReceiverType) String() string
type CELType ¶ added in v0.10.0
type CELType struct { // Types that are assignable to Type: // // *CELType_Kind // *CELType_Repeated // *CELType_Map // *CELType_Message // *CELType_Enum Type isCELType_Type `protobuf_oneof:"type"` // contains filtered or unexported fields }
CELType represents type information for CEL plugin interface.
func (*CELType) Descriptor
deprecated
added in
v0.10.0
func (*CELType) GetMap ¶ added in v1.0.0
func (x *CELType) GetMap() *CELMapType
func (*CELType) GetMessage ¶ added in v1.0.0
func (*CELType) GetRepeated ¶ added in v0.10.0
func (*CELType) ProtoMessage ¶ added in v0.10.0
func (*CELType) ProtoMessage()
func (*CELType) ProtoReflect ¶ added in v0.10.0
func (x *CELType) ProtoReflect() protoreflect.Message
type CELTypeDeclare ¶ added in v0.10.0
type CELTypeHelper ¶ added in v0.4.0
CELTypeHelper provides the cel.Registry needed to build a cel environment.
func NewCELTypeHelper ¶ added in v0.4.0
func NewCELTypeHelper(pkgName string, structFieldMap CELTypeHelperFieldMap) *CELTypeHelper
func (*CELTypeHelper) CELRegistry ¶ added in v0.13.8
func (h *CELTypeHelper) CELRegistry() *celtypes.Registry
func (*CELTypeHelper) EnumValue ¶ added in v0.4.0
func (h *CELTypeHelper) EnumValue(enumName string) ref.Val
func (*CELTypeHelper) FindIdent ¶ added in v0.4.0
func (h *CELTypeHelper) FindIdent(identName string) (ref.Val, bool)
func (*CELTypeHelper) FindStructFieldNames ¶ added in v0.4.0
func (h *CELTypeHelper) FindStructFieldNames(structType string) ([]string, bool)
func (*CELTypeHelper) FindStructFieldType ¶ added in v0.4.0
func (h *CELTypeHelper) FindStructFieldType(structType, fieldName string) (*celtypes.FieldType, bool)
func (*CELTypeHelper) FindStructType ¶ added in v0.4.0
func (h *CELTypeHelper) FindStructType(structType string) (*celtypes.Type, bool)
func (*CELTypeHelper) RegisterType ¶ added in v0.13.8
func (h *CELTypeHelper) RegisterType(types ...ref.Type) error
func (*CELTypeHelper) TypeAdapter ¶ added in v0.4.0
func (h *CELTypeHelper) TypeAdapter() celtypes.Adapter
func (*CELTypeHelper) TypeProvider ¶ added in v0.4.0
func (h *CELTypeHelper) TypeProvider() celtypes.Provider
type CELTypeHelperFieldMap ¶ added in v0.13.8
type CELType_Enum ¶ added in v1.0.0
type CELType_Enum struct { // enum is a fqdn to the enum type. Enum string `protobuf:"bytes,5,opt,name=enum,proto3,oneof"` }
type CELType_Kind ¶ added in v1.0.0
type CELType_Kind struct { // kind is used when the type is a primitive type. Kind TypeKind `protobuf:"varint,1,opt,name=kind,proto3,enum=grpc.federation.TypeKind,oneof"` }
type CELType_Map ¶ added in v1.0.0
type CELType_Map struct { // map is used when the type is a map type. Map *CELMapType `protobuf:"bytes,3,opt,name=map,proto3,oneof"` }
type CELType_Message ¶ added in v1.0.0
type CELType_Message struct { // message is a fqdn to the message type. Message string `protobuf:"bytes,4,opt,name=message,proto3,oneof"` }
type CELType_Repeated ¶ added in v1.0.0
type CELType_Repeated struct { // repeated is used when the type is a repeated type. Repeated *CELType `protobuf:"bytes,2,opt,name=repeated,proto3,oneof"` }
type CELVariable ¶ added in v0.10.0
type CELVariable struct { // name is the variable name. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // desc is the description of plugin. // This description is used as documentation at code generation. Desc string `protobuf:"bytes,2,opt,name=desc,proto3" json:"desc,omitempty"` // type is the variable type. Type *CELType `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"` // contains filtered or unexported fields }
CELVariable represents CEL variable.
func (*CELVariable) Descriptor
deprecated
added in
v0.10.0
func (*CELVariable) Descriptor() ([]byte, []int)
Deprecated: Use CELVariable.ProtoReflect.Descriptor instead.
func (*CELVariable) GetDesc ¶ added in v0.10.0
func (x *CELVariable) GetDesc() string
func (*CELVariable) GetName ¶ added in v0.10.0
func (x *CELVariable) GetName() string
func (*CELVariable) GetType ¶ added in v0.10.0
func (x *CELVariable) GetType() *CELType
func (*CELVariable) ProtoMessage ¶ added in v0.10.0
func (*CELVariable) ProtoMessage()
func (*CELVariable) ProtoReflect ¶ added in v0.10.0
func (x *CELVariable) ProtoReflect() protoreflect.Message
func (*CELVariable) Reset ¶ added in v0.10.0
func (x *CELVariable) Reset()
func (*CELVariable) String ¶ added in v0.10.0
func (x *CELVariable) String() string
type CallExpr ¶ added in v0.6.0
type CallExpr struct { // method specify the FQDN for the gRPC method. format is `<package-name>.<service-name>/<method-name>`. Method string `protobuf:"bytes,1,opt,name=method,proto3" json:"method,omitempty"` // request specify request parameters for the gRPC method. Request []*MethodRequest `protobuf:"bytes,2,rep,name=request,proto3" json:"request,omitempty"` // the time to timeout. If the specified time period elapses, DEADLINE_EXCEEDED status is returned. // If you want to handle this error, you need to implement a custom error handler in Go. // The format is the same as Go's time.Duration format. See https://pkg.go.dev/time#ParseDuration. Timeout *string `protobuf:"bytes,3,opt,name=timeout,proto3,oneof" json:"timeout,omitempty"` // retry specifies the retry policy if the method call fails. Retry *RetryPolicy `protobuf:"bytes,4,opt,name=retry,proto3,oneof" json:"retry,omitempty"` // error evaluated when an error occurs during a method call. // Multiple errors can be defined and are evaluated in the order in which they are described. // If an error occurs while creating an gRPC status error, original error will be returned. Error []*GRPCError `protobuf:"bytes,5,rep,name=error,proto3" json:"error,omitempty"` // contains filtered or unexported fields }
CallExpr represents how to call gRPC method.
func (*CallExpr) Descriptor
deprecated
added in
v0.6.0
func (*CallExpr) GetRequest ¶ added in v0.6.0
func (x *CallExpr) GetRequest() []*MethodRequest
func (*CallExpr) GetRetry ¶ added in v0.6.0
func (x *CallExpr) GetRetry() *RetryPolicy
func (*CallExpr) GetTimeout ¶ added in v0.6.0
func (*CallExpr) ProtoMessage ¶ added in v0.6.0
func (*CallExpr) ProtoMessage()
func (*CallExpr) ProtoReflect ¶ added in v0.6.0
func (x *CallExpr) ProtoReflect() protoreflect.Message
type Code ¶ added in v0.10.0
const ( OKCode Code = codes.OK // CancelledCode this is not a typo. // On proto, it is defined as `CANCELLED`, but in Go's library it is defined as Canceled. // The name of the code is automatically generated by (*GRPCError).GoGRPCStatusCode in generator/code_generator.go. // So if the name is different, it will not work. Therefore, the names should be the same as the names on the proto side. // - Proto: https://github.com/googleapis/googleapis/blob/65277ddce9caa1cfd1a0eb7ab67980fc73d20b50/google/rpc/code.proto#L41 // - Go: https://github.com/grpc/grpc-go/blob/9952aa83979822b5915c3fcb2bb0f60afe55aa7d/codes/codes.go#L45 //nolint:misspell CancelledCode Code = codes.Canceled UnknownCode Code = codes.Unknown InvalidArgumentCode Code = codes.InvalidArgument DeadlineExceededCode Code = codes.DeadlineExceeded NotFoundCode Code = codes.NotFound AlreadyExistsCode Code = codes.AlreadyExists PermissionDeniedCode Code = codes.PermissionDenied ResourceExhaustedCode Code = codes.ResourceExhausted FailedPreconditionCode Code = codes.FailedPrecondition AbortedCode Code = codes.Aborted OutOfRangeCode Code = codes.OutOfRange UnimplementedCode Code = codes.Unimplemented InternalCode Code = codes.Internal DataLossCode Code = codes.DataLoss UnauthenticatedCode Code = codes.Unauthenticated )
type CustomMessageParam ¶ added in v0.13.8
type DefMap ¶ added in v0.10.0
type DefMap[T any, U any, V localValue] struct { If string IfCacheIndex int Name string Type *cel.Type Setter func(V, T) error IteratorName string IteratorType *cel.Type IteratorSource func(V) []U Iterator func(context.Context, *MapIteratorValue) (any, error) // contains filtered or unexported fields }
type EnumRule ¶
type EnumRule struct { // alias mapping between enums defined in other packages and enums defined on the federation service side. // The alias is the FQDN ( <package-name>.<enum-name> ) to the enum. // If this definition exists, type conversion is automatically performed before the enum value assignment operation. // If a enum with this option has a value that is not present in the enum specified by alias, and the alias option is not specified for that value, an error is occurred. // You can specify multiple aliases. In that case, only values common to all aliases will be considered. // Specifying a value that is not included in either alias will result in an error. Alias []string `protobuf:"bytes,1,rep,name=alias,proto3" json:"alias,omitempty"` // contains filtered or unexported fields }
func (*EnumRule) Descriptor
deprecated
func (*EnumRule) ProtoMessage ¶
func (*EnumRule) ProtoMessage()
func (*EnumRule) ProtoReflect ¶
func (x *EnumRule) ProtoReflect() protoreflect.Message
type EnumValueRule ¶
type EnumValueRule struct { // specifies the default value of the enum. // All values other than those specified in alias will be default values. Default *bool `protobuf:"varint,1,opt,name=default,proto3,oneof" json:"default,omitempty"` // alias can be used when alias is specified in grpc.federation.enum option, // and specifies the value name to be referenced among the enums specified in alias of enum option. // multiple value names can be specified for alias. Alias []string `protobuf:"bytes,2,rep,name=alias,proto3" json:"alias,omitempty"` // contains filtered or unexported fields }
func (*EnumValueRule) Descriptor
deprecated
func (*EnumValueRule) Descriptor() ([]byte, []int)
Deprecated: Use EnumValueRule.ProtoReflect.Descriptor instead.
func (*EnumValueRule) GetAlias ¶
func (x *EnumValueRule) GetAlias() []string
func (*EnumValueRule) GetDefault ¶
func (x *EnumValueRule) GetDefault() bool
func (*EnumValueRule) ProtoMessage ¶
func (*EnumValueRule) ProtoMessage()
func (*EnumValueRule) ProtoReflect ¶
func (x *EnumValueRule) ProtoReflect() protoreflect.Message
func (*EnumValueRule) Reset ¶
func (x *EnumValueRule) Reset()
func (*EnumValueRule) String ¶
func (x *EnumValueRule) String() string
type Env ¶ added in v1.0.0
type Env struct { // var is used to directly list environment variables. Var []*EnvVar `protobuf:"bytes,1,rep,name=var,proto3" json:"var,omitempty"` // message is used to reference an already defined Protocol Buffers' message for defining environment variables. // If you want to set detailed options for the fields of the message, use the `env` option in FieldRule. Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
Env is used when setting environment variables. There are two ways to configure it.
func (*Env) Descriptor
deprecated
added in
v1.0.0
func (*Env) GetMessage ¶ added in v1.0.0
func (*Env) ProtoMessage ¶ added in v1.0.0
func (*Env) ProtoMessage()
func (*Env) ProtoReflect ¶ added in v1.0.0
func (x *Env) ProtoReflect() protoreflect.Message
type EnvMapType ¶ added in v1.0.0
type EnvMapType struct { // key represents map's key type. Key *EnvType `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` // value represents map's value type. Value *EnvType `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
EnvMapType represents map type.
func (*EnvMapType) Descriptor
deprecated
added in
v1.0.0
func (*EnvMapType) Descriptor() ([]byte, []int)
Deprecated: Use EnvMapType.ProtoReflect.Descriptor instead.
func (*EnvMapType) GetKey ¶ added in v1.0.0
func (x *EnvMapType) GetKey() *EnvType
func (*EnvMapType) GetValue ¶ added in v1.0.0
func (x *EnvMapType) GetValue() *EnvType
func (*EnvMapType) ProtoMessage ¶ added in v1.0.0
func (*EnvMapType) ProtoMessage()
func (*EnvMapType) ProtoReflect ¶ added in v1.0.0
func (x *EnvMapType) ProtoReflect() protoreflect.Message
func (*EnvMapType) Reset ¶ added in v1.0.0
func (x *EnvMapType) Reset()
func (*EnvMapType) String ¶ added in v1.0.0
func (x *EnvMapType) String() string
type EnvType ¶ added in v1.0.0
type EnvType struct { // Types that are assignable to Type: // // *EnvType_Kind // *EnvType_Repeated // *EnvType_Map Type isEnvType_Type `protobuf_oneof:"type"` // contains filtered or unexported fields }
EnvType represents type information for environment variable.
func (*EnvType) Descriptor
deprecated
added in
v1.0.0
func (*EnvType) GetMap ¶ added in v1.0.0
func (x *EnvType) GetMap() *EnvMapType
func (*EnvType) GetRepeated ¶ added in v1.0.0
func (*EnvType) ProtoMessage ¶ added in v1.0.0
func (*EnvType) ProtoMessage()
func (*EnvType) ProtoReflect ¶ added in v1.0.0
func (x *EnvType) ProtoReflect() protoreflect.Message
type EnvType_Kind ¶ added in v1.0.0
type EnvType_Kind struct { // kind is used when the type is a primitive type. Kind TypeKind `protobuf:"varint,1,opt,name=kind,proto3,enum=grpc.federation.TypeKind,oneof"` }
type EnvType_Map ¶ added in v1.0.0
type EnvType_Map struct { // map is used when the type is a map type. Map *EnvMapType `protobuf:"bytes,3,opt,name=map,proto3,oneof"` }
type EnvType_Repeated ¶ added in v1.0.0
type EnvType_Repeated struct { // repeated is used when the type is a repeated type. Repeated *EnvType `protobuf:"bytes,2,opt,name=repeated,proto3,oneof"` }
type EnvVar ¶ added in v1.0.0
type EnvVar struct { // name is an environment variable name. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // type is an environment variable type. Type *EnvType `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` // option is an additional option for parsing environment variable. Option *EnvVarOption `protobuf:"bytes,3,opt,name=option,proto3,oneof" json:"option,omitempty"` // contains filtered or unexported fields }
EnvVar represents an environment variable.
func (*EnvVar) Descriptor
deprecated
added in
v1.0.0
func (*EnvVar) GetOption ¶ added in v1.0.0
func (x *EnvVar) GetOption() *EnvVarOption
func (*EnvVar) ProtoMessage ¶ added in v1.0.0
func (*EnvVar) ProtoMessage()
func (*EnvVar) ProtoReflect ¶ added in v1.0.0
func (x *EnvVar) ProtoReflect() protoreflect.Message
type EnvVarOption ¶ added in v1.0.0
type EnvVarOption struct { // alternate use this option if you want to use an environment variable with a different name than the value specified in `EnvVar.name`. Alternate *string `protobuf:"bytes,1,opt,name=alternate,proto3,oneof" json:"alternate,omitempty"` // default specify the value to use as a fallback if the specified environment variable is not found. Default *string `protobuf:"bytes,2,opt,name=default,proto3,oneof" json:"default,omitempty"` // required require the environment variable to exist. // If it does not exist, an error will occur at startup. Required *bool `protobuf:"varint,3,opt,name=required,proto3,oneof" json:"required,omitempty"` // ignored if ignored is true, it does nothing even if the environment variable exists. Ignored *bool `protobuf:"varint,4,opt,name=ignored,proto3,oneof" json:"ignored,omitempty"` // contains filtered or unexported fields }
EnvVarOption represents additional option for environment variable. The option work with the `envconfig` library in Go language. For detailed specifications, please refer to the library's documentation ( https://pkg.go.dev/github.com/kelseyhightower/envconfig#section-readme ).
func (*EnvVarOption) Descriptor
deprecated
added in
v1.0.0
func (*EnvVarOption) Descriptor() ([]byte, []int)
Deprecated: Use EnvVarOption.ProtoReflect.Descriptor instead.
func (*EnvVarOption) GetAlternate ¶ added in v1.0.0
func (x *EnvVarOption) GetAlternate() string
func (*EnvVarOption) GetDefault ¶ added in v1.0.0
func (x *EnvVarOption) GetDefault() string
func (*EnvVarOption) GetIgnored ¶ added in v1.0.0
func (x *EnvVarOption) GetIgnored() bool
func (*EnvVarOption) GetRequired ¶ added in v1.0.0
func (x *EnvVarOption) GetRequired() bool
func (*EnvVarOption) ProtoMessage ¶ added in v1.0.0
func (*EnvVarOption) ProtoMessage()
func (*EnvVarOption) ProtoReflect ¶ added in v1.0.0
func (x *EnvVarOption) ProtoReflect() protoreflect.Message
func (*EnvVarOption) Reset ¶ added in v1.0.0
func (x *EnvVarOption) Reset()
func (*EnvVarOption) String ¶ added in v1.0.0
func (x *EnvVarOption) String() string
type ErrorGroup ¶ added in v0.10.0
type ErrorHandler ¶ added in v0.4.0
ErrorHandler Federation Service often needs to convert errors received from downstream services. If an error occurs during method execution in the Federation Service, this error handler is called and the returned error is treated as a final error.
type ErrorWithLogAttrs ¶ added in v1.0.3
type ErrorWithLogAttrs struct {
// contains filtered or unexported fields
}
func (*ErrorWithLogAttrs) Error ¶ added in v1.0.3
func (e *ErrorWithLogAttrs) Error() string
func (*ErrorWithLogAttrs) GRPCStatus ¶ added in v1.0.3
func (e *ErrorWithLogAttrs) GRPCStatus() *grpcstatus.Status
func (*ErrorWithLogAttrs) Unwrap ¶ added in v1.0.3
func (e *ErrorWithLogAttrs) Unwrap() error
type EvalCELRequest ¶ added in v0.13.8
type ExponentialBackOffConfig ¶ added in v0.10.0
type FieldOneof ¶ added in v0.3.0
type FieldOneof struct { // cond specify either `expr` or `default`. Only one `default` can be set per oneof. // // Types that are assignable to Cond: // // *FieldOneof_If // *FieldOneof_Default Cond isFieldOneof_Cond `protobuf_oneof:"cond"` // def specify variables to be used in current oneof field's scope for field binding. Def []*VariableDefinition `protobuf:"bytes,3,rep,name=def,proto3" json:"def,omitempty"` // by used to refer to a name or message argument defined in a MessageRule, use `$.` to refer to the message argument. // Use CEL (https://github.com/google/cel-spec) to evaluate the expression. // Variables are already defined in MessageRule and FieldOneOf can be used. By string `protobuf:"bytes,4,opt,name=by,proto3" json:"by,omitempty"` // contains filtered or unexported fields }
FieldOneof evaluate "messages" or other field only if expr is true and assign to the oneof field. This feature only available in oneof.
func (*FieldOneof) Descriptor
deprecated
added in
v0.3.0
func (*FieldOneof) Descriptor() ([]byte, []int)
Deprecated: Use FieldOneof.ProtoReflect.Descriptor instead.
func (*FieldOneof) GetBy ¶ added in v0.3.0
func (x *FieldOneof) GetBy() string
func (*FieldOneof) GetCond ¶ added in v0.3.0
func (m *FieldOneof) GetCond() isFieldOneof_Cond
func (*FieldOneof) GetDef ¶ added in v0.7.0
func (x *FieldOneof) GetDef() []*VariableDefinition
func (*FieldOneof) GetDefault ¶ added in v0.3.0
func (x *FieldOneof) GetDefault() bool
func (*FieldOneof) GetIf ¶ added in v0.6.0
func (x *FieldOneof) GetIf() string
func (*FieldOneof) ProtoMessage ¶ added in v0.3.0
func (*FieldOneof) ProtoMessage()
func (*FieldOneof) ProtoReflect ¶ added in v0.3.0
func (x *FieldOneof) ProtoReflect() protoreflect.Message
func (*FieldOneof) Reset ¶ added in v0.3.0
func (x *FieldOneof) Reset()
func (*FieldOneof) String ¶ added in v0.3.0
func (x *FieldOneof) String() string
type FieldOneof_Default ¶ added in v0.3.0
type FieldOneof_Default struct { // default used to assign a value when none of the other fields match any of the specified expressions. // Only one value can be defined per oneof. Default bool `protobuf:"varint,2,opt,name=default,proto3,oneof"` }
type FieldOneof_If ¶ added in v0.6.0
type FieldOneof_If struct { // if describes the condition to be assigned to field. // The return value must be of type bool. // Use CEL (https://github.com/google/cel-spec) to evaluate the expression. // Variables are already defined in MessageRule can be used. If string `protobuf:"bytes,1,opt,name=if,proto3,oneof"` }
type FieldRule ¶
type FieldRule struct { // If custom_resolver is true, the field binding process is to be implemented in Go. // If there are any values retrieved by grpc.federation.message option, they are passed as arguments for custom resolver. CustomResolver *bool `protobuf:"varint,1,opt,name=custom_resolver,json=customResolver,proto3,oneof" json:"custom_resolver,omitempty"` // by used to refer to a name or message argument defined in a MessageRule, use `$.` to refer to the message argument. // Use CEL (https://github.com/google/cel-spec) to evaluate the expression. // Variables are already defined in MessageRule can be used. By *string `protobuf:"bytes,2,opt,name=by,proto3,oneof" json:"by,omitempty"` // alias can be used when alias is specified in grpc.federation.message option, // and specifies the field name to be referenced among the messages specified in alias of message option. // If the specified field has the same type or can be converted automatically, its value is assigned. Alias *string `protobuf:"bytes,3,opt,name=alias,proto3,oneof" json:"alias,omitempty"` // use to evaluate any one of fields. this field only available in oneof. Oneof *FieldOneof `protobuf:"bytes,4,opt,name=oneof,proto3" json:"oneof,omitempty"` // when defining an environment variable, use it for fields where you want to set additional options. Env *EnvVarOption `protobuf:"bytes,5,opt,name=env,proto3" json:"env,omitempty"` // contains filtered or unexported fields }
FieldRule define gRPC Federation rules for the field of message.
func (*FieldRule) Descriptor
deprecated
func (*FieldRule) GetCustomResolver ¶
func (*FieldRule) GetEnv ¶
func (x *FieldRule) GetEnv() *EnvVarOption
func (*FieldRule) GetOneof ¶ added in v0.3.0
func (x *FieldRule) GetOneof() *FieldOneof
func (*FieldRule) ProtoMessage ¶
func (*FieldRule) ProtoMessage()
func (*FieldRule) ProtoReflect ¶
func (x *FieldRule) ProtoReflect() protoreflect.Message
type FileRule ¶ added in v1.0.0
type FileRule struct { Plugin *CELPlugin `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"` // import can be used to resolve methods, messages, etc. that are referenced in gRPC Federation rules. Import []string `protobuf:"bytes,2,rep,name=import,proto3" json:"import,omitempty"` // contains filtered or unexported fields }
func (*FileRule) Descriptor
deprecated
added in
v1.0.0
func (*FileRule) ProtoMessage ¶ added in v1.0.0
func (*FileRule) ProtoMessage()
func (*FileRule) ProtoReflect ¶ added in v1.0.0
func (x *FileRule) ProtoReflect() protoreflect.Message
type GRPCError ¶ added in v0.10.0
type GRPCError struct { // def define variables in current scope. Def []*VariableDefinition `protobuf:"bytes,1,rep,name=def,proto3" json:"def,omitempty"` // if specifies condition in CEL. If the condition is true, it returns defined error information. // If this field is omitted, it is always treated as 'true' and returns defined error information. // The return value must always be of type boolean. If *string `protobuf:"bytes,2,opt,name=if,proto3,oneof" json:"if,omitempty"` // code is a gRPC status code. Code code.Code `protobuf:"varint,3,opt,name=code,proto3,enum=google.rpc.Code" json:"code,omitempty"` // message is a gRPC status message. // If omitted, the message will be auto-generated from the configurations. Message *string `protobuf:"bytes,4,opt,name=message,proto3,oneof" json:"message,omitempty"` // details is a list of error details. // If returns error, the corresponding error details are set. Details []*GRPCErrorDetail `protobuf:"bytes,5,rep,name=details,proto3" json:"details,omitempty"` // ignore ignore the error if the condition in the "if" field is true and "ignore" field is set to true. // When an error is ignored, the returned response is always null value. // If you want to return a response that is not null, please use `ignore_and_response` feature. // Therefore, `ignore` and `ignore_and_response` cannot be specified same. Ignore *bool `protobuf:"varint,6,opt,name=ignore,proto3,oneof" json:"ignore,omitempty"` // ignore_and_response ignore the error if the condition in the "if" field is true and it returns response specified in CEL. // The evaluation value of CEL must always be the same as the response message type. // `ignore` and `ignore_and_response` cannot be specified same. IgnoreAndResponse *string `protobuf:"bytes,7,opt,name=ignore_and_response,json=ignoreAndResponse,proto3,oneof" json:"ignore_and_response,omitempty"` // log_level can be configured to output logs as any log level. // If DEBUG is specified for the log_level, logs are output as debug logs. // default value is ERROR. LogLevel *GRPCError_LogLevel `` /* 132-byte string literal not displayed */ // contains filtered or unexported fields }
GRPCError create gRPC status value.
func (*GRPCError) Descriptor
deprecated
added in
v0.13.0
func (*GRPCError) GetDef ¶ added in v0.13.0
func (x *GRPCError) GetDef() []*VariableDefinition
func (*GRPCError) GetDetails ¶ added in v0.13.0
func (x *GRPCError) GetDetails() []*GRPCErrorDetail
func (*GRPCError) GetIgnoreAndResponse ¶ added in v0.14.0
func (*GRPCError) GetLogLevel ¶ added in v1.3.0
func (x *GRPCError) GetLogLevel() GRPCError_LogLevel
func (*GRPCError) GetMessage ¶ added in v0.13.0
func (*GRPCError) ProtoMessage ¶ added in v0.13.0
func (*GRPCError) ProtoMessage()
func (*GRPCError) ProtoReflect ¶ added in v0.13.0
func (x *GRPCError) ProtoReflect() protoreflect.Message
type GRPCErrorDetail ¶ added in v0.13.0
type GRPCErrorDetail struct { // if specifies condition rule in CEL. If the condition is true, gRPC error detail is added to the error. If string `protobuf:"bytes,1,opt,name=if,proto3" json:"if,omitempty"` // def define variables in current scope. Def []*VariableDefinition `protobuf:"bytes,2,rep,name=def,proto3" json:"def,omitempty"` // message represents arbitrary messages to describe the detail of the error. Message []*MessageExpr `protobuf:"bytes,3,rep,name=message,proto3" json:"message,omitempty"` // error_info describes the cause of the error with structured details. ErrorInfo []*errdetails.ErrorInfo `protobuf:"bytes,4,rep,name=error_info,json=errorInfo,proto3" json:"error_info,omitempty"` // retry_info describes when the clients can retry a failed request. RetryInfo []*errdetails.RetryInfo `protobuf:"bytes,5,rep,name=retry_info,json=retryInfo,proto3" json:"retry_info,omitempty"` // debug_info describes additional debugging info. DebugInfo []*errdetails.DebugInfo `protobuf:"bytes,6,rep,name=debug_info,json=debugInfo,proto3" json:"debug_info,omitempty"` // quota_failure describes how a quota check failed. QuotaFailure []*errdetails.QuotaFailure `protobuf:"bytes,7,rep,name=quota_failure,json=quotaFailure,proto3" json:"quota_failure,omitempty"` // precondition_failure describes what preconditions have failed. PreconditionFailure []*errdetails.PreconditionFailure `protobuf:"bytes,8,rep,name=precondition_failure,json=preconditionFailure,proto3" json:"precondition_failure,omitempty"` // bad_request describes violations in a client request. BadRequest []*errdetails.BadRequest `protobuf:"bytes,9,rep,name=bad_request,json=badRequest,proto3" json:"bad_request,omitempty"` // request_info contains metadata about the request that clients can attach. RequestInfo []*errdetails.RequestInfo `protobuf:"bytes,10,rep,name=request_info,json=requestInfo,proto3" json:"request_info,omitempty"` // resource_info describes the resource that is being accessed. ResourceInfo []*errdetails.ResourceInfo `protobuf:"bytes,11,rep,name=resource_info,json=resourceInfo,proto3" json:"resource_info,omitempty"` // help provides links to documentation or for performing an out of band action. Help []*errdetails.Help `protobuf:"bytes,12,rep,name=help,proto3" json:"help,omitempty"` // localized_message provides a localized error message that is safe to return to the user. LocalizedMessage []*errdetails.LocalizedMessage `protobuf:"bytes,13,rep,name=localized_message,json=localizedMessage,proto3" json:"localized_message,omitempty"` // by specify a message in CEL to express the details of the error. By []string `protobuf:"bytes,14,rep,name=by,proto3" json:"by,omitempty"` // contains filtered or unexported fields }
func (*GRPCErrorDetail) Descriptor
deprecated
added in
v0.13.0
func (*GRPCErrorDetail) Descriptor() ([]byte, []int)
Deprecated: Use GRPCErrorDetail.ProtoReflect.Descriptor instead.
func (*GRPCErrorDetail) GetBadRequest ¶ added in v0.13.0
func (x *GRPCErrorDetail) GetBadRequest() []*errdetails.BadRequest
func (*GRPCErrorDetail) GetBy ¶ added in v1.2.0
func (x *GRPCErrorDetail) GetBy() []string
func (*GRPCErrorDetail) GetDebugInfo ¶ added in v0.13.0
func (x *GRPCErrorDetail) GetDebugInfo() []*errdetails.DebugInfo
func (*GRPCErrorDetail) GetDef ¶ added in v0.13.0
func (x *GRPCErrorDetail) GetDef() []*VariableDefinition
func (*GRPCErrorDetail) GetErrorInfo ¶ added in v0.13.0
func (x *GRPCErrorDetail) GetErrorInfo() []*errdetails.ErrorInfo
func (*GRPCErrorDetail) GetHelp ¶ added in v0.13.0
func (x *GRPCErrorDetail) GetHelp() []*errdetails.Help
func (*GRPCErrorDetail) GetIf ¶ added in v0.13.0
func (x *GRPCErrorDetail) GetIf() string
func (*GRPCErrorDetail) GetLocalizedMessage ¶ added in v0.13.0
func (x *GRPCErrorDetail) GetLocalizedMessage() []*errdetails.LocalizedMessage
func (*GRPCErrorDetail) GetMessage ¶ added in v0.13.0
func (x *GRPCErrorDetail) GetMessage() []*MessageExpr
func (*GRPCErrorDetail) GetPreconditionFailure ¶ added in v0.13.0
func (x *GRPCErrorDetail) GetPreconditionFailure() []*errdetails.PreconditionFailure
func (*GRPCErrorDetail) GetQuotaFailure ¶ added in v0.13.0
func (x *GRPCErrorDetail) GetQuotaFailure() []*errdetails.QuotaFailure
func (*GRPCErrorDetail) GetRequestInfo ¶ added in v0.13.0
func (x *GRPCErrorDetail) GetRequestInfo() []*errdetails.RequestInfo
func (*GRPCErrorDetail) GetResourceInfo ¶ added in v0.13.0
func (x *GRPCErrorDetail) GetResourceInfo() []*errdetails.ResourceInfo
func (*GRPCErrorDetail) GetRetryInfo ¶ added in v0.13.0
func (x *GRPCErrorDetail) GetRetryInfo() []*errdetails.RetryInfo
func (*GRPCErrorDetail) ProtoMessage ¶ added in v0.13.0
func (*GRPCErrorDetail) ProtoMessage()
func (*GRPCErrorDetail) ProtoReflect ¶ added in v0.13.0
func (x *GRPCErrorDetail) ProtoReflect() protoreflect.Message
func (*GRPCErrorDetail) Reset ¶ added in v0.13.0
func (x *GRPCErrorDetail) Reset()
func (*GRPCErrorDetail) String ¶ added in v0.13.0
func (x *GRPCErrorDetail) String() string
type GRPCError_LogLevel ¶ added in v1.3.0
type GRPCError_LogLevel int32
LogLevel is the importance or severity of a log event.
const ( // UNKNOWN represents unexpected value. GRPCError_UNKNOWN GRPCError_LogLevel = 0 // DEBUG is used for detailed information that is useful during development and debugging. GRPCError_DEBUG GRPCError_LogLevel = 1 // INFO logs are used to provide information about the normal functioning of the application. GRPCError_INFO GRPCError_LogLevel = 2 // WARN signifies a potential problem or warning that does not necessarily stop the program from working but may lead to issues in the future. GRPCError_WARN GRPCError_LogLevel = 3 // ERROR indicates a serious issue that has caused a failure in the application. GRPCError_ERROR GRPCError_LogLevel = 4 )
func (GRPCError_LogLevel) Descriptor ¶ added in v1.3.0
func (GRPCError_LogLevel) Descriptor() protoreflect.EnumDescriptor
func (GRPCError_LogLevel) Enum ¶ added in v1.3.0
func (x GRPCError_LogLevel) Enum() *GRPCError_LogLevel
func (GRPCError_LogLevel) EnumDescriptor
deprecated
added in
v1.3.0
func (GRPCError_LogLevel) EnumDescriptor() ([]byte, []int)
Deprecated: Use GRPCError_LogLevel.Descriptor instead.
func (GRPCError_LogLevel) Number ¶ added in v1.3.0
func (x GRPCError_LogLevel) Number() protoreflect.EnumNumber
func (GRPCError_LogLevel) String ¶ added in v1.3.0
func (x GRPCError_LogLevel) String() string
func (GRPCError_LogLevel) Type ¶ added in v1.3.0
func (GRPCError_LogLevel) Type() protoreflect.EnumType
type Iterator ¶ added in v0.6.0
type Iterator struct { // variable name. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // src the value that will be the source for creating the iterator. // src must be a repeated type. Src string `protobuf:"bytes,2,opt,name=src,proto3" json:"src,omitempty"` // contains filtered or unexported fields }
Iterator represents iterator variable.
func (*Iterator) Descriptor
deprecated
added in
v0.6.0
func (*Iterator) ProtoMessage ¶ added in v0.6.0
func (*Iterator) ProtoMessage()
func (*Iterator) ProtoReflect ¶ added in v0.6.0
func (x *Iterator) ProtoReflect() protoreflect.Message
type LocalValue ¶ added in v0.10.0
type LocalValue struct {
// contains filtered or unexported fields
}
func NewLocalValue ¶ added in v0.10.0
func (*LocalValue) AddEnv ¶ added in v1.0.0
func (v *LocalValue) AddEnv(env any)
type LocalizedMessageParam ¶ added in v0.13.8
type MapExpr ¶ added in v0.6.0
type MapExpr struct { // iterator define iterator variable. // When evaluating CEL in `expr`, we can refer to the name defined in iterator. Iterator *Iterator `protobuf:"bytes,1,opt,name=iterator,proto3" json:"iterator,omitempty"` // expr creates map elements using iterator variable. // // Types that are assignable to Expr: // // *MapExpr_By // *MapExpr_Message Expr isMapExpr_Expr `protobuf_oneof:"expr"` // contains filtered or unexported fields }
MapExpr apply map operation for the specified repeated type.
func (*MapExpr) Descriptor
deprecated
added in
v0.6.0
func (*MapExpr) GetIterator ¶ added in v0.6.0
func (*MapExpr) GetMessage ¶ added in v0.6.0
func (x *MapExpr) GetMessage() *MessageExpr
func (*MapExpr) ProtoMessage ¶ added in v0.6.0
func (*MapExpr) ProtoMessage()
func (*MapExpr) ProtoReflect ¶ added in v0.6.0
func (x *MapExpr) ProtoReflect() protoreflect.Message
type MapExpr_By ¶ added in v0.6.0
type MapExpr_By struct { // `by` evaluates with CEL. // this can refer to the variable declared by `iterator`. By string `protobuf:"bytes,11,opt,name=by,proto3,oneof"` }
type MapExpr_Message ¶ added in v0.6.0
type MapExpr_Message struct { // message gets with message arguments, and it is made an element of the map. // The result type of MapExpr is the repeated type of the specified message. Message *MessageExpr `protobuf:"bytes,12,opt,name=message,proto3,oneof"` }
type MapIteratorValue ¶ added in v0.10.0
type MapIteratorValue struct {
// contains filtered or unexported fields
}
type MessageExpr ¶ added in v0.7.0
type MessageExpr struct { // name specify the message name by FQDN. format is `<package-name>.<message-name>`. // <package-name> can be omitted when referring to messages in the same package. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // args specify the parameters needed to get the message. This is called the "message arguments". Args []*Argument `protobuf:"bytes,2,rep,name=args,proto3" json:"args,omitempty"` // contains filtered or unexported fields }
MessageExpr represents dependent message.
func (*MessageExpr) Descriptor
deprecated
added in
v0.7.0
func (*MessageExpr) Descriptor() ([]byte, []int)
Deprecated: Use MessageExpr.ProtoReflect.Descriptor instead.
func (*MessageExpr) GetArgs ¶ added in v0.7.0
func (x *MessageExpr) GetArgs() []*Argument
func (*MessageExpr) GetName ¶ added in v0.7.0
func (x *MessageExpr) GetName() string
func (*MessageExpr) ProtoMessage ¶ added in v0.7.0
func (*MessageExpr) ProtoMessage()
func (*MessageExpr) ProtoReflect ¶ added in v0.7.0
func (x *MessageExpr) ProtoReflect() protoreflect.Message
func (*MessageExpr) Reset ¶ added in v0.7.0
func (x *MessageExpr) Reset()
func (*MessageExpr) String ¶ added in v0.7.0
func (x *MessageExpr) String() string
type MessageRule ¶
type MessageRule struct { // def specify variables to be used in field binding by `grpc.federation.field` option. Def []*VariableDefinition `protobuf:"bytes,1,rep,name=def,proto3" json:"def,omitempty"` // if custom_resolver is true, the resolver for this message is implemented by Go. // If there are any values retrieved by resolver or messages, they are passed as arguments for custom resolver. // Each field of the message returned by the custom resolver is automatically bound. // If you want to change the binding process for a particular field, set `custom_resolver=true` option for that field. CustomResolver *bool `protobuf:"varint,2,opt,name=custom_resolver,json=customResolver,proto3,oneof" json:"custom_resolver,omitempty"` // alias mapping between messages defined in other packages and messages defined on the federation service side. // The alias is the FQDN ( <package-name>.<message-name> ) to the message. // If this definition exists, type conversion is automatically performed before the field assignment operation. // If a message with this option has a field that is not present in the message specified by alias, and the alias option is not specified for that field, an error is occurred. // You can specify multiple aliases. In that case, only fields common to all aliases will be considered. // Specifying a field that is not included in either alias will result in an error. Alias []string `protobuf:"bytes,3,rep,name=alias,proto3" json:"alias,omitempty"` // contains filtered or unexported fields }
MessageRule define gRPC Federation rules for the message.
func (*MessageRule) Descriptor
deprecated
func (*MessageRule) Descriptor() ([]byte, []int)
Deprecated: Use MessageRule.ProtoReflect.Descriptor instead.
func (*MessageRule) GetAlias ¶
func (x *MessageRule) GetAlias() []string
func (*MessageRule) GetCustomResolver ¶
func (x *MessageRule) GetCustomResolver() bool
func (*MessageRule) GetDef ¶ added in v0.6.0
func (x *MessageRule) GetDef() []*VariableDefinition
func (*MessageRule) ProtoMessage ¶
func (*MessageRule) ProtoMessage()
func (*MessageRule) ProtoReflect ¶
func (x *MessageRule) ProtoReflect() protoreflect.Message
func (*MessageRule) Reset ¶
func (x *MessageRule) Reset()
func (*MessageRule) String ¶
func (x *MessageRule) String() string
type MethodRequest ¶
type MethodRequest struct { // field name of the request message. Field string `protobuf:"bytes,1,opt,name=field,proto3" json:"field,omitempty"` // by used to refer to a name or message argument defined in a MessageRule, use `$.` to refer to the message argument. // Use CEL (https://github.com/google/cel-spec) to evaluate the expression. // Variables are already defined in MessageRule can be used. By *string `protobuf:"bytes,2,opt,name=by,proto3,oneof" json:"by,omitempty"` // if describes the condition to be assigned to field. // The return value must be of type bool. // Use CEL (https://github.com/google/cel-spec) to evaluate the expression. // Variables are already defined in MessageRule can be used. // If the field is a 'oneof' field, it must be specified. If *string `protobuf:"bytes,3,opt,name=if,proto3,oneof" json:"if,omitempty"` // contains filtered or unexported fields }
MethodRequest define parameters to be used for gRPC method request.
func (*MethodRequest) Descriptor
deprecated
func (*MethodRequest) Descriptor() ([]byte, []int)
Deprecated: Use MethodRequest.ProtoReflect.Descriptor instead.
func (*MethodRequest) GetBy ¶
func (x *MethodRequest) GetBy() string
func (*MethodRequest) GetField ¶
func (x *MethodRequest) GetField() string
func (*MethodRequest) GetIf ¶ added in v0.16.0
func (x *MethodRequest) GetIf() string
func (*MethodRequest) ProtoMessage ¶
func (*MethodRequest) ProtoMessage()
func (*MethodRequest) ProtoReflect ¶
func (x *MethodRequest) ProtoReflect() protoreflect.Message
func (*MethodRequest) Reset ¶
func (x *MethodRequest) Reset()
func (*MethodRequest) String ¶
func (x *MethodRequest) String() string
type MethodResponse ¶
type MethodResponse struct { // name specify the unique name that can be used in a `MessageRule` / `FieldRule` for the same message for a specific field in the response. Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` // field name in response message. Field *string `protobuf:"bytes,2,opt,name=field,proto3,oneof" json:"field,omitempty"` // autobind if the value referenced by `field` is a message type, // the value of a field with the same name and type as the field name of its own message is automatically assigned to the value of the field in the message. // If multiple autobinds are used at the same message, // you must explicitly use the `grpc.federation.field` option to do the binding yourself, since duplicate field names cannot be correctly determined as one. Autobind *bool `protobuf:"varint,3,opt,name=autobind,proto3,oneof" json:"autobind,omitempty"` // contains filtered or unexported fields }
MethodResponse define which value of the method response is referenced.
func (*MethodResponse) Descriptor
deprecated
func (*MethodResponse) Descriptor() ([]byte, []int)
Deprecated: Use MethodResponse.ProtoReflect.Descriptor instead.
func (*MethodResponse) GetAutobind ¶
func (x *MethodResponse) GetAutobind() bool
func (*MethodResponse) GetField ¶
func (x *MethodResponse) GetField() string
func (*MethodResponse) GetName ¶
func (x *MethodResponse) GetName() string
func (*MethodResponse) ProtoMessage ¶
func (*MethodResponse) ProtoMessage()
func (*MethodResponse) ProtoReflect ¶
func (x *MethodResponse) ProtoReflect() protoreflect.Message
func (*MethodResponse) Reset ¶
func (x *MethodResponse) Reset()
func (*MethodResponse) String ¶
func (x *MethodResponse) String() string
type MethodRule ¶
type MethodRule struct { // the time to timeout. If the specified time period elapses, DEADLINE_EXCEEDED status is returned. // If you want to handle this error, you need to implement a custom error handler in Go. // The format is the same as Go's time.Duration format. See https://pkg.go.dev/time#ParseDuration. Timeout *string `protobuf:"bytes,1,opt,name=timeout,proto3,oneof" json:"timeout,omitempty"` // contains filtered or unexported fields }
func (*MethodRule) Descriptor
deprecated
func (*MethodRule) Descriptor() ([]byte, []int)
Deprecated: Use MethodRule.ProtoReflect.Descriptor instead.
func (*MethodRule) GetTimeout ¶
func (x *MethodRule) GetTimeout() string
func (*MethodRule) ProtoMessage ¶
func (*MethodRule) ProtoMessage()
func (*MethodRule) ProtoReflect ¶
func (x *MethodRule) ProtoReflect() protoreflect.Message
func (*MethodRule) Reset ¶
func (x *MethodRule) Reset()
func (*MethodRule) String ¶
func (x *MethodRule) String() string
type OneofRule ¶
type OneofRule struct {
// contains filtered or unexported fields
}
func (*OneofRule) Descriptor
deprecated
func (*OneofRule) ProtoMessage ¶
func (*OneofRule) ProtoMessage()
func (*OneofRule) ProtoReflect ¶
func (x *OneofRule) ProtoReflect() protoreflect.Message
type PreconditionFailureViolation ¶ added in v0.10.0
type ProtoMessage ¶ added in v0.10.0
type ProtoMessage = protoadapt.MessageV1
type RecoveredError ¶ added in v0.4.0
RecoveredError represents recovered error.
func RecoverError ¶ added in v0.4.0
func RecoverError(v interface{}, rawStack []byte) *RecoveredError
func (*RecoveredError) Error ¶ added in v0.4.0
func (e *RecoveredError) Error() string
type RetryParam ¶ added in v0.13.9
type RetryPolicy ¶
type RetryPolicy struct { // Types that are assignable to Policy: // // *RetryPolicy_Constant // *RetryPolicy_Exponential Policy isRetryPolicy_Policy `protobuf_oneof:"policy"` // if specifies condition in CEL. If the condition is true, run the retry process according to the policy. // If this field is omitted, it is always treated as 'true' and run the retry process. // The return value must always be of type boolean. If string `protobuf:"bytes,3,opt,name=if,proto3" json:"if,omitempty"` // contains filtered or unexported fields }
RetryPolicy define the retry policy if the method call fails.
func (*RetryPolicy) Descriptor
deprecated
func (*RetryPolicy) Descriptor() ([]byte, []int)
Deprecated: Use RetryPolicy.ProtoReflect.Descriptor instead.
func (*RetryPolicy) GetConstant ¶
func (x *RetryPolicy) GetConstant() *RetryPolicyConstant
func (*RetryPolicy) GetExponential ¶
func (x *RetryPolicy) GetExponential() *RetryPolicyExponential
func (*RetryPolicy) GetIf ¶ added in v0.13.9
func (x *RetryPolicy) GetIf() string
func (*RetryPolicy) GetPolicy ¶
func (m *RetryPolicy) GetPolicy() isRetryPolicy_Policy
func (*RetryPolicy) ProtoMessage ¶
func (*RetryPolicy) ProtoMessage()
func (*RetryPolicy) ProtoReflect ¶
func (x *RetryPolicy) ProtoReflect() protoreflect.Message
func (*RetryPolicy) Reset ¶
func (x *RetryPolicy) Reset()
func (*RetryPolicy) String ¶
func (x *RetryPolicy) String() string
type RetryPolicyConstant ¶
type RetryPolicyConstant struct { // interval value. ( default value is 1s ). Interval *string `protobuf:"bytes,1,opt,name=interval,proto3,oneof" json:"interval,omitempty"` // max retry count. ( default value is 5. If zero is specified, it never stops ) MaxRetries *uint64 `protobuf:"varint,2,opt,name=max_retries,json=maxRetries,proto3,oneof" json:"max_retries,omitempty"` // contains filtered or unexported fields }
RetryPolicyConstant define "constant" based retry policy.
func (*RetryPolicyConstant) Descriptor
deprecated
func (*RetryPolicyConstant) Descriptor() ([]byte, []int)
Deprecated: Use RetryPolicyConstant.ProtoReflect.Descriptor instead.
func (*RetryPolicyConstant) GetInterval ¶
func (x *RetryPolicyConstant) GetInterval() string
func (*RetryPolicyConstant) GetMaxRetries ¶
func (x *RetryPolicyConstant) GetMaxRetries() uint64
func (*RetryPolicyConstant) ProtoMessage ¶
func (*RetryPolicyConstant) ProtoMessage()
func (*RetryPolicyConstant) ProtoReflect ¶
func (x *RetryPolicyConstant) ProtoReflect() protoreflect.Message
func (*RetryPolicyConstant) Reset ¶
func (x *RetryPolicyConstant) Reset()
func (*RetryPolicyConstant) String ¶
func (x *RetryPolicyConstant) String() string
type RetryPolicyExponential ¶
type RetryPolicyExponential struct { // initial interval value. ( default value is "500ms" ). InitialInterval *string `protobuf:"bytes,1,opt,name=initial_interval,json=initialInterval,proto3,oneof" json:"initial_interval,omitempty"` // randomization factor value. ( default value is 0.5 ). RandomizationFactor *float64 `` /* 126-byte string literal not displayed */ // multiplier. ( default value is 1.5 ). Multiplier *float64 `protobuf:"fixed64,3,opt,name=multiplier,proto3,oneof" json:"multiplier,omitempty"` // max interval value. ( default value is "60s" ). MaxInterval *string `protobuf:"bytes,4,opt,name=max_interval,json=maxInterval,proto3,oneof" json:"max_interval,omitempty"` // max retry count. ( default value is 5. If zero is specified, it never stops ). MaxRetries *uint64 `protobuf:"varint,5,opt,name=max_retries,json=maxRetries,proto3,oneof" json:"max_retries,omitempty"` // contains filtered or unexported fields }
RetryPolicyExponential define "exponential backoff" based retry policy.
func (*RetryPolicyExponential) Descriptor
deprecated
func (*RetryPolicyExponential) Descriptor() ([]byte, []int)
Deprecated: Use RetryPolicyExponential.ProtoReflect.Descriptor instead.
func (*RetryPolicyExponential) GetInitialInterval ¶
func (x *RetryPolicyExponential) GetInitialInterval() string
func (*RetryPolicyExponential) GetMaxInterval ¶
func (x *RetryPolicyExponential) GetMaxInterval() string
func (*RetryPolicyExponential) GetMaxRetries ¶
func (x *RetryPolicyExponential) GetMaxRetries() uint64
func (*RetryPolicyExponential) GetMultiplier ¶
func (x *RetryPolicyExponential) GetMultiplier() float64
func (*RetryPolicyExponential) GetRandomizationFactor ¶
func (x *RetryPolicyExponential) GetRandomizationFactor() float64
func (*RetryPolicyExponential) ProtoMessage ¶
func (*RetryPolicyExponential) ProtoMessage()
func (*RetryPolicyExponential) ProtoReflect ¶
func (x *RetryPolicyExponential) ProtoReflect() protoreflect.Message
func (*RetryPolicyExponential) Reset ¶
func (x *RetryPolicyExponential) Reset()
func (*RetryPolicyExponential) String ¶
func (x *RetryPolicyExponential) String() string
type RetryPolicy_Constant ¶
type RetryPolicy_Constant struct { // retry according to the "constant" policy. Constant *RetryPolicyConstant `protobuf:"bytes,1,opt,name=constant,proto3,oneof"` }
type RetryPolicy_Exponential ¶
type RetryPolicy_Exponential struct { // retry according to the "exponential backoff" policy. // The following Go library is used in the implementation, // so please refer to the library documentation for how to specify each parameter. // https://pkg.go.dev/github.com/cenkalti/backoff/v4#section-readme. Exponential *RetryPolicyExponential `protobuf:"bytes,2,opt,name=exponential,proto3,oneof"` }
type ServiceRule ¶
type ServiceRule struct { // env defines the environment variable. Env *Env `protobuf:"bytes,1,opt,name=env,proto3" json:"env,omitempty"` // contains filtered or unexported fields }
ServiceRule define gRPC Federation rules for the service.
func (*ServiceRule) Descriptor
deprecated
func (*ServiceRule) Descriptor() ([]byte, []int)
Deprecated: Use ServiceRule.ProtoReflect.Descriptor instead.
func (*ServiceRule) GetEnv ¶ added in v1.0.0
func (x *ServiceRule) GetEnv() *Env
func (*ServiceRule) ProtoMessage ¶
func (*ServiceRule) ProtoMessage()
func (*ServiceRule) ProtoReflect ¶
func (x *ServiceRule) ProtoReflect() protoreflect.Message
func (*ServiceRule) Reset ¶
func (x *ServiceRule) Reset()
func (*ServiceRule) String ¶
func (x *ServiceRule) String() string
type SetCELValueParam ¶ added in v0.13.8
type TypeKind ¶ added in v1.0.0
type TypeKind int32
TypeKind is primitive kind list.
const ( // UNKNOWN represents unexpected value. TypeKind_UNKNOWN TypeKind = 0 // STRING is used to convert the input value to `string` type. TypeKind_STRING TypeKind = 1 // BOOL is used to convert the input value to `bool` type. TypeKind_BOOL TypeKind = 2 // INT64 is used to convert the input value to `int64` type. TypeKind_INT64 TypeKind = 3 // UINT64 is used to convert the input value to `uint64` type. TypeKind_UINT64 TypeKind = 4 // DOUBLE is used to convert the input value to `double` type. TypeKind_DOUBLE TypeKind = 5 // DURATION is used to convert the input value to the `google.protobuf.Duration` type. TypeKind_DURATION TypeKind = 6 )
func (TypeKind) Descriptor ¶ added in v1.0.0
func (TypeKind) Descriptor() protoreflect.EnumDescriptor
func (TypeKind) EnumDescriptor
deprecated
added in
v1.0.0
func (TypeKind) Number ¶ added in v1.0.0
func (x TypeKind) Number() protoreflect.EnumNumber
func (TypeKind) Type ¶ added in v1.0.0
func (TypeKind) Type() protoreflect.EnumType
type ValidationExpr ¶ added in v0.7.0
type ValidationExpr struct { // name is a unique name for the validation. // If set, the validation error type will be <message-name><name>Error. // If omitted, the validation error type will be ValidationError. Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` // error defines the actual validation rules and an error to returned if the validation fails. Error *GRPCError `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` // contains filtered or unexported fields }
Validation represents a validation rule against variables defined within the current scope.
func (*ValidationExpr) Descriptor
deprecated
added in
v0.7.0
func (*ValidationExpr) Descriptor() ([]byte, []int)
Deprecated: Use ValidationExpr.ProtoReflect.Descriptor instead.
func (*ValidationExpr) GetError ¶ added in v0.7.0
func (x *ValidationExpr) GetError() *GRPCError
func (*ValidationExpr) GetName ¶ added in v0.7.0
func (x *ValidationExpr) GetName() string
func (*ValidationExpr) ProtoMessage ¶ added in v0.7.0
func (*ValidationExpr) ProtoMessage()
func (*ValidationExpr) ProtoReflect ¶ added in v0.7.0
func (x *ValidationExpr) ProtoReflect() protoreflect.Message
func (*ValidationExpr) Reset ¶ added in v0.7.0
func (x *ValidationExpr) Reset()
func (*ValidationExpr) String ¶ added in v0.7.0
func (x *ValidationExpr) String() string
type VariableDefinition ¶ added in v0.6.0
type VariableDefinition struct { // name is a variable name. // This name can be referenced in all CELs defined after itself in the same message. // It can also be referenced in `grpc.federation.field` option. Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` // if specify the condition for evaluating expr. // this value evaluated by CEL and it must return a boolean value. // If the result of evaluation is `false`, the value assigned to name is the default value of the result of evaluation of `expr`. If *string `protobuf:"bytes,2,opt,name=if,proto3,oneof" json:"if,omitempty"` // autobind if the result value of `expr` is a message type, // the value of a field with the same name and type as the field name of its own message is automatically assigned to the value of the field in the message. // If multiple autobinds are used at the same message, // you must explicitly use the `grpc.federation.field` option to do the binding yourself, since duplicate field names cannot be correctly determined as one. Autobind *bool `protobuf:"varint,3,opt,name=autobind,proto3,oneof" json:"autobind,omitempty"` // expr specify the value to be assigned to name. // // Types that are assignable to Expr: // // *VariableDefinition_By // *VariableDefinition_Map // *VariableDefinition_Message // *VariableDefinition_Call // *VariableDefinition_Validation Expr isVariableDefinition_Expr `protobuf_oneof:"expr"` // contains filtered or unexported fields }
VariableDefinition represents variable definition.
func (*VariableDefinition) Descriptor
deprecated
added in
v0.6.0
func (*VariableDefinition) Descriptor() ([]byte, []int)
Deprecated: Use VariableDefinition.ProtoReflect.Descriptor instead.
func (*VariableDefinition) GetAutobind ¶ added in v0.6.0
func (x *VariableDefinition) GetAutobind() bool
func (*VariableDefinition) GetBy ¶ added in v0.6.0
func (x *VariableDefinition) GetBy() string
func (*VariableDefinition) GetCall ¶ added in v0.6.0
func (x *VariableDefinition) GetCall() *CallExpr
func (*VariableDefinition) GetExpr ¶ added in v0.6.0
func (m *VariableDefinition) GetExpr() isVariableDefinition_Expr
func (*VariableDefinition) GetIf ¶ added in v0.6.0
func (x *VariableDefinition) GetIf() string
func (*VariableDefinition) GetMap ¶ added in v0.6.0
func (x *VariableDefinition) GetMap() *MapExpr
func (*VariableDefinition) GetMessage ¶ added in v0.6.0
func (x *VariableDefinition) GetMessage() *MessageExpr
func (*VariableDefinition) GetName ¶ added in v0.6.0
func (x *VariableDefinition) GetName() string
func (*VariableDefinition) GetValidation ¶ added in v0.6.0
func (x *VariableDefinition) GetValidation() *ValidationExpr
func (*VariableDefinition) ProtoMessage ¶ added in v0.6.0
func (*VariableDefinition) ProtoMessage()
func (*VariableDefinition) ProtoReflect ¶ added in v0.6.0
func (x *VariableDefinition) ProtoReflect() protoreflect.Message
func (*VariableDefinition) Reset ¶ added in v0.6.0
func (x *VariableDefinition) Reset()
func (*VariableDefinition) String ¶ added in v0.6.0
func (x *VariableDefinition) String() string
type VariableDefinition_By ¶ added in v0.6.0
type VariableDefinition_By struct { // `by` evaluates with CEL. By string `protobuf:"bytes,11,opt,name=by,proto3,oneof"` }
type VariableDefinition_Call ¶ added in v0.6.0
type VariableDefinition_Call struct { // call specifies how to call gRPC method. Call *CallExpr `protobuf:"bytes,14,opt,name=call,proto3,oneof"` }
type VariableDefinition_Map ¶ added in v0.6.0
type VariableDefinition_Map struct { // map apply map operation for the specified repeated type. Map *MapExpr `protobuf:"bytes,12,opt,name=map,proto3,oneof"` }
type VariableDefinition_Message ¶ added in v0.6.0
type VariableDefinition_Message struct { // message gets with message arguments. Message *MessageExpr `protobuf:"bytes,13,opt,name=message,proto3,oneof"` }
type VariableDefinition_Validation ¶ added in v0.6.0
type VariableDefinition_Validation struct { // validation defines the validation rule and error. Validation *ValidationExpr `protobuf:"bytes,15,opt,name=validation,proto3,oneof"` }