mirror of
https://github.com/1f349/go-webdav.git
synced 2024-12-23 00:34:23 +00:00
33 lines
543 B
Go
33 lines
543 B
Go
package carddav
|
|
|
|
// TODO: add context support
|
|
|
|
import (
|
|
"errors"
|
|
"os"
|
|
|
|
"github.com/emersion/go-vcard"
|
|
)
|
|
|
|
var (
|
|
ErrNotFound = errors.New("carddav: not found")
|
|
)
|
|
|
|
type AddressBookInfo struct {
|
|
Name string
|
|
Description string
|
|
MaxResourceSize int
|
|
}
|
|
|
|
type AddressObject interface {
|
|
ID() string
|
|
Card() (vcard.Card, error)
|
|
Stat() (os.FileInfo, error) // can return nil, nil
|
|
}
|
|
|
|
type AddressBook interface {
|
|
Info() (*AddressBookInfo, error)
|
|
GetAddressObject(id string) (AddressObject, error)
|
|
ListAddressObjects() ([]AddressObject, error)
|
|
}
|