graph

package
v0.0.0-...-7e20739 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2024 License: MIT Imports: 1 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Edge

type Edge struct {
	Id       string            `json:"id,omitempty" yaml:"id,omitempty" mapstructure:"id,omitempty"`
	Source   string            `json:"source" yaml:"source" mapstructure:"source"`
	Target   string            `json:"target" yaml:"target" mapstructure:"target"`
	Relation string            `json:"relation,omitempty" yaml:"relation,omitempty" mapstructure:"relation,omitempty"`
	Label    string            `json:"label,omitempty" yaml:"label,omitempty" mapstructure:"label,omitempty"`
	Directed bool              `json:"directed,omitempty" yaml:"directed,omitempty" mapstructure:"directed,omitempty"`
	Metadata metadata.Metadata `json:"metadata,omitempty" yaml:"metadata,omitempty" mapstructure:"metadata,omitempty"`
}

type Graph

type Graph struct {
	Label    string            `json:"label,omitempty" yaml:"label,omitempty" mapstructure:"label,omitempty"`
	Directed bool              `json:"directed,omitempty" yaml:"directed,omitempty" mapstructure:"directed,omitempty"`
	Type     string            `json:"type,omitempty" yaml:"type,omitempty" mapstructure:"type,omitempty"`
	Metadata metadata.Metadata `json:"metadata,omitempty" yaml:"metadata,omitempty" mapstructure:"metadata,omitempty"`
	Nodes    []Node            `json:"nodes" yaml:"nodes" mapstructure:"nodes"`
	Edges    []Edge            `json:"edges,omitempty" yaml:"edges,omitempty" mapstructure:"edges,omitempty"`
}

The base graph type

type JsonGraph

type JsonGraph struct {
	Graph Graph `json:"graph"`
}

A JSONGraph can either be parsed into a list of graps or single graph We have types for standard, and then explicitly directed and undirected

func NewGraph

func NewGraph() *JsonGraph

New functions handle creation of new graphs (and directed, etc.)

type JsonGraphList

type JsonGraphList struct {
	Label    string            `json:"label,omitempty" yaml:"label,omitempty" mapstructure:"label,omitempty"`
	Type     string            `json:"type,omitempty" yaml:"type,omitempty" mapstructure:"type,omitempty"`
	Metadata metadata.Metadata `json:"metadata,omitempty" yaml:"metadata,omitempty" mapstructure:"metadata,omitempty"`
	Graphs   []Graph           `json:"graphs"`
}

type Node

type Node struct {
	Id       string            `json:"id,omitempty" yaml:"id,omitempty" mapstructure:"id,omitempty"`
	Label    *string           `json:"label,omitempty" yaml:"label,omitempty" mapstructure:"label,omitempty"`
	Metadata metadata.Metadata `json:"metadata,omitempty" yaml:"metadata,omitempty" mapstructure:"metadata,omitempty"`
}

Jump to

Keyboard shortcuts

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