2020-01-15 04:22:34 +01:00
|
|
|
package model
|
2016-02-26 07:32:31 +01:00
|
|
|
|
|
|
|
type Artist struct {
|
2020-01-10 05:33:01 +01:00
|
|
|
ID string
|
2016-03-28 02:13:00 +02:00
|
|
|
Name string
|
|
|
|
AlbumCount int
|
2016-03-02 15:33:49 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
type ArtistRepository interface {
|
2020-01-15 14:21:32 +01:00
|
|
|
CountAll() (int64, error)
|
|
|
|
Exists(id string) (bool, error)
|
2016-03-02 15:33:49 +01:00
|
|
|
Put(m *Artist) error
|
|
|
|
Get(id string) (*Artist, error)
|
2020-01-15 00:23:29 +01:00
|
|
|
PurgeInactive(active Artists) error
|
2020-01-13 22:02:49 +01:00
|
|
|
Search(q string, offset int, size int) (Artists, error)
|
2020-01-16 22:53:48 +01:00
|
|
|
Refresh(ids ...string) error
|
2016-03-02 15:33:49 +01:00
|
|
|
}
|
2016-03-04 22:42:09 +01:00
|
|
|
|
|
|
|
type Artists []Artist
|