persistence

package
v0.0.0-...-480ba54 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2020 License: GPL-3.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 PhotoPersistence

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

func NewPhotoPersistence

func NewPhotoPersistence(db *sql.DB) PhotoPersistence

func (*PhotoPersistence) Fetch

func (p *PhotoPersistence) Fetch(id int) (*models.Photo, error)

Fetch retrieve a photo

func (*PhotoPersistence) FetchAll

func (p *PhotoPersistence) FetchAll() ([]*models.Photo, error)

func (*PhotoPersistence) Save

func (p *PhotoPersistence) Save(photo models.Photo) (int, error)

Save Places photo in file system and stores info in database

Jump to

Keyboard shortcuts

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