ip

package
v0.0.0-...-3a8f46b Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const IPLookupAddress = "https://api.ipify.org"

Variables

View Source
var ErrRecordNotFound = errors.New("requested dns record was not found")

Functions

This section is empty.

Types

type ErrInvalidIP

type ErrInvalidIP struct {
	IP string
}

func (ErrInvalidIP) Error

func (e ErrInvalidIP) Error() string

type ErrStatusNotOK

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

func (ErrStatusNotOK) Error

func (e ErrStatusNotOK) Error() string

type IPLookup

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

func NewIPLookup

func NewIPLookup(logger *zap.Logger) *IPLookup

func (*IPLookup) LookupPublicIP

func (l *IPLookup) LookupPublicIP(ctx context.Context) (net.IP, error)

type IPUpdater

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

func NewIPUpdater

func NewIPUpdater(logger *zap.Logger, apiKey, zoneID string) (*IPUpdater, error)

func (*IPUpdater) UpdateIP

func (u *IPUpdater) UpdateIP(ctx context.Context, record string, ip net.IP) error

Jump to

Keyboard shortcuts

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