This repository is archived and unmaintained. Use at your own risk.
go-alertlogic
is a Go client library for the Alert Logic Cloud Insight API.
This is in very early development and only supports a few of the myriad of endpoints of the API. Expect the API here to break often during early development.
go get github.com/duffn/go-alertlogic/alertlogic
package main
import (
"fmt"
"log"
"os"
"github.com/duffn/go-alertlogic/alertlogic"
)
func main() {
// Create an API instance.
api, err := alertlogic.NewWithAccessKey(
os.Getenv("ALERTLOGIC_ACCOUNT_ID"),
os.Getenv("ALERTLOGIC_ACCESS_KEY_ID"),
os.Getenv("ALERTLOGIC_SECRET_KEY"),
)
if err != nil {
log.Fatal(err)
}
// Get your account details.
accountDetails, err := api.GetAccountDetails()
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", accountDetails)
}