mirror of
https://git.sr.ht/~phw/scotty
synced 2025-04-16 10:09:28 +02:00
Initial interfaces fr love transfer
This commit is contained in:
parent
49cb2774e2
commit
153b1a0def
2 changed files with 16 additions and 0 deletions
|
@ -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
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue