Documentation ¶
Overview ¶
A Ubigraph client API and callback server. https://github.com/caffix/go-ubigraph/ Licensed under the MIT license
Index ¶
- type EdgeID
- type EdgeStyleID
- type Graph
- func (g *Graph) Callback(r *http.Request, args *struct{ ID int }, reply *struct{ Status int }) error
- func (g *Graph) ChangeEdgeStyle(edge EdgeID, style EdgeStyleID) error
- func (g *Graph) ChangeVertexStyle(vertex VertexID, style VertexStyleID) error
- func (g *Graph) Clear() error
- func (g *Graph) NewEdge(x, y VertexID) (EdgeID, error)
- func (g *Graph) NewEdgeStyle(parentStyle EdgeStyleID) (EdgeStyleID, error)
- func (g *Graph) NewEdgeStyleWithID(id, parentStyle EdgeStyleID) error
- func (g *Graph) NewEdgeWithID(id EdgeID, x, y VertexID) error
- func (g *Graph) NewVertex() (VertexID, error)
- func (g *Graph) NewVertexStyle(parentStyle VertexStyleID) (VertexStyleID, error)
- func (g *Graph) NewVertexStyleWithID(id, parentStyle VertexStyleID) error
- func (g *Graph) NewVertexWithID(id VertexID) error
- func (g *Graph) RemoveEdge(id EdgeID) error
- func (g *Graph) RemoveVertex(id VertexID) error
- func (g *Graph) SetEdgeAttribute(id EdgeID, attribute, value string) error
- func (g *Graph) SetEdgeStyleAttribute(id EdgeStyleID, attribute, value string) error
- func (g *Graph) SetVertexAttribute(id VertexID, attribute, value string) error
- func (g *Graph) SetVertexCallback(id VertexID, f func(VertexID)) error
- func (g *Graph) SetVertexStyleAttribute(id VertexStyleID, attribute, value string) error
- func (g *Graph) SetVertexStyleCallback(id VertexStyleID, f func(VertexID)) error
- type VertexID
- type VertexStyleID
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EdgeStyleID ¶
type EdgeStyleID int
type Graph ¶
type Graph struct {
// contains filtered or unexported fields
}
func Ubigraph ¶
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) NewEdge ¶
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 ¶
NewEdgeWithID creates a edge on the graph connected to two selected vertices and with a chosen identifier.
func (*Graph) NewVertex ¶
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 ¶
NewVertexWithID creates a vertex on the graph with a chosen identifier.
func (*Graph) RemoveEdge ¶
RemoveEdge deletes the edge with the identifier matching the argument.
func (*Graph) RemoveVertex ¶
RemoveVertex deletes the vertex with the identifier matching the argument.
func (*Graph) SetEdgeAttribute ¶
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 ¶
SetVertexAttribute modifies the attributes of the identified vertex.
func (*Graph) SetVertexCallback ¶
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 VertexStyleID ¶
type VertexStyleID int