Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Recovery ¶
func Recovery(log slog.Logger) gin.HandlerFunc
Recovery returns a middleware that recovers from any panics which occur in request handlers. It logs the panic, a stack trace, and the full request details. It also ensure the client receives a 500 response rather than no response at all.
Types ¶
type DcrdStatus ¶
type DcrdStatus struct {
Host string `json:"host"`
Connected bool `json:"connected"`
BestBlockError bool `json:"bestblockerror"`
BestBlockHeight uint32 `json:"bestblockheight"`
}
DcrdStatus describes the current status of the local instance of dcrd used by vspd. This is used by the admin.html template, and also serialized to JSON for the /admin/status endpoint.
type Node ¶
type Node interface {
ExistsLiveTicket(ticketHash string) (bool, error)
GetRawTransaction(txHash string) (*dcrdtypes.TxRawResult, error)
}
Node is satisfied by *rpc.DcrdRPC and retrieves data from the blockchain.
type WalletStatus ¶
type WalletStatus struct {
Connected bool `json:"connected"`
InfoError bool `json:"infoerror"`
DaemonConnected bool `json:"daemonconnected"`
VoteVersion uint32 `json:"voteversion"`
Unlocked bool `json:"unlocked"`
Voting bool `json:"voting"`
BestBlockError bool `json:"bestblockerror"`
BestBlockHeight int64 `json:"bestblockheight"`
}
WalletStatus describes the current status of a single voting wallet. This is used by the admin.html template, and also serialized to JSON for the /admin/status endpoint.