webproxy

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(p datastore.ProposalsStore, f datastore.FundsStore, block0 *[]byte, address string, revProxyAddr string) error

func ShiftPath

func ShiftPath(p string) (head, tail string)

ShiftPath splits off the first component of p, which will be cleaned of relative components before processing. head will never contain a slash and tail will always be a rooted path without trailing slash.

Types

type ApiHandler

type ApiHandler struct {
	V0Handler *V0Handler
}

func (*ApiHandler) ServeHTTP

func (h *ApiHandler) ServeHTTP(res http.ResponseWriter, req *http.Request)

type App

type App struct {
	// Not using http.Handler for decoupling
	ApiHandler *ApiHandler
}

func (*App) ServeHTTP

func (h *App) ServeHTTP(res http.ResponseWriter, req *http.Request)

type Block0Handler

type Block0Handler struct{}

func (*Block0Handler) ServeHTTP

func (h *Block0Handler) ServeHTTP(res http.ResponseWriter, req *http.Request)

type FundInfoHandler

type FundInfoHandler struct{}

func (*FundInfoHandler) ServeHTTP

func (h *FundInfoHandler) ServeHTTP(res http.ResponseWriter, req *http.Request)

type ProposalHandler

type ProposalHandler struct {
	ProposalListAll    *ProposalListAll
	ProposalListSingle *ProposalListSingle
}

func (*ProposalHandler) ServeHTTP

func (h *ProposalHandler) ServeHTTP(res http.ResponseWriter, req *http.Request)

type ProposalListAll

type ProposalListAll struct{}

func (*ProposalListAll) ServeHTTP

func (h *ProposalListAll) ServeHTTP(res http.ResponseWriter, req *http.Request)

type ProposalListSingle

type ProposalListSingle struct{}

func (*ProposalListSingle) Handler

func (h *ProposalListSingle) Handler(internalID string, res http.ResponseWriter, req *http.Request) http.Handler

type V0Handler

type V0Handler struct {
	ProposalHandler *ProposalHandler
	Block0Handler   *Block0Handler
	FundInfoHandler *FundInfoHandler
}

func (*V0Handler) ServeHTTP

func (h *V0Handler) ServeHTTP(res http.ResponseWriter, req *http.Request)

Jump to

Keyboard shortcuts

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