network

package
v0.0.0-...-9135743 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: BSD-2-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Device

type Device string

func (Device) String

func (d Device) String() string

func (Device) Validate

func (d Device) Validate(ctx context.Context) error

type Host

type Host string

func (Host) String

func (h Host) String() string

func (Host) Validate

func (h Host) Validate(ctx context.Context) error

type IP

type IP interface {
	IP(ctx context.Context) (net.IP, error)
	Validate(ctx context.Context) error
}

type IPFromIPNet

type IPFromIPNet struct {
	IPNet IPNet
}

func (IPFromIPNet) IP

func (i IPFromIPNet) IP(ctx context.Context) (net.IP, error)

func (IPFromIPNet) Validate

func (i IPFromIPNet) Validate(ctx context.Context) error

type IPMask

type IPMask interface {
	IPMask(ctx context.Context) (net.IPMask, error)
	Validate(ctx context.Context) error
}

type IPNet

type IPNet interface {
	IPNet(ctx context.Context) (net.IPNet, error)
	Validate(ctx context.Context) error
}

type IPNetFromIP

type IPNetFromIP struct {
	IP   IP
	Mask int
}

func (IPNetFromIP) IPNet

func (i IPNetFromIP) IPNet(ctx context.Context) (net.IPNet, error)

func (IPNetFromIP) Validate

func (i IPNetFromIP) Validate(ctx context.Context) error

type IPNetStatic

type IPNetStatic string

func (IPNetStatic) IPNet

func (i IPNetStatic) IPNet(ctx context.Context) (net.IPNet, error)

func (IPNetStatic) String

func (i IPNetStatic) String() string

func (IPNetStatic) Validate

func (i IPNetStatic) Validate(ctx context.Context) error

type IPStatic

type IPStatic string

func (IPStatic) IP

func (i IPStatic) IP(ctx context.Context) (net.IP, error)

func (IPStatic) String

func (i IPStatic) String() string

func (IPStatic) Validate

func (i IPStatic) Validate(ctx context.Context) error

type MaskStatic

type MaskStatic int

func (MaskStatic) IPMask

func (i MaskStatic) IPMask(ctx context.Context) (net.IPMask, error)

func (MaskStatic) Int

func (i MaskStatic) Int() int

func (MaskStatic) String

func (i MaskStatic) String() string

func (MaskStatic) Validate

func (i MaskStatic) Validate(ctx context.Context) error

type Port

type Port interface {
	Port(ctx context.Context) (int, error)
	Validate(ctx context.Context) error
}

type PortRange

type PortRange struct {
	From Port
	To   Port
}

func (PortRange) Validate

func (p PortRange) Validate(ctx context.Context) error

type PortStatic

type PortStatic int

func (PortStatic) Int

func (i PortStatic) Int() int

func (PortStatic) Port

func (i PortStatic) Port(ctx context.Context) (int, error)

func (PortStatic) String

func (i PortStatic) String() string

func (PortStatic) Validate

func (i PortStatic) Validate(ctx context.Context) error

type Protocol

type Protocol string
const (
	UDP Protocol = "udp"
	TCP Protocol = "tcp"
)

func (Protocol) String

func (p Protocol) String() string

func (Protocol) Validate

func (p Protocol) Validate(ctx context.Context) error

Jump to

Keyboard shortcuts

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