generate

package
v0.0.0-...-075680a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 22, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Categories

type Categories struct {
	// CDN contains a list of inputs for CDN cidrs
	CDN *Category `yaml:"cdn"`
	// WAF contains a list of inputs for WAF cidrs
	WAF *Category `yaml:"waf"`
	// Cloud contains a list of inputs for Cloud cidrs
	Cloud  *Category `yaml:"cloud"`
	Common *Category `yaml:"common"`
}

Categories contains various cdn, waf, cloud and fqdn operators

func (*Categories) Compile

func (c *Categories) Compile(options *Options) (*cdncheck.InputCompiled, error)

Compile returns the compiled form of an input structure

type Category

type Category struct {
	// URLs contains a list of static URLs for CIDR list
	URLs map[string][]string `yaml:"urls"`
	// ASN contains ASN numbers for an Input item
	ASN map[string][]string `yaml:"asn"`
	// CIDR contains a list of CIDRs for Input item
	//
	// CIDR is generated using generate-index tool which is then
	// used for checking the provided IP for each input type.
	CIDR map[string][]string `yaml:"cidr"`
	// FQDN contains public suffixes for major cloud operators
	FQDN map[string][]string `yaml:"fqdn"`
}

Category contains configuration for a specific category

type Options

type Options struct {
	IPInfoToken string
	HTTPClient  *http.Client
}

func (*Options) HasAuthInfo

func (options *Options) HasAuthInfo() bool

HasAuthInfo returns true if auth info has been provided

func (*Options) ParseFromEnv

func (options *Options) ParseFromEnv()

ParseFromEnv parses auth tokens from env or file

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL