postgres

package
v0.0.0-...-2cbf6af Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Wrap

func Wrap(err error, message string) error

Wrap returns an error annotating err with a stack trace at the point Wrap is called, and the supplied message. If err is nil, Wrap returns nil.

Types

type ToDoStorage

type ToDoStorage struct {
	DB *sqlx.DB
}

func New

func New() (*ToDoStorage, error)

func (*ToDoStorage) Create

func (s *ToDoStorage) Create(ctx context.Context, item *todoapp.ToDoItem) error

func (*ToDoStorage) Delete

func (s *ToDoStorage) Delete(ctx context.Context, id string) error

func (*ToDoStorage) Fetch

func (s *ToDoStorage) Fetch(ctx context.Context, id string) (*todoapp.ToDoItem, error)

func (*ToDoStorage) List

func (s *ToDoStorage) List(ctx context.Context) ([]todoapp.ToDoItem, error)

func (*ToDoStorage) Update

func (s *ToDoStorage) Update(ctx context.Context, item *todoapp.ToDoItem) error

Jump to

Keyboard shortcuts

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