Documentation ¶
Index ¶
Constants ¶
View Source
const Version = "Version"
Version is the metadata field name
Variables ¶
View Source
var ( // ErrNotModified is returned when the stored version is the same as provided ErrNotModified = errors.New("not modified") // ErrVersionConflict when it's trying to update a file with an old version ErrVersionConflict = errors.New("version conflict") // ErrInvalidVersion when the stored version is missing or invalid ErrInvalidVersion = errors.New("invalid version") // ErrNotFound when the file is not found ErrNotFound = errors.New("not found") )
Functions ¶
Types ¶
type Store ¶
type Store interface { // GetCurrentVersion retrieves the version stored. GetCurrentVersion() (time.Time, error) // Get retrieves the file Get(time.Time, io.Writer) (time.Time, error) // SafePut overwrites the file if the new version is newer than the stored one. SafePut(time.Time, int64, io.ReadSeeker) error // Overwrite overwrites the version stored. Overwrite(int64, io.ReadSeeker) error }
Store retrieves and updates the TODO list
Click to show internal directories.
Click to hide internal directories.