webtree

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2023 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JsonPage

type JsonPage struct {
	URL        string              `json:"url"`
	StatusCode int                 `json:"status_code"`
	Results    map[string][]string `json:"results"`
	Children   []*JsonPage         `json:"children,omitempty"`
}

func NewJsonPage

func NewJsonPage() *JsonPage

func (JsonPage) SprintJSON

func (p JsonPage) SprintJSON() ([]byte, error)

type Node

type Node struct {
	Page     Page
	Parent   *Node
	Children []*Node
}

func (*Node) AddChild

func (node *Node) AddChild(page *Page) *Node

func (*Node) Display

func (node *Node) Display()

func (*Node) SprintJSON

func (node *Node) SprintJSON() ([]byte, error)

func (*Node) SprintTXT

func (node *Node) SprintTXT() (string, error)

func (*Node) SprintTXTColored

func (node *Node) SprintTXTColored() (string, error)

func (*Node) SprintXML

func (node *Node) SprintXML() ([]byte, error)

func (*Node) ToJSONPage

func (node *Node) ToJSONPage() *JsonPage

func (*Node) ToXMLPage

func (node *Node) ToXMLPage() *XmlPage

type Page

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

func NewPage

func NewPage() *Page

func (*Page) AddMatch

func (page *Page) AddMatch(rname string, match string)

func (*Page) GetData

func (page *Page) GetData() string

func (*Page) GetResults

func (page *Page) GetResults() map[string][]string

func (*Page) GetStatusCode

func (page *Page) GetStatusCode() int

func (*Page) GetUrl

func (page *Page) GetUrl() string

func (*Page) PrintPageLive

func (page *Page) PrintPageLive(prefix *string, last bool)

func (*Page) SetData

func (page *Page) SetData(s string)

func (*Page) SetStatusCode

func (page *Page) SetStatusCode(code int)

func (*Page) SetUrl

func (page *Page) SetUrl(url string)

func (*Page) SprintPageLine

func (page *Page) SprintPageLine(prefix *string, last bool) string

func (*Page) SprintPageLineColored

func (page *Page) SprintPageLineColored(prefix *string, last bool) string

type XmlPage

type XmlPage struct {
	URL        string           `xml:"url"`
	StatusCode int              `xml:"status_code"`
	Results    []*XmlPageResult `xml:"results"`
	Children   []*XmlPage       `xml:"children,omitempty"`
}

func NewXmlPage

func NewXmlPage() *XmlPage

func (XmlPage) SprintXML

func (p XmlPage) SprintXML() ([]byte, error)

type XmlPageResult

type XmlPageResult struct {
	Pattern string   `xml:"pattern"`
	Result  []string `xml:"result"`
}

Jump to

Keyboard shortcuts

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