planner/sync/service/storage.go

23 lines
387 B
Go
Raw Normal View History

2024-09-18 07:55:14 +02:00
package main
import (
"errors"
"time"
2024-09-20 07:09:30 +02:00
"go-mod.ewintr.nl/planner/item"
2024-09-18 07:55:14 +02:00
)
var (
2024-12-01 10:22:47 +01:00
ErrNotFound = errors.New("not found")
ErrNotARecurrer = errors.New("not a recurrer")
2024-09-18 07:55:14 +02:00
)
type Syncer interface {
2024-12-01 10:22:47 +01:00
Update(item item.Item, t time.Time) error
2024-09-18 07:55:14 +02:00
Updated(kind []item.Kind, t time.Time) ([]item.Item, error)
}
2024-12-01 10:22:47 +01:00
type Recurrer interface {
2024-12-23 09:43:45 +01:00
ShouldRecur(date item.Date) ([]item.Item, error)
2024-12-01 10:22:47 +01:00
}