Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dynamic ¶
type Dynamic struct {
// contains filtered or unexported fields
}
Dynamic is an angulardetector.DetectorsProvider that calls GCOM to get Angular detection patterns, converts them to detectors and caches them for all future calls. It also provides a background service that will periodically refresh the patterns from GCOM.
func ProvideDynamic ¶
func (*Dynamic) ProvideDetectors ¶
func (d *Dynamic) ProvideDetectors(_ context.Context) []angulardetector.AngularDetector
ProvideDetectors returns the cached detectors. It returns an empty slice if there's no value.
type GCOMPattern ¶
type GCOMPattern struct { Name string Pattern string Type GCOMPatternType }
GCOMPattern is an Angular detection pattern returned by the GCOM API.
type GCOMPatternType ¶
type GCOMPatternType string
GCOMPatternType is a pattern type returned by the GCOM API.
const ( GCOMPatternTypeContains GCOMPatternType = "contains" GCOMPatternTypeRegex GCOMPatternType = "regex" )
type GCOMResponse ¶
type GCOMResponse struct { Patterns GCOMPatterns ETag string }
Click to show internal directories.
Click to hide internal directories.