storage

package
v0.0.0-...-c8cc802 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrRecordNotFound = errors.New("record not found")
	ErrEditConflict   = errors.New("edit conflict")
)

Functions

This section is empty.

Types

type PGStore

type PGStore struct {
	DB *sql.DB
}

func NewPGStore

func NewPGStore(db *sql.DB) *PGStore

func (*PGStore) Delete

func (m *PGStore) Delete(id int64) error

func (*PGStore) Get

func (m *PGStore) Get(id int64) (*models.Movie, error)

func (*PGStore) Insert

func (m *PGStore) Insert(movie *models.Movie) error

func (*PGStore) Update

func (m *PGStore) Update(movie *models.Movie) error

type Storage

type Storage struct {
	PGStore domain.Storer
}

func New

func New(pgstore domain.Storer) *Storage

Jump to

Keyboard shortcuts

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