api

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2019 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

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

API for HTTP

func New

func New(
	k *crypto.PrivateKey,
	n net.Network,
	d discovery.Discoverer,
	x exchange.Exchange,
	linf *peer.LocalPeer,
	bls graph.Store,
	dag dag.Manager,
	version string,
	commit string,
	buildDate string,
	token string,
) *API

New HTTP API

func (*API) Cors added in v0.3.2

func (api *API) Cors() router.Handler

func (*API) HandleGetGraph

func (api *API) HandleGetGraph(c *router.Context)

func (*API) HandleGetGraphs

func (api *API) HandleGetGraphs(c *router.Context)

func (*API) HandleGetIdentities added in v0.3.2

func (api *API) HandleGetIdentities(c *router.Context)

func (*API) HandleGetIdentity added in v0.3.2

func (api *API) HandleGetIdentity(c *router.Context)

func (*API) HandleGetLocal

func (api *API) HandleGetLocal(c *router.Context)

func (*API) HandleGetObject

func (api *API) HandleGetObject(c *router.Context)

func (*API) HandleGetObjects

func (api *API) HandleGetObjects(c *router.Context)

func (*API) HandleGetPeer

func (api *API) HandleGetPeer(c *router.Context)

func (*API) HandleGetPeers

func (api *API) HandleGetPeers(c *router.Context)

func (*API) HandleGetStreams

func (api *API) HandleGetStreams(c *router.Context)

func (*API) HandlePostGraph

func (api *API) HandlePostGraph(c *router.Context)

func (*API) HandlePostGraphs

func (api *API) HandlePostGraphs(c *router.Context)

func (*API) HandlePostIdentities added in v0.3.2

func (api *API) HandlePostIdentities(c *router.Context)

func (*API) HandlePostObject

func (api *API) HandlePostObject(c *router.Context)

func (*API) HandleVersion

func (api *API) HandleVersion(c *router.Context)

func (*API) Serve

func (api *API) Serve(address string) error

Serve HTTP API

func (*API) Stop

func (api *API) Stop(c *router.Context)

func (*API) TokenAuth

func (api *API) TokenAuth() router.Handler

Jump to

Keyboard shortcuts

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