view

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2021 License: MIT Imports: 16 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
}

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
}

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 {
	Data    *jira.Issue
	Display DisplayFormat
}

Issue is a list view for issues.

func (Issue) Render

func (i Issue) Render() error

Render renders the view.

func (Issue) String

func (i Issue) String() string

type IssueList

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

IssueList is a list view for issues.

func (IssueList) Render

func (l IssueList) Render() error

Render renders the view.

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 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