pve-sdk-go
is the Proxmox VE API SDK for the Go programming language.
All api_op_* code are generated by pve api schema
package main
import (
"context"
"crypto/tls"
"fmt"
"log"
"github.com/qcu266/pve-sdk-go/pve"
)
func main() {
auth, err := pve.AuthOptionsFromEnv()
if err != nil {
log.Fatal(err)
}
client := pve.New(auth,
pve.WithTLSOptions(&tls.Config{
InsecureSkipVerify: true,
}),
)
response, err := client.VersionVersion(context.TODO(), nil)
fmt.Println("Proxmox VE version:", response.Version, response.Release, response.Repoid)
}