mirror of
https://github.com/1f349/go-webdav.git
synced 2024-12-22 16:24:14 +00:00
caldav: support deletion of calendar objects
Has to be implemented by the backend.
This commit is contained in:
parent
561012d30f
commit
001e5953f7
@ -35,6 +35,7 @@ type Backend interface {
|
|||||||
ListCalendarObjects(ctx context.Context, req *CalendarCompRequest) ([]CalendarObject, error)
|
ListCalendarObjects(ctx context.Context, req *CalendarCompRequest) ([]CalendarObject, error)
|
||||||
QueryCalendarObjects(ctx context.Context, query *CalendarQuery) ([]CalendarObject, error)
|
QueryCalendarObjects(ctx context.Context, query *CalendarQuery) ([]CalendarObject, error)
|
||||||
PutCalendarObject(ctx context.Context, path string, calendar *ical.Calendar, opts *PutCalendarObjectOptions) (loc string, err error)
|
PutCalendarObject(ctx context.Context, path string, calendar *ical.Calendar, opts *PutCalendarObjectOptions) (loc string, err error)
|
||||||
|
DeleteCalendarObject(ctx context.Context, path string) error
|
||||||
|
|
||||||
webdav.UserPrincipalBackend
|
webdav.UserPrincipalBackend
|
||||||
}
|
}
|
||||||
@ -528,7 +529,7 @@ func (b *backend) Put(r *http.Request) (*internal.Href, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (b *backend) Delete(r *http.Request) error {
|
func (b *backend) Delete(r *http.Request) error {
|
||||||
panic("TODO")
|
return b.Backend.DeleteCalendarObject(r.Context(), r.URL.Path)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (b *backend) Mkcol(r *http.Request) error {
|
func (b *backend) Mkcol(r *http.Request) error {
|
||||||
|
Loading…
Reference in New Issue
Block a user