server

package
v0.0.0-...-82f4cde Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: AGPL-3.0 Imports: 20 Imported by: 0

Documentation

Overview

Package server Algod REST API.

Index

Constants

View Source
const (

	// TokenHeader is the header where we put the token.
	TokenHeader = "X-Algo-API-Token"
	// MaxRequestBodyBytes is the maximum request body size that we allow in our APIs.
	MaxRequestBodyBytes = "10MB"
)

Variables

This section is empty.

Functions

func NewRouter

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

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

Types

type APINode

type APINode struct{ *node.AlgorandFullNode }

APINode wraps the AlgorandFullNode to provide v2.NodeInterface.

func (APINode) LedgerForAPI

func (n APINode) LedgerForAPI() v2.LedgerForAPI

LedgerForAPI implements the v2.Handlers interface

type APINodeInterface

type APINodeInterface interface {
	lib.NodeInterface
	v2.NodeInterface
}

APINodeInterface describes all the node methods required by common and v2 APIs, and the server/router

type FollowerNode

type FollowerNode struct{ *node.AlgorandFollowerNode }

FollowerNode wraps the AlgorandFollowerNode to provide v2.NodeInterface.

func (FollowerNode) LedgerForAPI

func (n FollowerNode) LedgerForAPI() v2.LedgerForAPI

LedgerForAPI implements the v2.Handlers interface

Directories

Path Synopsis
lib
v1
v2
generated/data
Package data provides primitives to interact with the openapi HTTP API.
Package data provides primitives to interact with the openapi HTTP API.
generated/experimental
Package experimental provides primitives to interact with the openapi HTTP API.
Package experimental provides primitives to interact with the openapi HTTP API.
generated/model
Package model provides primitives to interact with the openapi HTTP API.
Package model provides primitives to interact with the openapi HTTP API.
generated/nonparticipating/private
Package private provides primitives to interact with the openapi HTTP API.
Package private provides primitives to interact with the openapi HTTP API.
generated/nonparticipating/public
Package public provides primitives to interact with the openapi HTTP API.
Package public provides primitives to interact with the openapi HTTP API.
generated/participating/private
Package private provides primitives to interact with the openapi HTTP API.
Package private provides primitives to interact with the openapi HTTP API.
generated/participating/public
Package public provides primitives to interact with the openapi HTTP API.
Package public provides primitives to interact with the openapi HTTP API.

Jump to

Keyboard shortcuts

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