Documentation
¶
Index ¶
- func FetchGooglebotIPs(log *slog.Logger, httpClient *http.Client, url string) ([]string, error)
- func GetDefaultTmpl() string
- func GetPojJS() string
- func IsIpExcluded(clientIP string, exemptIps []*net.IPNet) bool
- func IsIpGoodBot(clientIP string, goodBots []string) bool
- func ParseCIDR(cidr string) (*net.IPNet, error)
- type GooglebotIPs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FetchGooglebotIPs ¶ added in v1.12.0
FetchGooglebotIPs fetches the list of Googlebot IPs from Google's official endpoint, parses the JSON response, and returns a slice of CIDR strings.
func GetDefaultTmpl ¶
func GetDefaultTmpl() string
need to hardcode a default template given yaegi's constraints on finding files on disk provided by this plugin
func GetPojJS ¶ added in v1.11.0
func GetPojJS() string
GetPojJS returns the proof-of-javascript JavaScript implementation
func IsIpGoodBot ¶
Types ¶
type GooglebotIPs ¶ added in v1.12.0
type GooglebotIPs struct {
// contains filtered or unexported fields
}
GooglebotIPs holds the list of Googlebot IP ranges, providing a thread-safe way to check if an IP is a Googlebot.
func NewGooglebotIPs ¶ added in v1.12.0
func NewGooglebotIPs() *GooglebotIPs
NewGooglebotIPs creates and initializes a new GooglebotIPs object.
Click to show internal directories.
Click to hide internal directories.