filesystem: also allow dot (.) in file names
filesystem: allow @ in file names
It's apparently common in files from Google calendar.
The whole regex probably needs to be reconsidered, but for now just make
this work and keep it simple.
storage: streamline ETag calculation
This commit introduces some helpers so that ETags can be calculated at
the same time that files get read or written. Besides looking nicer, it
should also help reduce lock contention around file access, as files do
not need to be opened twice anymore.
cmd/tokidoki: fix unused error
storage/filesystem: add R/W locking
This commit adds read/write locking for individual files, so that
concurrent requests (e.g. to read and write the same file) cannot
interfere with one another.
The locking is not very fine-grained at the moment, and can probably be
improved upon. But it does ensure consistency.
Add handling of SIGINT and SIGTERM
Handle exit signals so that deferred calls are executed. It's mainly
to unlink the socket before exiting.
storage: adapt to go-webdav interface changes
Migrate to go-imap v2
v1 is no longer actively maintained.
Co-authored-by: Conrad Hoffmann <ch@bitfehler.net>
storage/filesytem: more consistent logging
auth/*: more consistent logging
Add htpasswd-style static file auth module
Can be used via `-auth.url=file://`. Only supports bcrypt password
hashes ($2y). Use e.g. `htpasswd -c -BC 14 <filename> <user>` to create
a file. Documentation forthcoming.
Update README to reflect the multi-resource update