browser

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Overview

package browser implements an HTML UI for web browsers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attrs

type Attrs map[string]string

Attributes for nodes and lines rendered by Graphviz.

func (Attrs) Attributes

func (a Attrs) Attributes() (enc []encoding.Attribute)

type Browser

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

Browser implements HTTP handlers for web browsers.

func New

func New(restClient *client.RESTAPI, router *gin.Engine) (*Browser, error)

func (*Browser) Close

func (b *Browser) Close()

Close should be called on shutdown to clean up external resources.

type Edge

type Edge struct {
	Model *models.Edge
	Attrs
	multi.Edge
}

type Graph

type Graph struct {
	Model                            *models.Graph
	GraphAttrs, NodeAttrs, EdgeAttrs Attrs

	*multi.DirectedGraph
	// contains filtered or unexported fields
}

func NewGraph

func NewGraph(mg *models.Graph) *Graph

func (*Graph) DOTAttributers

func (g *Graph) DOTAttributers() (graph, node, edge encoding.Attributer)

func (*Graph) DOTID

func (g *Graph) DOTID() string

func (*Graph) NodeFor

func (g *Graph) NodeFor(class string) *Node

type Node

type Node struct {
	Model *models.Node
	Attrs
}

func (*Node) ID

func (n *Node) ID() int64

Jump to

Keyboard shortcuts

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