Skip to content

Commit 2bae745

Browse files
authored
chore: Change the reference path to v2 (#1671)
Signed-off-by: Lei Jin <lei.jin@lacework.net>
1 parent de9bf63 commit 2bae745

File tree

414 files changed

+693
-693
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

414 files changed

+693
-693
lines changed

Makefile

+13-13
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ PACKAGENAME?=lacework-cli
1919
CLINAME?=lacework
2020
# Honeycomb variables
2121
HONEYDATASET?=lacework-cli-dev
22-
GO_LDFLAGS="-X github.com/lacework/go-sdk/cli/cmd.Version=$(shell cat VERSION) \
23-
-X github.com/lacework/go-sdk/cli/cmd.GitSHA=$(shell git rev-parse HEAD) \
24-
-X github.com/lacework/go-sdk/cli/cmd.HoneyDataset=$(HONEYDATASET) \
25-
-X github.com/lacework/go-sdk/cli/cmd.BuildTime=$(shell date +%Y%m%d%H%M%S)"
22+
GO_LDFLAGS="-X github.com/lacework/go-sdk/v2/cli/cmd.Version=$(shell cat VERSION) \
23+
-X github.com/lacework/go-sdk/v2/cli/cmd.GitSHA=$(shell git rev-parse HEAD) \
24+
-X github.com/lacework/go-sdk/v2/cli/cmd.HoneyDataset=$(HONEYDATASET) \
25+
-X github.com/lacework/go-sdk/v2/cli/cmd.BuildTime=$(shell date +%Y%m%d%H%M%S)"
2626
GOFLAGS=-mod=vendor
2727
CGO_ENABLED?=0
2828
export GOFLAGS GO_LDFLAGS CGO_ENABLED
@@ -81,21 +81,21 @@ integration-context-tests: install-tools ## Run integration tests with build tag
8181

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

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

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

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

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

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

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

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

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

189189
.PHONY: generate-databox
190190
generate-databox: ## *CI ONLY* Generates in memory representation of template files

api/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ A Golang API client for interacting with [Lacework APIs](https://docs.lacework.n
66

77
Download the library into your `$GOPATH`:
88

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

1111
Import the library into your tool:
1212

1313
```go
14-
import "github.com/lacework/go-sdk/api"
14+
import "github.com/lacework/go-sdk/v2/api"
1515
```
1616

1717
## Requirements
@@ -33,7 +33,7 @@ import (
3333
"fmt"
3434
"log"
3535

36-
"github.com/lacework/go-sdk/api"
36+
"github.com/lacework/go-sdk/v2/api"
3737
)
3838

3939
func main() {

api/_examples/active-containers/main.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import (
66
"os"
77
"time"
88

9-
"github.com/lacework/go-sdk/api"
10-
"github.com/lacework/go-sdk/internal/array"
9+
"github.com/lacework/go-sdk/v2/api"
10+
"github.com/lacework/go-sdk/v2/internal/array"
1111
"github.com/pkg/errors"
1212
)
1313

api/_examples/agent-access-token/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"log"
66
"os"
77

8-
"github.com/lacework/go-sdk/api"
8+
"github.com/lacework/go-sdk/v2/api"
99
)
1010

1111
func main() {

api/_examples/alert-channels-v2/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"log"
66
"os"
77

8-
"github.com/lacework/go-sdk/api"
8+
"github.com/lacework/go-sdk/v2/api"
99
)
1010

1111
func main() {

api/_examples/alert-profiles/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"log"
66
"os"
77

8-
"github.com/lacework/go-sdk/api"
8+
"github.com/lacework/go-sdk/v2/api"
99
)
1010

1111
func main() {

api/_examples/alert-rules/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"log"
66
"os"
77

8-
"github.com/lacework/go-sdk/api"
8+
"github.com/lacework/go-sdk/v2/api"
99
)
1010

1111
func main() {

api/_examples/aws-cloudwatch-alert-channel/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"log"
66
"os"
77

8-
"github.com/lacework/go-sdk/api"
8+
"github.com/lacework/go-sdk/v2/api"
99
)
1010

1111
func main() {

api/_examples/aws-s3-alert-channel/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"log"
66
"os"
77

8-
"github.com/lacework/go-sdk/api"
8+
"github.com/lacework/go-sdk/v2/api"
99
)
1010

1111
func main() {

api/_examples/cisco-webex-alert-channel/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"log"
66
"os"
77

8-
"github.com/lacework/go-sdk/api"
8+
"github.com/lacework/go-sdk/v2/api"
99
)
1010

1111
func main() {

api/_examples/cloud-accounts/aws-agentless-scanning-org/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"log"
66
"os"
77

8-
"github.com/lacework/go-sdk/api"
8+
"github.com/lacework/go-sdk/v2/api"
99
)
1010

1111
func main() {

api/_examples/cloud-accounts/aws-agentless-scanning/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"log"
66
"os"
77

8-
"github.com/lacework/go-sdk/api"
8+
"github.com/lacework/go-sdk/v2/api"
99
)
1010

1111
func main() {

api/_examples/cloud-accounts/aws-cfg/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"log"
66
"os"
77

8-
"github.com/lacework/go-sdk/api"
8+
"github.com/lacework/go-sdk/v2/api"
99
)
1010

1111
func main() {

api/_examples/cloud-accounts/aws-ct-sqs/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"log"
66
"os"
77

8-
"github.com/lacework/go-sdk/api"
8+
"github.com/lacework/go-sdk/v2/api"
99
)
1010

1111
func main() {

api/_examples/cloud-accounts/aws-eks-audit/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"log"
66
"os"
77

8-
"github.com/lacework/go-sdk/api"
8+
"github.com/lacework/go-sdk/v2/api"
99
)
1010

1111
func main() {

api/_examples/cloud-accounts/azure-ad-al/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"log"
66
"os"
77

8-
"github.com/lacework/go-sdk/api"
8+
"github.com/lacework/go-sdk/v2/api"
99
)
1010

1111
func main() {

api/_examples/cloud-accounts/gcp-al-pub-sub/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"log"
66
"os"
77

8-
"github.com/lacework/go-sdk/api"
8+
"github.com/lacework/go-sdk/v2/api"
99
)
1010

1111
func main() {

api/_examples/cloud-accounts/gcp-gke-audit/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"log"
66
"os"
77

8-
"github.com/lacework/go-sdk/api"
8+
"github.com/lacework/go-sdk/v2/api"
99
)
1010

1111
func main() {

api/_examples/cloud-accounts/oci-cfg/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"log"
66
"os"
77

8-
"github.com/lacework/go-sdk/api"
8+
"github.com/lacework/go-sdk/v2/api"
99
)
1010

1111
func main() {

api/_examples/components/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"log"
66
"os"
77

8-
"github.com/lacework/go-sdk/api"
8+
"github.com/lacework/go-sdk/v2/api"
99
)
1010

1111
func main() {

api/_examples/container-registries/aws_ecr_access_key/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"log"
66
"os"
77

8-
"github.com/lacework/go-sdk/api"
8+
"github.com/lacework/go-sdk/v2/api"
99
)
1010

1111
func main() {

api/_examples/container-registries/aws_ecr_iam_role/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"log"
66
"os"
77

8-
"github.com/lacework/go-sdk/api"
8+
"github.com/lacework/go-sdk/v2/api"
99
)
1010

1111
func main() {

api/_examples/container-registries/inline_scanner/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"log"
66
"os"
77

8-
"github.com/lacework/go-sdk/api"
8+
"github.com/lacework/go-sdk/v2/api"
99
)
1010

1111
func main() {

api/_examples/container-registries/proxy_scanner/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"log"
66
"os"
77

8-
"github.com/lacework/go-sdk/api"
8+
"github.com/lacework/go-sdk/v2/api"
99
)
1010

1111
func main() {

api/_examples/container-vuln-search/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"os"
77
"time"
88

9-
"github.com/lacework/go-sdk/api"
9+
"github.com/lacework/go-sdk/v2/api"
1010
)
1111

1212
func main() {

api/_examples/data-export-rules/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"log"
66
"os"
77

8-
"github.com/lacework/go-sdk/api"
8+
"github.com/lacework/go-sdk/v2/api"
99
)
1010

1111
func main() {

api/_examples/datadog-alert-channel/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"log"
66
"os"
77

8-
"github.com/lacework/go-sdk/api"
8+
"github.com/lacework/go-sdk/v2/api"
99
)
1010

1111
func main() {

api/_examples/feature-flags/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"log"
66
"os"
77

8-
"github.com/lacework/go-sdk/api"
8+
"github.com/lacework/go-sdk/v2/api"
99
)
1010

1111
func main() {

api/_examples/gcp_pub_sub-alert-channel/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"log"
66
"os"
77

8-
"github.com/lacework/go-sdk/api"
8+
"github.com/lacework/go-sdk/v2/api"
99
)
1010

1111
func main() {

api/_examples/host-vuln-list-cves/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"fmt"
66
"log"
77

8-
"github.com/lacework/go-sdk/api"
8+
"github.com/lacework/go-sdk/v2/api"
99
)
1010

1111
var (

api/_examples/jira-cloud-with-custom-template-alert-channel/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"log"
66
"os"
77

8-
"github.com/lacework/go-sdk/api"
8+
"github.com/lacework/go-sdk/v2/api"
99
)
1010

1111
func main() {

api/_examples/microsoft-teams-alert-channel/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"log"
66
"os"
77

8-
"github.com/lacework/go-sdk/api"
8+
"github.com/lacework/go-sdk/v2/api"
99
)
1010

1111
func main() {

api/_examples/new-relic-alert-channel/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"log"
66
"os"
77

8-
"github.com/lacework/go-sdk/api"
8+
"github.com/lacework/go-sdk/v2/api"
99
)
1010

1111
func main() {

api/_examples/pagerduty-alert-channel/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"log"
66
"os"
77

8-
"github.com/lacework/go-sdk/api"
8+
"github.com/lacework/go-sdk/v2/api"
99
)
1010

1111
func main() {

api/_examples/pagination/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"log"
66
"os"
77

8-
"github.com/lacework/go-sdk/api"
8+
"github.com/lacework/go-sdk/v2/api"
99
)
1010

1111
func main() {

0 commit comments

Comments
 (0)