navidrome/model/artist.go

31 lines
644 B
Go
Raw Normal View History

2020-01-14 22:22:34 -05:00
package model
import "time"
type Artist struct {
ID string
2016-03-27 20:13:00 -04:00
Name string
AlbumCount int
Starred bool
StarredAt time.Time
}
type Artists []Artist
type ArtistIndex struct {
ID string
Artists Artists
}
type ArtistIndexes []ArtistIndex
type ArtistRepository interface {
CountAll() (int64, error)
Exists(id string) (bool, error)
Put(m *Artist) error
Get(id string) (*Artist, error)
GetStarred(...QueryOptions) (Artists, error)
SetStar(star bool, ids ...string) error
Search(q string, offset int, size int) (Artists, error)
2020-01-16 16:53:48 -05:00
Refresh(ids ...string) error
GetIndex() (ArtistIndexes, error)
2020-01-17 23:28:11 -05:00
PurgeEmpty() error
}