webforest

package
v1.3.5-alpha-0814 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2024 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WebsiteForest

type WebsiteForest struct {
	MaxSize int `json:"max_size"`

	// schema + hostname + port
	Roots map[string]*WebsiteNode `json:"Roots"`

	Uuid string `json:"uuid"`
}

func NewWebsiteForest

func NewWebsiteForest(size int) *WebsiteForest

func (*WebsiteForest) AddNode

func (w *WebsiteForest) AddNode(u string) error

func (*WebsiteForest) ToBasicOutput

func (w *WebsiteForest) ToBasicOutput() *WebsiteForestOutputBasic

type WebsiteForestOutputBasic

type WebsiteForestOutputBasic struct {
	Size  int
	Trees []*treeItem
	Uuid  string
}

type WebsiteNode

type WebsiteNode struct {
	Parent *WebsiteNode `json:"-"`

	// 如果是根结点的话,
	NodeName       string   `json:"node_name"`
	HTTPRequestIDs []uint   `json:"http_request_ids"` // 暂时弃用
	Urls           []string `json:"urls"`

	// path == / 或者 "" 都为根结点
	Path string `json:"path"`

	Children map[string]*WebsiteNode `json:"children"`

	Uuid string `json:"uuid"`
}

func (*WebsiteNode) GetRootName

func (n *WebsiteNode) GetRootName() string

func (*WebsiteNode) IsLeaf

func (n *WebsiteNode) IsLeaf() bool

func (*WebsiteNode) IsRoot

func (n *WebsiteNode) IsRoot() bool

Jump to

Keyboard shortcuts

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