carddav

package
v0.0.0-...-c0173e1 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client webdav.Client

a client for making WebDAV requests

func NewClient

func NewClient(server *Server, native *http.Client) *Client

creates a new client for communicating with an WebDAV server

func NewDefaultClient

func NewDefaultClient(server *Server) *Client

creates a new client for communicating with a WebDAV server uses the default HTTP client from net/http

func (*Client) DeleteCard

func (c *Client) DeleteCard(path string) error

func (*Client) Do

func (c *Client) Do(req *Request) (*Response, error)

executes a CardDAV request

func (*Client) GetCard

func (c *Client) GetCard(path string) (*components.ContactCard, error)

attempts to fetch an event on the remote CardDAV server

func (*Client) PutCards

func (c *Client) PutCards(path string, cards ...*components.Card) error

creates or updates one or more cards on the remote CardDAV server

func (*Client) QueryCards

func (c *Client) QueryCards(path string, query *cont.ContactQuery) (contacts []*components.ContactCard, oerr error)

attempts to fetch an cards on the remote CalDAV server

func (*Client) Server

func (c *Client) Server() *Server

returns the embedded CalDAV server reference

func (*Client) WebDAV

func (c *Client) WebDAV() *webdav.Client

downcasts the client to the WebDAV interface

type Request

type Request webdav.Request

an CalDAV request object

func NewRequest

func NewRequest(method string, urlstr string, icaldata ...interface{}) (*Request, error)

creates a new CalDAV request object

func (*Request) WebDAV

func (r *Request) WebDAV() *webdav.Request

downcasts the request to the WebDAV interface

type Response

type Response webdav.Response

a WebDAV response object

func NewResponse

func NewResponse(response *webdav.Response) *Response

creates a new WebDAV response object

func (*Response) Decode

func (r *Response) Decode(into interface{}) error

decodes a CalDAV iCalendar response into the provided interface

func (*Response) WebDAV

func (r *Response) WebDAV() *webdav.Response

downcasts the response to the WebDAV interface

type Server

type Server webdav.Server

a server that accepts CalDAV requests

func NewServer

func NewServer(baseUrlStr string) (*Server, error)

creates a reference to a CalDAV server

func (*Server) NewRequest

func (s *Server) NewRequest(method string, path string, icaldata ...interface{}) (*Request, error)

creates a new CalDAV request object

func (*Server) WebDAV

func (s *Server) WebDAV() *webdav.Server

downcasts the server to the WebDAV interface

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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