todo

package
v0.0.0-...-2680af6 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateTodoParams

type CreateTodoParams struct {
	Title  string
	Status string
}

type FindTodosParams

type FindTodosParams struct {
	// optional
	ID     int64
	IDs    []int64
	Title  string
	Status string

	// required
	Limit  int
	Offset int
}

type Store

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

func NewStore

func NewStore(db *pgxpool.Pool) *Store

func (*Store) CreateTodo

func (s *Store) CreateTodo(ctx context.Context, params CreateTodoParams) (int64, error)

func (*Store) DeleteTodo

func (s *Store) DeleteTodo(ctx context.Context, id int64) error

func (*Store) FindTodos

func (s *Store) FindTodos(ctx context.Context, params FindTodosParams) ([]Todo, error)

func (*Store) UpdateTodo

func (s *Store) UpdateTodo(ctx context.Context, id int64, params UpdateTodoParams) error

type Todo

type Todo struct {
	ID     int64
	Title  string
	Status string
}

type UpdateTodoParams

type UpdateTodoParams struct {
	Title  string
	Status string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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