caldav: add DiscoverContextURL

This commit is contained in:
Simon Ser
2023-12-27 23:16:49 +01:00
parent 174622c1eb
commit 7e076258d6
3 changed files with 44 additions and 32 deletions

View File

@@ -16,6 +16,12 @@ import (
"github.com/emersion/go-webdav/internal"
)
// DiscoverContextURL performs a DNS-based CardDAV service discovery as
// described in RFC 6352 section 11. It returns the URL to the CardDAV server.
func DiscoverContextURL(ctx context.Context, domain string) (string, error) {
return internal.DiscoverContextURL(ctx, "caldavs", domain)
}
// Client provides access to a remote CardDAV server.
type Client struct {
*webdav.Client