handlers

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: May 6, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FrontendHandler

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

func NewFrontendHandler

func NewFrontendHandler(d *daemon.Daemon) *FrontendHandler

func (*FrontendHandler) Health

func (fh *FrontendHandler) Health(w http.ResponseWriter, r *http.Request)

Health will return the "health" page using a go template

func (*FrontendHandler) Index

func (fh *FrontendHandler) Index(w http.ResponseWriter, r *http.Request)

Index will return the "index" page using a go template

func (*FrontendHandler) Wallets

func (fh *FrontendHandler) Wallets(w http.ResponseWriter, r *http.Request)

type HealthPage

type HealthPage struct {
	Clients     []*HealthPageClient `json:"clients"`
	ClientCount uint64              `json:"client_count"`
}

type HealthPageClient

type HealthPageClient struct {
	Index       int    `json:"index"`
	Name        string `json:"name"`
	Group       string `json:"group"`
	Version     string `json:"version"`
	BlockHeight uint64 `json:"block_height"`
	IsReady     bool   `json:"ready"`
}

type IndexPage

type IndexPage struct {
	Spammers []*IndexPageSpammer
}

type IndexPageSpammer

type IndexPageSpammer struct {
	ID          int64     `json:"id"`
	Name        string    `json:"name"`
	Description string    `json:"description"`
	Scenario    string    `json:"scenario"`
	Status      int       `json:"status"`
	Config      string    `json:"config"`
	CreatedAt   time.Time `json:"created_at"`
}

type WalletInfo

type WalletInfo struct {
	Address        string  `json:"address"`
	Balance        float64 `json:"balance"`
	PendingNonce   uint64  `json:"pending_nonce"`
	ConfirmedNonce uint64  `json:"confirmed_nonce"`
	SpammerID      int64   `json:"spammer_id,omitempty"`
	SpammerName    string  `json:"spammer_name,omitempty"`
	SpammerStatus  int     `json:"spammer_status,omitempty"`
}

type WalletsPage

type WalletsPage struct {
	RootWallet     *WalletInfo   `json:"root_wallet"`
	SpammerWallets []*WalletInfo `json:"spammer_wallets"`
}

Directories

Path Synopsis
Package docs Code generated by swaggo/swag.
Package docs Code generated by swaggo/swag.

Jump to

Keyboard shortcuts

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