gui

package
v0.0.0-...-b221635 Latest Latest
Warning

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

Go to latest
Published: May 25, 2019 License: ISC Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DisableLog

func DisableLog()

DisableLog disables all library log output. Logging output is disabled by default until UseLogger is called.

func UseLogger

func UseLogger(logger slog.Logger)

UseLogger uses a specified Logger to output package logging info.

Types

type AccountStats

type AccountStats struct {
	MinedWork []*network.AcceptedWork
	Payments  []*dividend.Payment
	Clients   []*network.ClientInfo
}

AccountStats is a snapshot of an accounts contribution to the pool. This comprises of blocks mined by the pool and payments made to the account.

type Config

type Config struct {
	Ctx         context.Context
	SoloPool    bool
	GUIDir      string
	CSRFSecret  []byte
	BackupPass  string
	GUIPort     uint32
	TLSCertFile string
	TLSKeyFile  string
	ActiveNet   *chaincfg.Params
}

Config represents configuration details for the pool user interface.

type GUI

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

GUI represents the the mining pool user interface.

func NewGUI

func NewGUI(cfg *Config, hub *network.Hub, db *bolt.DB) (*GUI, error)

NewGUI creates an instance of the user interface.

func (*GUI) GenerateSecret

func (ui *GUI) GenerateSecret() []byte

GenerateSecret generates the CSRF secret.

func (*GUI) GetAdmin

func (ui *GUI) GetAdmin(w http.ResponseWriter, r *http.Request)

func (*GUI) GetIndex

func (ui *GUI) GetIndex(w http.ResponseWriter, r *http.Request)

func (*GUI) PostAdmin

func (ui *GUI) PostAdmin(w http.ResponseWriter, r *http.Request)

func (*GUI) PostBackup

func (ui *GUI) PostBackup(w http.ResponseWriter, r *http.Request)

func (*GUI) PostLogout

func (ui *GUI) PostLogout(w http.ResponseWriter, r *http.Request)

func (*GUI) Run

func (ui *GUI) Run()

Run starts the user interface.

func (*GUI) Shutdown

func (ui *GUI) Shutdown()

Shutdown tears down the user interface.

Jump to

Keyboard shortcuts

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