Documentation
¶
Overview ¶
Package webdav discovers gowebdav servers advertised on the local network via mDNS and exposes them as transfer targets. gowebdav registers itself under the "_gowebdav._tcp" service type (see github.com/joshkerr/gowebdav), so no central registry is needed: mDNS multicast on the LAN is the registry.
Index ¶
Constants ¶
View Source
const ( // ServiceType is the mDNS service type gowebdav registers under. ServiceType = "_gowebdav._tcp" // ServiceDomain is the mDNS domain used for discovery. ServiceDomain = "local." )
Variables ¶
This section is empty.
Functions ¶
func Check ¶ added in v0.3.28
Check verifies that a WebDAV server is reachable and, when credentials are given, that it accepts them. It issues a PROPFIND (depth 0) against the base URL — the request every WebDAV server must answer — and treats an auth status as a credential error so callers can fail fast before a large upload.
Types ¶
type Target ¶
type Target struct {
Name string // mDNS instance name (gowebdav -name flag, or hostname)
Host string // resolved hostname (e.g. "office.local.")
Port int // server port
Addresses []string // IPv4 + IPv6 addresses
Scheme string // "http" or "https" (from the scheme= TXT record)
}
Target represents a gowebdav server discovered on the local network.
Click to show internal directories.
Click to hide internal directories.