Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CollectAreas ¶
func CollectAreas(infra *infrastructure.Infrastructure, areasMap map[string]*infrastructure.Area, query string) ([]*infrastructure.Area, error)
Types ¶
type Filter ¶
type Filter struct { Tag *TagFilter `parser:" @@"` Level *LevelFilter `parser:"| @@"` }
type LevelFilter ¶
type LevelFilter struct { Comp string `parser:"'level' @( ('<' '>') | ('<' '=') | ('>' '=') | '=' | '<' | '>' | ('!' '=') )"` Numb string `parser:"@Number"` }
func (*LevelFilter) String ¶
func (l *LevelFilter) String() string
type NodesInArea ¶
type NodesInArea struct { AreaId string `parser:"(@Ident | @('*'))"` Filters []*Filter `parser:"('(' @@ (',' @@)* ')')?"` }
NodesInArea is a single area.
func (*NodesInArea) String ¶
func (n *NodesInArea) String() string
type Query ¶
type Query struct {
Set *Set `parser:"@@"`
}
Query is the top-level query structure.
func ParseQuery ¶
type Set ¶
type Set struct { AreaId *string `parser:" '#'@Ident"` NodesInArea *NodesInArea `parser:"| @@"` Sets *Sets `parser:"| '{' @@ '}'"` }
Set is a set of areas.
type SetWithSign ¶
func (*SetWithSign) String ¶
func (s *SetWithSign) String() string
type Sets ¶
type Sets struct { InitialSet *Set `parser:"@@"` NextSets []*SetWithSign `parser:"@@*"` }
Click to show internal directories.
Click to hide internal directories.