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

todo

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(s *fuego.Server, svc *Service)

Types

type Detail

type Detail struct {
	Notes    []db.TaskNote
	Subitems []db.TaskSubitem
	Task     db.Task
}

type Filter

type Filter string
const (
	FilterActive    Filter = "active"
	FilterAll       Filter = "all"
	FilterArchived  Filter = "archived"
	FilterCompleted Filter = "completed"
	FilterDone      Filter = "done"
)

func ParseFilter

func ParseFilter(s string) Filter

type Service

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

func NewService

func NewService(tasks db.TaskStore) *Service

func (*Service) AddNote

func (s *Service) AddNote(taskID int64, body string) (db.TaskNote, error)

func (*Service) AddSubitem

func (s *Service) AddSubitem(taskID int64, title string) (db.TaskSubitem, error)

func (*Service) All

func (s *Service) All() ([]db.Task, error)

func (*Service) ClearCompleted

func (s *Service) ClearCompleted() (int, error)

func (*Service) Create

func (s *Service) Create(title string) (db.Task, error)

func (*Service) Delete

func (s *Service) Delete(id int64) error

func (*Service) DeleteSubitem

func (s *Service) DeleteSubitem(id int64) error

func (*Service) Edit

func (s *Service) Edit(id int64, title string) (db.Task, error)

func (*Service) EditDescription

func (s *Service) EditDescription(id int64, description string) (db.Task, error)

func (*Service) Get

func (s *Service) Get(id int64) (db.Task, error)

func (*Service) SetArchived

func (s *Service) SetArchived(id int64, archived bool) (db.Task, error)

func (*Service) SetCompleted

func (s *Service) SetCompleted(id int64, completed bool) (db.Task, error)

func (*Service) SetStarred

func (s *Service) SetStarred(id int64, starred bool) (db.Task, error)

func (*Service) SetSubitemCompleted

func (s *Service) SetSubitemCompleted(id int64, completed bool) (db.TaskSubitem, error)

func (*Service) Toggle

func (s *Service) Toggle(id int64) (db.Task, error)

func (*Service) View

func (s *Service) View(filter Filter) (View, error)

func (*Service) ViewTask

func (s *Service) ViewTask(filter Filter, selectedID int64) (View, error)

type Task

type Task struct {
	Completed   bool      `json:"completed"`
	CreatedAt   time.Time `json:"createdAt"`
	Description string    `json:"description"`
	ID          int64     `json:"id"`
	Title       string    `json:"title"`
	UpdatedAt   time.Time `json:"updatedAt"`
}

type TaskCreateIn

type TaskCreateIn struct {
	Description string `json:"description"`
	Title       string `json:"title"`
}

type TaskUpdateIn

type TaskUpdateIn struct {
	Completed   *bool   `json:"completed"`
	Description *string `json:"description"`
	Title       *string `json:"title"`
}

type View

type View struct {
	ActiveCount    int
	ArchivedCount  int
	CompletedCount int
	Detail         *Detail
	Filter         Filter
	Tasks          []db.Task
}

type WebServer

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

func NewWebServer

func NewWebServer(tasks *Service, log *slog.Logger) *WebServer

func NewWebServerWithChat

func NewWebServerWithChat(tasks *Service, chat *chat.Service, log *slog.Logger) *WebServer

func (*WebServer) Handler

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

Jump to

Keyboard shortcuts

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