carddav

package
v0.0.0-...-75f9ce2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 27, 2019 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Overview

Package carddav provides a CardDAV server implementation, as defined in RFC 6352.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound = errors.New("carddav: not found")
)

Functions

This section is empty.

Types

type AddressBook

type AddressBook interface {
	Info() (*AddressBookInfo, error)
	GetAddressObject(id string) (AddressObject, error)
	ListAddressObjects() ([]AddressObject, error)
	CreateAddressObject(vcard.Card) (AddressObject, error)
}

type AddressBookInfo

type AddressBookInfo struct {
	Name            string
	Description     string
	MaxResourceSize int
}

type AddressObject

type AddressObject interface {
	ID() string
	Stat() (os.FileInfo, error) // can return nil, nil
	Card() (vcard.Card, error)
	SetCard(vcard.Card) error
	Remove() error
}

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(ab AddressBook) *Handler

func (*Handler) ServeHTTP

func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL