Documentation ¶
Index ¶
Constants ¶
View Source
const ( AntizapretPACGeneratorLightUpstreamBaseURL = "https://bitbucket.org/anticensority/antizapret-pac-generator-light/raw/master/config/" ExcludeHostsByIPsDist = "exclude-hosts-by-ips-dist.txt" ExcludeHostsDist = "exclude-hosts-dist.txt" ExcludeIPsDist = "exclude-ips-dist.txt" ExcludeRegexpDist = "exclude-regexp-dist.awk" IncludeHostsDist = "include-hosts-dist.txt" IncludeIPsDist = "include-ips-dist.txt" )
View Source
const DefaultDownloadURL = "https://raw.githubusercontent.com/zapret-info/z-i/master/dump.csv"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AntizapretConfig ¶
type AntizapretConfig struct { Type AntizapretConfigType Exclude bool URL string }
type AntizapretConfigType ¶
type AntizapretConfigType string
const ( IPs AntizapretConfigType = "ips" Hosts AntizapretConfigType = "hosts" HostsByIPs AntizapretConfigType = "hosts_by_ips" Regexp AntizapretConfigType = "regexp" )
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
func NewGenerator ¶
func NewGenerator(opts ...GeneratorOption) *Generator
func (*Generator) GenerateAndUpload ¶
func (*Generator) GenerateAndWrite ¶
type GeneratorOption ¶
type GeneratorOption func(*Generator)
func WithDownloadURL ¶
func WithDownloadURL(downloadURL string) GeneratorOption
func WithGitHubClient ¶
func WithGitHubClient(pat, owner, repo string) GeneratorOption
func WithHTTPClient ¶
func WithHTTPClient(httpClient *http.Client) GeneratorOption
Click to show internal directories.
Click to hide internal directories.