storage

package
v0.0.0-...-fc2be90 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PostgresStore

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

func NewPostgresStore

func NewPostgresStore() (*PostgresStore, error)

func (*PostgresStore) CreateToDo

func (s *PostgresStore) CreateToDo(todo *models.ToDo) error

func (*PostgresStore) DeleteToDo

func (s *PostgresStore) DeleteToDo(id int) error

func (*PostgresStore) GetToDoById

func (s *PostgresStore) GetToDoById(id int) (*models.ToDo, error)

func (*PostgresStore) GetTodos

func (s *PostgresStore) GetTodos() ([]*models.ToDo, error)

func (*PostgresStore) Init

func (s *PostgresStore) Init() error

func (*PostgresStore) UpdateToDo

func (s *PostgresStore) UpdateToDo(id int, updateTodo *models.ToDo) error

type Storage

type Storage interface {
	CreateToDo(*models.ToDo) error
	DeleteToDo(int) error
	UpdateToDo(int, *models.ToDo) error
	GetTodos() ([]*models.ToDo, error)
	GetToDoById(int) (*models.ToDo, error)
}

Jump to

Keyboard shortcuts

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