Skip to content

Latest commit

 

History

History
76 lines (51 loc) · 1.33 KB

README.md

File metadata and controls

76 lines (51 loc) · 1.33 KB

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