httpredirects

package module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2022 License: MIT Imports: 6 Imported by: 0

README

httpredirects

Get HTTP redirect with hosts and IP addresses

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetA

func GetA(hostname string, nameserver string) ([]string, error)

GetA function

func GetAAAA

func GetAAAA(hostname string, nameserver string) ([]string, error)

GetAAAA function

func GetCNAME

func GetCNAME(hostname string, nameserver string) (string, error)

GetCNAME function

Types

type Data

type Data struct {
	URL          string       `json:"url,omitempty"`
	Redirects    []*Redirects `json:"redirects,omitempty"`
	Hosts        []*Hosts     `json:"hosts,omitempty"`
	Error        bool         `json:"error,omitempty"`
	ErrorMessage string       `json:"errormessage,omitempty"`
}

Data struct

func Get

func Get(redirecturl string, nameserver string) *Data

Get function

type Hosts

type Hosts struct {
	Hostname     string   `json:"hostname,omitempty"`
	IPv4         []string `json:"ipv4,omitempty"`
	IPv6         []string `json:"ipv6,omitempty"`
	CNAME        string   `json:"cname,omitempty"`
	Error        bool     `json:"error,omitempty"`
	ErrorMessage string   `json:"errormessage,omitempty"`
}

Hosts struct

type Redirects

type Redirects struct {
	Number     int    `json:"number"`
	StatusCode int    `json:"statuscode,omitempty"`
	URL        string `json:"url,omitempty"`
	Protocol   string `json:"protocol,omitempty"`
}

Redirects struct

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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