caldav

package
v0.19.2 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2022 License: AGPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const DavBasePath = `/dav/`

DavBasePath is the base url path

View Source
const ListBasePath = DavBasePath + `lists`

ListBasePath is the base path for all lists resources

Variables

This section is empty.

Functions

func BasicAuth added in v0.19.0

func BasicAuth(username, password string, c echo.Context) (bool, error)

func EntryHandler

func EntryHandler(c echo.Context) error

EntryHandler handles all request to principal resources

func ListHandler

func ListHandler(c echo.Context) error

ListHandler returns all tasks from a list

func PrincipalHandler

func PrincipalHandler(c echo.Context) error

PrincipalHandler handles all request to principal resources

func TaskHandler

func TaskHandler(c echo.Context) error

TaskHandler is the handler which manages updating/deleting a single task

Types

type VikunjaCaldavListStorage

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

VikunjaCaldavListStorage represents a list storage

func (*VikunjaCaldavListStorage) CreateResource

func (vcls *VikunjaCaldavListStorage) CreateResource(rpath, content string) (*data.Resource, error)

CreateResource creates a new resource

func (*VikunjaCaldavListStorage) DeleteResource

func (vcls *VikunjaCaldavListStorage) DeleteResource(rpath string) error

DeleteResource deletes a resource

func (*VikunjaCaldavListStorage) GetResource

func (vcls *VikunjaCaldavListStorage) GetResource(rpath string) (*data.Resource, bool, error)

GetResource fetches a single resource

func (*VikunjaCaldavListStorage) GetResources

func (vcls *VikunjaCaldavListStorage) GetResources(rpath string, withChildren bool) ([]data.Resource, error)

GetResources returns either all lists, links to the principal, or only one list, depending on the request

func (*VikunjaCaldavListStorage) GetResourcesByFilters

func (vcls *VikunjaCaldavListStorage) GetResourcesByFilters(rpath string, filters *data.ResourceFilter) ([]data.Resource, error)

GetResourcesByFilters fetches a list of resources with a filter

func (*VikunjaCaldavListStorage) GetResourcesByList

func (vcls *VikunjaCaldavListStorage) GetResourcesByList(rpaths []string) ([]data.Resource, error)

GetResourcesByList fetches a list of resources from a slice of paths

func (*VikunjaCaldavListStorage) GetShallowResource

func (vcls *VikunjaCaldavListStorage) GetShallowResource(rpath string) (*data.Resource, bool, error)

GetShallowResource gets a ressource without childs Since Vikunja has no children, this is the same as GetResource

func (*VikunjaCaldavListStorage) UpdateResource

func (vcls *VikunjaCaldavListStorage) UpdateResource(rpath, content string) (*data.Resource, error)

UpdateResource updates a resource

type VikunjaListResourceAdapter

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

VikunjaListResourceAdapter holds the actual resource

func (*VikunjaListResourceAdapter) CalculateEtag

func (vlra *VikunjaListResourceAdapter) CalculateEtag() string

CalculateEtag returns the etag of a resource

func (*VikunjaListResourceAdapter) GetContent

func (vlra *VikunjaListResourceAdapter) GetContent() string

GetContent returns the content string of a resource (a task in our case)

func (*VikunjaListResourceAdapter) GetContentSize

func (vlra *VikunjaListResourceAdapter) GetContentSize() int64

GetContentSize is the size of a caldav content

func (*VikunjaListResourceAdapter) GetModTime

func (vlra *VikunjaListResourceAdapter) GetModTime() time.Time

GetModTime returns when the resource was last modified

func (*VikunjaListResourceAdapter) IsCollection

func (vlra *VikunjaListResourceAdapter) IsCollection() bool

IsCollection checks if the resoure in the adapter is a collection

Jump to

Keyboard shortcuts

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