domain

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2025 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoExpiration = errors.New("could not find expiration date")

Functions

This section is empty.

Types

type Domain

type Domain struct {
	Name               string
	CurrWhois          whoisparser.WhoisInfo
	PrevWhois          *whoisparser.WhoisInfo
	ExpiresAt          time.Time
	TimeLeft           time.Duration
	TriggeredThreshold int
	// contains filtered or unexported fields
}

func New

func New(conf *config.Config, name string) Domain

func (*Domain) CheckNotifications

func (d *Domain) CheckNotifications(ctx context.Context, i integration.Integrations) error

func (Domain) Log

func (d Domain) Log() *slog.Logger

func (*Domain) NotifyStatusChange

func (d *Domain) NotifyStatusChange(ctx context.Context, integrations integration.Integrations) error

func (*Domain) NotifyThreshold

func (d *Domain) NotifyThreshold(ctx context.Context, integrations integration.Integrations) error

func (*Domain) Run

func (d *Domain) Run(ctx context.Context, integrations integration.Integrations) error

func (Domain) Whois

func (d Domain) Whois() (whoisparser.WhoisInfo, error)

type Domains

type Domains struct {
	Sleep   time.Duration
	Domains []*Domain
}

func (*Domains) Add

func (d *Domains) Add(domain Domain)

func (Domains) Tick

func (d Domains) Tick(ctx context.Context, integrations integration.Integrations)

Jump to

Keyboard shortcuts

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