dashboard

package
v0.0.0-...-e6555c8 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2022 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetHeader

func GetHeader(clock *widgets.Paragraph) []interface{}

Header component for the dashboard

func GetTimePassedSince

func GetTimePassedSince(createdAt time.Time, withSeconds bool) string

Types

type AttackerSuccessWindow

type AttackerSuccessWindow struct {
	GaugeComponent
	// contains filtered or unexported fields
}

Tracks the overall success chance of the attacker team

func NewAttackerSuccessWindow

func NewAttackerSuccessWindow(combatService combat.IService) *AttackerSuccessWindow

Constructor for an UptimeTrackerWindow

func (*AttackerSuccessWindow) GetWidget

func (asw *AttackerSuccessWindow) GetWidget() *widgets.Gauge

func (*AttackerSuccessWindow) Refresh

func (asw *AttackerSuccessWindow) Refresh()

type BestAttackersWindow

type BestAttackersWindow struct {
	BestPlayersWindow
	// contains filtered or unexported fields
}

Tracks the top 5 attackers

func NewBestAttackersWindow

func NewBestAttackersWindow(playerService player.IService) *BestAttackersWindow

Constructor for a new best attackers window

func (*BestAttackersWindow) GetWidget

func (baw *BestAttackersWindow) GetWidget() *widgets.List

func (*BestAttackersWindow) Refresh

func (baw *BestAttackersWindow) Refresh()

type BestDefendersWindow

type BestDefendersWindow struct {
	BestPlayersWindow
	// contains filtered or unexported fields
}

Tracks the top 5 defenders

func NewBestDefendersWindow

func NewBestDefendersWindow(playerService player.IService) *BestDefendersWindow

Constructor for a new best attackers window

func (*BestDefendersWindow) GetWidget

func (bdw *BestDefendersWindow) GetWidget() *widgets.List

func (*BestDefendersWindow) Refresh

func (bdw *BestDefendersWindow) Refresh()

type BestPlayersWindow

type BestPlayersWindow struct {
	List *widgets.List
}

Generic type for the best player tracking

type ClockWindow

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

Describes a clock window widget

func NewClockWindow

func NewClockWindow(createdAt time.Time) *ClockWindow

Constructor for ClockWindow

func (*ClockWindow) GetWidget

func (cw *ClockWindow) GetWidget() *widgets.Paragraph

returns the widget

func (*ClockWindow) Refresh

func (cw *ClockWindow) Refresh()

Refreshes the time on the clock

type GaugeComponent

type GaugeComponent struct {
	Percentage int
	Gauge      *widgets.Gauge
}

Describes a gauge component

type IRefreshable

type IRefreshable interface {
	// Function to call when refresh is needed
	Refresh()
}

Describes a component that can be refreshed

type LogWindow

type LogWindow struct {
	CreatedAt time.Time
	List      *widgets.List
}

LogWindow is a wrapper class over the lists to provide handy high level functionality for rendering logs

func GetEventLog

func GetEventLog(createdAt time.Time) *LogWindow

Returns a new list for event logs

func (*LogWindow) Push

func (lw *LogWindow) Push(item string) *LogWindow

Pushes a given number of item into the stack

type UptimeTrackerWindow

type UptimeTrackerWindow struct {
	GaugeComponent
	// contains filtered or unexported fields
}

Tracks overall uptime for the defensive team

func NewUptimeTrackerWindow

func NewUptimeTrackerWindow(combatService combat.IService) *UptimeTrackerWindow

Constructor for an UptimeTrackerWindow

func (*UptimeTrackerWindow) GetWidget

func (utw *UptimeTrackerWindow) GetWidget() *widgets.Gauge

func (*UptimeTrackerWindow) Refresh

func (utw *UptimeTrackerWindow) Refresh()

Jump to

Keyboard shortcuts

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