sdk

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 20, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const DEFAULT_URL string = "https://us.api.insight.rapid7.com/opendata"

DEFAULT_URL is the default base URL for the OpenData API endpoint

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is an API client for Rapid7's Sonar dataset

func NewClient

func NewClient(apiToken string, baseURL string) (*Client, error)

NewClient constructs a new api client

func (*Client) ListStudies

func (c *Client) ListStudies() ([]StudyResp, error)

ListStudies returns an array of available studies

type StudyResp

type StudyResp struct {
	Uniqid              string   `json:"uniqid"`
	Name                string   `json:"name"`
	ShortDesc           string   `json:"short_desc"`
	LongDesc            string   `json:"long_desc"`
	StudyURL            string   `json:"study_url"`
	StudyName           string   `json:"study_name"`
	StudyVenue          string   `json:"study_venue"`
	StudyBibtext        string   `json:"study_bibtext"`
	ContactName         string   `json:"contact_name"`
	ContactEmail        string   `json:"contact_email"`
	OrganizationName    string   `json:"organization_name"`
	OrganizationWebsite string   `json:"organization_website"`
	CreatedAt           string   `json:"created_at"`
	UpdatedAt           string   `json:"updated_at"`
	SonarfileSet        []string `json:"sonarfile_set"`
}

StudyResp is a Rapid7 OpenData API Study JSON response Ref: https://opendata.rapid7.com/apihelp/

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL