43 lines
1001 B
Go
43 lines
1001 B
Go
|
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")
|
||
|
}
|