package url
import "github.com/influxdata/flux/dependencies/url"
Index ¶
- type ErrorValidator
- type PassValidator
- type PrivateIPValidator
- func (v PrivateIPValidator) Validate(u *url.URL) error
- func (PrivateIPValidator) ValidateIP(ip net.IP) error
- type Validator
Types ¶
type ErrorValidator ¶
type ErrorValidator struct{}
func (ErrorValidator) Validate ¶
func (ErrorValidator) Validate(*url.URL) error
func (ErrorValidator) ValidateIP ¶
func (ErrorValidator) ValidateIP(net.IP) error
type PassValidator ¶
type PassValidator struct{}
PassValidator passes all URLs
func (PassValidator) Validate ¶
func (PassValidator) Validate(*url.URL) error
func (PassValidator) ValidateIP ¶
func (PassValidator) ValidateIP(net.IP) error
type PrivateIPValidator ¶
type PrivateIPValidator struct{}
PrivateIPValidator validates that a url does not communicate with a private IP range
func (PrivateIPValidator) Validate ¶
func (v PrivateIPValidator) Validate(u *url.URL) error
func (PrivateIPValidator) ValidateIP ¶
func (PrivateIPValidator) ValidateIP(ip net.IP) error
type Validator ¶
Validator reports whether a given URL is valid.
XXX: `sql.validateDataSource` bypasses this for BigQuery DSNs since they have no host information in them and therefore can't have their IP validated. If validation is refactored to later consider more than just IPs, give the `sql.validateDataSource` another look.
Source Files ¶
- Version
- v0.196.1 (latest)
- Published
- Feb 19, 2025
- Platform
- linux/amd64
- Imports
- 5 packages
- Last checked
- 3 hours ago –
Tools for package owners.