A golang API library for Darktrace appliances.
This project uses go modules
You can install it locally by running:
$ go get github.com/rfizzle/darktrace
Import the library into your project, setup the client, and call the API with valid parameters:
package main
import (
"github.com/rfizzle/darktrace"
"log"
)
func main() {
client, err := darktrace.NewClient(
"https://darktrace.example.com",
"publicToken",
"privateToken",
)
if err != nil {
log.Fatal(err)
}
results, err := client.EventList(
darktrace.Param("pbid", "6000000053951"),
darktrace.Param("includetotalbytes", "true"),
)
if err != nil {
log.Fatal(err)
}
if len(results) > 0 {
return
}
return
}
Feel free to dive in! Open an issue or submit PRs.
MIT © Coleton Pierson