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-19 12:06:03 +01:00
|
|
|
ShouldRecur(date item.Date) ([]item.Item, error)
|
2024-12-01 10:22:47 +01:00
|
|
|
}
|