Skip to content

Commit

Permalink
chore: Change the reference path to v2
Browse files Browse the repository at this point in the history
Signed-off-by: Lei Jin <lei.jin@lacework.net>
  • Loading branch information
leijin-lw committed Oct 30, 2024
1 parent de9bf63 commit fb249cc
Show file tree
Hide file tree
Showing 414 changed files with 693 additions and 693 deletions.
26 changes: 13 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ PACKAGENAME?=lacework-cli
CLINAME?=lacework
# Honeycomb variables
HONEYDATASET?=lacework-cli-dev
GO_LDFLAGS="-X github.com/lacework/go-sdk/cli/cmd.Version=$(shell cat VERSION) \
-X github.com/lacework/go-sdk/cli/cmd.GitSHA=$(shell git rev-parse HEAD) \
-X github.com/lacework/go-sdk/cli/cmd.HoneyDataset=$(HONEYDATASET) \
-X github.com/lacework/go-sdk/cli/cmd.BuildTime=$(shell date +%Y%m%d%H%M%S)"
GO_LDFLAGS="-X github.com/lacework/go-sdk/v2/cli/cmd.Version=$(shell cat VERSION) \
-X github.com/lacework/go-sdk/v2/cli/cmd.GitSHA=$(shell git rev-parse HEAD) \
-X github.com/lacework/go-sdk/v2/cli/cmd.HoneyDataset=$(HONEYDATASET) \
-X github.com/lacework/go-sdk/v2/cli/cmd.BuildTime=$(shell date +%Y%m%d%H%M%S)"
GOFLAGS=-mod=vendor
CGO_ENABLED?=0
export GOFLAGS GO_LDFLAGS CGO_ENABLED
Expand Down Expand Up @@ -81,21 +81,21 @@ integration-context-tests: install-tools ## Run integration tests with build tag

.PHONY: integration-generation-only
integration-generation-only: ## Run integration tests
PATH="$(PWD)/bin:${PATH}" go test -v github.com/lacework/go-sdk/integration -timeout 30m -run "^TestGeneration" -tags="generation"
PATH="$(PWD)/bin:${PATH}" go test -v github.com/lacework/go-sdk/v2/integration -timeout 30m -run "^TestGeneration" -tags="generation"

.PHONY: integration-only
integration-only: install-tools ## Run integration tests
PATH="$(PWD)/bin:${PATH}" gotestsum -f testname --rerun-fails=3 --packages="github.com/lacework/go-sdk/integration" \
-- -v github.com/lacework/go-sdk/integration -timeout 30m -tags="$(INTEGRATION_TEST_TAGS)" -run=$(regex)
PATH="$(PWD)/bin:${PATH}" gotestsum -f testname --rerun-fails=3 --packages="github.com/lacework/go-sdk/v2/integration" \
-- -v github.com/lacework/go-sdk/v2/integration -timeout 30m -tags="$(INTEGRATION_TEST_TAGS)" -run=$(regex)

.PHONY: integration-only-subset
integration-only-subset: install-tools ## Run a subset of integration tests
$(eval START := $(shell echo 1+$(index)*5 | bc))
$(eval END := $(shell echo 5+$(index)*5 | bc))
$(eval LENGTH := ${words $(INTEGRATION_TEST_TAGS)})
if [ ${START} -le ${LENGTH} ]; then \
PATH="$(PWD)/bin:${PATH}" gotestsum -f testname --rerun-fails=3 --packages="github.com/lacework/go-sdk/integration" \
-- -v github.com/lacework/go-sdk/integration -timeout 30m \
PATH="$(PWD)/bin:${PATH}" gotestsum -f testname --rerun-fails=3 --packages="github.com/lacework/go-sdk/v2/integration" \
-- -v github.com/lacework/go-sdk/v2/integration -timeout 30m \
-tags="${wordlist $(START), $(END), $(INTEGRATION_TEST_TAGS)}" -run=$(regex) \
exit 1; \
fi
Expand All @@ -105,14 +105,14 @@ integration-lql: build-cli-cross-platform integration-lql-only ## Build and run

.PHONY: integration-lql-only
integration-lql-only: ## Run lql integration tests
PATH=$(PWD)/bin:${PATH} gotestsum -- -v github.com/lacework/go-sdk/integration -timeout 30m -tags="query"
PATH=$(PWD)/bin:${PATH} gotestsum -- -v github.com/lacework/go-sdk/v2/integration -timeout 30m -tags="query"

.PHONY: integration-policy
integration-policy: build-cli-cross-platform integration-policy-only ## Build and run lql policy tests

.PHONY: integration-policy-only
integration-policy-only: ## Run lql policy tests
PATH=$(PWD)/bin:${PATH} gotestsum -- -v github.com/lacework/go-sdk/integration -timeout 30m -tags="policy"
PATH=$(PWD)/bin:${PATH} gotestsum -- -v github.com/lacework/go-sdk/v2/integration -timeout 30m -tags="policy"

.PHONY: coverage
coverage: test ## Output coverage profile information for each function
Expand Down Expand Up @@ -175,7 +175,7 @@ run-api-example: ## Run an API example like 'make run-api-example example=api/_e

.PHONY: build
build: ## Compiles binary for the running workstation
go build -o bin/lacework -ldflags=$(GO_LDFLAGS) github.com/lacework/go-sdk/cli
go build -o bin/lacework -ldflags=$(GO_LDFLAGS) github.com/lacework/go-sdk/v2/cli

.PHONY: build-cli-cross-platform
build-cli-cross-platform: ## Compiles the Lacework CLI for all supported platforms
Expand All @@ -184,7 +184,7 @@ build-cli-cross-platform: ## Compiles the Lacework CLI for all supported platfor
-arch="amd64 386" \
-osarch="darwin/amd64 darwin/arm64 linux/arm linux/arm64" \
-ldflags=$(GO_LDFLAGS) \
github.com/lacework/go-sdk/cli
github.com/lacework/go-sdk/v2/cli

.PHONY: generate-databox
generate-databox: ## *CI ONLY* Generates in memory representation of template files
Expand Down
6 changes: 3 additions & 3 deletions api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ A Golang API client for interacting with [Lacework APIs](https://docs.lacework.n

Download the library into your `$GOPATH`:

$ go get github.com/lacework/go-sdk/api
$ go get github.com/lacework/go-sdk/v2/api

Import the library into your tool:

```go
import "github.com/lacework/go-sdk/api"
import "github.com/lacework/go-sdk/v2/api"
```

## Requirements
Expand All @@ -33,7 +33,7 @@ import (
"fmt"
"log"

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

func main() {
Expand Down
4 changes: 2 additions & 2 deletions api/_examples/active-containers/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"os"
"time"

"github.com/lacework/go-sdk/api"
"github.com/lacework/go-sdk/internal/array"
"github.com/lacework/go-sdk/v2/api"
"github.com/lacework/go-sdk/v2/internal/array"
"github.com/pkg/errors"
)

Expand Down
2 changes: 1 addition & 1 deletion api/_examples/agent-access-token/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"os"

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

func main() {
Expand Down
2 changes: 1 addition & 1 deletion api/_examples/alert-channels-v2/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"os"

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

func main() {
Expand Down
2 changes: 1 addition & 1 deletion api/_examples/alert-profiles/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"os"

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

func main() {
Expand Down
2 changes: 1 addition & 1 deletion api/_examples/alert-rules/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"os"

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

func main() {
Expand Down
2 changes: 1 addition & 1 deletion api/_examples/aws-cloudwatch-alert-channel/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"os"

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

func main() {
Expand Down
2 changes: 1 addition & 1 deletion api/_examples/aws-s3-alert-channel/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"os"

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

func main() {
Expand Down
2 changes: 1 addition & 1 deletion api/_examples/cisco-webex-alert-channel/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"os"

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

func main() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"os"

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

func main() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"os"

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

func main() {
Expand Down
2 changes: 1 addition & 1 deletion api/_examples/cloud-accounts/aws-cfg/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"os"

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

func main() {
Expand Down
2 changes: 1 addition & 1 deletion api/_examples/cloud-accounts/aws-ct-sqs/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"os"

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

func main() {
Expand Down
2 changes: 1 addition & 1 deletion api/_examples/cloud-accounts/aws-eks-audit/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"os"

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

func main() {
Expand Down
2 changes: 1 addition & 1 deletion api/_examples/cloud-accounts/azure-ad-al/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"os"

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

func main() {
Expand Down
2 changes: 1 addition & 1 deletion api/_examples/cloud-accounts/gcp-al-pub-sub/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"os"

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

func main() {
Expand Down
2 changes: 1 addition & 1 deletion api/_examples/cloud-accounts/gcp-gke-audit/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"os"

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

func main() {
Expand Down
2 changes: 1 addition & 1 deletion api/_examples/cloud-accounts/oci-cfg/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"os"

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

func main() {
Expand Down
2 changes: 1 addition & 1 deletion api/_examples/components/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"os"

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

func main() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"os"

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

func main() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"os"

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

func main() {
Expand Down
2 changes: 1 addition & 1 deletion api/_examples/container-registries/inline_scanner/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"os"

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

func main() {
Expand Down
2 changes: 1 addition & 1 deletion api/_examples/container-registries/proxy_scanner/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"os"

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

func main() {
Expand Down
2 changes: 1 addition & 1 deletion api/_examples/container-vuln-search/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"os"
"time"

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

func main() {
Expand Down
2 changes: 1 addition & 1 deletion api/_examples/data-export-rules/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"os"

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

func main() {
Expand Down
2 changes: 1 addition & 1 deletion api/_examples/datadog-alert-channel/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"os"

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

func main() {
Expand Down
2 changes: 1 addition & 1 deletion api/_examples/feature-flags/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"os"

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

func main() {
Expand Down
2 changes: 1 addition & 1 deletion api/_examples/gcp_pub_sub-alert-channel/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"os"

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

func main() {
Expand Down
2 changes: 1 addition & 1 deletion api/_examples/host-vuln-list-cves/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"log"

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

var (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"os"

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

func main() {
Expand Down
2 changes: 1 addition & 1 deletion api/_examples/microsoft-teams-alert-channel/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"os"

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

func main() {
Expand Down
2 changes: 1 addition & 1 deletion api/_examples/new-relic-alert-channel/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"os"

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

func main() {
Expand Down
2 changes: 1 addition & 1 deletion api/_examples/pagerduty-alert-channel/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"os"

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

func main() {
Expand Down
2 changes: 1 addition & 1 deletion api/_examples/pagination/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"os"

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

func main() {
Expand Down
Loading

0 comments on commit fb249cc

Please sign in to comment.