This go-based client is intended to be used as an sdk for the Apache Guacamole web API. To my knowledge this API is undocumented and could therefore change from release to release.
The primary intent of this sdk is to be used with the following Terraform provider:
https://registry.terraform.io/providers/techBeck03/guacamole/latest
Be sure to checkout the release that matches the version of Guacamole you are running. The developement of this sdk started with the Guacamole 1.2.0 release so no prior releases are currently supported.
package main
import (
"fmt"
guac "github.com/techBeck03/guacamole-api-client"
"github.com/techBeck03/guacamole-api-client/types"
)
func main() {
client := guac.New(guac.Config{
URL: "https://guac.example.com",
Username: "guacadmin",
Password: "guacadmin",
DisableTLSVerification: true,
})
err := client.Connect()
if err != nil {
log.Fatal(err)
} else {
fmt.Println("Connection successful")
}
err = client.Disconnect()
if err != nil {
log.Fatal(err)
} else {
fmt.Println("Disconnect successful")
}
}
- Copy/Rename the example env file and change values to match your envrionment
cp .env_example .env
- Run tests
make test
Check the examples folder for more detailed usage examples