internal

package
v3.1.0-M1+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2018 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package internal should be considered as an internal subpackage of labelsutil. It should not be used directly.

This package contains a set of functions and types that are public for use by reflexion.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ComparableOperator

type ComparableOperator struct {
	Type  string  `parser:"@CompOperators"`
	Value float64 `parser:"@Number"`
	Unit  *string `parser:"[@(Ident|String|Number)]"`
}

ComparableOperator is public for use by reflexion but it should be considered as this whole package as internal and not used directly

type EqOperator

type EqOperator struct {
	Type   string   `parser:"@EqOperators"`
	Values []string `parser:"@(Ident|String|Number) {@(Ident|String|Number)}"`
}

EqOperator is public for use by reflexion but it should be considered as this whole package as internal and not used directly

type Filter

type Filter struct {
	LabelName          string              `parser:"@(Ident|String)"`
	EqOperator         *EqOperator         `parser:"[ @@ "`
	SetOperator        *SetOperator        `parser:"| @@ "`
	ComparableOperator *ComparableOperator `parser:"| @@ ]"`
}

Filter is public for use by reflexion but it should be considered as this whole package as internal and not used directly

func FilterFromString

func FilterFromString(input string) (*Filter, error)

FilterFromString generates a Filter from a given input string

func (*Filter) Matches

func (f *Filter) Matches(labels map[string]string) (bool, error)

Matches implementation of labelsutil.Filter.Matches()

type SetOperator

type SetOperator struct {
	Type   string   `parser:"@Keyword '(' "`
	Values []string `parser:"@(Ident|String|Number) {','  @(Ident|String|Number)}')'"`
}

SetOperator is public for use by reflexion but it should be considered as this whole package as internal and not used directly

Jump to

Keyboard shortcuts

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