Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(api): new Vulnerabilities.ListEvaluations() func #160

Merged
merged 2 commits into from
Jul 6, 2020

Conversation

afiune
Copy link
Contributor

@afiune afiune commented Jul 6, 2020

This new feature is adding two new functions ListEvalutions() and
ListEvaluationsDateRange() to the Vulnerabilities service inside the
Go API client, these endpoints wrap the new API endpoint:

/external/vulnerabilities/container/GetEvaluationsForDateRange

The functions will allow users to lists all evaluations in an account.

An example:

package main

import (
	"fmt"
	"log"

	"github.com/lacework/go-sdk/api"
)

func main() {
	lacework, err := api.NewClient("account")
	if err != nil {
		log.Fatal(err)
	}

	// List evaluations from the last 7 days
	fmt.Println(lacework.Vulnerabilities.ListEvaluations())
}

Contributes to #156

Signed-off-by: Salim Afiune Maya [email protected]

@afiune afiune requested a review from scottford-lw July 6, 2020 20:09
@afiune afiune self-assigned this Jul 6, 2020
@afiune afiune added api Something related to the Go API client feat New feature or request labels Jul 6, 2020
@afiune afiune force-pushed the afiune/156/list-vuln-reports branch from 10f9bea to 3c44ae3 Compare July 6, 2020 20:11
This new feature is adding two new functions `ListEvalutions()` and
`ListEvaluationsDateRange()` to the `Vulnerabilities` service inside the
Go API client, these endpoints wrap the new API endpoint:

`/external/vulnerabilities/container/GetEvaluationsForDateRange`

The functions will allow users to lists all evaluations in an account.

An example:
```go
package main

import (
	"fmt"
	"log"

	"github.com/lacework/go-sdk/api"
)

func main() {
	lacework, err := api.NewClient("account")
	if err != nil {
		log.Fatal(err)
	}

	fmt.Println(lacework.Vulnerabilities.ListEvaluations())
}
```

Contributes to #156

Signed-off-by: Salim Afiune Maya <[email protected]>
@afiune afiune force-pushed the afiune/156/list-vuln-reports branch from 3c44ae3 to 31457fd Compare July 6, 2020 20:14
Copy link
Contributor

@scottford-lw scottford-lw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@afiune afiune merged commit 0060799 into master Jul 6, 2020
@afiune afiune deleted the afiune/156/list-vuln-reports branch July 6, 2020 22:19
@afiune afiune mentioned this pull request Jul 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Something related to the Go API client feat New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants