server

package
v0.0.0-...-76c1feb Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2021 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Overview

Package server Algod REST API.

API Endpoint for AlgoD Operations.

Schemes: http
Host: localhost
BasePath: /
Version: 0.0.1
License:
Contact: [email protected]

Consumes:
- application/json

Produces:
- application/json

Security:
- api_key:

SecurityDefinitions:
api_key:
  type: apiKey
  name: X-Algo-API-Token
  in: header
  description: >-
    Generated header parameter. This token can be generated using the Goal command line tool. Example value
    ='b7e384d0317b8050ce45900a94a1931e28540e1f69b2d242b424659c341b4697'
  required: true
  x-example: b7e384d0317b8050ce45900a94a1931e28540e1f69b2d242b424659c341b4697

swagger:meta --- Currently, server implementation annotations serve as the API ground truth. From that, we use go-swagger to generate a swagger spec.

Autogenerate the swagger json - automatically run by the 'make build' step. Base path must be a fully specified package name (else, it seems that swagger feeds a relative path to loader.Config.Import(), and that breaks the vendor directory if the source is symlinked from elsewhere)

Index

Constants

View Source
const TokenHeader = "X-Algo-API-Token"

TokenHeader is the header where we put the token.

Variables

This section is empty.

Functions

func NewRouter

func NewRouter(logger logging.Logger, node *node.AlgorandFullNode, shutdown <-chan struct{}, apiToken string, adminAPIToken string, listener net.Listener) *echo.Echo

NewRouter builds and returns a new router with our REST handlers registered.

Types

This section is empty.

Directories

Path Synopsis
lib
Code generated by bundle_swagger_json.sh, along with swagger.json.
Code generated by bundle_swagger_json.sh, along with swagger.json.
v1
handlers
Package handlers handles and helps specify the algod/api Currently, server implementation annotations serve as the API ground truth.
Package handlers handles and helps specify the algod/api Currently, server implementation annotations serve as the API ground truth.
v2
generated
Package generated provides primitives to interact the openapi HTTP API.
Package generated provides primitives to interact the openapi HTTP API.
generated/private
Package private provides primitives to interact the openapi HTTP API.
Package private provides primitives to interact the openapi HTTP API.

Jump to

Keyboard shortcuts

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