Documentation
¶
Overview ¶
Copyright © 2025 Oscar Marquez
Copyright © 2025 Oscar Marquez ¶
Copyright © 2025 Oscar Marquez
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CSVStorage ¶
type CSVStorage struct {
// contains filtered or unexported fields
}
func NewCSVStorage ¶
func NewCSVStorage(filepath string) *CSVStorage
func (*CSVStorage) AddTask ¶
func (s *CSVStorage) AddTask(task string) error
func (*CSVStorage) CompleteTask ¶
func (s *CSVStorage) CompleteTask(w io.Writer, id int) error
func (*CSVStorage) DeleteTask ¶
func (s *CSVStorage) DeleteTask(w io.Writer, id int) error
type FileStorage ¶
type FileStorage interface {
AddTask(task string) error
ListTasks(w io.Writer) error
CompleteTask(w io.Writer, id int) error
DeleteTask(w io.Writer, id int) error
}
func SelectStorage ¶
func SelectStorage(path, storageType string) (FileStorage, error)
type JSONStorage ¶
type JSONStorage struct {
// contains filtered or unexported fields
}
func NewJSONStorage ¶
func NewJSONStorage(filepath string) *JSONStorage
func (*JSONStorage) AddTask ¶
func (s *JSONStorage) AddTask(task string) error
func (*JSONStorage) CompleteTask ¶
func (s *JSONStorage) CompleteTask(w io.Writer, id int) error
func (*JSONStorage) DeleteTask ¶
func (s *JSONStorage) DeleteTask(w io.Writer, id int) error
Click to show internal directories.
Click to hide internal directories.