2024-09-22 11:22:38 +02:00

54 lines
1.1 KiB
Go

package matchparser
import (
"config-lsp/common"
commonparser "config-lsp/common/parser"
)
type Match struct {
Entries []*MatchEntry
}
type MatchCriteriaType string
const (
MatchCriteriaTypeUser MatchCriteriaType = "User"
MatchCriteriaTypeGroup MatchCriteriaType = "Group"
MatchCriteriaTypeHost MatchCriteriaType = "Host"
MatchCriteriaTypeLocalAddress MatchCriteriaType = "LocalAddress"
MatchCriteriaTypeLocalPort MatchCriteriaType = "LocalPort"
MatchCriteriaTypeRDomain MatchCriteriaType = "RDomain"
MatchCriteriaTypeAddress MatchCriteriaType = "Address"
)
type MatchCriteria struct {
common.LocationRange
Type MatchCriteriaType
Value commonparser.ParsedString
}
type MatchSeparator struct {
common.LocationRange
}
type MatchValues struct {
common.LocationRange
Values []*MatchValue
}
type MatchEntry struct {
common.LocationRange
Value commonparser.ParsedString
Criteria MatchCriteria
Separator *MatchSeparator
Values *MatchValues
}
type MatchValue struct {
common.LocationRange
Value commonparser.ParsedString
}