Documentation ¶
Index ¶
- func GetPrefixURLMapFromUrlResponses(responses *[]UrlResponse) (prefixesWithPaths map[netip.Prefix][]string, err error)
- func ReadRawPrefixesFromFileData(data []byte) (ipnets []netip.Prefix, err error)
- func ReadRawPrefixesFromUrlResponse(response UrlResponse) (prefixes []netip.Prefix, err error)
- type Client
- type DataMap
- type Doc
- type GetInput
- type HttpFile
- type HttpFiles
- type IPv4Entry
- type IPv6Entry
- type Option
- type PrefixesWithPaths
- type RawDoc
- type RawIPv4Entry
- type RawIPv6Entry
- type Request
- type Responses
- type UrlResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetPrefixURLMapFromUrlResponses ¶
func GetPrefixURLMapFromUrlResponses(responses *[]UrlResponse) (prefixesWithPaths map[netip.Prefix][]string, err error)
func ReadRawPrefixesFromFileData ¶
ReadRawPrefixesFromFileData reads the IPs as strings from the given path
func ReadRawPrefixesFromUrlResponse ¶
func ReadRawPrefixesFromUrlResponse(response UrlResponse) (prefixes []netip.Prefix, err error)
Types ¶
type Client ¶
type Client struct { Debug bool // URLs []url.URL HttpClient *retryablehttp.Client }
func (*Client) FetchPrefixes ¶
func (*Client) FetchPrefixesAsText ¶
type HttpFile ¶
func (*HttpFile) FetchPrefixes ¶
func (*HttpFile) FetchUrl ¶
func (hf *HttpFile) FetchUrl() (result UrlResponse, err error)
type HttpFiles ¶
func (*HttpFiles) FetchUrls ¶
func (hf *HttpFiles) FetchUrls() (results []UrlResponse, err error)
type Option ¶
type Option func(*Client)
func WithHttpClient ¶
func WithHttpClient(rc *retryablehttp.Client) Option
type PrefixesWithPaths ¶
type RawIPv4Entry ¶
type RawIPv6Entry ¶
type Responses ¶
type Responses []UrlResponse
type UrlResponse ¶
type UrlResponse struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.