caldav

package
v0.23.0 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2024 License: AGPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const DavBasePath = `/dav/`

DavBasePath is the base url path

View Source
const ProjectBasePath = DavBasePath + `projects`

ProjectBasePath is the base path for all projects 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 PrincipalHandler

func PrincipalHandler(c echo.Context) error

PrincipalHandler handles all request to principal resources

func ProjectHandler added in v0.21.0

func ProjectHandler(c echo.Context) error

ProjectHandler returns all tasks from a project

func TaskHandler

func TaskHandler(c echo.Context) error

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

Types

type VikunjaCaldavProjectStorage added in v0.21.0

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

VikunjaCaldavProjectStorage represents a project storage

func (*VikunjaCaldavProjectStorage) CreateResource added in v0.21.0

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

CreateResource creates a new resource

func (*VikunjaCaldavProjectStorage) DeleteResource added in v0.21.0

func (vcls *VikunjaCaldavProjectStorage) DeleteResource(_ string) error

DeleteResource deletes a resource

func (*VikunjaCaldavProjectStorage) GetResource added in v0.21.0

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

GetResource fetches a single resource

func (*VikunjaCaldavProjectStorage) GetResources added in v0.21.0

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

GetResources returns either all projects, links to the principal, or only one project, depending on the request

func (*VikunjaCaldavProjectStorage) GetResourcesByFilters added in v0.21.0

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

GetResourcesByFilters fetches a project of resources with a filter

func (*VikunjaCaldavProjectStorage) GetResourcesByList added in v0.21.0

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

GetResourcesByList fetches a project of resources from a slice of paths

func (*VikunjaCaldavProjectStorage) GetShallowResource added in v0.21.0

func (vcls *VikunjaCaldavProjectStorage) 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 (*VikunjaCaldavProjectStorage) UpdateResource added in v0.21.0

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

UpdateResource updates a resource

type VikunjaProjectResourceAdapter added in v0.21.0

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

VikunjaProjectResourceAdapter holds the actual resource

func (*VikunjaProjectResourceAdapter) CalculateEtag added in v0.21.0

func (vlra *VikunjaProjectResourceAdapter) CalculateEtag() string

CalculateEtag returns the etag of a resource

func (*VikunjaProjectResourceAdapter) GetContent added in v0.21.0

func (vlra *VikunjaProjectResourceAdapter) GetContent() string

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

func (*VikunjaProjectResourceAdapter) GetContentSize added in v0.21.0

func (vlra *VikunjaProjectResourceAdapter) GetContentSize() int64

GetContentSize is the size of a caldav content

func (*VikunjaProjectResourceAdapter) GetModTime added in v0.21.0

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

GetModTime returns when the resource was last modified

func (*VikunjaProjectResourceAdapter) IsCollection added in v0.21.0

func (vlra *VikunjaProjectResourceAdapter) 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