frontend

package
v0.0.0-...-5584581 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2025 License: AGPL-3.0 Imports: 47 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Command = &cobra.Command{
		Use:   "analyze [-options]",
		Short: "Lanunches the interactive discovery tool in your browser",
	}
)
View Source
var PostProcessors []PostProcessorFunc

Functions

func AddDataEndpoints

func AddDataEndpoints(ws *WebService)

func AddOption

func AddOption(os optionsetter)

func AddPreferencesEndpoints

func AddPreferencesEndpoints(ws *WebService)

func AddUIEndpoints

func AddUIEndpoints(ws *WebService)

func Execute

func Execute(cmd *cobra.Command, args []string) error

func ExportCytoscapeJS

func ExportCytoscapeJS(pg graph.Graph[*engine.Object, engine.EdgeBitmap], filename string) error

func ExportGraphViz

func ExportGraphViz(pg graph.Graph[*engine.Object, engine.EdgeBitmap], filename string) error

func WebServiceStatusStrings

func WebServiceStatusStrings() []string

WebServiceStatusStrings returns a slice of all String values of the enum

func WithCert

func WithCert(certfile, keyfile string) optionsetter

WithCert is a webservice modifier that switches to HTTPS using a provided certificate

func WithLocalHTML

func WithLocalHTML(path string) optionsetter

WithLocalHTML adds live files to the webservice from a given path

func WithProfiling

func WithProfiling() func(*WebService)

WithProfiling is a webservice modifier that enables pprof profiling endpoints on the web service.

Types

type AnalysisResults

type AnalysisResults struct {
	Graph   graph.Graph[*engine.Object, engine.EdgeBitmap]
	Removed int
}

type CytoElements

type CytoElements []CytoFlatElement

type CytoFlatElement

type CytoFlatElement struct {
	Data  MapStringInterface `json:"data"`
	Group string             `json:"group"` // nodes or edges
}

type CytoGraph

type CytoGraph struct {
	FormatVersion            string        `json:"format_version"`
	GeneratedBy              string        `json:"generated_by"`
	TargetCytoscapeJSVersion string        `json:"target_cytoscapejs_version"`
	Data                     CytoGraphData `json:"data"`
	Elements                 CytoElements  `json:"elements"`
}

func GenerateCytoscapeJS

func GenerateCytoscapeJS(pg graph.Graph[*engine.Object, engine.EdgeBitmap], alldetails bool) (CytoGraph, error)

type CytoGraphData

type CytoGraphData struct {
	SharedName string `json:"shared_name"`
	Name       string `json:"name"`
	SUID       int    `json:"SUID"`
}

type GraphNode

type GraphNode struct {
	CanExpand int
	// contains filtered or unexported fields
}

type MapStringInterface

type MapStringInterface map[string]any

type MarkDownIndexRenderer

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

func (*MarkDownIndexRenderer) RenderFooter

func (mdir *MarkDownIndexRenderer) RenderFooter(w io.Writer, ast ast.Node)

RenderFooter

func (*MarkDownIndexRenderer) RenderHeader

func (mdir *MarkDownIndexRenderer) RenderHeader(w io.Writer, ast ast.Node)

RenderHeader

func (*MarkDownIndexRenderer) RenderNode

func (mdir *MarkDownIndexRenderer) RenderNode(w io.Writer, node ast.Node, entering bool) ast.WalkStatus

RenderNode

type MethodMap

type MethodMap map[string]bool

type Preference

type Preference struct {
	Name  string `json:"name"`
	Value any    `json:"value"`
}

func (Preference) ID

func (p Preference) ID() string

type UnionFS

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

func (*UnionFS) AddFS

func (ufs *UnionFS) AddFS(newfs fs.FS)

func (UnionFS) Exists

func (ufs UnionFS) Exists(filename string) bool

func (UnionFS) Open

func (ufs UnionFS) Open(filename string) (fs.File, error)

func (UnionFS) OpenDir

func (ufs UnionFS) OpenDir(name string) ([]fs.DirEntry, error)

type WSFileSystem

type WSFileSystem interface {
	fs.ReadDirFS
	fs.StatFS
}

type WebService

type WebService struct {
	Router *gin.RouterGroup
	API    *gin.RouterGroup
	Objs   *engine.Objects

	UnionFS
	// srv *http.Server
	AdditionalHeaders []string // Additional things to add to the main page

	Initialized bool
	// contains filtered or unexported fields
}

func NewWebservice

func NewWebservice() *WebService

func (*WebService) Analyze

func (ws *WebService) Analyze(paths ...string) error

Analyze analyzes paths for some purpose, though its implementation is missing in the provided code.

func (*WebService) Init

func (ws *WebService) Init(r gin.IRoutes)

Init initializes the web service by adding stock functions and setting up routes.

func (*WebService) Quit

func (ws *WebService) Quit()

func (*WebService) QuitChan

func (ws *WebService) QuitChan() <-chan bool

func (*WebService) RequireData

func (ws *WebService) RequireData(minimumStatus WebServiceStatus) func(ctx *gin.Context)

RequireData is a middleware that ensures that a certain level of data readynesss is available or fails the request

func (*WebService) ServeTemplate

func (ws *WebService) ServeTemplate(c *gin.Context, path string, data any)

func (*WebService) Start

func (ws *WebService) Start(bind string) error

type WebServiceStatus

type WebServiceStatus int
const (
	NoData WebServiceStatus = iota
	Error
	Loading
	Analyzing
	PostAnalyzing
	Ready
)

func WebServiceStatusString

func WebServiceStatusString(s string) (WebServiceStatus, error)

WebServiceStatusString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.

func WebServiceStatusValues

func WebServiceStatusValues() []WebServiceStatus

WebServiceStatusValues returns all values of the enum

func (WebServiceStatus) IsAWebServiceStatus

func (i WebServiceStatus) IsAWebServiceStatus() bool

IsAWebServiceStatus returns "true" if the value is listed in the enum definition. "false" otherwise

func (WebServiceStatus) String

func (i WebServiceStatus) String() string

type XGMMLAttribute

type XGMMLAttribute struct {
	XMLName xml.Name `xml:"att"`
	Name    string   `xml:"name,attr"`
	Value   string   `xml:"value,attr"`
}

type XGMMLEdge

type XGMMLEdge struct {
	XMLName    xml.Name `xml:"edge"`
	Label      string   `xml:"label,attr"`
	Attributes []XGMMLAttribute
	Source     engine.ObjectID `xml:"source,attr"`
	Target     engine.ObjectID `xml:"target,attr"`
}

type XGMMLGraph

type XGMMLGraph struct {
	XMLName    xml.Name `xml:"graph"`
	XMLNS      string   `xml:"xmlns,attr"`
	XMLNSDC    string   `xml:"xmlns:dc,attr"`
	XMLNSXLINK string   `xml:"xmlns:xlink,attr"`
	XMLNSRDF   string   `xml:"xmlns:rdf,attr"`
	XMLNSCY    string   `xml:"xmlns:cy,attr"`
	Label      string   `xml:"label,attr,omitempty"`
	Nodes      []XGMMLNode
	Edges      []XGMMLEdge
	Directed   int `xml:"directed,attr"`
	RootNode   int `xml:"Rootnode,attr,omitempty"`
}

func NewXGMMLGraph

func NewXGMMLGraph() XGMMLGraph
type XGMML struct {
	XMLNAme xml.Name `xml:"graph"`
	Graph   XGMMLGraph
}

type XGMMLNode

type XGMMLNode struct {
	XMLName    xml.Name `xml:"node"`
	Label      string   `xml:"label,attr"`
	Attributes []XGMMLAttribute
	Weight     int             `xml:"weight,attr,omitempty"`
	Id         engine.ObjectID `xml:"id,attr"`
}

Jump to

Keyboard shortcuts

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