Versions in this module Expand all Collapse all v1 v1.7.1 Jan 30, 2025 v1.7.0 Dec 8, 2023 Changes in this version + const ReservedTagKeyName + var ErrAppNameIsRequired = errors.New("application name is required") + var ErrInvalidAppName = errors.New("invalid application name") + var ErrInvalidMatchersSyntax = errors.New("invalid tag matchers syntax") + var ErrInvalidQuerySyntax = errors.New("invalid query syntax") + var ErrInvalidTagKey = errors.New("invalid tag key") + var ErrInvalidTagValueSyntax = errors.New("invalid tag value syntax") + var ErrMatchOperatorIsRequired = errors.New("match operator is required") + var ErrTagKeyIsRequired = errors.New("tag key is required") + var ErrTagKeyReserved = errors.New("tag key is reserved") + var ErrUnknownOp = errors.New("unknown tag match operator") + func FromTreeToDictKey(k string) string + func IsAppNameRuneAllowed(r rune) bool + func IsTagKeyReserved(k string) bool + func IsTagKeyRuneAllowed(r rune) bool + func ParseTreeKey(k string) (time.Time, int, error) + func TreeKey(k string, depth int, unixTime int64) string + func ValidateAppName(n string) error + func ValidateTagKey(k string) error + type ByPriority []*TagMatcher + func (p ByPriority) Len() int + func (p ByPriority) Less(i, j int) bool + func (p ByPriority) Swap(i, j int) + type Error struct + Expr string + Inner error + func (e *Error) Error() string + func (e *Error) Unwrap() error + type Key struct + func NewKey(labels map[string]string) *Key + func ParseKey(name string) (*Key, error) + func (k *Key) Add(key, value string) + func (k *Key) AppName() string + func (k *Key) Clone() *Key + func (k *Key) DictKey() string + func (k *Key) Labels() map[string]string + func (k *Key) Match(q *Query) bool + func (k *Key) Normalized() string + func (k *Key) SegmentKey() string + func (k *Key) TreeKey(depth int, t time.Time) string + type Op int + const OpEqual + const OpEqualRegex + const OpNotEqual + const OpNotEqualRegex + func (o Op) IsNegation() bool + type ParserState int + type Query struct + AppName string + Matchers []*TagMatcher + func ParseQuery(s string) (*Query, error) + func (q *Query) String() string + type TagMatcher struct + Key string + R *regexp.Regexp + Value string + func ParseMatcher(s string) (*TagMatcher, error) + func ParseMatchers(s string) ([]*TagMatcher, error) + func (m *TagMatcher) Match(v string) bool