ipaddress

package
v0.0.0-...-491b0ec Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2025 License: AGPL-3.0 Imports: 1 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddressType

type AddressType int

AddressType represents the type of an IP address, as recorded in the ip_address_type lookup table.

const (
	AddressTypeIPv4 AddressType = iota
	AddressTypeIPv6
)

func MarshallAddressType

func MarshallAddressType(addressType corenetwork.AddressType) AddressType

MarshallAddressType converts an address type to a db address type id.

type ConfigType

type ConfigType int

ConfigType represents the means via which an IP address is configured, as recorded in the ip_address_config_type lookup table.

const (
	ConfigTypeUnknown ConfigType = iota
	ConfigTypeDHCP
	ConfigTypeDHCPv6
	ConfigTypeSLAAC
	ConfigTypeStatic
	ConfigTypeManual
	ConfigTypeLoopback
)

func MarshallConfigType

func MarshallConfigType(configType corenetwork.AddressConfigType) ConfigType

MarshallConfigType converts an IP address config type to a db config type id.

type Origin

type Origin int

Origin represents the origin of an IP address, as recorded in the ip_address_origin lookup table.

const (
	OriginHost Origin = iota
	OriginProvider
)

func MarshallOrigin

func MarshallOrigin(origin corenetwork.Origin) Origin

MarshallOrigin converts an address origin to a db origin id.

type Scope

type Scope int

Scope represents the scope of an IP address, as recorded in the ip_address_scope lookup table.

const (
	ScopeUnknown Scope = iota
	ScopePublic
	ScopeCloudLocal
	ScopeMachineLocal
	ScopeLinkLocal
)

func MarshallScope

func MarshallScope(scope corenetwork.Scope) Scope

MarshallScope converts an address scope to a db scope id.

Jump to

Keyboard shortcuts

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