Help us shape the future of Go! Take the 2026 Go Developer Survey

ticket

package
v0.0.0-...-144555e Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Statusses = [3]Status{
	Todo, InProgress, Done,
}

Functions

func CreateTicket

func CreateTicket(store Store) tea.Cmd

func EditTicket

func EditTicket(ticket Ticket, store Store) tea.Cmd

func IdStyle

func IdStyle() lipgloss.Style

Types

type Model

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

func NewModel

func NewModel(store Store) Model

func (*Model) EditTicket

func (m *Model) EditTicket(ticket Ticket)

func (Model) Init

func (m Model) Init() tea.Cmd

func (Model) SetSize

func (m Model) SetSize(width, height int) overlay.ModalModel

func (Model) Size

func (m Model) Size() (width int, height int)

func (Model) Update

func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (Model) View

func (m Model) View() string

type Status

type Status uint
const (
	Todo Status = iota
	InProgress
	Done

	NumberOfStatusses = int(iota)
)

func (Status) ColumnTitle

func (s Status) ColumnTitle() string

func (*Status) Parse

func (i *Status) Parse(value string) Status

func (Status) String

func (i Status) String() string

type Store

type Store interface {
	Load() tea.Msg
	New(title TicketTitle, description TicketDescription) tea.Cmd
	UpdateTicket(id TicketId, newTitle TicketTitle, newDescription TicketDescription) tea.Cmd
	UpdateStatus(id TicketId, newStatus Status) tea.Cmd
	RankTicketAfterTicket(id, afterId TicketId) tea.Cmd
	RankTicketBeforeTicket(id, beforeId TicketId) tea.Cmd
	MoveToNextStatus(id TicketId) tea.Cmd
	MoveToPreviousStatus(id TicketId) tea.Cmd
	DeleteTicket(id TicketId) tea.Cmd
}

func NewStore

func NewStore(db database.Connection) Store

type Ticket

type Ticket struct {
	ID TicketId

	Status      Status
	Title       TicketTitle
	Description TicketDescription
	// contains filtered or unexported fields
}

type TicketDescription

type TicketDescription string

type TicketId

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

func (TicketId) IsValid

func (i TicketId) IsValid() bool

func (TicketId) String

func (i TicketId) String() string

type TicketTitle

type TicketTitle string

type TicketsUpdatedMsg

type TicketsUpdatedMsg struct {
	Tickets []Ticket
}

Jump to

Keyboard shortcuts

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