Docs, docs, docs!

This commit is contained in:
nemunaire 2018-05-12 01:08:37 +02:00
parent 12a85ee804
commit dcb67fba63
7 changed files with 38 additions and 2 deletions

View file

@ -12,12 +12,20 @@ import (
"github.com/studio-b12/gowebdav"
)
// CloudImporter implements an Importer, where files to imports are located
// remotely, under a WebDAV server (such as sabre/dav, owncloud, ...).
type CloudImporter struct {
// baseDAV is the URL (most probably http or https one) to the root directory.
// It should contains all themes, in separated directories.
baseDAV url.URL
// username is the username used to perform authentication through BasicAuth.
username string
// password is the password used to perform authentication through BasicAuth.
password string
}
// NewCloudImporter registers a new object CloudImporter, as the URL conversion
// can returns errors.
func NewCloudImporter(baseDAV string, username string, password string) (*CloudImporter, error) {
if r, err := url.Parse(baseDAV); err != nil {
return nil, err