ubigraph

package
v0.0.0-...-1729201 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2017 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Overview

A Ubigraph client API and callback server. https://github.com/caffix/go-ubigraph/ Licensed under the MIT license

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EdgeID

type EdgeID int

type EdgeStyleID

type EdgeStyleID int

type Graph

type Graph struct {
	// contains filtered or unexported fields
}

func Ubigraph

func Ubigraph(url ...string) *Graph

Ubigraph provides a reference to a session object with the Ubigraph server. The function assumes the Ubigraph server is on the localhost, unless the optional argument indicates otherwise. It returns the object for making API calls that manipulate the graph.

func (*Graph) Callback

func (g *Graph) Callback(r *http.Request, args *struct{ ID int }, reply *struct{ Status int }) error

Called by the RPC library

func (*Graph) ChangeEdgeStyle

func (g *Graph) ChangeEdgeStyle(edge EdgeID, style EdgeStyleID) error

ChangeEdgeStyle changes the identified edge's style.

func (*Graph) ChangeVertexStyle

func (g *Graph) ChangeVertexStyle(vertex VertexID, style VertexStyleID) error

ChangeVertexStyle changes the identified vertex's style.

func (*Graph) Clear

func (g *Graph) Clear() error

Clear removes all elements from the Ubigraph server.

func (*Graph) NewEdge

func (g *Graph) NewEdge(x, y VertexID) (EdgeID, error)

NewEdge creates a edge on the graph connected to two vertices identified by arguments. It returns an Ubigraph server selected edge ID on success.

func (*Graph) NewEdgeStyle

func (g *Graph) NewEdgeStyle(parentStyle EdgeStyleID) (EdgeStyleID, error)

NewEdgeStyle creates a edge style based on an existing style. It returns an Ubigraph server selected style ID on success.

func (*Graph) NewEdgeStyleWithID

func (g *Graph) NewEdgeStyleWithID(id, parentStyle EdgeStyleID) error

NewEdgeStyleWithID creates a edge style with a chosen identifier based on an existing style.

func (*Graph) NewEdgeWithID

func (g *Graph) NewEdgeWithID(id EdgeID, x, y VertexID) error

NewEdgeWithID creates a edge on the graph connected to two selected vertices and with a chosen identifier.

func (*Graph) NewVertex

func (g *Graph) NewVertex() (VertexID, error)

NewVertex creates a vertex on the graph. It returns an Ubigraph server selected vertex ID on success.

func (*Graph) NewVertexStyle

func (g *Graph) NewVertexStyle(parentStyle VertexStyleID) (VertexStyleID, error)

NewVertexStyle creates a vertex style based on an existing style. It returns an Ubigraph server selected style ID on success.

func (*Graph) NewVertexStyleWithID

func (g *Graph) NewVertexStyleWithID(id, parentStyle VertexStyleID) error

NewVertexStyleWithID creates a vertex style with a chosen identifier based on an existing style.

func (*Graph) NewVertexWithID

func (g *Graph) NewVertexWithID(id VertexID) error

NewVertexWithID creates a vertex on the graph with a chosen identifier.

func (*Graph) RemoveEdge

func (g *Graph) RemoveEdge(id EdgeID) error

RemoveEdge deletes the edge with the identifier matching the argument.

func (*Graph) RemoveVertex

func (g *Graph) RemoveVertex(id VertexID) error

RemoveVertex deletes the vertex with the identifier matching the argument.

func (*Graph) SetEdgeAttribute

func (g *Graph) SetEdgeAttribute(id EdgeID, attribute, value string) error

SetEdgeAttribute modifies the attributes of the identified edge.

func (*Graph) SetEdgeStyleAttribute

func (g *Graph) SetEdgeStyleAttribute(id EdgeStyleID, attribute, value string) error

SetEdgeStyleAttribute modifies the attributes of the identified edge style.

func (*Graph) SetVertexAttribute

func (g *Graph) SetVertexAttribute(id VertexID, attribute, value string) error

SetVertexAttribute modifies the attributes of the identified vertex.

func (*Graph) SetVertexCallback

func (g *Graph) SetVertexCallback(id VertexID, f func(VertexID)) error

SetVertexCallback sets the double-click callback attribute for the identified vertex

func (*Graph) SetVertexStyleAttribute

func (g *Graph) SetVertexStyleAttribute(id VertexStyleID, attribute, value string) error

SetVertexStyleAttribute modifies the attributes of the identified vertex style.

func (*Graph) SetVertexStyleCallback

func (g *Graph) SetVertexStyleCallback(id VertexStyleID, f func(VertexID)) error

SetVertexStyleCallback sets the double-click callback attribute for the identified style

type VertexID

type VertexID int

type VertexStyleID

type VertexStyleID int

Jump to

Keyboard shortcuts

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