Documentation ¶
Index ¶
- Variables
- type ConcatCollection
- type ConcatKeyed
- type Map
- func (c *Map) Add(key string, value string)
- func (c *Map) FindAll() []types.MatchData
- func (c *Map) FindRegex(key *regexp.Regexp) []types.MatchData
- func (c *Map) FindString(key string) []types.MatchData
- func (c *Map) Format(res *strings.Builder)
- func (c *Map) Get(key string) []string
- func (c *Map) Len() int
- func (c *Map) Name() string
- func (c *Map) Remove(key string)
- func (c *Map) Reset()
- func (c *Map) Set(key string, values []string)
- func (c *Map) SetIndex(key string, index int, value string)
- func (c *Map) String() string
- type NamedCollection
- func (c *NamedCollection) Add(key string, value string)
- func (c *NamedCollection) Data() map[string][]string
- func (c *NamedCollection) Format(res *strings.Builder)
- func (c *NamedCollection) Len() int
- func (c *NamedCollection) Name() string
- func (c *NamedCollection) Names(rv variables.RuleVariable) collection.Collection
- func (c *NamedCollection) Remove(key string)
- func (c *NamedCollection) Reset()
- func (c *NamedCollection) Set(key string, values []string)
- func (c *NamedCollection) SetIndex(key string, index int, value string)
- func (c *NamedCollection) String() string
- type NamedCollectionNames
- func (c *NamedCollectionNames) FindAll() []types.MatchData
- func (c *NamedCollectionNames) FindRegex(key *regexp.Regexp) []types.MatchData
- func (c *NamedCollectionNames) FindString(key string) []types.MatchData
- func (c *NamedCollectionNames) Name() string
- func (c *NamedCollectionNames) String() string
- type Single
- type SizeCollection
- func (c *SizeCollection) FindAll() []types.MatchData
- func (c *SizeCollection) FindRegex(*regexp.Regexp) []types.MatchData
- func (c *SizeCollection) FindString(string) []types.MatchData
- func (c *SizeCollection) Format(res *strings.Builder)
- func (c *SizeCollection) Name() string
- func (c *SizeCollection) String() string
Constants ¶
This section is empty.
Variables ¶
var Noop collection.Collection = &noop{}
Functions ¶
This section is empty.
Types ¶
type ConcatCollection ¶
type ConcatCollection struct {
// contains filtered or unexported fields
}
ConcatCollection is a collection view over multiple collections.
func NewConcatCollection ¶
func NewConcatCollection(variable variables.RuleVariable, data ...collection.Collection) *ConcatCollection
func (*ConcatCollection) FindAll ¶
func (c *ConcatCollection) FindAll() []types.MatchData
FindAll returns all matches for all collections
func (*ConcatCollection) Name ¶
func (c *ConcatCollection) Name() string
Name returns the name for the current CollectionconcatCollection
type ConcatKeyed ¶
type ConcatKeyed struct {
// contains filtered or unexported fields
}
ConcatKeyed is a collection view over multiple keyed collections.
func NewConcatKeyed ¶
func NewConcatKeyed(variable variables.RuleVariable, data ...collection.Keyed) *ConcatKeyed
func (*ConcatKeyed) FindAll ¶
func (c *ConcatKeyed) FindAll() []types.MatchData
FindAll returns all matches for all collections
func (*ConcatKeyed) FindRegex ¶
func (c *ConcatKeyed) FindRegex(key *regexp.Regexp) []types.MatchData
FindRegex returns a slice of MatchData for the regex
func (*ConcatKeyed) FindString ¶
func (c *ConcatKeyed) FindString(key string) []types.MatchData
FindString returns a slice of MatchData for the string
func (*ConcatKeyed) Get ¶
func (c *ConcatKeyed) Get(key string) []string
func (*ConcatKeyed) Name ¶
func (c *ConcatKeyed) Name() string
Name returns the name for the current CollectionconcatCollection
type Map ¶
type Map struct {
// contains filtered or unexported fields
}
Map is a default collection.Map.
func NewMap ¶
func NewMap(variable variables.RuleVariable) *Map
type NamedCollection ¶
type NamedCollection struct {
*Map
}
NamedCollection is a Collection that also keeps track of names.
func NewNamedCollection ¶
func NewNamedCollection(rv variables.RuleVariable) *NamedCollection
func (*NamedCollection) Add ¶
func (c *NamedCollection) Add(key string, value string)
Add a value to some key
func (*NamedCollection) Data ¶
func (c *NamedCollection) Data() map[string][]string
Data is an internal method used for serializing to JSON
func (*NamedCollection) Format ¶
func (c *NamedCollection) Format(res *strings.Builder)
func (*NamedCollection) Len ¶
func (c *NamedCollection) Len() int
func (*NamedCollection) Name ¶
func (c *NamedCollection) Name() string
Name returns the name for the current CollectionMap
func (*NamedCollection) Names ¶
func (c *NamedCollection) Names(rv variables.RuleVariable) collection.Collection
func (*NamedCollection) Remove ¶
func (c *NamedCollection) Remove(key string)
Remove deletes the key from the CollectionMap
func (*NamedCollection) Reset ¶
func (c *NamedCollection) Reset()
func (*NamedCollection) Set ¶
func (c *NamedCollection) Set(key string, values []string)
Set will replace the key's value with this slice
func (*NamedCollection) SetIndex ¶
func (c *NamedCollection) SetIndex(key string, index int, value string)
SetIndex will place the value under the index If the index is higher than the current size of the CollectionMap it will be appended
func (*NamedCollection) String ¶
func (c *NamedCollection) String() string
type NamedCollectionNames ¶
type NamedCollectionNames struct {
// contains filtered or unexported fields
}
func (*NamedCollectionNames) FindAll ¶
func (c *NamedCollectionNames) FindAll() []types.MatchData
func (*NamedCollectionNames) FindRegex ¶
func (c *NamedCollectionNames) FindRegex(key *regexp.Regexp) []types.MatchData
func (*NamedCollectionNames) FindString ¶
func (c *NamedCollectionNames) FindString(key string) []types.MatchData
func (*NamedCollectionNames) Name ¶
func (c *NamedCollectionNames) Name() string
func (*NamedCollectionNames) String ¶
func (c *NamedCollectionNames) String() string
type Single ¶
type Single struct {
// contains filtered or unexported fields
}
func NewSingle ¶
func NewSingle(variable variables.RuleVariable) *Single
NewSingle creates a new Single.
type SizeCollection ¶
type SizeCollection struct {
// contains filtered or unexported fields
}
func NewSizeCollection ¶
func NewSizeCollection(variable variables.RuleVariable, data ...*NamedCollection) *SizeCollection
NewSizeCollection returns a collection that only returns the total sum of all the collections values
func (*SizeCollection) FindAll ¶
func (c *SizeCollection) FindAll() []types.MatchData
FindAll returns a slice of MatchData of all matches
func (*SizeCollection) FindRegex ¶
func (c *SizeCollection) FindRegex(*regexp.Regexp) []types.MatchData
FindRegex returns a slice of MatchData for the regex
func (*SizeCollection) FindString ¶
func (c *SizeCollection) FindString(string) []types.MatchData
FindString returns a slice of MatchData for the string
func (*SizeCollection) Format ¶
func (c *SizeCollection) Format(res *strings.Builder)
func (*SizeCollection) Name ¶
func (c *SizeCollection) Name() string
Name returns the name for the current CollectionSizeProxy
func (*SizeCollection) String ¶
func (c *SizeCollection) String() string