Skip to content

rfizzle/darktrace

Repository files navigation

Darktrace API Library

standard-readme compliant

A golang API library for Darktrace appliances.

Table of Contents

Install

This project uses go modules

You can install it locally by running:

$ go get github.com/rfizzle/darktrace

Usage

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
}

Maintainers

@rfizzle

Contributing

Feel free to dive in! Open an issue or submit PRs.

License

MIT © Coleton Pierson

About

Darktrace API Client Library written in Golang

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages