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.

                  Source Files