domains

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Domains

type Domains struct {
	// contains filtered or unexported fields
}

Domains is the domain list and management system.

func New

func New(db *sql.DB) *Domains

New creates a new domain list

func (*Domains) Compile

func (d *Domains) Compile()

Compile downloads the list of domains from the database and loads them into memory for faster lookups.

This method makes use of the rescheduler instead of just ignoring multiple calls.

func (*Domains) Delete

func (d *Domains) Delete(domain string)

func (*Domains) IsValid

func (d *Domains) IsValid(host string) bool

IsValid returns true if a domain is valid.

func (*Domains) Put

func (d *Domains) Put(domain string, active bool)

Jump to

Keyboard shortcuts

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