ui

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package ui provides an embedded web-based kanban board for gig. Usage:

server := ui.New(store)
server.ListenAndServe(":9741")

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BoardData

type BoardData struct {
	Columns    []Column
	ReadyCount int
	TotalCount int
	View       string
}

BoardData is the template data for the board view.

type Column

type Column struct {
	Status gig.Status
	Tasks  []*gig.Task
}

Column represents a kanban column for template rendering.

type CreateData

type CreateData struct {
	AllTasks          []*gig.Task
	PreselectedParent string
}

CreateData is the template data for the create form.

type DepInfo

type DepInfo struct {
	Task *gig.Task
	Dep  *gig.Dependency
}

DepInfo pairs a dependency with its task info.

type DetailData

type DetailData struct {
	Task            *gig.Task
	Comments        []*gig.Comment
	DepsOn          []*DepInfo
	Blocks          []*DepInfo
	Children        []*gig.Task
	ChildrenColumns []Column
	Events          []*gig.Event
	AllTasks        []*gig.Task
}

DetailData is the template data for the task detail view.

type Server

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

Server is the gig web UI server.

func New

func New(store *gig.Store) *Server

New creates a new web UI server backed by the given store.

func (*Server) Handler

func (s *Server) Handler() http.Handler

Handler returns the http.Handler for use with custom servers.

func (*Server) ListenAndServe

func (s *Server) ListenAndServe(addr string) error

ListenAndServe starts the HTTP server on the given address (e.g. ":9741").

Jump to

Keyboard shortcuts

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