surfd4wg / jupiterone-client-go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

JupiterOne Client Go

Requirements

Usage

package main

import (
	"fmt"

	j1 "github.com/jupiterone/jupiterone-client-go/jupiterone"
)

func main() {
	var entityProps j1.EntityProperties

	// Set configuration
	config := j1.Config{
		APIKey:    "api_key",
		AccountID: "accountid",
		Region:    "dev",
	}

	entityProps.Key = "go-client-key"
	entityProps.Type = "go_client_type"
	entityProps.Class = "Record"

	//Initialize client
	client, err := j1.NewClient(&config)

	if err != nil {
		fmt.Println("failed to create JupiterOne client: %s", err.Error())
	}

	//Do stuffs
	// fmt.Print(client)
	fmt.Print(client.Entity.Create(entityProps))
}

About

License:MIT License


Languages

Language:Go 92.4%Language:Makefile 5.7%Language:Shell 1.8%