2022-02-21 10:39:57 +00:00
|
|
|
package storage
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/emersion/go-vcard"
|
|
|
|
"github.com/emersion/go-webdav/carddav"
|
|
|
|
)
|
|
|
|
|
|
|
|
type psqlBackend struct{}
|
|
|
|
|
|
|
|
var _ carddav.Backend = (*psqlBackend)(nil)
|
|
|
|
|
|
|
|
func NewPostgreSQL() carddav.Backend {
|
|
|
|
return &psqlBackend{}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (*psqlBackend) AddressBook() (*carddav.AddressBook, error) {
|
|
|
|
panic("TODO")
|
|
|
|
}
|
|
|
|
|
|
|
|
func (*psqlBackend) GetAddressObject(path string, req *carddav.AddressDataRequest) (*carddav.AddressObject, error) {
|
|
|
|
panic("TODO")
|
|
|
|
}
|
|
|
|
|
|
|
|
func (*psqlBackend) ListAddressObjects(req *carddav.AddressDataRequest) ([]carddav.AddressObject, error) {
|
|
|
|
panic("TODO")
|
|
|
|
}
|
|
|
|
|
|
|
|
func (*psqlBackend) QueryAddressObjects(query *carddav.AddressBookQuery) ([]carddav.AddressObject, error) {
|
|
|
|
panic("TODO")
|
|
|
|
}
|
|
|
|
|
|
|
|
func (*psqlBackend) PutAddressObject(path string, card vcard.Card) (loc string, err error) {
|
|
|
|
panic("TODO")
|
|
|
|
}
|
|
|
|
|
|
|
|
func (*psqlBackend) DeleteAddressObject(path string) error {
|
|
|
|
panic("TODO")
|
|
|
|
}
|