Skip to content

Module hb_cache_render.erl

A module that helps to render given Key graphs into the .dot files.

Function Index

add_arc/5*Add an arc to the graph.
add_node/4*Add a node to the graph.
cache_path_to_dot/2Generate a dot file from a cache path and options/store.
cache_path_to_dot/3
cache_path_to_graph/3Main function to collect graph elements.
cache_path_to_graph/4*
collect_output/2*Helper function to collect output from port.
dot_to_svg/1Convert a dot graph to SVG format.
extract_label/1*Extract a label from a path.
get_graph_data/3Get graph data for the Three.js visualization.
get_label/1*Extract a readable label from a path.
get_node_type/1*Convert node color from hb_cache_render to node type for visualization.
graph_to_dot/2*Generate the DOT file from the graph.
prepare_deeply_nested_complex_message/0
prepare_signed_data/0
prepare_unsigned_data/0
process_composite_node/7*Process a composite (directory) node.
process_simple_node/7*Process a simple (leaf) node.
render/1Render the given Key into svg.
render/2
test_signed/2*
test_unsigned/1*
traverse_store/5*Traverse the store recursively to build the graph.

Function Details

add_arc/5 *

add_arc(Graph, From, To, Label, Opts) -> any()

Add an arc to the graph

add_node/4 *

add_node(Graph, ID, Color, Opts) -> any()

Add a node to the graph

cache_path_to_dot/2

cache_path_to_dot(ToRender, StoreOrOpts) -> any()

Generate a dot file from a cache path and options/store

cache_path_to_dot/3

cache_path_to_dot(ToRender, RenderOpts, StoreOrOpts) -> any()

cache_path_to_graph/3

cache_path_to_graph(ToRender, GraphOpts, StoreOrOpts) -> any()

Main function to collect graph elements

cache_path_to_graph/4 *

cache_path_to_graph(InitPath, GraphOpts, Store, Opts) -> any()

collect_output/2 *

collect_output(Port, Acc) -> any()

Helper function to collect output from port

dot_to_svg/1

dot_to_svg(DotInput) -> any()

Convert a dot graph to SVG format

extract_label/1 *

extract_label(Path) -> any()

Extract a label from a path

get_graph_data/3

get_graph_data(Base, MaxSize, Opts) -> any()

Get graph data for the Three.js visualization

get_label/1 *

get_label(Path) -> any()

Extract a readable label from a path

get_node_type/1 *

get_node_type(Color) -> any()

Convert node color from hb_cache_render to node type for visualization

graph_to_dot/2 *

graph_to_dot(Graph, Opts) -> any()

Generate the DOT file from the graph

prepare_deeply_nested_complex_message/0

prepare_deeply_nested_complex_message() -> any()

prepare_signed_data/0

prepare_signed_data() -> any()

prepare_unsigned_data/0

prepare_unsigned_data() -> any()

process_composite_node/7 *

process_composite_node(Store, Key, Parent, ResolvedPath, JoinedPath, Graph, Opts) -> any()

Process a composite (directory) node

process_simple_node/7 *

process_simple_node(Store, Key, Parent, ResolvedPath, JoinedPath, Graph, Opts) -> any()

Process a simple (leaf) node

render/1

render(StoreOrOpts) -> any()

Render the given Key into svg

render/2

render(ToRender, StoreOrOpts) -> any()

test_signed/2 *

test_signed(Data, Wallet) -> any()

test_unsigned/1 *

test_unsigned(Data) -> any()

traverse_store/5 *

traverse_store(Store, Path, Parent, Graph, Opts) -> any()

Traverse the store recursively to build the graph