Add stub for filesystem storage backend

References: https://todo.sr.ht/~sircmpwn/tokidoki/2
This commit is contained in:
Conrad Hoffmann 2022-02-22 12:14:19 +01:00
parent 071ee7c729
commit 2b6220c1ea

42
storage/filesystem.go Normal file
View File

@ -0,0 +1,42 @@
package storage
import (
"github.com/emersion/go-vcard"
"github.com/emersion/go-webdav/carddav"
)
type filesystemBackend struct {
path string
}
var _ carddav.Backend = (*filesystemBackend)(nil)
func NewfilesystemBackend(path string) carddav.Backend {
return &filesystemBackend{
path: path,
}
}
func (*filesystemBackend) AddressBook() (*carddav.AddressBook, error) {
panic("TODO")
}
func (*filesystemBackend) GetAddressObject(path string, req *carddav.AddressDataRequest) (*carddav.AddressObject, error) {
panic("TODO")
}
func (*filesystemBackend) ListAddressObjects(req *carddav.AddressDataRequest) ([]carddav.AddressObject, error) {
panic("TODO")
}
func (*filesystemBackend) QueryAddressObjects(query *carddav.AddressBookQuery) ([]carddav.AddressObject, error) {
panic("TODO")
}
func (*filesystemBackend) PutAddressObject(path string, card vcard.Card) (loc string, err error) {
panic("TODO")
}
func (*filesystemBackend) DeleteAddressObject(path string) error {
panic("TODO")
}