state

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InListRange

func InListRange(scrollable constants.Scrollable) bool

Types

type IssueState

type IssueState struct {
	Issues   []api.Issue
	Filtered []api.Issue
	Filter   string
	Width    int
	Cursor   int
}

func (IssueState) FilteredIssues

func (state IssueState) FilteredIssues() []api.Issue

func (IssueState) GetCursor

func (state IssueState) GetCursor() int

func (IssueState) GetFilter

func (state IssueState) GetFilter() string

func (IssueState) GetSelected

func (state IssueState) GetSelected() constants.Presentable

func (IssueState) GetTotalHeight

func (state IssueState) GetTotalHeight() int

func (IssueState) GetTotalIssues

func (state IssueState) GetTotalIssues() int

func (*IssueState) GoToBottom

func (state *IssueState) GoToBottom()

func (*IssueState) GoToTop

func (state *IssueState) GoToTop()

func (IssueState) IncludedInFilter

func (state IssueState) IncludedInFilter(rendered string) bool

func (*IssueState) LineDown

func (state *IssueState) LineDown(lines int)

func (*IssueState) LineUp

func (state *IssueState) LineUp(lines int)

func (*IssueState) SetCursor

func (state *IssueState) SetCursor(cursor int)

func (*IssueState) SetFilter

func (state *IssueState) SetFilter(filter string)

func (IssueState) View

func (issueState IssueState) View(state State) string

type State

type State struct {
	States              map[string]interface{}
	CurrentUser         api.User
	SelectedItemColor   string
	UnselectedItemColor string
}

func NewState

func NewState(selectedItemColor, unselectedItemColor string) State

func (State) GetFilter

func (state State) GetFilter(pane string) string

func (State) GetFilterable

func (state State) GetFilterable(pane string) constants.Filterable

func (State) GetScrollable

func (state State) GetScrollable(name string) constants.Scrollable

func (State) GetSelectedElement

func (state State) GetSelectedElement(pane string) constants.Presentable

func (State) GetViewable

func (state State) GetViewable(name string) string

func (State) IsFilterable

func (state State) IsFilterable(pane string) bool

func (State) IssueView

func (state State) IssueView() string

func (*State) Scroll

func (state *State) Scroll(pane, direction string, lines int)

func (State) ScrollPane

func (state State) ScrollPane(pane, direction string, lines int)

func (*State) SetFilter

func (state *State) SetFilter(pane string, filter string)

func (*State) SetIssues

func (state *State) SetIssues(issues []api.Issue)

func (*State) SetTimeEntries

func (state *State) SetTimeEntries(timeEntries []api.TimeEntry)

func (*State) SetTimeEntryActivities

func (state *State) SetTimeEntryActivities(activites []api.TimeEntryActivity)

func (State) TimeEntriesView

func (state State) TimeEntriesView() string

func (State) WillChangeFilter

func (state State) WillChangeFilter(pane string, filter string) bool

type TimeEntryState

type TimeEntryState struct {
	TimeEntries         []api.TimeEntry
	Filtered            []api.TimeEntry
	Filter              string
	TimeEntryActivities []api.TimeEntryActivity
	Width               int
	Cursor              int
}

func (TimeEntryState) FilteredEntries

func (state TimeEntryState) FilteredEntries() []api.TimeEntry

func (TimeEntryState) GetCursor

func (state TimeEntryState) GetCursor() int

func (TimeEntryState) GetFilter

func (state TimeEntryState) GetFilter() string

func (TimeEntryState) GetSelected

func (state TimeEntryState) GetSelected() constants.Presentable

func (TimeEntryState) GetTotalHeight

func (state TimeEntryState) GetTotalHeight() int

func (TimeEntryState) GetTotalTimeEntries

func (state TimeEntryState) GetTotalTimeEntries() int

func (*TimeEntryState) GoToBottom

func (state *TimeEntryState) GoToBottom()

func (*TimeEntryState) GoToTop

func (state *TimeEntryState) GoToTop()

func (TimeEntryState) IncludedInFilter

func (state TimeEntryState) IncludedInFilter(rendered string) bool

func (*TimeEntryState) LineDown

func (state *TimeEntryState) LineDown(lines int)

func (*TimeEntryState) LineUp

func (state *TimeEntryState) LineUp(lines int)

func (*TimeEntryState) SetCursor

func (state *TimeEntryState) SetCursor(cursor int)

func (*TimeEntryState) SetFilter

func (state *TimeEntryState) SetFilter(filter string)

func (TimeEntryState) View

func (timeEntryState TimeEntryState) View(state State) string

Jump to

Keyboard shortcuts

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