gui

package
v1.8.3 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddHead

func AddHead()

AddHead adds a head to the GUI.

func Headless

func Headless() bool

Headless returns true when the GUI is headless.

func Heartbeat

func Heartbeat() time.Time

Heartbeat returns the heartbeat time.

func UpdateHeartbeat

func UpdateHeartbeat() time.Time

UpdateHeartbeat updates and returns the heartbeat time.

Types

type Gui

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

Gui is a struct that tracks global settings

func New

func New(apiAddr string) *Gui

New creates a new Gui.

func (*Gui) AddSessionId

func (gui *Gui) AddSessionId() string

AddSessionId adds a new session ID to memory.

func (*Gui) CachedPage

func (gui *Gui) CachedPage(cachedPage string, sessionId string) bool

CachedPage caches the page without the menu and returns true.

func (*Gui) Close

func (gui *Gui) Close() error

Close will shut down the GUI, giving the module enough time to run any required closing routines.

func (*Gui) CollapseMenu

func (gui *Gui) CollapseMenu(sessionId string) bool

CollapseMenu sets the menu state to collapsed and returns true

func (*Gui) ExpandMenu

func (gui *Gui) ExpandMenu(sessionId string) bool

ExpandMenu sets the menu state to expanded and returns true

func (*Gui) GetCachedPage

func (gui *Gui) GetCachedPage(sessionId string) string

GetCachedPage returns the session's cached page.

func (*Gui) GetTxHistoryPage

func (gui *Gui) GetTxHistoryPage(sessionId string) int

GetTxHistoryPage returns the session's transaction history page or -1 when no session is found.

func (*Gui) MenuIsCollapsed

func (gui *Gui) MenuIsCollapsed(sessionId string) bool

MenuIsCollapsed returns true when the menu state is collapsed

func (*Gui) SessionIdExists

func (gui *Gui) SessionIdExists(sessionId string) bool

SessionIdExists returns true when the supplied session ID exists in memory.

func (*Gui) SetStatus

func (gui *Gui) SetStatus(status string)

SetStatus sets the GUI's status.

func (*Gui) SetTxHistoryPage

func (gui *Gui) SetTxHistoryPage(txHistoryPage int, sessionId string) bool

SetTxHistoryPage sets the session's transaction history page and returns true.

func (*Gui) Status

func (gui *Gui) Status() string

Status returns the GUI's status.

type Session

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

Session is a struct that tracks session settings

Jump to

Keyboard shortcuts

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