details

package
v0.0.0-...-bd9fa1b Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2019 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// FuncMap defines the available operations for the `details` package.
	FuncMap = map[string]func(c Client, target string) (*Output, error){
		"http_quick":    httpShort,
		"http_details":  httpDetails,
		"https_quick":   httpsShort,
		"https_details": httpsDetails,
		"ping":          pingShort,
		"dkim":          dkimShort,
		"spf":           spfShort,
		"dmarc":         dmarcShort,
		"hostname":      hostnameShort,
		"asn":           geoASN,
		"country":       geoCountry,
		"mx":            mxShort,
		"smtp25":        smtp25,
		"smtp465":       smtp465,
		"smtp587":       smtp587,
		"imap143":       imap143,
		"imap993":       imap993,
		"pop3110":       pop3110,
		"pop3s995":      pop3995,
	}
)

Functions

This section is empty.

Types

type Client

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

Client defines the available clients to perform details operations.

func NewClient

func NewClient() *Client

NewClient returns a new details client.

func (*Client) Close

func (c *Client) Close()

Close closes the open clients, if any.

type Output

type Output struct {
	ID         string        `json:"id"`
	OpName     string        `json:"op_name"`
	Target     string        `json:"target"`
	CreatedAt  time.Time     `json:"created_at"`
	Results    []string      `json:"results"`
	Details    []string      `json:"details"`
	OpSuccess  bool          `json:"op_success"`
	OpDuration time.Duration `json:"op_duration"`
}

Output defines the structure of a `details` operation.

func NewOutput

func NewOutput(target string, name string) *Output

NewOutput returns a new Output populated with the provided parameters.

func (*Output) AppendDetails

func (o *Output) AppendDetails(s string)

AppendDetails allows appending multiple results to an existing Output.

func (*Output) AppendResults

func (o *Output) AppendResults(s string)

AppendResults allows appending multiple results to an existing Output.

func (*Output) Finish

func (o *Output) Finish()

Finish fills any remaining details in relation to an Output.

Jump to

Keyboard shortcuts

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