jsonl

package
v0.0.0-...-02c76fb Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package jsonl implements a pretty printer for JSONL format (jsonlines.org)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Edge

type Edge struct {
	Kind        string `json:"kind"`
	Source      string `json:"source"`
	Destination string `json:"destination"`
}

Edge is the serializable type for graph edges

type Node

type Node struct {
	Kind  string      `json:"kind"`
	ID    string      `json:"id"` // TODO: preserved for compat, remove in 0.4.0
	Meta  *node.Node  `json:"meta"`
	Value interface{} `json:"value"`
}

Node is the serializable type for graph nodes

type Printer

type Printer struct{}

Printer prints a graph in JSONL format

func (*Printer) DrawEdge

func (j *Printer) DrawEdge(graph *graph.Graph, srcNodeID string, dstNodeID string) (pp.Renderable, error)

DrawEdge returns an edge in JSONL format

func (*Printer) DrawNode

func (j *Printer) DrawNode(graph *graph.Graph, nodeID string) (pp.Renderable, error)

DrawNode prints a node in JSONL format

Jump to

Keyboard shortcuts

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