Documentation ¶
Overview ¶
This package is an abstraction of the Terminal UI itself.
Index ¶
- Constants
- func Blog() string
- func CreateBlogConfig(keyfile string, viewID string, address string) blogConfig
- func CreateGitHubProjectConfig(token string, owner string, repo string) githubConfig
- func DisplayError(tui *Tui, err error) func() error
- func ExtractDimensions(widgetOptions map[string]string) (dimensions []string)
- func ExtractMetric(widgetOptions map[string]string) (metric string)
- func ExtractTimeRange(base time.Time, widgetOptions map[string]string) (sd time.Time, ed time.Time, err error)
- func GitHubProject() string
- func MapSize(size string) (int, error)
- func NewDisplayWidget() *displayWidget
- func NewFeedlyWidget(address string) *feedlyWidget
- func NewGaWidget(keyfile string, viewID string) (*gaWidget, error)
- func NewGitWidget(path string) *gitWidget
- func NewGithubWidget(token string, owner string, repo string) (*githubWidget, error)
- func NewGscWidget(keyfile string, address string) (*gscWidget, error)
- func NewMonitorWidget(address string) (*monitorWidget, error)
- func NewProject(name string, nameOptions map[string]string, widgets [][][]Widget, ...) *project
- func NewTravisCIWidget(token string) *travisCIWidget
- type HostWidget
- type Tui
- func (t *Tui) AddBarChart(data []int, dimensions []string, title string, options map[string]string) (err error)
- func (t *Tui) AddCol(size string) error
- func (t *Tui) AddGauge(data float64, title string, options map[string]string) (err error)
- func (t *Tui) AddKEdit(key string, editDashboard func())
- func (t *Tui) AddKHotReload(key string, c chan<- time.Time)
- func (t *Tui) AddKQuit(key string)
- func (t *Tui) AddProjectTitle(title string, options map[string]string) (err error)
- func (t *Tui) AddRow()
- func (t *Tui) AddStackedBarChart(data [8][]int, dimensions []string, title string, colors []uint16, ...) (err error)
- func (t *Tui) AddTable(data [][]string, title string, options map[string]string) error
- func (t *Tui) AddTextBox(data string, title string, options map[string]string) (err error)
- func (t *Tui) Align()
- func (t *Tui) Clean()
- func (t *Tui) Close()
- func (t *Tui) HotReload()
- func (t *Tui) Loop()
- func (t *Tui) Render()
- type Widget
Constants ¶
const FeedlySubscribers = "feedly.box_subscribers"
Variables ¶
This section is empty.
Functions ¶
func CreateBlogConfig ¶ added in v0.5.0
func CreateGitHubProjectConfig ¶ added in v0.5.0
func DisplayError ¶
func ExtractDimensions ¶
func ExtractMetric ¶
func ExtractTimeRange ¶
func GitHubProject ¶ added in v0.5.0
func GitHubProject() string
func MapSize ¶
Map the size of each column if t-shirt size is provided (XXS to XL). Otherwise use the numerical value provided in the config directly.
func NewDisplayWidget ¶
func NewDisplayWidget() *displayWidget
func NewFeedlyWidget ¶
func NewFeedlyWidget(address string) *feedlyWidget
NewFeedlyWidget with all information necessary to connect to the Feedly API.
func NewGaWidget ¶
NewGaWidget including all information to connect to the Google Analytics API.
func NewGitWidget ¶
func NewGitWidget(path string) *gitWidget
func NewGithubWidget ¶
NewGithubWidget with all information necessary to connect to the Github API.
func NewGscWidget ¶
NewGscWidget including everything to connect to the Google Search Console API.
func NewMonitorWidget ¶
NewMonitorWidget with the address of the website to monitor.
func NewProject ¶
func NewProject( name string, nameOptions map[string]string, widgets [][][]Widget, sizes [][]string, themes map[string]map[string]string, tui *Tui, ) *project
NewProject for the dashboard.
func NewTravisCIWidget ¶
func NewTravisCIWidget(token string) *travisCIWidget
NewTravisCIWidget with all information necessary to connect to the Github API.
Types ¶
type HostWidget ¶
type HostWidget struct {
// contains filtered or unexported fields
}
func NewHostWidget ¶
func NewHostWidget(username, addr string) (*HostWidget, error)
func (*HostWidget) CreateWidgets ¶
func (ms *HostWidget) CreateWidgets(widget Widget, tui *Tui) (f func() error, err error)
type Tui ¶
type Tui struct {
// contains filtered or unexported fields
}
func (*Tui) AddBarChart ¶
func (t *Tui) AddBarChart( data []int, dimensions []string, title string, options map[string]string, ) (err error)
AddBarChart to the TUI, a representation of the evolution of a dataset overtime.
func (*Tui) AddProjectTitle ¶
AddProjectTitle to the TUI.
func (*Tui) AddStackedBarChart ¶
func (t *Tui) AddStackedBarChart( data [8][]int, dimensions []string, title string, colors []uint16, options map[string]string, ) (err error)
AddStackedBarChart to the TUI, which represent two or more dataset overtime.
func (*Tui) AddTextBox ¶
AddTextBox to the TUI.