fritzbox

package
v0.0.0-...-0cf69dc Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	GetPublicIPs(withIPv6Prefix bool) ([]ip.CIDR, error)
}

func NewClient

func NewClient(url string, creds ClientCredentials) (Client, error)

type ClientCredentials

type ClientCredentials struct {
	Username  string
	Password  string
	VerifyTLS bool
}

type ExternalIPv4

type ExternalIPv4 struct {
	IPv4Address string `mapstructure:"ExternalIPAddress"`
}

type ExternalIPv6

type ExternalIPv6 struct {
	IPv6Address      string `mapstructure:"ExternalIPv6Address"`
	PreferedLifetime int    `mapstructure:"PreferedLifetime"`
	PrefixLength     int    `mapstructure:"PrefixLength"`
	ValidLifetime    int    `mapstructure:"ValidLifetime"`
}

type ExternalIPv6Prefix

type ExternalIPv6Prefix struct {
	IPv6Prefix       string `mapstructure:"IPv6Prefix"`
	PreferedLifetime int    `mapstructure:"PreferedLifetime"`
	PrefixLength     int    `mapstructure:"PrefixLength"`
	ValidLifetime    int    `mapstructure:"ValidLifetime"`
}

type UPNPClient

type UPNPClient interface {
	GetExternalIPv4Address() (*ExternalIPv4, error)
	GetExternalIPv6Address() (*ExternalIPv6, error)
	GetExternalIPv6Prefix() (*ExternalIPv6Prefix, error)
}

func NewUPNPClient

func NewUPNPClient(url string, creds ClientCredentials) UPNPClient

Jump to

Keyboard shortcuts

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