mirror of
https://gitlab.bertha.cloud/partitio/Nextcloud-Partitio/gonextcloud
synced 2024-12-22 10:30:43 +00:00
cover | ||
docs | ||
types | ||
vendor | ||
.gitignore | ||
.gitlab-ci.yml | ||
apps.go | ||
appsconfig_test.go | ||
appsconfig.go | ||
auth.go | ||
client.go | ||
config.yml | ||
coverage.html | ||
doc.go | ||
example.config.yml | ||
gonextcloud_test.go | ||
gonextcloud.iml | ||
groupfolders_test.go | ||
groupfolders.go | ||
groups.go | ||
LICENCE | ||
Makefile | ||
monitoring.go | ||
notifications_test.go | ||
notifications.go | ||
README.md | ||
routes.go | ||
shares.go | ||
users.go | ||
utils.go |
GoNextcloud
A simple Client for Nextcloud's Provisioning API in Go.
import "gitlab.adphi.fr/partitio/Nextcloud-Partitio/gonextcloud"
Usage
package main
import (
"fmt"
"gitlab.adphi.fr/partitio/Nextcloud-Partitio/gonextcloud"
)
func main() {
url := "https://www.mynextcloud.com"
username := "admin"
password := "password"
c, err := gonextcloud.NewClient(url)
if err != nil {
panic(err)
}
if err := c.Login(username, password); err != nil {
panic(err)
}
defer c.Logout()
}
Run tests
Configure the tests for your instance by editing example.config.yml and renaming it config.yml
then run the tests :
$ go test -v .