mirror of
https://git.sr.ht/~phw/scotty
synced 2025-04-28 06:57:56 +02:00
Move models to separate package
This allows easier reuse and better separation of code without introducing circular dependencies
This commit is contained in:
parent
cdddf89a3e
commit
9d97e324aa
8 changed files with 43 additions and 37 deletions
|
@ -26,6 +26,7 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/spf13/viper"
|
||||
"go.uploadedlobster.com/scotty/models"
|
||||
)
|
||||
|
||||
type DumpBackend struct{}
|
||||
|
@ -34,7 +35,7 @@ func (b DumpBackend) FromConfig(config *viper.Viper) Backend {
|
|||
return b
|
||||
}
|
||||
|
||||
func (b DumpBackend) ImportListens(listens []Listen, oldestTimestamp time.Time) (ImportResult, error) {
|
||||
func (b DumpBackend) ImportListens(listens []models.Listen, oldestTimestamp time.Time) (ImportResult, error) {
|
||||
result := ImportResult{
|
||||
Count: len(listens),
|
||||
LastTimestamp: oldestTimestamp,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue