backend

package
v0.0.0-...-f39c967 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2016 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type QGraph

type QGraph struct {
	Graph *directed.Graph
	Nodes map[string]qinv.QEntity
}

QGraph holds the inventory graph

func NewQGraph

func NewQGraph() (QGraph, error)

NewQGraph returns a new Graph

func (*QGraph) AddEdge

func (qg *QGraph) AddEdge(x, y qinv.QEntity) (*QGraph, error)

AddEdge connects to entities

func (*QGraph) AddNode

func (qg *QGraph) AddNode(e qinv.QEntity) (*QGraph, error)

AddNode adds a qinventory entity to the Graph

func (*QGraph) GetNode

func (qg *QGraph) GetNode(id string) (qinv.QEntity, error)

GetNode fetches the IDs of all Nodes

func (*QGraph) GetNodeIDs

func (qg *QGraph) GetNodeIDs() ([]string, error)

GetNodeIDs fetches the IDs of all Nodes

func (*QGraph) IDinNodes

func (qg *QGraph) IDinNodes(id string) bool

IDinNodes returns true if id is part of nodes

func (*QGraph) Index

func (qg *QGraph) Index(w http.ResponseWriter, r *http.Request)

Index shows the entry page

func (*QGraph) IsSubset

func (qg *QGraph) IsSubset(keys []string) bool

IsSubset returns true if all ids provided are within the Nodes

func (*QGraph) ListMachines

func (qg *QGraph) ListMachines(w http.ResponseWriter, r *http.Request)

ListMachines fetches all machines

func (*QGraph) Machine

func (qg *QGraph) Machine(w http.ResponseWriter, r *http.Request)

Machine handles GET/POST for a machine

func (QGraph) SetNode

func (qg QGraph) SetNode(e qinv.QEntity) error

SetNode adds a qinventory entity to the Graph

func (*QGraph) StartHttpd

func (qg *QGraph) StartHttpd(c map[string]string)

StartHttpd creates a http serverPort

Jump to

Keyboard shortcuts

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