netx

package
v0.27.1 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidIP  = fmt.Errorf("invalid ip")
	ErrIPNetIsNil = fmt.Errorf("ipnet is nil")
)
View Source
var ErrDNSQueryFailed = errors.New("DNS query failed")
View Source
var ErrDownloadOptionsExhausted = errors.New("downloading options exhausted")

Functions

func AddOffsetToIPNet

func AddOffsetToIPNet(ipNet *net.IPNet, offset int) (*net.IPNet, error)

func DNSQuery

func DNSQuery(server, target string) error

Types

type Client

type Client interface {
	Download(src, dst string) error
}

type GoGetterClient

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

func NewGoGetterClient

func NewGoGetterClient() *GoGetterClient

func (*GoGetterClient) Download

func (g *GoGetterClient) Download(src, dst string) error

func (*GoGetterClient) URLHasForcedProtocol

func (g *GoGetterClient) URLHasForcedProtocol(url string) bool

URLHasForcedProtocol checks if the url has a forced protocol as described in hashicorp/go-getter.

Jump to

Keyboard shortcuts

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