view

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MDRenderer

func MDRenderer() (*glamour.TermRenderer, error)

MDRenderer constructs markdown renderer.

func ValidIssueColumns

func ValidIssueColumns() []string

ValidIssueColumns returns valid columns for issue list.

func ValidSprintColumns

func ValidSprintColumns() []string

ValidSprintColumns returns valid columns for sprint list.

Types

type Board

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

Board is a board view.

func NewBoard

func NewBoard(data []*jira.Board, opts ...BoardOption) *Board

NewBoard initializes a board.

func (Board) Render

func (b Board) Render() error

Render renders the board view.

type BoardOption

type BoardOption func(*Board)

BoardOption is a functional option to wrap board properties.

func WithBoardWriter

func WithBoardWriter(w io.Writer) BoardOption

WithBoardWriter sets a writer for the board.

type DisplayFormat

type DisplayFormat struct {
	Plain        bool
	NoHeaders    bool
	NoTruncate   bool
	Columns      []string
	FixedColumns uint
	TableStyle   tui.TableStyle
	Timezone     string
}

DisplayFormat is a issue display type.

type EpicIssueFunc

type EpicIssueFunc func(string) []*jira.Issue

EpicIssueFunc provides issues for the epic.

type EpicList

type EpicList struct {
	Total   int
	Project string
	Server  string
	Data    []*jira.Issue
	Issues  EpicIssueFunc
	Display DisplayFormat
}

EpicList is a list view for epics.

func (*EpicList) Render

func (el *EpicList) Render() error

Render renders the epic explorer view.

type Issue

type Issue struct {
	Server  string
	Data    *jira.Issue
	Display DisplayFormat
	Options IssueOption
}

Issue is a list view for issues.

func (Issue) Render

func (i Issue) Render() error

Render renders the view.

func (Issue) RenderedOut added in v0.3.0

func (i Issue) RenderedOut(renderer *glamour.TermRenderer) (string, error)

RenderedOut translates raw data to the format we want to display in.

func (Issue) String

func (i Issue) String() string

type IssueList

type IssueList struct {
	Total      int
	Project    string
	Server     string
	Data       []*jira.Issue
	Display    DisplayFormat
	Refresh    tui.RefreshFunc
	FooterText string
}

IssueList is a list view for issues.

func (*IssueList) Render

func (l *IssueList) Render() error

Render renders the view.

type IssueOption added in v0.3.0

type IssueOption struct {
	NumComments uint
}

IssueOption is filtering options for an issue.

type Project

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

Project is a project view.

func NewProject

func NewProject(data []*jira.Project, opts ...ProjectOption) *Project

NewProject initializes a project.

func (Project) Render

func (p Project) Render() error

Render renders the project view.

type ProjectOption

type ProjectOption func(*Project)

ProjectOption is a functional option to wrap project properties.

func WithProjectWriter

func WithProjectWriter(w io.Writer) ProjectOption

WithProjectWriter sets a writer for the project.

type ServerInfo added in v1.2.0

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

ServerInfo is a serveronfo view.

func NewServerInfo added in v1.2.0

func NewServerInfo(data *jira.ServerInfo, opts ...ServerInfoOption) *ServerInfo

NewServerInfo initializes server info struct.

func (ServerInfo) Render added in v1.2.0

func (s ServerInfo) Render() error

Render renders the serverinfo view.

type ServerInfoOption added in v1.2.0

type ServerInfoOption func(*ServerInfo)

ServerInfoOption is a functional option to wrap serverinfo properties.

func WithServerInfoWriter added in v1.2.0

func WithServerInfoWriter(w io.Writer) ServerInfoOption

WithServerInfoWriter sets a writer for the serverinfo view.

type SprintIssueFunc

type SprintIssueFunc func(boardID, sprintID int) []*jira.Issue

SprintIssueFunc provides issues in the sprint.

type SprintList

type SprintList struct {
	Project string
	Board   string
	Server  string
	Data    []*jira.Sprint
	Issues  SprintIssueFunc
	Display DisplayFormat
}

SprintList is a list view for sprints.

func (*SprintList) Render

func (sl *SprintList) Render() error

Render renders the sprint explorer view.

func (*SprintList) RenderInTable

func (sl *SprintList) RenderInTable() error

RenderInTable renders the list in table view.

Jump to

Keyboard shortcuts

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