widget

package
v0.9.6 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2017 License: MIT Imports: 23 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdditionalWidgetOption

type AdditionalWidgetOption struct {
	GithubClient *github.Client
}

AdditionalWidgetOption is

type ByPath

type ByPath struct {
	StatusItems
}

ByPath is a struct for sorting StatusItems

func (ByPath) Less

func (b ByPath) Less(i, j int) bool

Less is interface method of sort

type ByStage

type ByStage struct {
	StatusItems
}

ByStage is a struct for sorting StatusItems

func (ByStage) Less

func (s ByStage) Less(i, j int) bool

Less is interface method of sort

type Container

type Container struct {
	Metrics   string
	Name      string
	Container string
}

Container is the schema implements Config.Widgets.Conttainer

type DockerStatusWidget

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

DockerStatusWidget is a command launcher

func NewDockerStatusWidget

func NewDockerStatusWidget(opt *Option) (n *DockerStatusWidget, err error)

NewDockerStatusWidget constructs a New DockerStatusWidget

func (*DockerStatusWidget) Activate

func (n *DockerStatusWidget) Activate()

Activate is the implementation of Widget.Activate

func (*DockerStatusWidget) Deactivate

func (n *DockerStatusWidget) Deactivate()

Deactivate is the implementation of Widget.Activate

func (*DockerStatusWidget) Disable

func (n *DockerStatusWidget) Disable()

Disable is

func (*DockerStatusWidget) GetGridBufferers

func (n *DockerStatusWidget) GetGridBufferers() []ui.GridBufferer

GetGridBufferers is the implementation of widget.Activate

func (*DockerStatusWidget) GetHeight

func (n *DockerStatusWidget) GetHeight() int

GetHeight is the implementation of widget.Init

func (*DockerStatusWidget) GetHighlightenPos

func (n *DockerStatusWidget) GetHighlightenPos() int

GetHighlightenPos is the implementation of Widget.GetHighlightenPos

func (*DockerStatusWidget) GetWidth

func (n *DockerStatusWidget) GetWidth() int

GetWidth is the implementation of widget.Init

func (*DockerStatusWidget) Init added in v0.9.6

func (n *DockerStatusWidget) Init() (err error)

Init is the implementation of widget.Init

func (*DockerStatusWidget) IsDisabled

func (n *DockerStatusWidget) IsDisabled() bool

IsDisabled is the implementation of Widget.IsDisabled

func (*DockerStatusWidget) IsReady

func (n *DockerStatusWidget) IsReady() bool

IsReady is the implementation of Widget.IsReady

func (*DockerStatusWidget) SetOption

func (n *DockerStatusWidget) SetOption(opt *AdditionalWidgetOption)

SetOption is

type GitStatusWidget

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

GitStatusWidget is a command launcher

func NewGitStatusWidget

func NewGitStatusWidget(opt *Option) (g *GitStatusWidget, err error)

NewGitStatusWidget constructs a New GitStatusWidget

func (*GitStatusWidget) Activate

func (g *GitStatusWidget) Activate()

Activate is the implementation of Widget.Activate

func (*GitStatusWidget) Deactivate

func (g *GitStatusWidget) Deactivate()

Deactivate is the implementation of Widget.Activate

func (*GitStatusWidget) Disable

func (g *GitStatusWidget) Disable()

Disable is

func (*GitStatusWidget) GetGridBufferers

func (g *GitStatusWidget) GetGridBufferers() []ui.GridBufferer

GetGridBufferers is the implementation of widget.Activate

func (*GitStatusWidget) GetHeight

func (g *GitStatusWidget) GetHeight() int

GetHeight is the implementation of widget.Init

func (*GitStatusWidget) GetHighlightenPos

func (g *GitStatusWidget) GetHighlightenPos() int

GetHighlightenPos is the implementation of Widget.GetHighlightenPos

func (*GitStatusWidget) GetWidth

func (g *GitStatusWidget) GetWidth() int

GetWidth is the implementation of widget.Init

func (*GitStatusWidget) Init added in v0.9.6

func (g *GitStatusWidget) Init() (err error)

Init is the implementation of widget.Init

func (*GitStatusWidget) IsDisabled

func (g *GitStatusWidget) IsDisabled() bool

IsDisabled is the implementation of Widget.IsDisabled

func (*GitStatusWidget) IsReady

func (g *GitStatusWidget) IsReady() bool

IsReady is the implementation of Widget.IsReady

func (*GitStatusWidget) SetOption

func (g *GitStatusWidget) SetOption(opt *AdditionalWidgetOption)

SetOption is

type GithubIssueWidget

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

GithubIssueWidget is a stack which shows a issue of the current branch referering its name including issue id

func NewGithubIssueWidget

func NewGithubIssueWidget(opt *Option) (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) GetGridBufferers

func (g *GithubIssueWidget) GetGridBufferers() []ui.GridBufferer

GetGridBufferers is the implementation of Widget.Activate

func (*GithubIssueWidget) GetHeight

func (g *GithubIssueWidget) GetHeight() int

GetHeight is the implementation of stack.Init

func (*GithubIssueWidget) GetHighlightenPos

func (g *GithubIssueWidget) GetHighlightenPos() int

GetHighlightenPos is the implementation of Widget.GetHighlightenPos

func (*GithubIssueWidget) GetWidth

func (g *GithubIssueWidget) GetWidth() int

GetWidth is the implementation of stack.Init

func (*GithubIssueWidget) Init added in v0.9.6

func (g *GithubIssueWidget) Init() (err error)

Init renders the issue contents

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

func (*GithubIssueWidget) SetOption

func (g *GithubIssueWidget) SetOption(opt *AdditionalWidgetOption)

SetOption is

type Menu struct {
	Category    string
	Name        string
	Description string
	Command     string
}

Menu is the schema implements Config.Widgets.Menu

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

MenuWidget is a command launcher

func NewMenuWidget

func NewMenuWidget(opt *Option) (m *MenuWidget, err error)

NewMenuWidget constructs a New MenuWidget

func (m *MenuWidget) Activate()

Activate is the implementation of Widget.Activate

func (m *MenuWidget) Deactivate()

Deactivate is the implementation of Widget.Activate

func (m *MenuWidget) Disable()

Disable is

func (m *MenuWidget) GetGridBufferers() []ui.GridBufferer

GetGridBufferers is the implementation of stack.Activate

func (m *MenuWidget) GetHeight() int

GetHeight is the implementation of stack.Init

func (m *MenuWidget) GetHighlightenPos() int

GetHighlightenPos is the implementation of Widget.GetHighlightenPos

func (m *MenuWidget) GetWidth() int

GetWidth is the implementation of stack.Init

func (m *MenuWidget) Init() (err error)

Init is the implementation of stack.Init

func (m *MenuWidget) IsDisabled() bool

IsDisabled is the implementation of Widget.IsDisabled

func (m *MenuWidget) IsReady() bool

IsReady is the implementation of Widget.IsReady

func (m *MenuWidget) SetOption(opt *AdditionalWidgetOption)

SetOption is

type NoteWidget

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

NoteWidget is a command launcher

func NewNoteWidget

func NewNoteWidget(opt *Option) (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) Disable

func (n *NoteWidget) Disable()

Disable is

func (*NoteWidget) GetGridBufferers

func (n *NoteWidget) GetGridBufferers() []ui.GridBufferer

GetGridBufferers is the implementation of stack.Activate

func (*NoteWidget) GetHeight

func (n *NoteWidget) GetHeight() int

GetHeight is the implementation of stack.Init

func (*NoteWidget) GetHighlightenPos

func (n *NoteWidget) GetHighlightenPos() int

GetHighlightenPos is the implementation of Widget.GetHighlightenPos

func (*NoteWidget) GetWidth

func (n *NoteWidget) GetWidth() int

GetWidth is the implementation of stack.Init

func (*NoteWidget) Init added in v0.9.6

func (n *NoteWidget) Init() (err error)

Init is the implementation of stack.Init

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

func (*NoteWidget) SetOption

func (n *NoteWidget) SetOption(opt *AdditionalWidgetOption)

SetOption is

type Option

type Option struct {
	Envs       []map[string]string
	ExecPath   string
	Timezone   string
	Content    interface{}
	IssueRegex string
	Height     int
	Width      int
	Title      string
	Type       string
	Path       string
}

Option defines options for each type of widgets

func (*Option) GetHeight

func (w *Option) GetHeight() int

GetHeight is

func (*Option) GetTitle

func (w *Option) GetTitle() string

GetTitle is

func (*Option) GetWidth

func (w *Option) GetWidth() int

GetWidth is

type StatusItem

type StatusItem struct {
	Staged   bool
	StatusNo int
	Stage    string
	Status   string
	Path     string
}

StatusItem is a struct which stores each file status of git status

type StatusItems

type StatusItems []StatusItem

StatusItems is a collection of StatusItem, and implements sorting

func (StatusItems) Len

func (s StatusItems) Len() int

Len is interface method of sort

func (StatusItems) Swap

func (s StatusItems) Swap(i, j int)

Swap is interface method of sort

type TailFileWidget

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

TailFileWidget is a command launcher

func NewTailFileWidget

func NewTailFileWidget(opt *Option) (n *TailFileWidget, err error)

NewTailFileWidget constructs a New TailFileWidget

func (*TailFileWidget) Activate

func (n *TailFileWidget) Activate()

Activate is the implementation of Widget.Activate

func (*TailFileWidget) Deactivate

func (n *TailFileWidget) Deactivate()

Deactivate is the implementation of Widget.Activate

func (*TailFileWidget) Disable

func (n *TailFileWidget) Disable()

Disable is

func (*TailFileWidget) GetGridBufferers

func (n *TailFileWidget) GetGridBufferers() []ui.GridBufferer

GetGridBufferers is the implementation of stack.Activate

func (*TailFileWidget) GetHeight

func (n *TailFileWidget) GetHeight() int

GetHeight is the implementation of stack.Init

func (*TailFileWidget) GetHighlightenPos

func (n *TailFileWidget) GetHighlightenPos() int

GetHighlightenPos is the implementation of Widget.GetHighlightenPos

func (*TailFileWidget) GetWidth

func (n *TailFileWidget) GetWidth() int

GetWidth is the implementation of stack.Init

func (*TailFileWidget) Init added in v0.9.6

func (n *TailFileWidget) Init() (err error)

Init is the implementation of stack.Init

func (*TailFileWidget) IsDisabled

func (n *TailFileWidget) IsDisabled() bool

IsDisabled is the implementation of Widget.IsDisabled

func (*TailFileWidget) IsReady

func (n *TailFileWidget) IsReady() bool

IsReady is the implementation of Widget.IsReady

func (*TailFileWidget) SetOption

func (n *TailFileWidget) SetOption(opt *AdditionalWidgetOption)

SetOption is

type Widgetter

type Widgetter interface {
	Activate()
	Deactivate()
	Disable()
	SetOption(opt *AdditionalWidgetOption)
	IsDisabled() bool
	IsReady() bool
	GetGridBufferers() []ui.GridBufferer
	GetHighlightenPos() int
	Init() error
}

Widgetter define common interface for each widgets

type WrapperWidget

type WrapperWidget struct {
	Index      int
	WidgetType string
	Tab        int
	Title      string
	Rectangle  *vector.Rectangle
	Envs       []map[string]string
	ExecPath   string
	Timezone   string
	Content    interface{}
	IssueRegex string
	Type       string
	Path       string
	// contains filtered or unexported fields
}

WrapperWidget is

func (*WrapperWidget) Activate

func (w *WrapperWidget) Activate()

Activate is

func (*WrapperWidget) Deactivate

func (w *WrapperWidget) Deactivate()

Deactivate is

func (*WrapperWidget) Disable

func (w *WrapperWidget) Disable()

Disable is

func (*WrapperWidget) GetGridBufferers

func (w *WrapperWidget) GetGridBufferers() []ui.GridBufferer

GetGridBufferers is

func (*WrapperWidget) GetHighlightenPos

func (w *WrapperWidget) GetHighlightenPos() int

GetHighlightenPos is

func (*WrapperWidget) GetNeighborIndex

func (w *WrapperWidget) GetNeighborIndex(direction string) (idx int)

GetNeighborIndex is

func (*WrapperWidget) Init added in v0.9.6

func (w *WrapperWidget) Init() (err error)

Init is

func (*WrapperWidget) Is

func (w *WrapperWidget) Is(wType string) bool

Is is

func (*WrapperWidget) IsDisabled

func (w *WrapperWidget) IsDisabled() bool

IsDisabled is

func (*WrapperWidget) IsReady

func (w *WrapperWidget) IsReady() bool

IsReady is

func (*WrapperWidget) SetOption

func (w *WrapperWidget) SetOption(opt *AdditionalWidgetOption)

SetOption is

func (*WrapperWidget) Vary

func (w *WrapperWidget) Vary() (err error)

Vary is

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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