models

package
v0.0.0-...-f53f79a Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoAlbum = errors.New("models: no album found")

Create a new error message and store it as a constant. We'll use this error later if the FindAlbum() function fails to find an album with a specific id.

Functions

func IncrementLikes

func IncrementLikes(id string) error

Types

type Album

type Album struct {
	Title  string
	Artist string
	Price  float64
	Likes  int
}

func FindAlbum

func FindAlbum(id string) (*Album, error)

func FindTopThree

func FindTopThree() ([]*Album, error)

Jump to

Keyboard shortcuts

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