api

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2020 License: MIT Imports: 23 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(
	cfg *config.Config,
	k crypto.PrivateKey,
	n net.Network,
	d discovery.Discoverer,
	x exchange.Exchange,
	linf *peer.LocalPeer,
	sst *sqlobjectstore.Store,
	or orchestrator.Orchestrator,
	version string,
	commit string,
	buildDate string,
	token string,
) *API

New HTTP API

func (*API) Cors

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

func (*API) HandleGetIdentities

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

func (*API) HandleGetIdentity

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

func (*API) HandleGetLocal

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

func (*API) HandleGetLookup

func (api *API) HandleGetLookup(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) HandlePostIdentities

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

func (*API) HandlePostObject

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

func (*API) HandlePostObjects

func (api *API) HandlePostObjects(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