Documentation
¶
Index ¶
- Variables
- func Normalize(input string) (string, error)
- type ComparisonExpression
- type EntityOrigin
- type EntityOrigins
- type EntitySpec
- type ExpressionRenderer
- type FilterExpression
- type LogicalAndExpression
- type LogicalOrExpression
- type MatchExpressionMapper
- type Operator
- type Parser
- type PrimaryExpression
- type UnaryOperationExpression
Constants ¶
This section is empty.
Variables ¶
var ( //EntityOriginSource constant value for the source EntityOrigin EntityOriginSource = newEntityOrigin("src", restapi.MatcherExpressionEntitySource) //EntityOriginDestination constant value for the destination EntityOrigin EntityOriginDestination = newEntityOrigin("dest", restapi.MatcherExpressionEntityDestination) //EntityOriginNotApplicable constant value for the not applicable EntityOrigin EntityOriginNotApplicable = newEntityOrigin("na", restapi.MatcherExpressionEntityNotApplicable) )
var SupportedEntityOrigins = EntityOrigins{EntityOriginSource, EntityOriginDestination, EntityOriginNotApplicable}
SupportedEntityOrigins slice of supported EntityOrigins
Functions ¶
Types ¶
type ComparisonExpression ¶ added in v1.1.0
type ComparisonExpression struct { Entity *EntitySpec `parser:"@Ident (@EntityOriginOperator @EntityOrigin)? "` Operator Operator `` /* 237-byte string literal not displayed */ Value string `parser:"@String"` }
ComparisonExpression representation of a comparison expression.
func (*ComparisonExpression) Render ¶ added in v1.1.0
func (e *ComparisonExpression) Render() string
Render implementation of ExpressionRenderer.Render
type EntityOrigin ¶ added in v0.10.0
type EntityOrigin interface { //Key returns the key of the entity origin Key() string //MatcherExpressionEntity returns the Instana API Matcher Expression Entity MatcherExpressionEntity() restapi.MatcherExpressionEntity }
EntityOrigin custom type for the origin (source or destination) of a entity spec
type EntityOrigins ¶ added in v0.10.0
type EntityOrigins []EntityOrigin
EntityOrigins custom type for a slice of entity origins
func (EntityOrigins) ForInstanaAPIEntity ¶ added in v0.10.0
func (origins EntityOrigins) ForInstanaAPIEntity(input restapi.MatcherExpressionEntity) EntityOrigin
ForInstanaAPIEntity returns the EntityOrigin for its cooresponding MatchExpressionEntity from the Instana API
func (EntityOrigins) ForKey ¶ added in v0.10.0
func (origins EntityOrigins) ForKey(input string) EntityOrigin
ForKey returns the EntityOrigin for its string representation
type EntitySpec ¶ added in v0.10.0
type EntitySpec struct { Identifier string Origin EntityOrigin OriginDefined bool }
EntitySpec custom type for any kind of entity path specification
func (*EntitySpec) Capture ¶ added in v0.10.0
func (o *EntitySpec) Capture(values []string) error
Capture captures the string representation of an entity path from the given string. Interface of participle
func (*EntitySpec) Render ¶ added in v0.10.0
func (o *EntitySpec) Render() string
Render implementation of the ExpressionRenderer interface of EntitySpec
type ExpressionRenderer ¶
type ExpressionRenderer interface {
Render() string
}
ExpressionRenderer interface definition for all types of the Filter expression to render the corresponding value
type FilterExpression ¶
type FilterExpression struct {
Expression *LogicalOrExpression `parser:"@@"`
}
FilterExpression representation of a dynamic focus filter expression
func (*FilterExpression) Render ¶
func (e *FilterExpression) Render() string
Render implementation of ExpressionRenderer.Render
type LogicalAndExpression ¶
type LogicalAndExpression struct { Left *PrimaryExpression `parser:" @@"` Operator *Operator `parser:"( @\"AND\""` Right *LogicalAndExpression `parser:" @@ )?"` }
LogicalAndExpression representation of a logical AND or as a wrapper for a PrimaryExpression only. The wrapping is required to handle precedence.
func (*LogicalAndExpression) Render ¶
func (e *LogicalAndExpression) Render() string
Render implementation of ExpressionRenderer.Render
type LogicalOrExpression ¶
type LogicalOrExpression struct { Left *LogicalAndExpression `parser:" @@"` Operator *Operator `parser:"( @\"OR\""` Right *LogicalOrExpression `parser:" @@ )?"` }
LogicalOrExpression representation of a logical OR or as a wrapper for a, LogicalAndExpression or a PrimaryExpression. The wrapping is required to handle precedence.
func (*LogicalOrExpression) Render ¶
func (e *LogicalOrExpression) Render() string
Render implementation of ExpressionRenderer.Render
type MatchExpressionMapper ¶ added in v1.1.0
type MatchExpressionMapper interface { FromAPIModel(input restapi.MatchExpression) (*FilterExpression, error) ToAPIModel(input *FilterExpression) restapi.MatchExpression }
MatchExpressionMapper interface of the match expression mapper
func NewMatchExpressionMapper ¶ added in v1.1.0
func NewMatchExpressionMapper() MatchExpressionMapper
NewMatchExpressionMapper creates a new instance of the MatchExpressionMapper
type Parser ¶
type Parser interface {
Parse(expression string) (*FilterExpression, error)
}
Parser interface for working with Dynamic Focus filters of instana
type PrimaryExpression ¶
type PrimaryExpression struct { Comparison *ComparisonExpression `parser:" @@"` UnaryOperation *UnaryOperationExpression `parser:"| @@"` }
PrimaryExpression wrapper for either a comparison or a unary expression
func (*PrimaryExpression) Render ¶
func (e *PrimaryExpression) Render() string
Render implementation of ExpressionRenderer.Render
type UnaryOperationExpression ¶
type UnaryOperationExpression struct { Entity *EntitySpec `parser:"@Ident (@EntityOriginOperator @EntityOrigin)? "` Operator Operator `parser:"@( \"IS_EMPTY\" | \"IS_BLANK\" | \"NOT_EMPTY\" | \"NOT_BLANK\" )"` }
UnaryOperationExpression representation of a unary expression representing a unary operator
func (*UnaryOperationExpression) Render ¶
func (e *UnaryOperationExpression) Render() string
Render implementation of ExpressionRenderer.Render