mirror of
https://gitlab.bertha.cloud/partitio/Nextcloud-Partitio/gonextcloud
synced 2024-11-06 03:36:25 +00:00
1.5 KiB
1.5 KiB
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 .