evengsdk
is a Go client library for interacting with the EVE-NG API. It provides methods to manage labs, nodes, networks, and folders within an EVE-NG environment.
Install the library using go get
:
go get github.com/CorentinPtrl/evengsdk
Create a new client with basic authentication:
package main
import (
"github.com/CorentinPtrl/evengsdk"
"log"
)
func main() {
client, err := evengsdk.NewBasicAuthClient("username", "password", "0", "http://your-eve-ng-host")
if err != nil {
log.Fatal(err)
}
folder, err := client.Folder.GetFolder("/")
if err != nil {
log.Fatal(err)
}
log.Println(folder)
}
Run the tests using:
go test ./test
Sander van Harmelen for go-gitlab which was used as a reference for the structure of this library.