gonextcloud/README.md

1.5 KiB

Nextcloud

pipeline status coverage report Go Report Card GoDoc

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 .