services

package
v0.0.0-...-a50eb67 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2016 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 ArtistService

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

ArtistService provides services related with artists.

func NewArtistService

func NewArtistService(dao artistDAO) *ArtistService

NewArtistService creates a new ArtistService with the given artist DAO.

func (*ArtistService) Count

func (s *ArtistService) Count(rs app.RequestScope) (int, error)

Count returns the number of artists.

func (*ArtistService) Create

func (s *ArtistService) Create(rs app.RequestScope, model *models.Artist) (*models.Artist, error)

Create creates a new artist.

func (*ArtistService) Delete

func (s *ArtistService) Delete(rs app.RequestScope, id int) (*models.Artist, error)

Delete deletes the artist with the specified ID.

func (*ArtistService) Get

func (s *ArtistService) Get(rs app.RequestScope, id int) (*models.Artist, error)

Get returns the artist with the specified the artist ID.

func (*ArtistService) Query

func (s *ArtistService) Query(rs app.RequestScope, offset, limit int) ([]models.Artist, error)

Query returns the artists with the specified offset and limit.

func (*ArtistService) Update

func (s *ArtistService) Update(rs app.RequestScope, id int, model *models.Artist) (*models.Artist, error)

Update updates the artist with the specified ID.

Jump to

Keyboard shortcuts

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