Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeSegments ¶
Types ¶
type SegmentConfig ¶
type SegmentConfig struct {
Excludes []SegmentMatcherFields
Includes []SegmentMatcherFields
}
type SegmentFilter ¶
type SegmentFilter interface {
// ShouldExcludeCoarse returns whether the given fields should be excluded on a coarse level.
ShouldExcludeCoarse(SegmentQuery) bool
// ShouldExcludeFine returns whether the given fields should be excluded on a fine level.
ShouldExcludeFine(SegmentQuery) bool
}
type SegmentMatcherFields ¶
type SegmentMatcherFields struct {
Kind []string
Path []string
Output []string
Lang string // Deprecated: use Sites.Matrix instead.
Sites sitesmatrix.Sites // Note that we only use Sites.Matrix for now.
}
SegmentMatcherFields holds string slices of ordered filters for segment matching. The Glob patterns can be negated by prefixing with "! ". The first match wins (either include or exclude).
type SegmentQuery ¶ added in v0.153.0
type SegmentQuery struct {
Kind string
Path string
Output string
Site sitesmatrix.Vector
}
type Segments ¶
type Segments struct {
// SegmentFilter is the compiled filter for all segments to render.
SegmentFilter SegmentFilter
// contains filtered or unexported fields
}
Segments is a collection of named segments.
func (*Segments) InitConfig ¶ added in v0.153.0
func (b *Segments) InitConfig(logger loggers.Logger, _ sitesmatrix.VectorStore, configuredDimensions *sitesmatrix.ConfiguredDimensions) error
Click to show internal directories.
Click to hide internal directories.