sigmajs

package
v0.8.12 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2023 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Overview

Package sigmajs implements marshaling and unmarshaling of Sigma.js JSON documents.

See http://sigmajs.org/ for Sigma.js 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
	Source     string
	Target     string
	Attributes map[string]interface{}
}

Edge is a Sigma.js edge.

func (*Edge) MarshalJSON

func (e *Edge) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface.

func (*Edge) UnmarshalJSON

func (e *Edge) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface.

type Graph

type Graph struct {
	Nodes []Node `json:"nodes"`
	Edges []Edge `json:"edges"`
}

Graph is a Sigma.js graph.

type Node

type Node struct {
	ID         string
	Attributes map[string]interface{}
}

Node is a Sigma.js node.

func (*Node) MarshalJSON

func (n *Node) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface.

func (*Node) UnmarshalJSON

func (n *Node) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface.

Jump to

Keyboard shortcuts

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