Skip to content

Latest commit

 

History

History
37 lines (27 loc) · 690 Bytes

README.md

File metadata and controls

37 lines (27 loc) · 690 Bytes

Proxmox VE API SDK for Go

pve-sdk-go is the Proxmox VE API SDK for the Go programming language.

All api_op_* code are generated by pve api schema

Example

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)
}