pages

package
v0.0.0-...-64d8dd7 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2024 License: GPL-3.0 Imports: 13 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	All   = map[string]PageInterface{}
	Pages *tview.Pages

	Version string
)

Functions

func ChangePage

func ChangePage(nextPage string)

func GetCcClient

func GetCcClient(ccClient string) string

func GetEcClient

func GetEcClient(ecClient string) string

func GetRandomCcClient

func GetRandomCcClient() string

func GetRandomEcClient

func GetRandomEcClient() string

TODO - bchain and hamid - refactor the types to a repo to share types b/w wizard and stader node

func SetSettings

func SetSettings(settings SettingsType)

func Setup

func Setup(app *tview.Application)

TODO: This is a bit of a mess, I'm sure there's a better way to do this. Setup should be called once to initialize the pages

Types

type Confirmation

type Confirmation struct {
	*PageType
	// contains filtered or unexported fields
}

func (*Confirmation) GetFirstElement

func (n *Confirmation) GetFirstElement() tview.Primitive

func (*Confirmation) GoBack

func (n *Confirmation) GoBack()

func (*Confirmation) HandleEvents

func (n *Confirmation) HandleEvents(event *tcell.EventKey) *tcell.EventKey

func (*Confirmation) OnResume

func (n *Confirmation) OnResume()

func (*Confirmation) Page

func (n *Confirmation) Page() tview.Primitive

type ConsensusClientCheckpointSync

type ConsensusClientCheckpointSync struct {
	*PageType
	// contains filtered or unexported fields
}

func (*ConsensusClientCheckpointSync) GetFirstElement

func (p *ConsensusClientCheckpointSync) GetFirstElement() tview.Primitive

func (*ConsensusClientCheckpointSync) GoBack

func (p *ConsensusClientCheckpointSync) GoBack()

func (*ConsensusClientCheckpointSync) HandleEvents

func (p *ConsensusClientCheckpointSync) HandleEvents(event *tcell.EventKey) *tcell.EventKey

func (*ConsensusClientCheckpointSync) Page

type ConsensusClientDopelgangerProtection

type ConsensusClientDopelgangerProtection struct {
	*PageType
	// contains filtered or unexported fields
}

func (*ConsensusClientDopelgangerProtection) GetFirstElement

func (*ConsensusClientDopelgangerProtection) GoBack

func (*ConsensusClientDopelgangerProtection) HandleEvents

func (p *ConsensusClientDopelgangerProtection) HandleEvents(event *tcell.EventKey) *tcell.EventKey

func (*ConsensusClientDopelgangerProtection) Page

type ConsensusClientExternalSelectedLighthouse

type ConsensusClientExternalSelectedLighthouse struct {
	*PageType
	// contains filtered or unexported fields
}

func (*ConsensusClientExternalSelectedLighthouse) GetFirstElement

func (*ConsensusClientExternalSelectedLighthouse) GoBack

func (*ConsensusClientExternalSelectedLighthouse) HandleEvents

func (p *ConsensusClientExternalSelectedLighthouse) HandleEvents(event *tcell.EventKey) *tcell.EventKey

func (*ConsensusClientExternalSelectedLighthouse) Page

type ConsensusClientExternalSelectedLighthouseType

type ConsensusClientExternalSelectedLighthouseType struct {
	HTTPUrl string `json:"httpUrl"`
}

type ConsensusClientExternalSelectedLodestar

type ConsensusClientExternalSelectedLodestar struct {
	*PageType
	// contains filtered or unexported fields
}

func (*ConsensusClientExternalSelectedLodestar) GetFirstElement

func (*ConsensusClientExternalSelectedLodestar) GoBack

func (*ConsensusClientExternalSelectedLodestar) HandleEvents

func (p *ConsensusClientExternalSelectedLodestar) HandleEvents(event *tcell.EventKey) *tcell.EventKey

func (*ConsensusClientExternalSelectedLodestar) Page

type ConsensusClientExternalSelectedLodestarType

type ConsensusClientExternalSelectedLodestarType struct {
	HTTPUrl string `json:"httpUrl"`
}

type ConsensusClientExternalSelectedNimbus

type ConsensusClientExternalSelectedNimbus struct {
	*PageType
	// contains filtered or unexported fields
}

func (*ConsensusClientExternalSelectedNimbus) GetFirstElement

func (*ConsensusClientExternalSelectedNimbus) GoBack

func (*ConsensusClientExternalSelectedNimbus) HandleEvents

func (p *ConsensusClientExternalSelectedNimbus) HandleEvents(event *tcell.EventKey) *tcell.EventKey

func (*ConsensusClientExternalSelectedNimbus) Page

type ConsensusClientExternalSelectedNimbusType

type ConsensusClientExternalSelectedNimbusType struct {
	HTTPUrl string `json:"httpUrl"`
}

type ConsensusClientExternalSelectedPrysm

type ConsensusClientExternalSelectedPrysm struct {
	*PageType
	// contains filtered or unexported fields
}

func (*ConsensusClientExternalSelectedPrysm) GetFirstElement

func (*ConsensusClientExternalSelectedPrysm) GoBack

func (*ConsensusClientExternalSelectedPrysm) HandleEvents

func (p *ConsensusClientExternalSelectedPrysm) HandleEvents(event *tcell.EventKey) *tcell.EventKey

func (*ConsensusClientExternalSelectedPrysm) Page

type ConsensusClientExternalSelectedPrysmType

type ConsensusClientExternalSelectedPrysmType struct {
	HTTPUrl    string `json:"httpUrl"`
	JSONRpcUrl string `json:"jsonRpcUrl"`
}

type ConsensusClientExternalSelectedTeku

type ConsensusClientExternalSelectedTeku struct {
	*PageType
	// contains filtered or unexported fields
}

func (*ConsensusClientExternalSelectedTeku) GetFirstElement

func (*ConsensusClientExternalSelectedTeku) GoBack

func (*ConsensusClientExternalSelectedTeku) HandleEvents

func (p *ConsensusClientExternalSelectedTeku) HandleEvents(event *tcell.EventKey) *tcell.EventKey

func (*ConsensusClientExternalSelectedTeku) Page

type ConsensusClientExternalSelectedTekuType

type ConsensusClientExternalSelectedTekuType struct {
	HTTPUrl string `json:"httpUrl"`
}

type ConsensusClientExternalType

type ConsensusClientExternalType struct {
	Lighthouse ConsensusClientExternalSelectedLighthouseType `json:"lighthouse"`
	Nimbus     ConsensusClientExternalSelectedNimbusType     `json:"nimbus"`
	Prysm      ConsensusClientExternalSelectedPrysmType      `json:"prysm"`
	Teku       ConsensusClientExternalSelectedTekuType       `json:"teku"`
	Lodestar   ConsensusClientExternalSelectedLodestarType   `json:"lodestar"`
}

type ConsensusClientGraffiti

type ConsensusClientGraffiti struct {
	*PageType
	// contains filtered or unexported fields
}

func (*ConsensusClientGraffiti) GetFirstElement

func (p *ConsensusClientGraffiti) GetFirstElement() tview.Primitive

func (*ConsensusClientGraffiti) GoBack

func (p *ConsensusClientGraffiti) GoBack()

func (*ConsensusClientGraffiti) HandleEvents

func (p *ConsensusClientGraffiti) HandleEvents(event *tcell.EventKey) *tcell.EventKey

func (*ConsensusClientGraffiti) Page

type ConsensusClientSelection

type ConsensusClientSelection struct {
	*PageType
	// contains filtered or unexported fields
}

func (*ConsensusClientSelection) GetFirstElement

func (p *ConsensusClientSelection) GetFirstElement() tview.Primitive

func (*ConsensusClientSelection) GoBack

func (p *ConsensusClientSelection) GoBack()

func (*ConsensusClientSelection) HandleEvents

func (p *ConsensusClientSelection) HandleEvents(event *tcell.EventKey) *tcell.EventKey

func (*ConsensusClientSelection) Page

type ConsensusClientSettingsType

type ConsensusClientSettingsType struct {
	Selection              string                      `json:"selection"`
	ExternalSelection      string                      `json:"externalSelection"`
	Graffit                string                      `json:"graffit"`
	CheckpointUrl          string                      `json:"checkpointUrl"`
	DoppelgangerProtection string                      `json:"doppelgangerProtection"`
	External               ConsensusClientExternalType `json:"external"`
}

type Dummy

type Dummy struct {
	*PageType
}

func (*Dummy) HandleEvents

func (p *Dummy) HandleEvents(event *tcell.EventKey) *tcell.EventKey

func (*Dummy) OnResume

func (p *Dummy) OnResume()

func (*Dummy) Page

func (p *Dummy) Page() tview.Primitive

type ETHClient

type ETHClient struct {
	*PageType
	// contains filtered or unexported fields
}

func (*ETHClient) GetFirstElement

func (n *ETHClient) GetFirstElement() tview.Primitive

func (*ETHClient) GoBack

func (p *ETHClient) GoBack()

func (*ETHClient) HandleEvents

func (p *ETHClient) HandleEvents(event *tcell.EventKey) *tcell.EventKey

func (*ETHClient) Page

func (p *ETHClient) Page() tview.Primitive

type ExecutionClient

type ExecutionClient struct {
	*PageType
	// contains filtered or unexported fields
}

func (*ExecutionClient) GetFirstElement

func (p *ExecutionClient) GetFirstElement() tview.Primitive

func (*ExecutionClient) GoBack

func (p *ExecutionClient) GoBack()

func (*ExecutionClient) HandleEvents

func (p *ExecutionClient) HandleEvents(event *tcell.EventKey) *tcell.EventKey

func (*ExecutionClient) Page

func (p *ExecutionClient) Page() tview.Primitive

type ExecutionClientExternal

type ExecutionClientExternal struct {
	*PageType
	// contains filtered or unexported fields
}

func (*ExecutionClientExternal) GetFirstElement

func (p *ExecutionClientExternal) GetFirstElement() tview.Primitive

func (*ExecutionClientExternal) GoBack

func (p *ExecutionClientExternal) GoBack()

func (*ExecutionClientExternal) HandleEvents

func (p *ExecutionClientExternal) HandleEvents(event *tcell.EventKey) *tcell.EventKey

func (*ExecutionClientExternal) Page

type ExecutionClientExternalSelection

type ExecutionClientExternalSelection struct {
	*PageType
	// contains filtered or unexported fields
}

func (*ExecutionClientExternalSelection) GetFirstElement

func (n *ExecutionClientExternalSelection) GetFirstElement() tview.Primitive

func (*ExecutionClientExternalSelection) GoBack

func (*ExecutionClientExternalSelection) HandleEvents

func (p *ExecutionClientExternalSelection) HandleEvents(event *tcell.EventKey) *tcell.EventKey

func (*ExecutionClientExternalSelection) Page

type ExecutionClientExternalType

type ExecutionClientExternalType struct {
	HTTPBasedRpcApi      string `json:"httpBasedRpcApi"`
	WebsocketBasedRpcApi string `json:"websocketBasedRpcApi"`
}

type ExecutionClientSettingsType

type ExecutionClientSettingsType struct {
	SelectionOption string                      `json:"selectionOption"`
	External        ExecutionClientExternalType `json:"external"`
}

type FallbackClients

type FallbackClients struct {
	*PageType
	// contains filtered or unexported fields
}

func (*FallbackClients) GetFirstElement

func (n *FallbackClients) GetFirstElement() tview.Primitive

func (*FallbackClients) GoBack

func (p *FallbackClients) GoBack()

func (*FallbackClients) HandleEvents

func (p *FallbackClients) HandleEvents(event *tcell.EventKey) *tcell.EventKey

func (*FallbackClients) Page

func (p *FallbackClients) Page() tview.Primitive

type FallbackClientsLighthouse

type FallbackClientsLighthouse struct {
	*PageType
	// contains filtered or unexported fields
}

func (*FallbackClientsLighthouse) GetFirstElement

func (p *FallbackClientsLighthouse) GetFirstElement() tview.Primitive

func (*FallbackClientsLighthouse) GoBack

func (p *FallbackClientsLighthouse) GoBack()

GoBack

func (*FallbackClientsLighthouse) HandleEvents

func (p *FallbackClientsLighthouse) HandleEvents(event *tcell.EventKey) *tcell.EventKey

func (*FallbackClientsLighthouse) OnResume

func (p *FallbackClientsLighthouse) OnResume()

func (*FallbackClientsLighthouse) Page

type FallbackClientsLighthouseType

type FallbackClientsLighthouseType struct {
	ExecutionClientUrl string `json:"executionClientUrl"`
	BeaconNodeHttpUrl  string `json:"beaconNodeHttpUrl"`
}

type FallbackClientsLodestar

type FallbackClientsLodestar struct {
	*PageType
	// contains filtered or unexported fields
}

func (*FallbackClientsLodestar) GetFirstElement

func (p *FallbackClientsLodestar) GetFirstElement() tview.Primitive

func (*FallbackClientsLodestar) GoBack

func (p *FallbackClientsLodestar) GoBack()

GoBack

func (*FallbackClientsLodestar) HandleEvents

func (p *FallbackClientsLodestar) HandleEvents(event *tcell.EventKey) *tcell.EventKey

func (*FallbackClientsLodestar) OnResume

func (p *FallbackClientsLodestar) OnResume()

func (*FallbackClientsLodestar) Page

type FallbackClientsLodestarType

type FallbackClientsLodestarType struct {
	ExecutionClientUrl string `json:"executionClientUrl"`
	BeaconNodeHttpUrl  string `json:"beaconNodeHttpUrl"`
}

type FallbackClientsNimbus

type FallbackClientsNimbus struct {
	*PageType
	// contains filtered or unexported fields
}

func (*FallbackClientsNimbus) GetFirstElement

func (p *FallbackClientsNimbus) GetFirstElement() tview.Primitive

func (*FallbackClientsNimbus) GoBack

func (p *FallbackClientsNimbus) GoBack()

func (*FallbackClientsNimbus) HandleEvents

func (p *FallbackClientsNimbus) HandleEvents(event *tcell.EventKey) *tcell.EventKey

func (*FallbackClientsNimbus) OnResume

func (p *FallbackClientsNimbus) OnResume()

func (*FallbackClientsNimbus) Page

type FallbackClientsNimbusType

type FallbackClientsNimbusType struct {
	ExecutionClientUrl string `json:"executionClientUrl"`
	BeaconNodeHttpUrl  string `json:"beaconNodeHttpUrl"`
}

type FallbackClientsPrysm

type FallbackClientsPrysm struct {
	*PageType
	// contains filtered or unexported fields
}

func (*FallbackClientsPrysm) GetFirstElement

func (p *FallbackClientsPrysm) GetFirstElement() tview.Primitive

func (*FallbackClientsPrysm) GoBack

func (p *FallbackClientsPrysm) GoBack()

func (*FallbackClientsPrysm) HandleEvents

func (p *FallbackClientsPrysm) HandleEvents(event *tcell.EventKey) *tcell.EventKey

func (*FallbackClientsPrysm) OnResume

func (p *FallbackClientsPrysm) OnResume()

func (*FallbackClientsPrysm) Page

type FallbackClientsPrysmType

type FallbackClientsPrysmType struct {
	ExecutionClientUrl    string `json:"executionClientUrl"`
	BeaconNodeHttpUrl     string `json:"beaconNodeHttpUrl"`
	BeaconNodeJsonRpcpUrl string `json:"beaconNodeJsonRpcpUrl"`
}

type FallbackClientsSettingsType

type FallbackClientsSettingsType struct {
	SelectionOption string                        `json:"selectionOption"`
	Lighthouse      FallbackClientsLighthouseType `json:"lighthouse"`
	Lodestar        FallbackClientsLodestarType   `json:"lodestar"`
	Prysm           FallbackClientsPrysmType      `json:"prysm"`
	Teku            FallbackClientsTekuType       `json:"teku"`
	Nimbus          FallbackClientsNimbusType     `json:"nimbus"`
}

type FallbackClientsTeku

type FallbackClientsTeku struct {
	*PageType
	// contains filtered or unexported fields
}

func (*FallbackClientsTeku) GetFirstElement

func (p *FallbackClientsTeku) GetFirstElement() tview.Primitive

func (*FallbackClientsTeku) GoBack

func (p *FallbackClientsTeku) GoBack()

func (*FallbackClientsTeku) HandleEvents

func (p *FallbackClientsTeku) HandleEvents(event *tcell.EventKey) *tcell.EventKey

func (*FallbackClientsTeku) OnResume

func (p *FallbackClientsTeku) OnResume()

func (*FallbackClientsTeku) Page

type FallbackClientsTekuType

type FallbackClientsTekuType struct {
	ExecutionClientUrl string `json:"executionClientUrl"`
	BeaconNodeHttpUrl  string `json:"beaconNodeHttpUrl"`
}

type MEVBoost

type MEVBoost struct {
	*PageType
	// contains filtered or unexported fields
}

func (*MEVBoost) GetFirstElement

func (p *MEVBoost) GetFirstElement() tview.Primitive

func (*MEVBoost) GoBack

func (p *MEVBoost) GoBack()

func (*MEVBoost) HandleEvents

func (p *MEVBoost) HandleEvents(event *tcell.EventKey) *tcell.EventKey

func (*MEVBoost) OnResume

func (p *MEVBoost) OnResume()

func (*MEVBoost) Page

func (p *MEVBoost) Page() tview.Primitive

type MEVBoostExternal

type MEVBoostExternal struct {
	*PageType
	// contains filtered or unexported fields
}

func (*MEVBoostExternal) GetFirstElement

func (p *MEVBoostExternal) GetFirstElement() tview.Primitive

func (*MEVBoostExternal) GoBack

func (p *MEVBoostExternal) GoBack()

func (*MEVBoostExternal) HandleEvents

func (p *MEVBoostExternal) HandleEvents(event *tcell.EventKey) *tcell.EventKey

func (*MEVBoostExternal) OnResume

func (p *MEVBoostExternal) OnResume()

func (*MEVBoostExternal) Page

func (p *MEVBoostExternal) Page() tview.Primitive

type MEVBoostLocal

type MEVBoostLocal struct {
	*PageType
	// contains filtered or unexported fields
}

func (*MEVBoostLocal) GetFirstElement

func (p *MEVBoostLocal) GetFirstElement() tview.Primitive

func (*MEVBoostLocal) GoBack

func (p *MEVBoostLocal) GoBack()

func (*MEVBoostLocal) HandleEvents

func (p *MEVBoostLocal) HandleEvents(event *tcell.EventKey) *tcell.EventKey

func (*MEVBoostLocal) OnResume

func (p *MEVBoostLocal) OnResume()

func (*MEVBoostLocal) Page

func (p *MEVBoostLocal) Page() tview.Primitive

type ModalPage

type ModalPage struct {
}

func (*ModalPage) Page

func (p *ModalPage) Page(prop modalPageProps) tview.Primitive

type Monitoring

type Monitoring struct {
	*PageType
	// contains filtered or unexported fields
}

func (*Monitoring) GetFirstElement

func (n *Monitoring) GetFirstElement() tview.Primitive

func (*Monitoring) GoBack

func (n *Monitoring) GoBack()

func (*Monitoring) HandleEvents

func (n *Monitoring) HandleEvents(event *tcell.EventKey) *tcell.EventKey

func (*Monitoring) OnResume

func (n *Monitoring) OnResume()

func (*Monitoring) Page

func (n *Monitoring) Page() tview.Primitive

type Network

type Network struct {
	*PageType
	// contains filtered or unexported fields
}

func (*Network) GetFirstElement

func (n *Network) GetFirstElement() tview.Primitive

func (*Network) GoBack

func (n *Network) GoBack()

func (*Network) HandleEvents

func (n *Network) HandleEvents(event *tcell.EventKey) *tcell.EventKey

func (*Network) OnResume

func (n *Network) OnResume()

func (*Network) Page

func (n *Network) Page() tview.Primitive

type PageInterface

type PageInterface interface {
	// These will be called during initialisation
	// in pages/init.go
	SetPageID(id string)
	SetApp(app *tview.Application)

	// These will be implemented by each page
	Page() tview.Primitive
	HandleEvents(event *tcell.EventKey) *tcell.EventKey
	GetFirstElement() tview.Primitive
	OnResume()
	GoBack()
}

type PageType

type PageType struct {
	ID  string
	App *tview.Application
}

func (*PageType) GetFirstElement

func (p *PageType) GetFirstElement() tview.Primitive

GetFirstElement returns the first element in the page, so that the app can set focus on it

func (*PageType) GoBack

func (p *PageType) GoBack()

func (*PageType) HandleEvents

func (p *PageType) HandleEvents(event *tcell.EventKey) *tcell.EventKey

func (*PageType) OnResume

func (p *PageType) OnResume()

func (*PageType) Page

func (p *PageType) Page() tview.Primitive

func (*PageType) SetApp

func (p *PageType) SetApp(app *tview.Application)

func (*PageType) SetPageID

func (p *PageType) SetPageID(id string)

type SettingsType

type SettingsType struct {
	// Confirmed                bool                        `json:"confirmed"`
	// OpenConfigurationUI      bool                        `json:"openConfigurationUI"`
	Version                  string                      `json:"-"`
	Network                  string                      `json:"network"`
	EthClient                string                      `json:"ethClient"`
	ExecutionClient          ExecutionClientSettingsType `json:"executionClient"`
	ConsensusClient          ConsensusClientSettingsType `json:"consensusClient"`
	Monitoring               string                      `json:"monitoring"`
	MEVBoost                 string                      `json:"mevBoost"`
	MEVBoostExternalMevUrl   string                      `json:"mevBoostLocalMevUrl"`
	MEVBoostLocalRegulated   bool                        `json:"mevBoostLocalRegulated"`
	MEVBoostLocalUnregulated bool                        `json:"mevBoostLocalUnregulated"`
	FallbackClients          FallbackClientsSettingsType `json:"fallbackClients"`
}

func GetSettings

func GetSettings() SettingsType

Jump to

Keyboard shortcuts

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