entity

package
v0.0.0-...-ef69a7e Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Album

type Album struct {
	ID     string  `json:"id"`
	Title  string  `json:"title"`
	Artist string  `json:"artist"`
	Price  float64 `json:"price"`
}

func NewAlbum

func NewAlbum(title string, artist string, price float64) (*Album, error)

func (*Album) Validate

func (a *Album) Validate() error

type AlbumRepositoryInterface

type AlbumRepositoryInterface interface {
	Save(album *Album) error
	FindMany() ([]Album, error)
	FindOne(id string) (*Album, error)
	Delete(id string) error
}

Jump to

Keyboard shortcuts

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