common

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultBackgroundColor = "#282828"

	FallbackCommentColor = "#83a598"
)

Variables

View Source
var (
	BaseStyle = lipgloss.NewStyle().
		PaddingLeft(1).
		PaddingRight(1).
		Foreground(lipgloss.Color(DefaultBackgroundColor))
)

Functions

func HumanizeDuration

func HumanizeDuration(durationInSecs int) string

func RightPadTrim

func RightPadTrim(s string, length int) string

func Trim

func Trim(s string, length int) string

Types

type Issue

type Issue struct {
	IssueKey        string
	IssueType       string
	Summary         string
	Assignee        string
	Status          string
	AggSecondsSpent int
	TrackingActive  bool
	Desc            string
}

func (Issue) Description

func (issue Issue) Description() string

func (Issue) FilterValue

func (issue Issue) FilterValue() string

func (*Issue) SetDesc

func (issue *Issue) SetDesc()

func (Issue) Title

func (issue Issue) Title() string

type SyncedWorklogEntry

type SyncedWorklogEntry struct {
	ID       int
	IssueKey string
	BeginTS  time.Time
	EndTS    time.Time
	Comment  *string
}

func (SyncedWorklogEntry) Description

func (entry SyncedWorklogEntry) Description() string

func (SyncedWorklogEntry) FilterValue

func (entry SyncedWorklogEntry) FilterValue() string

func (*SyncedWorklogEntry) NeedsComment

func (entry *SyncedWorklogEntry) NeedsComment() bool

func (SyncedWorklogEntry) Title

func (entry SyncedWorklogEntry) Title() string

type WorklogEntry

type WorklogEntry struct {
	ID              int
	IssueKey        string
	BeginTS         time.Time
	EndTS           *time.Time
	Comment         *string
	FallbackComment *string
	Active          bool
	Synced          bool
	SyncInProgress  bool
	Error           error
}

func (WorklogEntry) Description

func (entry WorklogEntry) Description() string

func (WorklogEntry) FilterValue

func (entry WorklogEntry) FilterValue() string

func (*WorklogEntry) NeedsComment

func (entry *WorklogEntry) NeedsComment() bool

func (WorklogEntry) SecsSpent

func (entry WorklogEntry) SecsSpent() int

func (WorklogEntry) Title

func (entry WorklogEntry) Title() string

Jump to

Keyboard shortcuts

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