todo

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2025 License: MIT Imports: 8 Imported by: 0

README

todo

Go Reference

A simple TODO management sample implementation.

This module is created for learning and demonstration purposes.

License

MIT

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound        = errors.New("not found")
	ErrTitleTooLong    = errors.New("the title too long")
	ErrContentsTooLong = errors.New("the contents too long")
)

Functions

This section is empty.

Types

type Server

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

func NewServer

func NewServer() *Server

func (*Server) Delete

func (s *Server) Delete(id uuid.UUID) (*Task, error)

func (*Server) Get

func (s *Server) Get(id uuid.UUID) (*Task, error)

func (*Server) List

func (s *Server) List(limit int, filter func(task *Task) bool) ([]*Task, error)

func (*Server) Save

func (s *Server) Save(task *Task) error

type Task

type Task struct {
	ID         uuid.UUID
	Title      string
	Contents   string
	Done       bool
	CreateTime time.Time
	UpdateTime time.Time
}

func (*Task) Clone

func (t *Task) Clone() *Task

Jump to

Keyboard shortcuts

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