server

package
v0.0.0-...-862ce61 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server will hold connection to the db as well as handlers

func New

func New(bc *utxo.Blockchain, db *postgres.Database, c *config.Config) *Server

New returns a new Server

func (*Server) CoinCtx

func (i *Server) CoinCtx(next http.Handler) http.Handler

CoinCtx strips coin from url and places it on the ctx

func (*Server) Info

func (i *Server) Info(w http.ResponseWriter, r *http.Request)

Info handler for /{coin}/info

Jump to

Keyboard shortcuts

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