output

package
v2.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CSVWriter

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

func NewCSVWriter

func NewCSVWriter(paths ...string) (*CSVWriter, error)

func (*CSVWriter) Close

func (c *CSVWriter) Close() error

func (*CSVWriter) Write

func (c *CSVWriter) Write(b []byte) (int, error)

func (*CSVWriter) WriteString

func (c *CSVWriter) WriteString(data string)

type HTMLWriter

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

func NewHTMLWriter

func NewHTMLWriter(paths ...string) (*HTMLWriter, error)

func (*HTMLWriter) Close

func (h *HTMLWriter) Close() error

func (*HTMLWriter) Write

func (h *HTMLWriter) Write(b []byte) (int, error)

func (*HTMLWriter) WriteString

func (h *HTMLWriter) WriteString(data string)

type OutputWriter

type OutputWriter struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewOutputWriter

func NewOutputWriter() (*OutputWriter, error)

func (*OutputWriter) AddWriters

func (o *OutputWriter) AddWriters(writers ...io.Writer)

func (*OutputWriter) Close

func (o *OutputWriter) Close()

Close closes the output writers

func (*OutputWriter) Write

func (o *OutputWriter) Write(data []byte)

Write writes the data taken as input using only the writer(s) with that name.

func (*OutputWriter) WriteCSVData

func (o *OutputWriter) WriteCSVData(result ResultEvent)

func (*OutputWriter) WriteHTMLData

func (o *OutputWriter) WriteHTMLData(data ResultEvent)

func (*OutputWriter) WriteString

func (o *OutputWriter) WriteString(data string)

WriteString writes the string taken as input using only

type ResultEvent

type ResultEvent struct {
	TimeStamp     time.Time           `json:"timestamp" csv:"timestamp"`
	URL           string              `json:"target" csv:"url"`
	Path          string              `json:"path"  csv:"path"`
	Method        string              `json:"method" csv:"method"`
	Title         string              `json:"title" csv:"title"`
	Host          string              `json:"host" csv:"host"`
	A             []string            `json:"A" csv:"a"`
	CNAME         []string            `json:"CNAME" csv:"cname"`
	Status        int                 `json:"status" csv:"status"`
	ContentLength int                 `json:"content-length" csv:"content-length"`
	Server        string              `json:"server" csv:"server"`
	Technology    []string            `json:"technology" csv:"technology"`
	ResponseBody  string              `json:"response" csv:"-"`
	RequestBody   string              `json:"request" csv:"-"`
	Links         []string            `json:"-" csv:"-"`
	Header        map[string][]string `json:"-" csv:"-"`
}

func (ResultEvent) CSV

func (tr ResultEvent) CSV() string

func (ResultEvent) CSVHeader

func (tr ResultEvent) CSVHeader() ([]byte, error)

func (ResultEvent) ContentLengthString added in v2.1.0

func (tr ResultEvent) ContentLengthString() string

func (ResultEvent) EventToStdout

func (tr ResultEvent) EventToStdout() string

func (ResultEvent) EventToStdoutNoColor

func (tr ResultEvent) EventToStdoutNoColor() string

func (ResultEvent) HTML

func (tr ResultEvent) HTML() string

func (ResultEvent) String

func (tr ResultEvent) String() string

Jump to

Keyboard shortcuts

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