api

package
v0.0.0-...-bda66fc Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2019 License: ISC Imports: 22 Imported by: 1 module, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	// MaxLatest is the highest limit amount for getRandom
	MaxLatest = 100
)

Variables

This section is empty.

Functions

func DecodeHash

func DecodeHash(s string) (hash.Hash, error)

DecodeHash is a utility function, allowing the decoding of various formats

func JSONize

func JSONize(o *tangle.Object) jsonSite

JSONize converts an object into a jsonSite

Types

type API

type API struct {
	ListenInterface string
	Message         string
	// contains filtered or unexported fields
}

API is used as a container, allowing the REST API to access the node

func New

func New(c config.Configuration, n *node.Node) *API

New returns a configured instance of the API server

func (*API) Run

func (a *API) Run() error

Run starts the API server as specified in the configuration

type Error

type Error struct {
	Message string `json:"message"`
	Code    int    `json:"code"`
}

Error is returned when something has gone wrong

Jump to

Keyboard shortcuts

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