terminal

package
v0.0.0-...-30fe3bd Latest Latest
Warning

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

Go to latest
Published: May 4, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HelpViewer

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

HelpViewer displays the help message

func NewHelpViewer

func NewHelpViewer() *HelpViewer

NewHelpViewer returns a new viewer for help message

func (*HelpViewer) Draw

func (viewer *HelpViewer) Draw()

Draw populates the help message

type MarketViewer

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

MarketViewer displays real-time market data

func NewMarketViewer

func NewMarketViewer(market *portfolio.Market) *MarketViewer

NewMarketViewer returns a new viewer for the real-time market data

func (*MarketViewer) Draw

func (viewer *MarketViewer) Draw()

Draw fetches the latest market data and refreshes the viewer

func (*MarketViewer) Reload

func (viewer *MarketViewer) Reload(market *portfolio.Market)

Reload updates the market data object

type PerformanceViewer

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

PerformanceViewer displays the historic performance of a portfolio

func NewPerformanceViewer

func NewPerformanceViewer(performance *portfolio.Performance) *PerformanceViewer

NewPerformanceViewer returns a new viewer for the historic performance of a portfolio

func (*PerformanceViewer) Draw

func (viewer *PerformanceViewer) Draw()

Draw calculates the portfolio performance and refreshes the viewer

func (*PerformanceViewer) Reload

func (viewer *PerformanceViewer) Reload(performance *portfolio.Performance)

Reload updates the performance data object

type PortfolioViewer

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

PortfolioViewer displays real-time portfolio data

func NewPortfolioViewer

func NewPortfolioViewer(portfolio *portfolio.Portfolio) *PortfolioViewer

NewPortfolioViewer returns a new viewer for the real-time portfolio data

func (*PortfolioViewer) Draw

func (viewer *PortfolioViewer) Draw()

Draw fetches the latest portfolio data and refreshes the viewer

func (*PortfolioViewer) Reload

func (viewer *PortfolioViewer) Reload(portfolio *portfolio.Portfolio)

Reload updates the portfolio data object

type ProfileViewer

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

ProfileViewer displays real-time data for all portfolios in a profile

func NewProfileViewer

func NewProfileViewer(profile *portfolio.Profile) *ProfileViewer

NewProfileViewer returns a new viewer for the real-time profile data

func (*ProfileViewer) Draw

func (viewer *ProfileViewer) Draw()

Draw fetches the latest portfolio data and refreshes the viewer

func (*ProfileViewer) Reload

func (viewer *ProfileViewer) Reload(profile *portfolio.Profile)

Reload updates the profile data object

type ReturnViewer

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

ReturnViewer displays the trailing returns of a portfolio

func NewReturnViewer

func NewReturnViewer(performance *portfolio.Performance) *ReturnViewer

NewReturnViewer returns a new viewer for the trailing returns of a portfolio

func (*ReturnViewer) Draw

func (viewer *ReturnViewer) Draw()

Draw calculates the portfolio performance and refreshes the viewer

func (*ReturnViewer) Reload

func (viewer *ReturnViewer) Reload(performance *portfolio.Performance)

Reload updates the performance data object

type Terminal

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

Terminal defines the main terminal window for portfolio visualization

func NewTerminal

func NewTerminal(profileFile string) *Terminal

NewTerminal returns a new terminal window

func (*Terminal) Start

func (term *Terminal) Start() error

Start starts the terminal application

func (*Terminal) Stop

func (term *Terminal) Stop()

Stop stops the terminal application

Jump to

Keyboard shortcuts

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