Skip to content

Commit 7bb6dbe

Browse files
committed
Preparing for v1 API
Moving (most) source to v1 root package to prepare for v0/v1 API separation. Signed-off-by: Johan Fylling <[email protected]>
1 parent b4e2909 commit 7bb6dbe

File tree

5,064 files changed

+1335
-1431
lines changed

Some content is hidden

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

5,064 files changed

+1335
-1431
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ wasm-lib-clean:
233233

234234
.PHONY: wasm-rego-testgen-install
235235
wasm-rego-testgen-install:
236-
$(GO) install ./test/wasm/cmd/wasm-rego-testgen
236+
$(GO) install ./v1/test/wasm/cmd/wasm-rego-testgen
237237

238238
######################################################
239239
#

build/run-wasm-rego-tests.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ set -ex
1212
GOVERSION=${GOVERSION:?"You must set the GOVERSION environment variable."}
1313
DOCKER_UID=${DOCKER_UID:-$(id -u)}
1414
DOCKER_GID=${DOCKER_GID:-$(id -g)}
15-
ASSETS=${ASSETS:-"$PWD/test/wasm/assets"}
15+
ASSETS=${ASSETS:-"$PWD/v1/test/wasm/assets"}
1616
VERBOSE=${VERBOSE:-"0"}
1717
TESTGEN_CONTAINER_NAME="opa-wasm-testgen-container"
1818
TESTRUN_CONTAINER_NAME="opa-wasm-testrun-container"
@@ -61,7 +61,7 @@ function generate_testcases {
6161
sh -c 'git config --global --add safe.directory /src && make wasm-rego-testgen-install \
6262
&& wasm-rego-testgen \
6363
--input-dir=/assets \
64-
--runner=/src/test/wasm/assets/test.js \
64+
--runner=/src/v1/test/wasm/assets/test.js \
6565
--output=/src/.go/cache/testcases.tar.gz'
6666
}
6767

cmd/bench.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,22 +19,22 @@ import (
1919
"testing"
2020
"time"
2121

22-
"github.com/open-policy-agent/opa/ast"
22+
"github.com/open-policy-agent/opa/v1/ast"
2323

24-
"github.com/open-policy-agent/opa/server/types"
24+
"github.com/open-policy-agent/opa/v1/server/types"
2525

26-
"github.com/open-policy-agent/opa/logging"
27-
"github.com/open-policy-agent/opa/runtime"
26+
"github.com/open-policy-agent/opa/v1/logging"
27+
"github.com/open-policy-agent/opa/v1/runtime"
2828

2929
"github.com/olekukonko/tablewriter"
3030
"github.com/spf13/cobra"
3131

3232
"github.com/open-policy-agent/opa/cmd/internal/env"
33-
"github.com/open-policy-agent/opa/compile"
3433
"github.com/open-policy-agent/opa/internal/presentation"
35-
"github.com/open-policy-agent/opa/metrics"
36-
"github.com/open-policy-agent/opa/rego"
37-
"github.com/open-policy-agent/opa/util"
34+
"github.com/open-policy-agent/opa/v1/compile"
35+
"github.com/open-policy-agent/opa/v1/metrics"
36+
"github.com/open-policy-agent/opa/v1/rego"
37+
"github.com/open-policy-agent/opa/v1/util"
3838
)
3939

4040
// benchmarkCommandParams are a superset of evalCommandParams

cmd/bench_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ import (
1515
"strings"
1616
"testing"
1717

18-
"github.com/open-policy-agent/opa/ast"
19-
"github.com/open-policy-agent/opa/bundle"
2018
"github.com/open-policy-agent/opa/internal/presentation"
21-
"github.com/open-policy-agent/opa/rego"
22-
"github.com/open-policy-agent/opa/util"
23-
"github.com/open-policy-agent/opa/util/test"
19+
"github.com/open-policy-agent/opa/v1/ast"
20+
"github.com/open-policy-agent/opa/v1/bundle"
21+
"github.com/open-policy-agent/opa/v1/rego"
22+
"github.com/open-policy-agent/opa/v1/util"
23+
"github.com/open-policy-agent/opa/v1/util/test"
2424
)
2525

2626
// Minimize the number of tests that *actually* run the benchmarks, they are pretty slow.

cmd/build.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ import (
1414

1515
"github.com/spf13/cobra"
1616

17-
"github.com/open-policy-agent/opa/ast"
18-
"github.com/open-policy-agent/opa/bundle"
1917
"github.com/open-policy-agent/opa/cmd/internal/env"
20-
"github.com/open-policy-agent/opa/compile"
21-
"github.com/open-policy-agent/opa/keys"
22-
"github.com/open-policy-agent/opa/util"
18+
"github.com/open-policy-agent/opa/v1/ast"
19+
"github.com/open-policy-agent/opa/v1/bundle"
20+
"github.com/open-policy-agent/opa/v1/compile"
21+
"github.com/open-policy-agent/opa/v1/keys"
22+
"github.com/open-policy-agent/opa/v1/util"
2323
)
2424

2525
const defaultPublicKeyID = "default"

cmd/build_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ import (
1313
"strings"
1414
"testing"
1515

16-
"github.com/open-policy-agent/opa/ast"
1716
"github.com/open-policy-agent/opa/internal/file/archive"
18-
"github.com/open-policy-agent/opa/loader"
19-
"github.com/open-policy-agent/opa/util"
20-
"github.com/open-policy-agent/opa/util/test"
17+
"github.com/open-policy-agent/opa/v1/ast"
18+
"github.com/open-policy-agent/opa/v1/loader"
19+
"github.com/open-policy-agent/opa/v1/util"
20+
"github.com/open-policy-agent/opa/v1/util/test"
2121
)
2222

2323
func TestBuildProducesBundle(t *testing.T) {

cmd/capabilities.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import (
99
"fmt"
1010
"strings"
1111

12-
"github.com/open-policy-agent/opa/ast"
1312
"github.com/open-policy-agent/opa/cmd/internal/env"
13+
"github.com/open-policy-agent/opa/v1/ast"
1414
"github.com/spf13/cobra"
1515
)
1616

cmd/capabilities_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"path"
99
"testing"
1010

11-
"github.com/open-policy-agent/opa/util/test"
11+
"github.com/open-policy-agent/opa/v1/util/test"
1212
)
1313

1414
func TestCapabilitiesNoArgs(t *testing.T) {

cmd/check.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ import (
1212

1313
"github.com/spf13/cobra"
1414

15-
"github.com/open-policy-agent/opa/ast"
1615
"github.com/open-policy-agent/opa/cmd/internal/env"
1716
pr "github.com/open-policy-agent/opa/internal/presentation"
18-
"github.com/open-policy-agent/opa/loader"
19-
"github.com/open-policy-agent/opa/util"
17+
"github.com/open-policy-agent/opa/v1/ast"
18+
"github.com/open-policy-agent/opa/v1/loader"
19+
"github.com/open-policy-agent/opa/v1/util"
2020
)
2121

2222
type checkParams struct {

cmd/check_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ import (
1313
"strings"
1414
"testing"
1515

16-
"github.com/open-policy-agent/opa/ast"
1716
"github.com/open-policy-agent/opa/internal/file/archive"
18-
"github.com/open-policy-agent/opa/util/test"
17+
"github.com/open-policy-agent/opa/v1/ast"
18+
"github.com/open-policy-agent/opa/v1/util/test"
1919
)
2020

2121
func TestCheckRespectsCapabilities(t *testing.T) {

0 commit comments

Comments
 (0)