rulesv1beta1

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Type_name = map[int32]string{
		0: "TYPE_UNSPECIFIED",
		1: "TYPE_BOOL",
		2: "TYPE_NUMBER",
		3: "TYPE_STRING",
	}
	Type_value = map[string]int32{
		"TYPE_UNSPECIFIED": 0,
		"TYPE_BOOL":        1,
		"TYPE_NUMBER":      2,
		"TYPE_STRING":      3,
	}
)

Enum value maps for Type.

View Source
var (
	LogicalOperator_name = map[int32]string{
		0: "LOGICAL_OPERATOR_UNSPECIFIED",
		1: "LOGICAL_OPERATOR_EQUALS",
		2: "LOGICAL_OPERATOR_LESS_THAN",
		3: "LOGICAL_OPERATOR_LESS_THAN_OR_EQUALS",
		4: "LOGICAL_OPERATOR_GREATER_THAN",
		5: "LOGICAL_OPERATOR_GREATER_THAN_OR_EQUALS",
		6: "LOGICAL_OPERATOR_CONTAINED_WITHIN",
		7: "LOGICAL_OPERATOR_NOT_CONTAINED_WITHIN",
	}
	LogicalOperator_value = map[string]int32{
		"LOGICAL_OPERATOR_UNSPECIFIED":            0,
		"LOGICAL_OPERATOR_EQUALS":                 1,
		"LOGICAL_OPERATOR_LESS_THAN":              2,
		"LOGICAL_OPERATOR_LESS_THAN_OR_EQUALS":    3,
		"LOGICAL_OPERATOR_GREATER_THAN":           4,
		"LOGICAL_OPERATOR_GREATER_THAN_OR_EQUALS": 5,
		"LOGICAL_OPERATOR_CONTAINED_WITHIN":       6,
		"LOGICAL_OPERATOR_NOT_CONTAINED_WITHIN":   7,
	}
)

Enum value maps for LogicalOperator.

View Source
var (
	ConditionLinker_name = map[int32]string{
		0: "CONDITION_LINKER_UNSPECIFIED",
		1: "CONDITION_LINKER_AND",
		2: "CONDITION_LINKER_OR",
	}
	ConditionLinker_value = map[string]int32{
		"CONDITION_LINKER_UNSPECIFIED": 0,
		"CONDITION_LINKER_AND":         1,
		"CONDITION_LINKER_OR":          2,
	}
)

Enum value maps for ConditionLinker.

View Source
var File_lekko_rules_v1beta1_rules_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Condition

type Condition struct {
	ContextKey      string          `protobuf:"bytes,1,opt,name=context_key,json=contextKey,proto3" json:"context_key,omitempty"`
	ComparisonValue *structpb.Value `protobuf:"bytes,2,opt,name=comparison_value,json=comparisonValue,proto3" json:"comparison_value,omitempty"`
	// For operators, context is on the left, comparison value on the right.
	LogicalOperator LogicalOperator `` /* 148-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Condition) Descriptor deprecated

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

Deprecated: Use Condition.ProtoReflect.Descriptor instead.

func (*Condition) GetComparisonValue

func (x *Condition) GetComparisonValue() *structpb.Value

func (*Condition) GetContextKey

func (x *Condition) GetContextKey() string

func (*Condition) GetLogicalOperator

func (x *Condition) GetLogicalOperator() LogicalOperator

func (*Condition) ProtoMessage

func (*Condition) ProtoMessage()

func (*Condition) ProtoReflect

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

func (*Condition) Reset

func (x *Condition) Reset()

func (*Condition) String

func (x *Condition) String() string

type ConditionLinker

type ConditionLinker int32
const (
	ConditionLinker_CONDITION_LINKER_UNSPECIFIED ConditionLinker = 0
	ConditionLinker_CONDITION_LINKER_AND         ConditionLinker = 1
	ConditionLinker_CONDITION_LINKER_OR          ConditionLinker = 2
)

func (ConditionLinker) Descriptor

func (ConditionLinker) Enum

func (x ConditionLinker) Enum() *ConditionLinker

func (ConditionLinker) EnumDescriptor deprecated

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

Deprecated: Use ConditionLinker.Descriptor instead.

func (ConditionLinker) Number

func (ConditionLinker) String

func (x ConditionLinker) String() string

func (ConditionLinker) Type

type Constraint

type Constraint struct {
	Conditions []*Condition `protobuf:"bytes,1,rep,name=conditions,proto3" json:"conditions,omitempty"`
	// For now, we will only allow one condition linker that applies
	// to all sets of conditions where len(conditions) > 1. This will be
	// unset when len(conditions) == 1.
	ConditionLinker ConditionLinker `` /* 148-byte string literal not displayed */
	ResultingValue  *structpb.Value `protobuf:"bytes,3,opt,name=resulting_value,json=resultingValue,proto3" json:"resulting_value,omitempty"`
	// contains filtered or unexported fields
}

func (*Constraint) Descriptor deprecated

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

Deprecated: Use Constraint.ProtoReflect.Descriptor instead.

func (*Constraint) GetConditionLinker

func (x *Constraint) GetConditionLinker() ConditionLinker

func (*Constraint) GetConditions

func (x *Constraint) GetConditions() []*Condition

func (*Constraint) GetResultingValue

func (x *Constraint) GetResultingValue() *structpb.Value

func (*Constraint) ProtoMessage

func (*Constraint) ProtoMessage()

func (*Constraint) ProtoReflect

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

func (*Constraint) Reset

func (x *Constraint) Reset()

func (*Constraint) String

func (x *Constraint) String() string

type Feature

type Feature struct {
	Name         string          `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Type         Type            `protobuf:"varint,2,opt,name=type,proto3,enum=lekko.rules.v1beta1.Type" json:"type,omitempty"`
	DefaultValue *structpb.Value `protobuf:"bytes,3,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"`
	Constraints  []*Constraint   `protobuf:"bytes,4,rep,name=constraints,proto3" json:"constraints,omitempty"`
	// contains filtered or unexported fields
}

func (*Feature) Descriptor deprecated

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

Deprecated: Use Feature.ProtoReflect.Descriptor instead.

func (*Feature) GetConstraints

func (x *Feature) GetConstraints() []*Constraint

func (*Feature) GetDefaultValue

func (x *Feature) GetDefaultValue() *structpb.Value

func (*Feature) GetName

func (x *Feature) GetName() string

func (*Feature) GetType

func (x *Feature) GetType() Type

func (*Feature) ProtoMessage

func (*Feature) ProtoMessage()

func (*Feature) ProtoReflect

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

func (*Feature) Reset

func (x *Feature) Reset()

func (*Feature) String

func (x *Feature) String() string

type LogicalOperator

type LogicalOperator int32
const (
	LogicalOperator_LOGICAL_OPERATOR_UNSPECIFIED LogicalOperator = 0
	LogicalOperator_LOGICAL_OPERATOR_EQUALS      LogicalOperator = 1
	// > < >= <= only applies to number values.
	LogicalOperator_LOGICAL_OPERATOR_LESS_THAN              LogicalOperator = 2
	LogicalOperator_LOGICAL_OPERATOR_LESS_THAN_OR_EQUALS    LogicalOperator = 3
	LogicalOperator_LOGICAL_OPERATOR_GREATER_THAN           LogicalOperator = 4
	LogicalOperator_LOGICAL_OPERATOR_GREATER_THAN_OR_EQUALS LogicalOperator = 5
	// Contained within or not contained within only applies to list values.
	LogicalOperator_LOGICAL_OPERATOR_CONTAINED_WITHIN     LogicalOperator = 6
	LogicalOperator_LOGICAL_OPERATOR_NOT_CONTAINED_WITHIN LogicalOperator = 7
)

func (LogicalOperator) Descriptor

func (LogicalOperator) Enum

func (x LogicalOperator) Enum() *LogicalOperator

func (LogicalOperator) EnumDescriptor deprecated

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

Deprecated: Use LogicalOperator.Descriptor instead.

func (LogicalOperator) Number

func (LogicalOperator) String

func (x LogicalOperator) String() string

func (LogicalOperator) Type

type Type

type Type int32
const (
	Type_TYPE_UNSPECIFIED Type = 0
	Type_TYPE_BOOL        Type = 1
	Type_TYPE_NUMBER      Type = 2
	Type_TYPE_STRING      Type = 3
)

func (Type) Descriptor

func (Type) Descriptor() protoreflect.EnumDescriptor

func (Type) Enum

func (x Type) Enum() *Type

func (Type) EnumDescriptor deprecated

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

Deprecated: Use Type.Descriptor instead.

func (Type) Number

func (x Type) Number() protoreflect.EnumNumber

func (Type) String

func (x Type) String() string

func (Type) Type

func (Type) Type() protoreflect.EnumType

Jump to

Keyboard shortcuts

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