Documentation ¶
Overview ¶
Package query is a generated protocol buffer package.
It is generated from these files:
github.com/infobloxopen/atlas-app-toolkit/query/collection_operators.proto
It has these top-level messages:
SortCriteria Sorting FieldSelection Field Filtering LogicalOperator StringCondition NumberCondition NullCondition StringArrayCondition NumberArrayCondition Pagination PageInfo
Index ¶
- Constants
- Variables
- func DecodePageToken(ptoken string) (offset, limit int32, err error)
- func EncodePageToken(offset, limit int32) string
- func Filter(obj interface{}, filter string) (bool, error)
- type AndToken
- type EOFToken
- type EqToken
- type Field
- type FieldSelection
- func (f *FieldSelection) Add(field string, delimiter ...string)
- func (f *FieldSelection) AllFieldStrings() []string
- func (f *FieldSelection) Delete(field string, delimiter ...string) bool
- func (*FieldSelection) Descriptor() ([]byte, []int)
- func (f *FieldSelection) Get(field string, delimiter ...string) *Field
- func (m *FieldSelection) GetFields() map[string]*Field
- func (f *FieldSelection) GoString() string
- func (*FieldSelection) ProtoMessage()
- func (m *FieldSelection) Reset()
- func (m *FieldSelection) String() string
- type FieldSelectionMap
- type FieldToken
- type Filtering
- func (*Filtering) Descriptor() ([]byte, []int)
- func (m *Filtering) Filter(obj interface{}) (bool, error)
- func (m *Filtering) GetNullCondition() *NullCondition
- func (m *Filtering) GetNumberArrayCondition() *NumberArrayCondition
- func (m *Filtering) GetNumberCondition() *NumberCondition
- func (m *Filtering) GetOperator() *LogicalOperator
- func (m *Filtering) GetRoot() isFiltering_Root
- func (m *Filtering) GetStringArrayCondition() *StringArrayCondition
- func (m *Filtering) GetStringCondition() *StringCondition
- func (*Filtering) ProtoMessage()
- func (m *Filtering) Reset()
- func (m *Filtering) SetRoot(r interface{}) error
- func (m *Filtering) String() string
- func (*Filtering) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, ...)
- type FilteringExpression
- type FilteringLexer
- type FilteringParser
- type Filtering_NullCondition
- type Filtering_NumberArrayCondition
- type Filtering_NumberCondition
- type Filtering_Operator
- type Filtering_StringArrayCondition
- type Filtering_StringCondition
- type GeToken
- type GtToken
- type InToken
- type InsensitiveEqToken
- type LeToken
- type LogicalOperator
- func (*LogicalOperator) Descriptor() ([]byte, []int)
- func (lop *LogicalOperator) Filter(obj interface{}) (bool, error)
- func (m *LogicalOperator) GetIsNegative() bool
- func (m *LogicalOperator) GetLeft() isLogicalOperator_Left
- func (m *LogicalOperator) GetLeftNullCondition() *NullCondition
- func (m *LogicalOperator) GetLeftNumberArrayCondition() *NumberArrayCondition
- func (m *LogicalOperator) GetLeftNumberCondition() *NumberCondition
- func (m *LogicalOperator) GetLeftOperator() *LogicalOperator
- func (m *LogicalOperator) GetLeftStringArrayCondition() *StringArrayCondition
- func (m *LogicalOperator) GetLeftStringCondition() *StringCondition
- func (m *LogicalOperator) GetRight() isLogicalOperator_Right
- func (m *LogicalOperator) GetRightNullCondition() *NullCondition
- func (m *LogicalOperator) GetRightNumberArrayCondition() *NumberArrayCondition
- func (m *LogicalOperator) GetRightNumberCondition() *NumberCondition
- func (m *LogicalOperator) GetRightOperator() *LogicalOperator
- func (m *LogicalOperator) GetRightStringArrayCondition() *StringArrayCondition
- func (m *LogicalOperator) GetRightStringCondition() *StringCondition
- func (m *LogicalOperator) GetType() LogicalOperator_Type
- func (*LogicalOperator) ProtoMessage()
- func (m *LogicalOperator) Reset()
- func (m *LogicalOperator) SetLeft(l interface{}) error
- func (m *LogicalOperator) SetRight(r interface{}) error
- func (m *LogicalOperator) String() string
- func (*LogicalOperator) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, ...)
- type LogicalOperator_LeftNullCondition
- type LogicalOperator_LeftNumberArrayCondition
- type LogicalOperator_LeftNumberCondition
- type LogicalOperator_LeftOperator
- type LogicalOperator_LeftStringArrayCondition
- type LogicalOperator_LeftStringCondition
- type LogicalOperator_RightNullCondition
- type LogicalOperator_RightNumberArrayCondition
- type LogicalOperator_RightNumberCondition
- type LogicalOperator_RightOperator
- type LogicalOperator_RightStringArrayCondition
- type LogicalOperator_RightStringCondition
- type LogicalOperator_Type
- type LparenToken
- type LtToken
- type MatchToken
- type Matcher
- type NeToken
- type NmatchToken
- type NotToken
- type NullCondition
- func (*NullCondition) Descriptor() ([]byte, []int)
- func (c *NullCondition) Filter(obj interface{}) (bool, error)
- func (m *NullCondition) GetFieldPath() []string
- func (m *NullCondition) GetIsNegative() bool
- func (*NullCondition) ProtoMessage()
- func (m *NullCondition) Reset()
- func (m *NullCondition) String() string
- type NullToken
- type NumberArrayCondition
- func (*NumberArrayCondition) Descriptor() ([]byte, []int)
- func (c *NumberArrayCondition) Filter(obj interface{}) (bool, error)
- func (m *NumberArrayCondition) GetFieldPath() []string
- func (m *NumberArrayCondition) GetIsNegative() bool
- func (m *NumberArrayCondition) GetType() NumberArrayCondition_Type
- func (m *NumberArrayCondition) GetValues() []float64
- func (*NumberArrayCondition) ProtoMessage()
- func (m *NumberArrayCondition) Reset()
- func (m *NumberArrayCondition) String() string
- type NumberArrayCondition_Type
- type NumberArrayToken
- type NumberCondition
- func (*NumberCondition) Descriptor() ([]byte, []int)
- func (c *NumberCondition) Filter(obj interface{}) (bool, error)
- func (m *NumberCondition) GetFieldPath() []string
- func (m *NumberCondition) GetIsNegative() bool
- func (m *NumberCondition) GetType() NumberCondition_Type
- func (m *NumberCondition) GetValue() float64
- func (*NumberCondition) ProtoMessage()
- func (m *NumberCondition) Reset()
- func (m *NumberCondition) String() string
- type NumberCondition_Type
- type NumberToken
- type OrToken
- type PageInfo
- func (*PageInfo) Descriptor() ([]byte, []int)
- func (m *PageInfo) GetOffset() int32
- func (m *PageInfo) GetPageToken() string
- func (m *PageInfo) GetSize() int32
- func (p *PageInfo) NoMore() bool
- func (*PageInfo) ProtoMessage()
- func (m *PageInfo) Reset()
- func (p *PageInfo) SetLastOffset()
- func (p *PageInfo) SetLastToken()
- func (m *PageInfo) String() string
- type Pagination
- func (p *Pagination) DefaultLimit(dl ...int32) int32
- func (*Pagination) Descriptor() ([]byte, []int)
- func (p *Pagination) FirstPage() bool
- func (m *Pagination) GetLimit() int32
- func (m *Pagination) GetOffset() int32
- func (m *Pagination) GetPageToken() string
- func (*Pagination) ProtoMessage()
- func (m *Pagination) Reset()
- func (m *Pagination) String() string
- type RparenToken
- type SortCriteria
- func (*SortCriteria) Descriptor() ([]byte, []int)
- func (m *SortCriteria) GetOrder() SortCriteria_Order
- func (m *SortCriteria) GetTag() string
- func (c SortCriteria) GoString() string
- func (c SortCriteria) IsAsc() bool
- func (c SortCriteria) IsDesc() bool
- func (*SortCriteria) ProtoMessage()
- func (m *SortCriteria) Reset()
- func (m *SortCriteria) String() string
- type SortCriteria_Order
- type Sorting
- type StringArrayCondition
- func (*StringArrayCondition) Descriptor() ([]byte, []int)
- func (c *StringArrayCondition) Filter(obj interface{}) (bool, error)
- func (m *StringArrayCondition) GetFieldPath() []string
- func (m *StringArrayCondition) GetIsNegative() bool
- func (m *StringArrayCondition) GetType() StringArrayCondition_Type
- func (m *StringArrayCondition) GetValues() []string
- func (*StringArrayCondition) ProtoMessage()
- func (m *StringArrayCondition) Reset()
- func (m *StringArrayCondition) String() string
- type StringArrayCondition_Type
- type StringArrayToken
- type StringCondition
- func (*StringCondition) Descriptor() ([]byte, []int)
- func (c *StringCondition) Filter(obj interface{}) (bool, error)
- func (m *StringCondition) GetFieldPath() []string
- func (m *StringCondition) GetIsNegative() bool
- func (m *StringCondition) GetType() StringCondition_Type
- func (m *StringCondition) GetValue() string
- func (*StringCondition) ProtoMessage()
- func (m *StringCondition) Reset()
- func (m *StringCondition) String() string
- type StringCondition_Type
- type StringToken
- type Token
- type TokenBase
- type TypeMismatchError
- type UnexpectedSymbolError
- type UnexpectedTokenError
- type UnsupportedOperatorError
Constants ¶
const (
// Default pagination limit
DefaultLimit = 1000
)
Variables ¶
var LogicalOperator_Type_name = map[int32]string{
0: "AND",
1: "OR",
}
var LogicalOperator_Type_value = map[string]int32{
"AND": 0,
"OR": 1,
}
var NumberArrayCondition_Type_name = map[int32]string{
0: "IN",
}
var NumberArrayCondition_Type_value = map[string]int32{
"IN": 0,
}
var NumberCondition_Type_name = map[int32]string{
0: "EQ",
1: "GT",
2: "GE",
3: "LT",
4: "LE",
}
var NumberCondition_Type_value = map[string]int32{
"EQ": 0,
"GT": 1,
"GE": 2,
"LT": 3,
"LE": 4,
}
var SortCriteria_Order_name = map[int32]string{
0: "ASC",
1: "DESC",
}
var SortCriteria_Order_value = map[string]int32{
"ASC": 0,
"DESC": 1,
}
var StringArrayCondition_Type_name = map[int32]string{
0: "IN",
}
var StringArrayCondition_Type_value = map[string]int32{
"IN": 0,
}
var StringCondition_Type_name = map[int32]string{
0: "EQ",
1: "MATCH",
2: "GT",
3: "GE",
4: "LT",
5: "LE",
6: "IEQ",
}
var StringCondition_Type_value = map[string]int32{
"EQ": 0,
"MATCH": 1,
"GT": 2,
"GE": 3,
"LT": 4,
"LE": 5,
"IEQ": 6,
}
Functions ¶
func DecodePageToken ¶ added in v0.12.0
DecodePageToken decodes page token from the user's request. Return error if provided token is malformed or contains ivalid values, otherwise return offset, limit.
func EncodePageToken ¶ added in v0.12.0
EncodePageToken encodes offset and limit to a string in application specific format (offset:limit) in base64 encoding.
Types ¶
type Field ¶
type Field struct { Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` Subs map[string]*Field `` /* 128-byte string literal not displayed */ }
Field represents a single field for an object. It contains fields name and also may contain a group of sub-fields for cases when a fields represents some structure.
func (*Field) Descriptor ¶
func (*Field) ProtoMessage ¶
func (*Field) ProtoMessage()
type FieldSelection ¶
type FieldSelection struct {
Fields map[string]*Field `` /* 132-byte string literal not displayed */
}
FieldSelection represents a group of fields for some object. Main use case for if is to store information about object fields that need to be ratained prior to sending object as a response
func ParseFieldSelection ¶
func ParseFieldSelection(input string, delimiter ...string) *FieldSelection
ParseFieldSelection transforms a string with comma-separated fields that comes from client to FieldSelection struct. For complex fields dot is used as a delimeter by default, but it is also possible to specify a different delimiter.
func (*FieldSelection) Add ¶
func (f *FieldSelection) Add(field string, delimiter ...string)
Add allows to add new fields to FieldSelection
func (*FieldSelection) AllFieldStrings ¶ added in v0.18.0
func (f *FieldSelection) AllFieldStrings() []string
AllFieldStrings returns a slice of dot-notated fields
func (*FieldSelection) Delete ¶
func (f *FieldSelection) Delete(field string, delimiter ...string) bool
Delete allows to remove fields from FieldSelection
func (*FieldSelection) Descriptor ¶
func (*FieldSelection) Descriptor() ([]byte, []int)
func (*FieldSelection) Get ¶
func (f *FieldSelection) Get(field string, delimiter ...string) *Field
Get allows to get specified field from FieldSelection
func (*FieldSelection) GetFields ¶
func (m *FieldSelection) GetFields() map[string]*Field
func (*FieldSelection) GoString ¶
func (f *FieldSelection) GoString() string
GoString converts FieldSelection to a string representation It implements fmt.GoStringer interface and returns dot-notated fields separated by commas
func (*FieldSelection) ProtoMessage ¶
func (*FieldSelection) ProtoMessage()
func (*FieldSelection) Reset ¶
func (m *FieldSelection) Reset()
func (*FieldSelection) String ¶
func (m *FieldSelection) String() string
type FieldSelectionMap ¶
FieldSelectionMap is a convenience type that represents map[string]*Field used in FieldSelection and Field structs
type FieldToken ¶
FieldToken represents a reference to a value of a resource. Value is a value of the reference.
func (FieldToken) String ¶
func (t FieldToken) String() string
type Filtering ¶
type Filtering struct { // Types that are valid to be assigned to Root: // *Filtering_Operator // *Filtering_StringCondition // *Filtering_NumberCondition // *Filtering_NullCondition // *Filtering_StringArrayCondition // *Filtering_NumberArrayCondition Root isFiltering_Root `protobuf_oneof:"root"` }
Filtering represents filtering expression. root could be either LogicalOperator or one of the supported conditions.
func ParseFiltering ¶
ParseFiltering is a shortcut to parse a filtering expression using default FilteringParser implementation
func (*Filtering) Descriptor ¶
func (*Filtering) Filter ¶
Filter evaluates underlying filtering expression against obj. If obj implements Matcher, call it's custom implementation.
func (*Filtering) GetNullCondition ¶
func (m *Filtering) GetNullCondition() *NullCondition
func (*Filtering) GetNumberArrayCondition ¶ added in v0.15.0
func (m *Filtering) GetNumberArrayCondition() *NumberArrayCondition
func (*Filtering) GetNumberCondition ¶
func (m *Filtering) GetNumberCondition() *NumberCondition
func (*Filtering) GetOperator ¶
func (m *Filtering) GetOperator() *LogicalOperator
func (*Filtering) GetStringArrayCondition ¶ added in v0.15.0
func (m *Filtering) GetStringArrayCondition() *StringArrayCondition
func (*Filtering) GetStringCondition ¶
func (m *Filtering) GetStringCondition() *StringCondition
func (*Filtering) ProtoMessage ¶
func (*Filtering) ProtoMessage()
type FilteringExpression ¶
FilteringExpression is the interface implemented by types that represent nodes in a filtering expression AST.
type FilteringLexer ¶
FilteringLexer is impemented by lexical analyzers that are used by filtering expression parsers.
func NewFilteringLexer ¶
func NewFilteringLexer(text string) FilteringLexer
NewFilteringLexer returns a default FilteringLexer implementation. text is a filtering expression to analyze.
type FilteringParser ¶
FilteringParser is implemented by parsers of a filtering expression that conforms to REST API Syntax Specification.
func NewFilteringParser ¶
func NewFilteringParser() FilteringParser
NewFilteringParser returns a default FilteringParser implementation.
type Filtering_NullCondition ¶
type Filtering_NullCondition struct {
NullCondition *NullCondition `protobuf:"bytes,4,opt,name=null_condition,json=nullCondition,oneof"`
}
func (*Filtering_NullCondition) Filter ¶
func (m *Filtering_NullCondition) Filter(obj interface{}) (bool, error)
type Filtering_NumberArrayCondition ¶ added in v0.15.0
type Filtering_NumberArrayCondition struct {
NumberArrayCondition *NumberArrayCondition `protobuf:"bytes,6,opt,name=number_array_condition,json=numberArrayCondition,oneof"`
}
func (*Filtering_NumberArrayCondition) Filter ¶ added in v0.15.0
func (m *Filtering_NumberArrayCondition) Filter(obj interface{}) (bool, error)
type Filtering_NumberCondition ¶
type Filtering_NumberCondition struct {
NumberCondition *NumberCondition `protobuf:"bytes,3,opt,name=number_condition,json=numberCondition,oneof"`
}
func (*Filtering_NumberCondition) Filter ¶
func (m *Filtering_NumberCondition) Filter(obj interface{}) (bool, error)
type Filtering_Operator ¶
type Filtering_Operator struct {
Operator *LogicalOperator `protobuf:"bytes,1,opt,name=operator,oneof"`
}
func (*Filtering_Operator) Filter ¶
func (m *Filtering_Operator) Filter(obj interface{}) (bool, error)
type Filtering_StringArrayCondition ¶ added in v0.15.0
type Filtering_StringArrayCondition struct {
StringArrayCondition *StringArrayCondition `protobuf:"bytes,5,opt,name=string_array_condition,json=stringArrayCondition,oneof"`
}
func (*Filtering_StringArrayCondition) Filter ¶ added in v0.15.0
func (m *Filtering_StringArrayCondition) Filter(obj interface{}) (bool, error)
type Filtering_StringCondition ¶
type Filtering_StringCondition struct {
StringCondition *StringCondition `protobuf:"bytes,2,opt,name=string_condition,json=stringCondition,oneof"`
}
func (*Filtering_StringCondition) Filter ¶
func (m *Filtering_StringCondition) Filter(obj interface{}) (bool, error)
type GeToken ¶
type GeToken struct {
TokenBase
}
GeToken represents greater than or equals operator.
type InToken ¶ added in v0.15.0
type InToken struct {
TokenBase
}
InToken represent in operation for string and numbers arrays
type InsensitiveEqToken ¶ added in v0.15.0
type InsensitiveEqToken struct {
TokenBase
}
func (InsensitiveEqToken) String ¶ added in v0.15.0
func (t InsensitiveEqToken) String() string
type LogicalOperator ¶
type LogicalOperator struct { // Types that are valid to be assigned to Left: // *LogicalOperator_LeftOperator // *LogicalOperator_LeftStringCondition // *LogicalOperator_LeftNumberCondition // *LogicalOperator_LeftNullCondition // *LogicalOperator_LeftStringArrayCondition // *LogicalOperator_LeftNumberArrayCondition Left isLogicalOperator_Left `protobuf_oneof:"left"` // Types that are valid to be assigned to Right: // *LogicalOperator_RightOperator // *LogicalOperator_RightStringCondition // *LogicalOperator_RightNumberCondition // *LogicalOperator_RightNullCondition // *LogicalOperator_RightStringArrayCondition // *LogicalOperator_RightNumberArrayCondition Right isLogicalOperator_Right `protobuf_oneof:"right"` Type LogicalOperator_Type `protobuf:"varint,9,opt,name=type,enum=infoblox.api.LogicalOperator_Type" json:"type,omitempty"` IsNegative bool `protobuf:"varint,10,opt,name=is_negative,json=isNegative" json:"is_negative,omitempty"` }
LogicalOperator represents binary logical operator, either AND or OR depending on type. left and right are respectively left and right operands of the operator, could be either LogicalOperator or one of the supported conditions. is_negative is set to true if the operator is negated.
func (*LogicalOperator) Descriptor ¶
func (*LogicalOperator) Descriptor() ([]byte, []int)
func (*LogicalOperator) Filter ¶
func (lop *LogicalOperator) Filter(obj interface{}) (bool, error)
Filter evaluates filtering expression against obj.
func (*LogicalOperator) GetIsNegative ¶
func (m *LogicalOperator) GetIsNegative() bool
func (*LogicalOperator) GetLeft ¶
func (m *LogicalOperator) GetLeft() isLogicalOperator_Left
func (*LogicalOperator) GetLeftNullCondition ¶
func (m *LogicalOperator) GetLeftNullCondition() *NullCondition
func (*LogicalOperator) GetLeftNumberArrayCondition ¶ added in v0.15.0
func (m *LogicalOperator) GetLeftNumberArrayCondition() *NumberArrayCondition
func (*LogicalOperator) GetLeftNumberCondition ¶
func (m *LogicalOperator) GetLeftNumberCondition() *NumberCondition
func (*LogicalOperator) GetLeftOperator ¶
func (m *LogicalOperator) GetLeftOperator() *LogicalOperator
func (*LogicalOperator) GetLeftStringArrayCondition ¶ added in v0.15.0
func (m *LogicalOperator) GetLeftStringArrayCondition() *StringArrayCondition
func (*LogicalOperator) GetLeftStringCondition ¶
func (m *LogicalOperator) GetLeftStringCondition() *StringCondition
func (*LogicalOperator) GetRight ¶
func (m *LogicalOperator) GetRight() isLogicalOperator_Right
func (*LogicalOperator) GetRightNullCondition ¶
func (m *LogicalOperator) GetRightNullCondition() *NullCondition
func (*LogicalOperator) GetRightNumberArrayCondition ¶ added in v0.15.0
func (m *LogicalOperator) GetRightNumberArrayCondition() *NumberArrayCondition
func (*LogicalOperator) GetRightNumberCondition ¶
func (m *LogicalOperator) GetRightNumberCondition() *NumberCondition
func (*LogicalOperator) GetRightOperator ¶
func (m *LogicalOperator) GetRightOperator() *LogicalOperator
func (*LogicalOperator) GetRightStringArrayCondition ¶ added in v0.15.0
func (m *LogicalOperator) GetRightStringArrayCondition() *StringArrayCondition
func (*LogicalOperator) GetRightStringCondition ¶
func (m *LogicalOperator) GetRightStringCondition() *StringCondition
func (*LogicalOperator) GetType ¶
func (m *LogicalOperator) GetType() LogicalOperator_Type
func (*LogicalOperator) ProtoMessage ¶
func (*LogicalOperator) ProtoMessage()
func (*LogicalOperator) Reset ¶
func (m *LogicalOperator) Reset()
func (*LogicalOperator) SetLeft ¶
func (m *LogicalOperator) SetLeft(l interface{}) error
SetLeft automatically wraps l into appropriate oneof structure and sets it to Root.
func (*LogicalOperator) SetRight ¶
func (m *LogicalOperator) SetRight(r interface{}) error
SetRight automatically wraps r into appropriate oneof structure and sets it to Root.
func (*LogicalOperator) String ¶
func (m *LogicalOperator) String() string
func (*LogicalOperator) XXX_OneofFuncs ¶
func (*LogicalOperator) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})
XXX_OneofFuncs is for the internal use of the proto package.
type LogicalOperator_LeftNullCondition ¶
type LogicalOperator_LeftNullCondition struct {
LeftNullCondition *NullCondition `protobuf:"bytes,4,opt,name=left_null_condition,json=leftNullCondition,oneof"`
}
func (*LogicalOperator_LeftNullCondition) Filter ¶
func (m *LogicalOperator_LeftNullCondition) Filter(obj interface{}) (bool, error)
type LogicalOperator_LeftNumberArrayCondition ¶ added in v0.15.0
type LogicalOperator_LeftNumberArrayCondition struct {
LeftNumberArrayCondition *NumberArrayCondition `protobuf:"bytes,12,opt,name=left_number_array_condition,json=leftNumberArrayCondition,oneof"`
}
func (*LogicalOperator_LeftNumberArrayCondition) Filter ¶ added in v0.15.0
func (m *LogicalOperator_LeftNumberArrayCondition) Filter(obj interface{}) (bool, error)
type LogicalOperator_LeftNumberCondition ¶
type LogicalOperator_LeftNumberCondition struct {
LeftNumberCondition *NumberCondition `protobuf:"bytes,3,opt,name=left_number_condition,json=leftNumberCondition,oneof"`
}
func (*LogicalOperator_LeftNumberCondition) Filter ¶
func (m *LogicalOperator_LeftNumberCondition) Filter(obj interface{}) (bool, error)
type LogicalOperator_LeftOperator ¶
type LogicalOperator_LeftOperator struct {
LeftOperator *LogicalOperator `protobuf:"bytes,1,opt,name=left_operator,json=leftOperator,oneof"`
}
func (*LogicalOperator_LeftOperator) Filter ¶
func (m *LogicalOperator_LeftOperator) Filter(obj interface{}) (bool, error)
type LogicalOperator_LeftStringArrayCondition ¶ added in v0.15.0
type LogicalOperator_LeftStringArrayCondition struct {
LeftStringArrayCondition *StringArrayCondition `protobuf:"bytes,11,opt,name=left_string_array_condition,json=leftStringArrayCondition,oneof"`
}
func (*LogicalOperator_LeftStringArrayCondition) Filter ¶ added in v0.15.0
func (m *LogicalOperator_LeftStringArrayCondition) Filter(obj interface{}) (bool, error)
type LogicalOperator_LeftStringCondition ¶
type LogicalOperator_LeftStringCondition struct {
LeftStringCondition *StringCondition `protobuf:"bytes,2,opt,name=left_string_condition,json=leftStringCondition,oneof"`
}
func (*LogicalOperator_LeftStringCondition) Filter ¶
func (m *LogicalOperator_LeftStringCondition) Filter(obj interface{}) (bool, error)
type LogicalOperator_RightNullCondition ¶
type LogicalOperator_RightNullCondition struct {
RightNullCondition *NullCondition `protobuf:"bytes,8,opt,name=right_null_condition,json=rightNullCondition,oneof"`
}
func (*LogicalOperator_RightNullCondition) Filter ¶
func (m *LogicalOperator_RightNullCondition) Filter(obj interface{}) (bool, error)
type LogicalOperator_RightNumberArrayCondition ¶ added in v0.15.0
type LogicalOperator_RightNumberArrayCondition struct {
RightNumberArrayCondition *NumberArrayCondition `protobuf:"bytes,14,opt,name=right_number_array_condition,json=rightNumberArrayCondition,oneof"`
}
func (*LogicalOperator_RightNumberArrayCondition) Filter ¶ added in v0.15.0
func (m *LogicalOperator_RightNumberArrayCondition) Filter(obj interface{}) (bool, error)
type LogicalOperator_RightNumberCondition ¶
type LogicalOperator_RightNumberCondition struct {
RightNumberCondition *NumberCondition `protobuf:"bytes,7,opt,name=right_number_condition,json=rightNumberCondition,oneof"`
}
func (*LogicalOperator_RightNumberCondition) Filter ¶
func (m *LogicalOperator_RightNumberCondition) Filter(obj interface{}) (bool, error)
type LogicalOperator_RightOperator ¶
type LogicalOperator_RightOperator struct {
RightOperator *LogicalOperator `protobuf:"bytes,5,opt,name=right_operator,json=rightOperator,oneof"`
}
func (*LogicalOperator_RightOperator) Filter ¶
func (m *LogicalOperator_RightOperator) Filter(obj interface{}) (bool, error)
type LogicalOperator_RightStringArrayCondition ¶ added in v0.15.0
type LogicalOperator_RightStringArrayCondition struct {
RightStringArrayCondition *StringArrayCondition `protobuf:"bytes,13,opt,name=right_string_array_condition,json=rightStringArrayCondition,oneof"`
}
func (*LogicalOperator_RightStringArrayCondition) Filter ¶ added in v0.15.0
func (m *LogicalOperator_RightStringArrayCondition) Filter(obj interface{}) (bool, error)
type LogicalOperator_RightStringCondition ¶
type LogicalOperator_RightStringCondition struct {
RightStringCondition *StringCondition `protobuf:"bytes,6,opt,name=right_string_condition,json=rightStringCondition,oneof"`
}
func (*LogicalOperator_RightStringCondition) Filter ¶
func (m *LogicalOperator_RightStringCondition) Filter(obj interface{}) (bool, error)
type LogicalOperator_Type ¶
type LogicalOperator_Type int32
const ( LogicalOperator_AND LogicalOperator_Type = 0 LogicalOperator_OR LogicalOperator_Type = 1 )
func (LogicalOperator_Type) EnumDescriptor ¶
func (LogicalOperator_Type) EnumDescriptor() ([]byte, []int)
func (LogicalOperator_Type) String ¶
func (x LogicalOperator_Type) String() string
type LparenToken ¶
type LparenToken struct {
TokenBase
}
LparenToken represents left parenthesis.
func (LparenToken) String ¶
func (t LparenToken) String() string
type MatchToken ¶
type MatchToken struct {
TokenBase
}
MatchToken represents regular expression match.
func (MatchToken) String ¶
func (t MatchToken) String() string
type NmatchToken ¶
type NmatchToken struct {
TokenBase
}
NmatchToken represents negation of regular expression match.
func (NmatchToken) String ¶
func (t NmatchToken) String() string
type NullCondition ¶
type NullCondition struct { FieldPath []string `protobuf:"bytes,1,rep,name=field_path,json=fieldPath" json:"field_path,omitempty"` IsNegative bool `protobuf:"varint,2,opt,name=is_negative,json=isNegative" json:"is_negative,omitempty"` }
NullCondition represents a condition with a null literal, e.g. field == null. field_path is a reference to a value of a resource. is_negative is set to true if the condition is negated.
func (*NullCondition) Descriptor ¶
func (*NullCondition) Descriptor() ([]byte, []int)
func (*NullCondition) Filter ¶
func (c *NullCondition) Filter(obj interface{}) (bool, error)
Filter evaluates null condition against obj. If obj is a proto message, then 'protobuf' tag is used to map FieldPath to obj's struct fields, otherwise 'json' tag is used.
func (*NullCondition) GetFieldPath ¶
func (m *NullCondition) GetFieldPath() []string
func (*NullCondition) GetIsNegative ¶
func (m *NullCondition) GetIsNegative() bool
func (*NullCondition) ProtoMessage ¶
func (*NullCondition) ProtoMessage()
func (*NullCondition) Reset ¶
func (m *NullCondition) Reset()
func (*NullCondition) String ¶
func (m *NullCondition) String() string
type NumberArrayCondition ¶ added in v0.15.0
type NumberArrayCondition struct { FieldPath []string `protobuf:"bytes,1,rep,name=field_path,json=fieldPath" json:"field_path,omitempty"` Values []float64 `protobuf:"fixed64,2,rep,packed,name=values" json:"values,omitempty"` Type NumberArrayCondition_Type `protobuf:"varint,3,opt,name=type,enum=infoblox.api.NumberArrayCondition_Type" json:"type,omitempty"` IsNegative bool `protobuf:"varint,4,opt,name=is_negative,json=isNegative" json:"is_negative,omitempty"` }
NumberArrayCondition represents a condition with string arrays, e.g. field in [1, 5, 7] field_path is a reference to a value of a resource. is_negative is set to true if the condition is negated
func (*NumberArrayCondition) Descriptor ¶ added in v0.15.0
func (*NumberArrayCondition) Descriptor() ([]byte, []int)
func (*NumberArrayCondition) Filter ¶ added in v0.15.0
func (c *NumberArrayCondition) Filter(obj interface{}) (bool, error)
func (*NumberArrayCondition) GetFieldPath ¶ added in v0.15.0
func (m *NumberArrayCondition) GetFieldPath() []string
func (*NumberArrayCondition) GetIsNegative ¶ added in v0.15.0
func (m *NumberArrayCondition) GetIsNegative() bool
func (*NumberArrayCondition) GetType ¶ added in v0.15.0
func (m *NumberArrayCondition) GetType() NumberArrayCondition_Type
func (*NumberArrayCondition) GetValues ¶ added in v0.15.0
func (m *NumberArrayCondition) GetValues() []float64
func (*NumberArrayCondition) ProtoMessage ¶ added in v0.15.0
func (*NumberArrayCondition) ProtoMessage()
func (*NumberArrayCondition) Reset ¶ added in v0.15.0
func (m *NumberArrayCondition) Reset()
func (*NumberArrayCondition) String ¶ added in v0.15.0
func (m *NumberArrayCondition) String() string
type NumberArrayCondition_Type ¶ added in v0.15.0
type NumberArrayCondition_Type int32
const (
NumberArrayCondition_IN NumberArrayCondition_Type = 0
)
func (NumberArrayCondition_Type) EnumDescriptor ¶ added in v0.15.0
func (NumberArrayCondition_Type) EnumDescriptor() ([]byte, []int)
func (NumberArrayCondition_Type) String ¶ added in v0.15.0
func (x NumberArrayCondition_Type) String() string
type NumberArrayToken ¶ added in v0.15.0
NumberArrayToken represent number array e.g. [1,2,5]
func (NumberArrayToken) String ¶ added in v0.15.0
func (t NumberArrayToken) String() string
type NumberCondition ¶
type NumberCondition struct { FieldPath []string `protobuf:"bytes,1,rep,name=field_path,json=fieldPath" json:"field_path,omitempty"` Value float64 `protobuf:"fixed64,2,opt,name=value" json:"value,omitempty"` Type NumberCondition_Type `protobuf:"varint,3,opt,name=type,enum=infoblox.api.NumberCondition_Type" json:"type,omitempty"` IsNegative bool `protobuf:"varint,4,opt,name=is_negative,json=isNegative" json:"is_negative,omitempty"` }
NumberCondition represents a condition with a number literal, e.g. field > 3. field_path is a reference to a value of a resource. value is the number literal. type is a type of the condition. is_negative is set to true if the condition is negated.
func (*NumberCondition) Descriptor ¶
func (*NumberCondition) Descriptor() ([]byte, []int)
func (*NumberCondition) Filter ¶
func (c *NumberCondition) Filter(obj interface{}) (bool, error)
Filter evaluates number condition against obj. If obj is a proto message, then 'protobuf' tag is used to map FieldPath to obj's struct fields, otherwise 'json' tag is used.
func (*NumberCondition) GetFieldPath ¶
func (m *NumberCondition) GetFieldPath() []string
func (*NumberCondition) GetIsNegative ¶
func (m *NumberCondition) GetIsNegative() bool
func (*NumberCondition) GetType ¶
func (m *NumberCondition) GetType() NumberCondition_Type
func (*NumberCondition) GetValue ¶
func (m *NumberCondition) GetValue() float64
func (*NumberCondition) ProtoMessage ¶
func (*NumberCondition) ProtoMessage()
func (*NumberCondition) Reset ¶
func (m *NumberCondition) Reset()
func (*NumberCondition) String ¶
func (m *NumberCondition) String() string
type NumberCondition_Type ¶
type NumberCondition_Type int32
const ( NumberCondition_EQ NumberCondition_Type = 0 NumberCondition_GT NumberCondition_Type = 1 NumberCondition_GE NumberCondition_Type = 2 NumberCondition_LT NumberCondition_Type = 3 NumberCondition_LE NumberCondition_Type = 4 )
func (NumberCondition_Type) EnumDescriptor ¶
func (NumberCondition_Type) EnumDescriptor() ([]byte, []int)
func (NumberCondition_Type) String ¶
func (x NumberCondition_Type) String() string
type NumberToken ¶
NumberToken represents a number literal. Value is a value of the literal.
func (NumberToken) String ¶
func (t NumberToken) String() string
type PageInfo ¶
type PageInfo struct { // The service response should contain a string to indicate // the next page of resources. // A null value indicates no more pages. PageToken string `protobuf:"bytes,1,opt,name=page_token,json=pageToken" json:"page_token,omitempty"` // The service may optionally include the total number of resources being paged. Size int32 `protobuf:"varint,2,opt,name=size" json:"size,omitempty"` // The service may optionally include the offset of the next page of resources. // A null value indicates no more pages. Offset int32 `protobuf:"varint,3,opt,name=offset" json:"offset,omitempty"` }
PageInfo represents both server-driven and client-driven pagination response. Server-driven pagination is a model in which the server returns some amount of data along with an token indicating there is more data and where subsequent queries can get the next page of data. Client-driven pagination is a model in which rows are addressable by offset and page size (limit).
func (*PageInfo) Descriptor ¶
func (*PageInfo) GetPageToken ¶
func (*PageInfo) ProtoMessage ¶
func (*PageInfo) ProtoMessage()
func (*PageInfo) SetLastOffset ¶
func (p *PageInfo) SetLastOffset()
SetLastOffset sets page info to indicate no more pages are available
func (*PageInfo) SetLastToken ¶
func (p *PageInfo) SetLastToken()
SetLastToken sets page info to indicate no more pages are available
type Pagination ¶
type Pagination struct { // The service-defined string used to identify a page of resources. // A null value indicates the first page. PageToken string `protobuf:"bytes,1,opt,name=page_token,json=pageToken" json:"page_token,omitempty"` // The integer index of the offset into a collection of resources. // If omitted or null the value is assumed to be "0". Offset int32 `protobuf:"varint,2,opt,name=offset" json:"offset,omitempty"` // The integer number of resources to be returned in the response. // The service may impose maximum value. // If omitted the service may impose a default value. Limit int32 `protobuf:"varint,3,opt,name=limit" json:"limit,omitempty"` }
Pagination represents both server-driven and client-driven pagination request. Server-driven pagination is a model in which the server returns some amount of data along with an token indicating there is more data and where subsequent queries can get the next page of data. Client-driven pagination is a model in which rows are addressable by offset and page size (limit).
func ParsePagination ¶
func ParsePagination(limit, offset, ptoken string) (*Pagination, error)
Pagination parses string representation of pagination limit, offset. Returns error if limit or offset has invalid syntax or out of range.
func (*Pagination) DefaultLimit ¶
func (p *Pagination) DefaultLimit(dl ...int32) int32
DefaultLimit returns DefaultLimit if limit was not specified otherwise returns either requested or specified one.
func (*Pagination) Descriptor ¶
func (*Pagination) Descriptor() ([]byte, []int)
func (*Pagination) FirstPage ¶
func (p *Pagination) FirstPage() bool
FirstPage returns true if requested first page
func (*Pagination) GetLimit ¶
func (m *Pagination) GetLimit() int32
func (*Pagination) GetOffset ¶
func (m *Pagination) GetOffset() int32
func (*Pagination) GetPageToken ¶
func (m *Pagination) GetPageToken() string
func (*Pagination) ProtoMessage ¶
func (*Pagination) ProtoMessage()
func (*Pagination) Reset ¶
func (m *Pagination) Reset()
func (*Pagination) String ¶
func (m *Pagination) String() string
type RparenToken ¶
type RparenToken struct {
TokenBase
}
RparenToken represents right parenthesis.
func (RparenToken) String ¶
func (t RparenToken) String() string
type SortCriteria ¶
type SortCriteria struct { // Tag is a JSON tag. Tag string `protobuf:"bytes,1,opt,name=tag" json:"tag,omitempty"` Order SortCriteria_Order `protobuf:"varint,2,opt,name=order,enum=infoblox.api.SortCriteria_Order" json:"order,omitempty"` }
SortCriteria represents sort criteria
func (*SortCriteria) Descriptor ¶
func (*SortCriteria) Descriptor() ([]byte, []int)
func (*SortCriteria) GetOrder ¶
func (m *SortCriteria) GetOrder() SortCriteria_Order
func (*SortCriteria) GetTag ¶
func (m *SortCriteria) GetTag() string
func (SortCriteria) GoString ¶
func (c SortCriteria) GoString() string
GoString implements fmt.GoStringer interface return string representation of a sort criteria in next form: "<tag_name> (ASC|DESC)".
func (SortCriteria) IsAsc ¶
func (c SortCriteria) IsAsc() bool
IsAsc returns true if sort criteria has ascending sort order, otherwise false.
func (SortCriteria) IsDesc ¶
func (c SortCriteria) IsDesc() bool
IsDesc returns true if sort criteria has descending sort order, otherwise false.
func (*SortCriteria) ProtoMessage ¶
func (*SortCriteria) ProtoMessage()
func (*SortCriteria) Reset ¶
func (m *SortCriteria) Reset()
func (*SortCriteria) String ¶
func (m *SortCriteria) String() string
type SortCriteria_Order ¶
type SortCriteria_Order int32
Order is a sort order.
const ( // ascending sort order SortCriteria_ASC SortCriteria_Order = 0 // descending sort order SortCriteria_DESC SortCriteria_Order = 1 )
func (SortCriteria_Order) EnumDescriptor ¶
func (SortCriteria_Order) EnumDescriptor() ([]byte, []int)
func (SortCriteria_Order) String ¶
func (x SortCriteria_Order) String() string
type Sorting ¶
type Sorting struct {
Criterias []*SortCriteria `protobuf:"bytes,1,rep,name=criterias" json:"criterias,omitempty"`
}
Sorting represents list of sort criterias.
func ParseSorting ¶
ParseSorting parses raw string that represent sort criteria into a Sorting data structure. Provided string is supposed to be in accordance with the sorting collection operator from REST API Syntax. See: https://github.com/infobloxopen/atlas-app-toolkit#sorting
func (*Sorting) Descriptor ¶
func (*Sorting) GetCriterias ¶
func (m *Sorting) GetCriterias() []*SortCriteria
func (Sorting) GoString ¶
GoString implements fmt.GoStringer interface Returns string representation of sorting in next form: "<name> (ASC|DESC) [, <tag_name> (ASC|DESC)]"
func (*Sorting) ProtoMessage ¶
func (*Sorting) ProtoMessage()
type StringArrayCondition ¶ added in v0.15.0
type StringArrayCondition struct { FieldPath []string `protobuf:"bytes,1,rep,name=field_path,json=fieldPath" json:"field_path,omitempty"` Values []string `protobuf:"bytes,2,rep,name=values" json:"values,omitempty"` Type StringArrayCondition_Type `protobuf:"varint,3,opt,name=type,enum=infoblox.api.StringArrayCondition_Type" json:"type,omitempty"` IsNegative bool `protobuf:"varint,4,opt,name=is_negative,json=isNegative" json:"is_negative,omitempty"` }
StringArrayCondition represents a condition with string arrays, e.g. field in ['hello','world'] field_path is a reference to a value of a resource. is_negative is set to true if the condition is negated
func (*StringArrayCondition) Descriptor ¶ added in v0.15.0
func (*StringArrayCondition) Descriptor() ([]byte, []int)
func (*StringArrayCondition) Filter ¶ added in v0.15.0
func (c *StringArrayCondition) Filter(obj interface{}) (bool, error)
func (*StringArrayCondition) GetFieldPath ¶ added in v0.15.0
func (m *StringArrayCondition) GetFieldPath() []string
func (*StringArrayCondition) GetIsNegative ¶ added in v0.15.0
func (m *StringArrayCondition) GetIsNegative() bool
func (*StringArrayCondition) GetType ¶ added in v0.15.0
func (m *StringArrayCondition) GetType() StringArrayCondition_Type
func (*StringArrayCondition) GetValues ¶ added in v0.15.0
func (m *StringArrayCondition) GetValues() []string
func (*StringArrayCondition) ProtoMessage ¶ added in v0.15.0
func (*StringArrayCondition) ProtoMessage()
func (*StringArrayCondition) Reset ¶ added in v0.15.0
func (m *StringArrayCondition) Reset()
func (*StringArrayCondition) String ¶ added in v0.15.0
func (m *StringArrayCondition) String() string
type StringArrayCondition_Type ¶ added in v0.15.0
type StringArrayCondition_Type int32
const (
StringArrayCondition_IN StringArrayCondition_Type = 0
)
func (StringArrayCondition_Type) EnumDescriptor ¶ added in v0.15.0
func (StringArrayCondition_Type) EnumDescriptor() ([]byte, []int)
func (StringArrayCondition_Type) String ¶ added in v0.15.0
func (x StringArrayCondition_Type) String() string
type StringArrayToken ¶ added in v0.15.0
NumberArrayToken represent number array e.g. [1,2,5]
func (StringArrayToken) String ¶ added in v0.15.0
func (t StringArrayToken) String() string
type StringCondition ¶
type StringCondition struct { FieldPath []string `protobuf:"bytes,1,rep,name=field_path,json=fieldPath" json:"field_path,omitempty"` Value string `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` Type StringCondition_Type `protobuf:"varint,3,opt,name=type,enum=infoblox.api.StringCondition_Type" json:"type,omitempty"` IsNegative bool `protobuf:"varint,4,opt,name=is_negative,json=isNegative" json:"is_negative,omitempty"` }
StringCondition represents a condition with a string literal, e.g. field == 'string'. field_path is a reference to a value of a resource. value is the string literal. type is a type of the condition. is_negative is set to true if the condition is negated.
func (*StringCondition) Descriptor ¶
func (*StringCondition) Descriptor() ([]byte, []int)
func (*StringCondition) Filter ¶
func (c *StringCondition) Filter(obj interface{}) (bool, error)
Filter evaluates string condition against obj. If obj is a proto message, then 'protobuf' tag is used to map FieldPath to obj's struct fields, otherwise 'json' tag is used.
func (*StringCondition) GetFieldPath ¶
func (m *StringCondition) GetFieldPath() []string
func (*StringCondition) GetIsNegative ¶
func (m *StringCondition) GetIsNegative() bool
func (*StringCondition) GetType ¶
func (m *StringCondition) GetType() StringCondition_Type
func (*StringCondition) GetValue ¶
func (m *StringCondition) GetValue() string
func (*StringCondition) ProtoMessage ¶
func (*StringCondition) ProtoMessage()
func (*StringCondition) Reset ¶
func (m *StringCondition) Reset()
func (*StringCondition) String ¶
func (m *StringCondition) String() string
type StringCondition_Type ¶
type StringCondition_Type int32
const ( StringCondition_EQ StringCondition_Type = 0 StringCondition_MATCH StringCondition_Type = 1 StringCondition_GT StringCondition_Type = 2 StringCondition_GE StringCondition_Type = 3 StringCondition_LT StringCondition_Type = 4 StringCondition_LE StringCondition_Type = 5 StringCondition_IEQ StringCondition_Type = 6 )
func (StringCondition_Type) EnumDescriptor ¶
func (StringCondition_Type) EnumDescriptor() ([]byte, []int)
func (StringCondition_Type) String ¶
func (x StringCondition_Type) String() string
type StringToken ¶
StringToken represents a string literal. Value is a value of the literal.
func (StringToken) String ¶
func (t StringToken) String() string
type Token ¶
type Token interface {
Token()
}
Token is impelemented by all supported tokens in a filtering expression.
type TokenBase ¶
type TokenBase struct{}
TokenBase is used as a base type for all types which are tokens.
type TypeMismatchError ¶
TypeMismatchError representes a type that is required for a value under FieldPath.
func (*TypeMismatchError) Error ¶
func (e *TypeMismatchError) Error() string
type UnexpectedSymbolError ¶
UnexpectedSymbolError describes symbol S in position Pos that was not appropriate according to REST API Syntax Specification.
func (*UnexpectedSymbolError) Error ¶
func (e *UnexpectedSymbolError) Error() string
type UnexpectedTokenError ¶
type UnexpectedTokenError struct {
T Token
}
UnexpectedTokenError describes a token that was not appropriate according to REST API Syntax Specification.
func (*UnexpectedTokenError) Error ¶
func (e *UnexpectedTokenError) Error() string
type UnsupportedOperatorError ¶
UnsupportedOperatorError represents an operator that is not supported by a particular field type.
func (*UnsupportedOperatorError) Error ¶
func (e *UnsupportedOperatorError) Error() string