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. If the feature flag FlagPluginsDynamicAngularDetectionPatterns is disabled, the background service is disabled.
func ProvideDynamic ¶
func ProvideDynamic(cfg *config.Cfg, store angularpatternsstore.Service, features featuremgmt.FeatureToggles) (*Dynamic, error)
func (*Dynamic) IsDisabled ¶
IsDisabled returns true if FlagPluginsDynamicAngularDetectionPatterns is not enabled.
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" )