Skip to content
This repository has been archived by the owner on Mar 13, 2023. It is now read-only.

duffn/go-alertlogic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Unmaintained

This repository is archived and unmaintained. Use at your own risk.

go-alertlogic

CI codecov Go Report Card Go Reference

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.

Installation

go get github.com/duffn/go-alertlogic/alertlogic

Usage

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

Documentation

https://pkg.go.dev/github.com/duffn/go-alertlogic

License

MIT