planner/sync/service/storage.go

24 lines
420 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 11:51:43 +01:00
ErrNotFound = errors.New("not found")
ErrNotARecurrer = errors.New("not a recurrer")
2024-09-18 07:55:14 +02:00
)
type Syncer interface {
Update(item item.Item) error
Updated(kind []item.Kind, t time.Time) ([]item.Item, error)
}
2024-12-01 11:51:43 +01:00
type Recurrer interface {
RecursBefore(date time.Time) ([]item.Item, error)
RecursNext(id string, date time.Time) error
}