Awesome
go-thehive
TheHive client library in Go
It's early days of the library, so use on your own risk.
Install
go get -u github.com/ilyaglow/go-thehive
Usage
package main
import (
"context"
"log"
"github.com/ilyaglow/go-thehive"
)
func main() {
hive, err := thehive.NewClient("https://thehive.domain/", &thehive.ClientOpts{
Auth: &thehive.APIAuth{
APIKey: "YOUR-API-KEY",
},
})
if err != nil {
log.Fatal(err)
}
cases, _, err := hive.Cases.List(context.Background())
if err != nil {
log.Fatal(err)
}
log.Println(cases)
c, _, err := hive.Cases.Get(context.Background(), cases[0].ID)
if err != nil {
log.Fatal(err)
}
log.Println(c)
}