ui

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type D2

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

func NewD2

func NewD2(p *model.PacketPath) (*D2, error)

func (*D2) ToD2

func (d *D2) ToD2() ([]byte, error)

func (*D2) ToSvg

func (d *D2) ToSvg() ([]byte, error)

type DiagnoseSummary

type DiagnoseSummary struct {
	Cluster DiagnoseSummaryCluster `json:"cluster"`
	Nodes   []DiagnoseSummaryNode  `json:"nodes"`
	Links   []DiagnoseSummaryLink  `json:"links"`
}

type DiagnoseSummaryCluster

type DiagnoseSummaryCluster struct {
	Suspicions []DiagnoseSummarySuspicion `json:"suspicions"`
}
type DiagnoseSummaryLink struct {
	ID                   string                `json:"id"`
	Source               string                `json:"source"`
	SourceAttribute      map[string]string     `json:"source_attributes"`
	DestinationAttribute map[string]string     `json:"destination_attributes"`
	Destination          string                `json:"destination"`
	Type                 model.LinkType        `json:"type"`
	ActionType           model.ActionType      `json:"action"`
	Packet               DiagnoseSummaryPacket `json:"packet"`
}

type DiagnoseSummaryNode

type DiagnoseSummaryNode struct {
	ID         string                               `json:"id"`
	Type       model.NetNodeType                    `json:"type"`
	Suspicions []DiagnoseSummarySuspicion           `json:"suspicions"`
	Actions    map[string]DiagnoseSummaryNodeAction `json:"actions"`
}

type DiagnoseSummaryNodeAction

type DiagnoseSummaryNodeAction struct {
	Type model.ActionType `json:"type"`
}

type DiagnoseSummaryPacket

type DiagnoseSummaryPacket struct {
	Src      string         `json:"source"`
	Dst      string         `json:"destination"`
	Dport    uint16         `json:"dport"`
	Protocol model.Protocol `json:"protocol"`
}

type DiagnoseSummarySuspicion

type DiagnoseSummarySuspicion struct {
	Level   model.SuspicionLevel `json:"level"`
	Message string               `json:"message"`
}

type JSONFormatter

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

func NewJSONFormatter

func NewJSONFormatter(globalSuspicions []model.Suspicion, p *model.PacketPath) *JSONFormatter

func (*JSONFormatter) ToJSON

func (f *JSONFormatter) ToJSON() ([]byte, error)

type WebUI

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

func NewWebUI

func NewWebUI(ctx *context.Context, globalSuspicions []model.Suspicion, p *model.PacketPath, address string) (*WebUI, error)

func (*WebUI) Serve

func (u *WebUI) Serve() error

Jump to

Keyboard shortcuts

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