Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseVerifierEndpoints ¶ added in v3.34.0
func ParseVerifierEndpoints(verifierURLs map[string]string) (map[DetectorID][]string, error)
ParseVerifierEndpoints parses a map of user supplied verifier URLs. The input keys are detector IDs and the values are a comma separated list of URLs. The URLs are validated as HTTPS endpoints.
Types ¶
type Config ¶
Config holds user supplied configuration.
type DetectorID ¶ added in v3.28.7
type DetectorID struct { ID dpb.DetectorType Version int }
DetectorID identifies a detector type and version. This struct is used as a way for users to identify detectors, whether unique or not. A DetectorID with Version = 0 indicates all possible versions of a detector.
func GetDetectorID ¶ added in v3.32.0
func GetDetectorID(d detectors.Detector) DetectorID
GetDetectorID extracts the DetectorID from a Detector.
func ParseDetector ¶ added in v3.34.0
func ParseDetector(input string) (DetectorID, error)
ParseDetector parses a user supplied string into a single DetectorID. Input is case-insensitive and either the detector name or ID may be used.
func ParseDetectors ¶ added in v3.28.3
func ParseDetectors(input string) ([]DetectorID, error)
ParseDetectors parses user supplied string into a list of detectors types. "all" will return the list of all available detectors. The input is comma separated and may use the case-insensitive detector name defined in the protobuf, or the protobuf enum number. A range may be used as well in the form "start-end". Order is preserved and duplicates are ignored.
func (DetectorID) String ¶ added in v3.28.7
func (id DetectorID) String() string