handlers

package
v0.0.0-...-43db901 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2018 License: GPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AccountBalanceHandler

func AccountBalanceHandler(w http.ResponseWriter, r *http.Request)

func AccountErrorHandler

func AccountErrorHandler(w http.ResponseWriter, r *http.Request, ga *blockchain.GladiusAccountManager) error

Account Manager Error Handler, checks required account permissions prior to accessing API endpoints

func AccountTransactionsHandler

func AccountTransactionsHandler(w http.ResponseWriter, r *http.Request)

func CreateSignedMessageHandler

func CreateSignedMessageHandler(ga *blockchain.GladiusAccountManager) func(w http.ResponseWriter, r *http.Request)

func ErrorHandler

func ErrorHandler(w http.ResponseWriter, r *http.Request, m string, e error, statusCode int)

ErrorHandler - Default Error Handler

func GetContentLinksHandler

func GetContentLinksHandler(p *peer.Peer) func(w http.ResponseWriter, r *http.Request)

GetContentLinksHandler gets the links to the given list of files from random nodes in the network

func GetContentNeededHandler

func GetContentNeededHandler(p *peer.Peer) func(w http.ResponseWriter, r *http.Request)

GetContentNeededHandler compares the content provided with what is required by the pool and returns the deltas in the format website/<asset or route/filename

func GetFullStateHandler

func GetFullStateHandler(p *peer.Peer) func(w http.ResponseWriter, r *http.Request)

GetFullStateHandler gets the current state the node has access to.

func GetNodeStateHandler

func GetNodeStateHandler(p *peer.Peer) func(w http.ResponseWriter, r *http.Request)

GetNodeStateHandler gets the current state of a specific node

func GetSignatureListHandler

func GetSignatureListHandler(p *peer.Peer) func(w http.ResponseWriter, r *http.Request)

GetSignatureListHandler gets the list of signatures used to create the current state

func JoinHandler

func JoinHandler(p *peer.Peer) func(w http.ResponseWriter, r *http.Request)

JoinHandler takes in an IP and tries to join it's cluster

func KeystoreAccountCreationHandler

func KeystoreAccountCreationHandler(ga *blockchain.GladiusAccountManager) func(w http.ResponseWriter, r *http.Request)

func KeystoreAccountRetrievalHandler

func KeystoreAccountRetrievalHandler(ga *blockchain.GladiusAccountManager) func(w http.ResponseWriter, r *http.Request)

func KeystoreAccountUnlockHandler

func KeystoreAccountUnlockHandler(ga *blockchain.GladiusAccountManager) func(w http.ResponseWriter, r *http.Request)

func LeaveHandler

func LeaveHandler(p *peer.Peer) func(w http.ResponseWriter, r *http.Request)

func MarketPoolsCreateHandler

func MarketPoolsCreateHandler(ga *blockchain.GladiusAccountManager) func(w http.ResponseWriter, r *http.Request)

MarketPoolsCreateHandler - Create a new Pool

func MarketPoolsHandler

func MarketPoolsHandler(ga *blockchain.GladiusAccountManager) func(w http.ResponseWriter, r *http.Request)

MarketPoolsHandler - Returns all Pools

func MarketPoolsOwnedHandler

func MarketPoolsOwnedHandler(ga *blockchain.GladiusAccountManager) func(w http.ResponseWriter, r *http.Request)

func NodeNewApplicationHandler

func NodeNewApplicationHandler(ga *blockchain.GladiusAccountManager) func(w http.ResponseWriter, r *http.Request)

New Routes

func NodeViewAllApplicationsHandler

func NodeViewAllApplicationsHandler(ga *blockchain.GladiusAccountManager) func(w http.ResponseWriter, r *http.Request)

func NodeViewApplicationHandler

func NodeViewApplicationHandler(ga *blockchain.GladiusAccountManager) func(w http.ResponseWriter, r *http.Request)

func NotFoundHandler

func NotFoundHandler(w http.ResponseWriter, r *http.Request)

func PoolContainsNode

func PoolContainsNode(database *gorm.DB) func(w http.ResponseWriter, r *http.Request)

func PoolEditApplicationHandler

func PoolEditApplicationHandler(db *gorm.DB) func(w http.ResponseWriter, r *http.Request)

func PoolNewApplicationHandler

func PoolNewApplicationHandler(db *gorm.DB) func(w http.ResponseWriter, r *http.Request)

func PoolNodes

func PoolNodes(database *gorm.DB) func(w http.ResponseWriter, r *http.Request)

func PoolPublicDataHandler

func PoolPublicDataHandler(ga *blockchain.GladiusAccountManager) func(w http.ResponseWriter, r *http.Request)

func PoolResponseForAddress

func PoolResponseForAddress(poolAddress string, ga *blockchain.GladiusAccountManager) (blockchain.PoolResponse, error)

func PoolRetrieveApprovedApplicationsHandler

func PoolRetrieveApprovedApplicationsHandler(db *gorm.DB) func(w http.ResponseWriter, r *http.Request)

func PoolRetrievePendingNodeConfirmationApplicationsHandler

func PoolRetrievePendingNodeConfirmationApplicationsHandler(db *gorm.DB) func(w http.ResponseWriter, r *http.Request)

func PoolRetrievePendingPoolConfirmationApplicationsHandler

func PoolRetrievePendingPoolConfirmationApplicationsHandler(db *gorm.DB) func(w http.ResponseWriter, r *http.Request)

func PoolRetrieveRejectedApplicationsHandler

func PoolRetrieveRejectedApplicationsHandler(db *gorm.DB) func(w http.ResponseWriter, r *http.Request)

func PoolStatusViewHandler

func PoolStatusViewHandler(db *gorm.DB) func(w http.ResponseWriter, r *http.Request)

func PoolViewApplicationHandler

func PoolViewApplicationHandler(db *gorm.DB) func(w http.ResponseWriter, r *http.Request)

func PublicPoolInformationHandler

func PublicPoolInformationHandler(database *gorm.DB) func(w http.ResponseWriter, r *http.Request)

Retrieve Pool Information

func PushStateMessageHandler

func PushStateMessageHandler(p *peer.Peer) func(w http.ResponseWriter, r *http.Request)

PushStateMessageHandler updates state with signed update and pushes state to a set of random peers. They then propigate it to their peers until the network has a consistent state

func ResponseHandler

func ResponseHandler(w http.ResponseWriter, r *http.Request, m string, success bool, err *string, res interface{}, transaction *types.Transaction)

ResponseHandler - Default Response Handler

func SetStateDebugHandler

func SetStateDebugHandler(p *peer.Peer) func(w http.ResponseWriter, r *http.Request)

func StatusHandler

func StatusHandler(w http.ResponseWriter, r *http.Request)

StatusHandler Main Status API route handler

func StatusTxHandler

func StatusTxHandler(w http.ResponseWriter, r *http.Request)

StatusTxHandler - Checks Status of txHash

func VerifySignedMessageHandler

func VerifySignedMessageHandler(w http.ResponseWriter, r *http.Request)

VerifySignedMessageHandler verifies the incoming message with takes the form of: {"message": "b64string", "hash": "b64string", "signature": "b64string", "address": ""}

Types

type PoolContainsWallet

type PoolContainsWallet struct {
	ContainsWallet bool
}

Jump to

Keyboard shortcuts

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