tequilapi

package
v0.0.0-...-be0919c Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2018 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Overview

Tequila API

The purpose of this documentation is to provide developers an insight of how to interact with Mysterium Node via Tequila API. This should demonstrate all the possible API calls with described parameters and responses.

Host: 127.0.0.1:4050

Consumes:
- application/json

Produces:
- application/json

swagger:meta

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyCors

func ApplyCors(original http.Handler) http.Handler

ApplyCors wraps original handler by adding cors headers to response BEFORE original ServeHTTP method is called

func DisableCaching

func DisableCaching(original http.Handler) http.Handler

DisableCaching middleware adds cache disabling headers to http response

func NewAPIRouter

func NewAPIRouter() *httprouter.Router

NewAPIRouter returns new api router with status endpoints

Types

type APIServer

type APIServer interface {
	Wait() error
	StartServing() error
	Stop()
	Address() (string, error)
}

APIServer interface represents control methods for underlying http api server

func NewServer

func NewServer(address string, port int, handler http.Handler) APIServer

NewServer creates http api server for given address port and http handler

type TestClient

type TestClient interface {
	Get(path string) *http.Response
}

func NewTestClient

func NewTestClient(t *testing.T, address string) TestClient

NewTestClient returns client for making test requests

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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