Documentation
¶
Index ¶
- func NewDashboard(appVersion string, configSchemaVersion string, configPath string) (err error)
- type ByPath
- type ByStage
- type Col
- type Config
- type ConfigManager
- type Dashboard
- type GitStatusWidget
- type GithubIssueWidget
- func (g *GithubIssueWidget) Activate()
- func (g *GithubIssueWidget) Deactivate()
- func (g *GithubIssueWidget) Disable()
- func (g *GithubIssueWidget) GetHighlightenPos() int
- func (g *GithubIssueWidget) GetWidget() *ui.List
- func (g *GithubIssueWidget) IsDisabled() bool
- func (g *GithubIssueWidget) IsReady() bool
- func (g *GithubIssueWidget) Render(client *github.Client) (err error)
- type ListRenderer
- func (l *ListRenderer) AddBody(line string)
- func (l *ListRenderer) GetCursor() int
- func (l *ListRenderer) MoveCursor(direction string) (items []string)
- func (l *ListRenderer) MoveCursorWithFocus(direction string) (items []string)
- func (l *ListRenderer) RenderActually() []string
- func (l *ListRenderer) ResetRender() (items []string)
- func (l *ListRenderer) SetBody(items []string)
- type ListRendererOption
- type ListWrapper
- func (l *ListWrapper) AddBody(line string)
- func (l *ListWrapper) GetCursor() int
- func (l *ListWrapper) GetWidget() *ui.List
- func (l *ListWrapper) MmoveCursorWithFocus(direction string)
- func (l *ListWrapper) MoveCursor(direction string)
- func (l *ListWrapper) Render()
- func (l *ListWrapper) ResetRender()
- func (l *ListWrapper) SetBody(items []string)
- type ListWrapperOption
- type Menu
- type MenuWidget
- type NoteWidget
- type Row
- type StatusItem
- type StatusItems
- type TailFileWidget
- type Widget
- type WidgetItem
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ByPath ¶ added in v0.9.4
type ByPath struct {
StatusItems
}
ByPath is a struct for sorting StatusItems
type ByStage ¶ added in v0.9.4
type ByStage struct {
StatusItems
}
ByStage is a struct for sorting StatusItems
type Config ¶
type Config struct {
SchemaVersion string `yaml:"schema_version"`
Timezone string
GitHubHost string `yaml:"github_url"`
Envs []map[string]string
Rows []Row
}
Config is the root schema of config file
type ConfigManager ¶
type ConfigManager struct {
LoadedData *Config
}
ConfigManager load and unmarshal config file
func NewConfigManager ¶
func NewConfigManager(path string) (c *ConfigManager, err error)
NewConfigManager constructs a ConfigManager
type Dashboard ¶
type Dashboard struct {
// contains filtered or unexported fields
}
Dashboard controls termui's widget layout and keybindings
type GitStatusWidget ¶ added in v0.9.4
type GitStatusWidget struct {
// contains filtered or unexported fields
}
GitStatusWidget is a command launcher
func NewGitStatusWidget ¶ added in v0.9.4
func NewGitStatusWidget(wi Widget, execPath string, envs []map[string]string) (g *GitStatusWidget, err error)
NewGitStatusWidget constructs a New GitStatusWidget
func (*GitStatusWidget) Activate ¶ added in v0.9.4
func (g *GitStatusWidget) Activate()
Activate is the implementation of Widget.Activate
func (*GitStatusWidget) Deactivate ¶ added in v0.9.4
func (g *GitStatusWidget) Deactivate()
Deactivate is the implementation of Widget.Activate
func (*GitStatusWidget) GetHighlightenPos ¶ added in v0.9.4
func (g *GitStatusWidget) GetHighlightenPos() int
GetHighlightenPos is the implementation of Widget.GetHighlightenPos
func (*GitStatusWidget) GetWidget ¶ added in v0.9.4
func (g *GitStatusWidget) GetWidget() *ui.List
GetWidget is the implementation of widget.Activate
func (*GitStatusWidget) IsDisabled ¶ added in v0.9.4
func (g *GitStatusWidget) IsDisabled() bool
IsDisabled is the implementation of Widget.IsDisabled
func (*GitStatusWidget) IsReady ¶ added in v0.9.4
func (g *GitStatusWidget) IsReady() bool
IsReady is the implementation of Widget.IsReady
type GithubIssueWidget ¶
type GithubIssueWidget struct {
// contains filtered or unexported fields
}
GithubIssueWidget is a widget which shows a issue of the current branch referering its name including issue id
func NewGithubIssueWidget ¶
func NewGithubIssueWidget(wi Widget, timezone string) (g *GithubIssueWidget, err error)
NewGithubIssueWidget constructs a New GithubIssueWidget
func (*GithubIssueWidget) Activate ¶
func (g *GithubIssueWidget) Activate()
Activate is the implementation of Widget.Activate
func (*GithubIssueWidget) Deactivate ¶
func (g *GithubIssueWidget) Deactivate()
Deactivate is the implementation of Widget.Deactivate
func (*GithubIssueWidget) Disable ¶
func (g *GithubIssueWidget) Disable()
Disable sets a GithubIssueWidget instance as disabled
func (*GithubIssueWidget) GetHighlightenPos ¶
func (g *GithubIssueWidget) GetHighlightenPos() int
GetHighlightenPos is the implementation of Widget.GetHighlightenPos
func (*GithubIssueWidget) GetWidget ¶
func (g *GithubIssueWidget) GetWidget() *ui.List
GetWidget is the implementation of Widget.Activate
func (*GithubIssueWidget) IsDisabled ¶
func (g *GithubIssueWidget) IsDisabled() bool
IsDisabled is the implementation of Widget.IsDisabled
func (*GithubIssueWidget) IsReady ¶
func (g *GithubIssueWidget) IsReady() bool
IsReady is the implementation of Widget.IsReady
type ListRenderer ¶
type ListRenderer struct {
// contains filtered or unexported fields
}
ListRenderer make a List widget which includes multi-line texts look like scrolled
func NewListRenderer ¶
func NewListRenderer(opt *ListRendererOption) (l *ListRenderer)
NewListRenderer constructs a ListWrapper
func (*ListRenderer) AddBody ¶ added in v0.9.4
func (l *ListRenderer) AddBody(line string)
AddBody add an another line of text to ListWrapper.body
func (*ListRenderer) GetCursor ¶
func (l *ListRenderer) GetCursor() int
GetCursor returns ListWrapper.cursor
func (*ListRenderer) MoveCursor ¶ added in v0.9.4
func (l *ListRenderer) MoveCursor(direction string) (items []string)
MoveCursor moves cursor position to "direction" with no focuse
func (*ListRenderer) MoveCursorWithFocus ¶ added in v0.9.4
func (l *ListRenderer) MoveCursorWithFocus(direction string) (items []string)
MoveCursorWithFocus moves cursor position to "direction" with a highlightened focus
func (*ListRenderer) RenderActually ¶
func (l *ListRenderer) RenderActually() []string
RenderActually renders list
func (*ListRenderer) ResetRender ¶
func (l *ListRenderer) ResetRender() (items []string)
ResetRender returns a initial multi-line texts
func (*ListRenderer) SetBody ¶
func (l *ListRenderer) SetBody(items []string)
SetBody replace strings on ListWrapper.body
type ListRendererOption ¶
ListRendererOption is the option argument for NewListWrapper
type ListWrapper ¶
type ListWrapper struct {
// contains filtered or unexported fields
}
ListWrapper make a List widget which includes multi-line texts look like scrolled
func NewListWrapper ¶
func NewListWrapper(opt *ListWrapperOption) (l *ListWrapper)
NewListWrapper constructs a ListWrapper
func (*ListWrapper) AddBody ¶ added in v0.9.4
func (l *ListWrapper) AddBody(line string)
AddBody add an another line of textto ListWrapper.body
func (*ListWrapper) GetCursor ¶
func (l *ListWrapper) GetCursor() int
GetCursor returns ListWrapper.cursor
func (*ListWrapper) GetWidget ¶
func (l *ListWrapper) GetWidget() *ui.List
GetWidget returns the instance of ui.List
func (*ListWrapper) MmoveCursorWithFocus ¶ added in v0.9.4
func (l *ListWrapper) MmoveCursorWithFocus(direction string)
MmoveCursorWithFocus moves cursor and update ui
func (*ListWrapper) MoveCursor ¶ added in v0.9.4
func (l *ListWrapper) MoveCursor(direction string)
MoveCursor moves cursor
func (*ListWrapper) ResetRender ¶
func (l *ListWrapper) ResetRender()
ResetRender returns a initial multi-line texts
func (*ListWrapper) SetBody ¶
func (l *ListWrapper) SetBody(items []string)
SetBody replace strings on ListWrapper.body
type ListWrapperOption ¶
type ListWrapperOption struct {
Title string
RealHeight int
Header []string
Body []string
LineHighLight bool
}
ListWrapperOption is the option argument for NewListWrapper
type MenuWidget ¶
type MenuWidget struct {
// contains filtered or unexported fields
}
MenuWidget is a command launcher
func NewMenuWidget ¶
func NewMenuWidget(wi Widget, envs []map[string]string) (m *MenuWidget, err error)
NewMenuWidget constructs a New MenuWidget
func (*MenuWidget) Activate ¶
func (m *MenuWidget) Activate()
Activate is the implementation of Widget.Activate
func (*MenuWidget) Deactivate ¶
func (m *MenuWidget) Deactivate()
Deactivate is the implementation of Widget.Activate
func (*MenuWidget) GetHighlightenPos ¶
func (m *MenuWidget) GetHighlightenPos() int
GetHighlightenPos is the implementation of Widget.GetHighlightenPos
func (*MenuWidget) GetWidget ¶
func (m *MenuWidget) GetWidget() *ui.List
GetWidget is the implementation of widget.Activate
func (*MenuWidget) IsDisabled ¶
func (m *MenuWidget) IsDisabled() bool
IsDisabled is the implementation of Widget.IsDisabled
func (*MenuWidget) IsReady ¶
func (m *MenuWidget) IsReady() bool
IsReady is the implementation of Widget.IsReady
type NoteWidget ¶
type NoteWidget struct {
// contains filtered or unexported fields
}
NoteWidget is a command launcher
func NewNoteWidget ¶
func NewNoteWidget(wi Widget, execPath string) (n *NoteWidget, err error)
NewNoteWidget constructs a New NoteWidget
func (*NoteWidget) Activate ¶
func (n *NoteWidget) Activate()
Activate is the implementation of Widget.Activate
func (*NoteWidget) Deactivate ¶
func (n *NoteWidget) Deactivate()
Deactivate is the implementation of Widget.Activate
func (*NoteWidget) GetHighlightenPos ¶
func (n *NoteWidget) GetHighlightenPos() int
GetHighlightenPos is the implementation of Widget.GetHighlightenPos
func (*NoteWidget) GetWidget ¶
func (n *NoteWidget) GetWidget() *ui.List
GetWidget is the implementation of widget.Activate
func (*NoteWidget) IsDisabled ¶
func (n *NoteWidget) IsDisabled() bool
IsDisabled is the implementation of Widget.IsDisabled
func (*NoteWidget) IsReady ¶
func (n *NoteWidget) IsReady() bool
IsReady is the implementation of Widget.IsReady
type StatusItem ¶ added in v0.9.4
StatusItem is a struct which stores each file status of git status
type StatusItems ¶ added in v0.9.4
type StatusItems []StatusItem
StatusItems is a collection of StatusItem, and implements sorting
func (StatusItems) Len ¶ added in v0.9.4
func (s StatusItems) Len() int
Len is interface method of sort
func (StatusItems) Swap ¶ added in v0.9.4
func (s StatusItems) Swap(i, j int)
Swap is interface method of sort
type TailFileWidget ¶ added in v0.9.4
type TailFileWidget struct {
// contains filtered or unexported fields
}
TailFileWidget is a command launcher
func NewTailFileWidget ¶ added in v0.9.4
func NewTailFileWidget(wi Widget, execPath string) (n *TailFileWidget, err error)
NewTailFileWidget constructs a New TailFileWidget
func (*TailFileWidget) Activate ¶ added in v0.9.4
func (n *TailFileWidget) Activate()
Activate is the implementation of Widget.Activate
func (*TailFileWidget) Deactivate ¶ added in v0.9.4
func (n *TailFileWidget) Deactivate()
Deactivate is the implementation of Widget.Activate
func (*TailFileWidget) GetHighlightenPos ¶ added in v0.9.4
func (n *TailFileWidget) GetHighlightenPos() int
GetHighlightenPos is the implementation of Widget.GetHighlightenPos
func (*TailFileWidget) GetWidget ¶ added in v0.9.4
func (n *TailFileWidget) GetWidget() *ui.List
GetWidget is the implementation of widget.Activate
func (*TailFileWidget) IsDisabled ¶ added in v0.9.4
func (n *TailFileWidget) IsDisabled() bool
IsDisabled is the implementation of Widget.IsDisabled
func (*TailFileWidget) IsReady ¶ added in v0.9.4
func (n *TailFileWidget) IsReady() bool
IsReady is the implementation of Widget.IsReady