Documentation ¶
Index ¶
- type ArtistService
- func (s *ArtistService) Count(rs app.RequestScope) (int, error)
- func (s *ArtistService) Create(rs app.RequestScope, model *models.Artist) (*models.Artist, error)
- func (s *ArtistService) Delete(rs app.RequestScope, id int) (*models.Artist, error)
- func (s *ArtistService) Get(rs app.RequestScope, id int) (*models.Artist, error)
- func (s *ArtistService) Query(rs app.RequestScope, offset, limit int) ([]models.Artist, error)
- func (s *ArtistService) Update(rs app.RequestScope, id int, model *models.Artist) (*models.Artist, error)
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.
Click to show internal directories.
Click to hide internal directories.