mirror of
https://git.sr.ht/~phw/scotty
synced 2025-04-30 05:37:05 +02:00
Unified export result types
This commit is contained in:
parent
a4a05ea047
commit
ca3b8492b0
12 changed files with 35 additions and 37 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue