caldav

package
v0.0.0-...-5d30c27 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2019 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) Do

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

executes a CalDAV request

func (*Client) Features

func (c *Client) Features(path string) ([]string, error)

fetches a list of CalDAV features supported by the server returns an error if the server does not support DAV

func (*Client) GetEvents

func (c *Client) GetEvents(path string) ([]*components.Event, error)

attempts to fetch an event on the remote CalDAV server

func (*Client) MakeCalendar

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

creates a new calendar collection on a given path

func (*Client) PutCalendars

func (c *Client) PutCalendars(path string, calendars ...*components.Calendar) error

creates or updates one or more calendars on the remote CalDAV server

func (*Client) PutEvents

func (c *Client) PutEvents(path string, events ...*components.Event) error

creates or updates one or more events on the remote CalDAV server

func (*Client) QueryEvents

func (c *Client) QueryEvents(path string, query *cent.CalendarQuery) (events []*components.Event, oerr error)

attempts to fetch an event on the remote CalDAV server

func (*Client) Server

func (c *Client) Server() *Server

returns the embedded CalDAV server reference

func (*Client) SupportsFeature

func (c *Client) SupportsFeature(name string, path string) (bool, error)

fetches a list of CalDAV features and checks if a certain one is supported by the server returns an error if the server does not support DAV

func (*Client) ValidateServer

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

fetches a list of CalDAV features and checks if a certain one is supported by the server returns an error if the server does not support DAV

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