api

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	IPv4loopback1 = net.IPv4(127, 0, 0, 1)
)

Functions

This section is empty.

Types

type ErrorJSON

type ErrorJSON struct {
	Message string `json:"message"`
}

ErrorJSON is returned with "application/json" content type and non-2XX status code

type Event

type Event struct {
	Time time.Time `json:"time,omitempty"`
	// The first event contains the full ports as LocalPortsAdded
	LocalPortsAdded   []IPPort `json:"localPortsAdded,omitempty"`
	LocalPortsRemoved []IPPort `json:"localPortsRemoved,omitempty"`
	Errors            []string `json:"errors,omitempty"`
}

type IPPort

type IPPort struct {
	IP   net.IP `json:"ip"`
	Port int    `json:"port"`
}

func (*IPPort) String

func (x *IPPort) String() string

type Info

type Info struct {
	// LocalPorts contain 127.0.0.1 and 0.0.0.0.
	// LocalPorts do NOT contain addresses such as 127.0.0.53 and 192.168.5.15.
	//
	// In future, LocalPorts will contain IPv6 addresses (::1 and ::) as well.
	LocalPorts []IPPort `json:"localPorts"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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