planner/sync/service/storage.go

24 lines
420 B
Go

package main
import (
"errors"
"time"
"go-mod.ewintr.nl/planner/item"
)
var (
ErrNotFound = errors.New("not found")
ErrNotARecurrer = errors.New("not a recurrer")
)
type Syncer interface {
Update(item item.Item) error
Updated(kind []item.Kind, t time.Time) ([]item.Item, error)
}
type Recurrer interface {
RecursBefore(date time.Time) ([]item.Item, error)
RecursNext(id string, date time.Time) error
}