Documentation
¶
Index ¶
- Constants
- func BasicAuth(username, password string, c echo.Context) (bool, error)
- func EntryHandler(c echo.Context) error
- func ListHandler(c echo.Context) error
- func PrincipalHandler(c echo.Context) error
- func TaskHandler(c echo.Context) error
- type VikunjaCaldavListStorage
- func (vcls *VikunjaCaldavListStorage) CreateResource(rpath, content string) (*data.Resource, error)
- func (vcls *VikunjaCaldavListStorage) DeleteResource(rpath string) error
- func (vcls *VikunjaCaldavListStorage) GetResource(rpath string) (*data.Resource, bool, error)
- func (vcls *VikunjaCaldavListStorage) GetResources(rpath string, withChildren bool) ([]data.Resource, error)
- func (vcls *VikunjaCaldavListStorage) GetResourcesByFilters(rpath string, filters *data.ResourceFilter) ([]data.Resource, error)
- func (vcls *VikunjaCaldavListStorage) GetResourcesByList(rpaths []string) ([]data.Resource, error)
- func (vcls *VikunjaCaldavListStorage) GetShallowResource(rpath string) (*data.Resource, bool, error)
- func (vcls *VikunjaCaldavListStorage) UpdateResource(rpath, content string) (*data.Resource, error)
- type VikunjaListResourceAdapter
- func (vlra *VikunjaListResourceAdapter) CalculateEtag() string
- func (vlra *VikunjaListResourceAdapter) GetContent() string
- func (vlra *VikunjaListResourceAdapter) GetContentSize() int64
- func (vlra *VikunjaListResourceAdapter) GetModTime() time.Time
- func (vlra *VikunjaListResourceAdapter) IsCollection() bool
Constants ¶
const DavBasePath = `/dav/`
DavBasePath is the base url path
const ListBasePath = DavBasePath + `lists`
ListBasePath is the base path for all lists resources
Variables ¶
This section is empty.
Functions ¶
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 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 ¶
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