Documentation ¶ Index ¶ Variables func Register(name string, creator Creator, cidrs []*net.IPNet) func Validate(ctx context.Context, domain string, token string) (cdnName string, err error) type CDNValidator type Creator func CreatorByIP(ip net.IP) (string, Creator) Constants ¶ This section is empty. Variables ¶ View Source var ( ErrNotFound = fmt.Errorf("this IP is not in our known CDN list") ErrCanStealIP = fmt.Errorf("this domain's setting can steal your IP information") ErrFailedValidate = fmt.Errorf("failed to validate") ) Functions ¶ func Register ¶ func Register(name string, creator Creator, cidrs []*net.IPNet) func Validate ¶ func Validate(ctx context.Context, domain string, token string) (cdnName string, err error) Types ¶ type CDNValidator ¶ type CDNValidator interface { Validate(ctx context.Context, domain string) (bool, error) } type Creator ¶ type Creator func(token string) (CDNValidator, error) func CreatorByIP ¶ func CreatorByIP(ip net.IP) (string, Creator) Source Files ¶ View all Source files cdn_validator.go Directories ¶ Show internal Expand all Path Synopsis cloudflare Click to show internal directories. Click to hide internal directories.