Initial interfaces fr love transfer

This commit is contained in:
Philipp Wolfer 2023-11-10 00:57:25 +01:00
parent 49cb2774e2
commit 153b1a0def
No known key found for this signature in database
GPG key ID: 8FDF744D4919943B
2 changed files with 16 additions and 0 deletions

View file

@ -42,6 +42,14 @@ type ListenImport interface {
ImportListens(listens []Listen, oldestTimestamp time.Time) (ImportResult, error)
}
type LovesExport interface {
ExportLoves(oldestTimestamp time.Time) ([]Love, error)
}
type LovesImport interface {
ExportLoves(loves []Love, oldestTimestamp time.Time) (ImportResult, error)
}
type ImportResult struct {
Count int
LastTimestamp time.Time

View file

@ -56,3 +56,11 @@ type Listen struct {
PlaybackDuration time.Duration
UserName string
}
type Love struct {
Track
Created time.Time
UserName string
RecordingMbid MBID
RecordingMsid MBID
}