storages

package
v0.0.0-...-feb5089 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Todo

type Todo struct {
	ID        uint64    `db:"id"`
	CreatedAt time.Time `db:"created_at"`
	UpdatedAt time.Time `db:"updated_at"`

	Title string `db:"title"`
	Body  string `db:"body"`
	Done  bool   `db:"done"`
}

type TodosStorage

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

func NewTodosStorage

func NewTodosStorage(db *sqlx.DB) TodosStorage

func (TodosStorage) Create

func (s TodosStorage) Create(todo *Todo) error

func (TodosStorage) Delete

func (s TodosStorage) Delete(todo *Todo) error

func (TodosStorage) Read

func (s TodosStorage) Read(todo *Todo) error

func (TodosStorage) ReadAll

func (s TodosStorage) ReadAll(todos *[]Todo) error

func (TodosStorage) ToggleDone

func (s TodosStorage) ToggleDone(todo *Todo) error

func (TodosStorage) Update

func (s TodosStorage) Update(todo *Todo) error

Jump to

Keyboard shortcuts

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