Unified export result types

This commit is contained in:
Philipp Wolfer 2023-12-03 16:56:12 +01:00
parent a4a05ea047
commit ca3b8492b0
No known key found for this signature in database
GPG key ID: 8FDF744D4919943B
12 changed files with 35 additions and 37 deletions

View file

@ -147,18 +147,16 @@ func (l LovesList) Swap(i, j int) {
l[i], l[j] = l[j], l[i]
}
type ListensResult struct {
type ExportResult[T LovesList | ListensList] struct {
Items T
Total int
Listens ListensList
OldestTimestamp time.Time
Error error
}
type LovesResult struct {
Total int
Loves LovesList
Error error
}
type ListensResult ExportResult[ListensList]
type LovesResult ExportResult[LovesList]
type ImportResult struct {
TotalCount int