Documentation
¶
Index ¶
- Constants
- func BasicAuth(username, password string, c echo.Context) (bool, error)
- func EntryHandler(c echo.Context) error
- func PrincipalHandler(c echo.Context) error
- func ProjectHandler(c echo.Context) error
- func TaskHandler(c echo.Context) error
- type VikunjaCaldavProjectStorage
- func (vcls *VikunjaCaldavProjectStorage) CreateResource(rpath, content string) (*data.Resource, error)
- func (vcls *VikunjaCaldavProjectStorage) DeleteResource(_ string) error
- func (vcls *VikunjaCaldavProjectStorage) GetResource(rpath string) (*data.Resource, bool, error)
- func (vcls *VikunjaCaldavProjectStorage) GetResources(rpath string, _ bool) ([]data.Resource, error)
- func (vcls *VikunjaCaldavProjectStorage) GetResourcesByFilters(rpath string, _ *data.ResourceFilter) ([]data.Resource, error)
- func (vcls *VikunjaCaldavProjectStorage) GetResourcesByList(rpaths []string) (resources []data.Resource, err error)
- func (vcls *VikunjaCaldavProjectStorage) GetShallowResource(rpath string) (*data.Resource, bool, error)
- func (vcls *VikunjaCaldavProjectStorage) UpdateResource(rpath, content string) (*data.Resource, error)
- type VikunjaProjectResourceAdapter
- func (vlra *VikunjaProjectResourceAdapter) CalculateEtag() string
- func (vlra *VikunjaProjectResourceAdapter) GetContent() string
- func (vlra *VikunjaProjectResourceAdapter) GetContentSize() int64
- func (vlra *VikunjaProjectResourceAdapter) GetModTime() time.Time
- func (vlra *VikunjaProjectResourceAdapter) IsCollection() bool
Constants ¶
const DavBasePath = `/dav/`
DavBasePath is the base url path
const ProjectBasePath = DavBasePath + `projects`
ProjectBasePath is the base path for all projects 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 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
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) (resources []data.Resource, err error)
GetResourcesByList fetches a list 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