diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 19e47152..e9c39e73 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -86,22 +86,22 @@ jobs: - name: Unit Test run: | - gotestsum --format short-verbose -- $(go list ./... | grep -v pkg/app/tests) \ + gotestsum --format short-verbose -- $(go list ./... | grep -v topazd/tests) \ -count=1 -timeout 120s -parallel=1 -v - name: Test run: | - gotestsum --format short-verbose -- $(go list ./pkg/app/tests/... | grep -v tests/template) \ + gotestsum --format short-verbose -- $(go list ./topazd/tests/... | grep -v tests/template) \ -count=1 -timeout 120s -parallel=1 -v - name: Templates Test (No TLS) run: | - gotestsum --format short-verbose -- github.com/aserto-dev/topaz/pkg/app/tests/template-no-tls/... \ + gotestsum --format short-verbose -- github.com/aserto-dev/topaz/topazd/tests/template-no-tls/... \ -count=1 -timeout 240s -parallel=1 -v - name: Templates Test (With TLS) run: | - gotestsum --format short-verbose -- github.com/aserto-dev/topaz/pkg/app/tests/template-with-tls/... \ + gotestsum --format short-verbose -- github.com/aserto-dev/topaz/topazd/tests/template-with-tls/... \ -count=1 -timeout 120s -parallel=1 -v - name: Upload code coverage diff --git a/.golangci.yaml b/.golangci.yaml index 217f25b7..851993c8 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -95,10 +95,7 @@ linters: yaml: snake overrides: - - pkg: pkg/console - rules: - json: camel - - pkg: pkg/app/handlers + - pkg: topazd/console rules: json: camel @@ -113,21 +110,20 @@ linters: # Paths to exclude paths: - internal/pkg/xdg/ - - pkg/signals/ - - pkg/cli/editor/ + - topazd/signals + - topaz/pkg/cli/editor rules: - - path: pkg/cli/cmd/ + - path: topaz/pkg/cli/cmd/ linters: - dupl - - path: builtins/ + - path: topazd/authorizer/builtins linters: - dupl - path: internal/pkg/eds/tests/ linters: - dupl - formatters: enable: - gofmt diff --git a/.goreleaser-test.yml b/.goreleaser-test.yml index c8a0e4b7..54820a50 100644 --- a/.goreleaser-test.yml +++ b/.goreleaser-test.yml @@ -20,7 +20,7 @@ dist: dist-test builds: # https://goreleaser.com/customization/build/ - id: topazd - main: ./cmd/topazd + main: ./topazd binary: topazd goos: - linux @@ -40,7 +40,7 @@ builds: post: make container-tag - id: topaz - main: ./cmd/topaz + main: ./topaz binary: topaz goos: - linux diff --git a/.goreleaser.yml b/.goreleaser.yml index 695021be..8c58405d 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -17,7 +17,7 @@ before: builds: # https://goreleaser.com/customization/build/ - id: topazd - main: ./cmd/topazd + main: ./topazd binary: topazd goos: - darwin @@ -40,7 +40,7 @@ builds: mod_timestamp: "{{ .CommitTimestamp }}" - id: topaz - main: ./cmd/topaz + main: ./topaz binary: topaz goos: - darwin @@ -63,7 +63,7 @@ builds: mod_timestamp: "{{ .CommitTimestamp }}" - id: topaz-db - main: ./cmd/topaz-db + main: ./topaz-db binary: topaz-db goos: - darwin @@ -86,7 +86,7 @@ builds: mod_timestamp: "{{ .CommitTimestamp }}" - id: topaz-backup - main: ./cmd/topaz-backup + main: ./topaz-backup binary: topaz-backup goos: - darwin diff --git a/makefile b/makefile index 7109926b..dccb1728 100644 --- a/makefile +++ b/makefile @@ -71,10 +71,10 @@ lint: gover .PHONY: test test: gover test-snapshot @echo -e "$(ATTN_COLOR)==> $@ $(NO_COLOR)" - @${EXT_BIN_DIR}/gotestsum --format short-verbose -- $$(go list ./... | grep -v pkg/app/tests) -count=1 -timeout 120s -parallel=1 -v - @${EXT_BIN_DIR}/gotestsum --format short-verbose -- $$(go list ./pkg/app/tests/... | grep -v tests/template) -count=1 -timeout 120s -parallel=1 -v - @${EXT_BIN_DIR}/gotestsum --format short-verbose -- github.com/aserto-dev/topaz/pkg/app/tests/template-no-tls/... -count=1 -timeout 240s -parallel=1 -v - @${EXT_BIN_DIR}/gotestsum --format short-verbose -- github.com/aserto-dev/topaz/pkg/app/tests/template-with-tls/... -count=1 -timeout 120s -parallel=1 -v + @${EXT_BIN_DIR}/gotestsum --format short-verbose -- $$(go list ./... | grep -v topazd/tests) -count=1 -timeout 120s -parallel=1 -v + @${EXT_BIN_DIR}/gotestsum --format short-verbose -- $$(go list ./topazd/tests/... | grep -v tests/template) -count=1 -timeout 120s -parallel=1 -v + @${EXT_BIN_DIR}/gotestsum --format short-verbose -- github.com/aserto-dev/topaz/topazd/tests/template-no-tls/... -count=1 -timeout 240s -parallel=1 -v + @${EXT_BIN_DIR}/gotestsum --format short-verbose -- github.com/aserto-dev/topaz/topazd/tests/template-with-tls/... -count=1 -timeout 120s -parallel=1 -v .PHONY: test-snapshot test-snapshot: diff --git a/pkg/config/migrate/migrate.go b/pkg/config/migrate/migrate.go index 6a458418..b73a64b2 100644 --- a/pkg/config/migrate/migrate.go +++ b/pkg/config/migrate/migrate.go @@ -7,18 +7,18 @@ import ( "time" "github.com/aserto-dev/self-decision-logger/logger/self" - "github.com/aserto-dev/topaz/controller" - "github.com/aserto-dev/topaz/decisionlog/logger/file" - "github.com/aserto-dev/topaz/pkg/authentication" - "github.com/aserto-dev/topaz/pkg/authorizer" "github.com/aserto-dev/topaz/pkg/config" config2 "github.com/aserto-dev/topaz/pkg/config/v2" config3 "github.com/aserto-dev/topaz/pkg/config/v3" - "github.com/aserto-dev/topaz/pkg/debug" - "github.com/aserto-dev/topaz/pkg/directory" - "github.com/aserto-dev/topaz/pkg/health" - "github.com/aserto-dev/topaz/pkg/metrics" - "github.com/aserto-dev/topaz/pkg/servers" + "github.com/aserto-dev/topaz/topazd/authentication" + "github.com/aserto-dev/topaz/topazd/authorizer" + "github.com/aserto-dev/topaz/topazd/authorizer/controller" + "github.com/aserto-dev/topaz/topazd/authorizer/decisionlog/logger/file" + "github.com/aserto-dev/topaz/topazd/debug" + "github.com/aserto-dev/topaz/topazd/directory" + "github.com/aserto-dev/topaz/topazd/health" + "github.com/aserto-dev/topaz/topazd/metrics" + "github.com/aserto-dev/topaz/topazd/servers" "github.com/go-viper/mapstructure/v2" "github.com/samber/lo" "github.com/spf13/viper" diff --git a/pkg/config/mixins.go b/pkg/config/mixins.go index 231979a2..b939b8a4 100644 --- a/pkg/config/mixins.go +++ b/pkg/config/mixins.go @@ -5,7 +5,7 @@ import ( "net" "github.com/aserto-dev/go-aserto" - "github.com/aserto-dev/topaz/pkg/loiter" + "github.com/aserto-dev/topaz/topazd/loiter" ) // Optional is a configuration mixin for features that can be enabled or disabled. diff --git a/pkg/config/v2/config.go b/pkg/config/v2/config.go index e2d91a4d..b1376c76 100644 --- a/pkg/config/v2/config.go +++ b/pkg/config/v2/config.go @@ -8,7 +8,7 @@ import ( "github.com/aserto-dev/runtime" "github.com/aserto-dev/topaz/internal/pkg/eds/pkg/directory" "github.com/aserto-dev/topaz/internal/pkg/fs" - "github.com/aserto-dev/topaz/pkg/debug" + "github.com/aserto-dev/topaz/topazd/debug" "github.com/pkg/errors" "github.com/rs/zerolog" ) diff --git a/pkg/config/v2/loader.go b/pkg/config/v2/loader.go index f9aadfea..5b34f949 100644 --- a/pkg/config/v2/loader.go +++ b/pkg/config/v2/loader.go @@ -9,8 +9,8 @@ import ( "strings" "github.com/aserto-dev/self-decision-logger/logger/self" - "github.com/aserto-dev/topaz/pkg/cli/cc" - "github.com/aserto-dev/topaz/pkg/cli/x" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cc" + "github.com/aserto-dev/topaz/topaz/pkg/cli/x" "github.com/go-viper/mapstructure/v2" "github.com/samber/lo" "github.com/spf13/viper" diff --git a/pkg/config/v2/topaz_config.go b/pkg/config/v2/topaz_config.go index e65d0e10..73e4810a 100644 --- a/pkg/config/v2/topaz_config.go +++ b/pkg/config/v2/topaz_config.go @@ -5,7 +5,7 @@ import ( "github.com/rs/zerolog/log" - "github.com/aserto-dev/topaz/controller" + "github.com/aserto-dev/topaz/topazd/authorizer/controller" "github.com/pkg/errors" ) diff --git a/pkg/config/v3/config.go b/pkg/config/v3/config.go index ee7f6cae..c24d3434 100644 --- a/pkg/config/v3/config.go +++ b/pkg/config/v3/config.go @@ -14,15 +14,15 @@ import ( "github.com/aserto-dev/logger" - "github.com/aserto-dev/topaz/pkg/authentication" - "github.com/aserto-dev/topaz/pkg/authorizer" "github.com/aserto-dev/topaz/pkg/config" - "github.com/aserto-dev/topaz/pkg/debug" - "github.com/aserto-dev/topaz/pkg/directory" - "github.com/aserto-dev/topaz/pkg/health" - "github.com/aserto-dev/topaz/pkg/loiter" - "github.com/aserto-dev/topaz/pkg/metrics" - "github.com/aserto-dev/topaz/pkg/servers" + "github.com/aserto-dev/topaz/topazd/authentication" + "github.com/aserto-dev/topaz/topazd/authorizer" + "github.com/aserto-dev/topaz/topazd/debug" + "github.com/aserto-dev/topaz/topazd/directory" + "github.com/aserto-dev/topaz/topazd/health" + "github.com/aserto-dev/topaz/topazd/loiter" + "github.com/aserto-dev/topaz/topazd/metrics" + "github.com/aserto-dev/topaz/topazd/servers" ) const Version int = 3 diff --git a/pkg/config/v3/config_test.go b/pkg/config/v3/config_test.go index b61b8a1b..e3080b89 100644 --- a/pkg/config/v3/config_test.go +++ b/pkg/config/v3/config_test.go @@ -5,8 +5,8 @@ import ( "os" "testing" - "github.com/aserto-dev/topaz/pkg/cli/x" "github.com/aserto-dev/topaz/pkg/config/v3" + "github.com/aserto-dev/topaz/topaz/pkg/cli/x" assrt "github.com/stretchr/testify/assert" rqur "github.com/stretchr/testify/require" diff --git a/pkg/config/v3/serialize_test.go b/pkg/config/v3/serialize_test.go index 2aa162d9..ad2e3a35 100644 --- a/pkg/config/v3/serialize_test.go +++ b/pkg/config/v3/serialize_test.go @@ -8,17 +8,17 @@ import ( "github.com/aserto-dev/go-aserto" "github.com/aserto-dev/logger" "github.com/aserto-dev/runtime" - "github.com/aserto-dev/topaz/controller" - "github.com/aserto-dev/topaz/decisionlog/logger/file" - "github.com/aserto-dev/topaz/pkg/authentication" - "github.com/aserto-dev/topaz/pkg/authorizer" cfgutil "github.com/aserto-dev/topaz/pkg/config" "github.com/aserto-dev/topaz/pkg/config/v3" - "github.com/aserto-dev/topaz/pkg/debug" - "github.com/aserto-dev/topaz/pkg/directory" - "github.com/aserto-dev/topaz/pkg/health" - "github.com/aserto-dev/topaz/pkg/metrics" - "github.com/aserto-dev/topaz/pkg/servers" + "github.com/aserto-dev/topaz/topazd/authentication" + "github.com/aserto-dev/topaz/topazd/authorizer" + "github.com/aserto-dev/topaz/topazd/authorizer/controller" + "github.com/aserto-dev/topaz/topazd/authorizer/decisionlog/logger/file" + "github.com/aserto-dev/topaz/topazd/debug" + "github.com/aserto-dev/topaz/topazd/directory" + "github.com/aserto-dev/topaz/topazd/health" + "github.com/aserto-dev/topaz/topazd/metrics" + "github.com/aserto-dev/topaz/topazd/servers" "github.com/open-policy-agent/opa/v1/download" bundleplugin "github.com/open-policy-agent/opa/v1/plugins/bundle" diff --git a/cmd/topaz-backup/README.md b/topaz-backup/README.md similarity index 100% rename from cmd/topaz-backup/README.md rename to topaz-backup/README.md diff --git a/cmd/topaz-backup/internal/plugin/plugin.go b/topaz-backup/internal/plugin/plugin.go similarity index 100% rename from cmd/topaz-backup/internal/plugin/plugin.go rename to topaz-backup/internal/plugin/plugin.go diff --git a/cmd/topaz-backup/internal/plugins/boltdb/boltdb.go b/topaz-backup/internal/plugins/boltdb/boltdb.go similarity index 96% rename from cmd/topaz-backup/internal/plugins/boltdb/boltdb.go rename to topaz-backup/internal/plugins/boltdb/boltdb.go index d6014da7..75b5c514 100644 --- a/cmd/topaz-backup/internal/plugins/boltdb/boltdb.go +++ b/topaz-backup/internal/plugins/boltdb/boltdb.go @@ -8,8 +8,8 @@ import ( "strings" "time" - "github.com/aserto-dev/topaz/cmd/topaz-backup/internal/plugin" "github.com/aserto-dev/topaz/internal/pkg/fs" + "github.com/aserto-dev/topaz/topaz-backup/internal/plugin" "github.com/pkg/errors" bolt "go.etcd.io/bbolt" ) diff --git a/cmd/topaz-backup/main.go b/topaz-backup/main.go similarity index 92% rename from cmd/topaz-backup/main.go rename to topaz-backup/main.go index abde2060..e41fe92b 100644 --- a/cmd/topaz-backup/main.go +++ b/topaz-backup/main.go @@ -7,7 +7,7 @@ import ( "syscall" "github.com/alecthomas/kong" - "github.com/aserto-dev/topaz/cmd/topaz-backup/internal/plugins/boltdb" + "github.com/aserto-dev/topaz/topaz-backup/internal/plugins/boltdb" ) const ( diff --git a/cmd/topaz-db/cmd/cli.go b/topaz-db/cmd/cli.go similarity index 91% rename from cmd/topaz-db/cmd/cli.go rename to topaz-db/cmd/cli.go index 65b42bbd..a550da00 100644 --- a/cmd/topaz-db/cmd/cli.go +++ b/topaz-db/cmd/cli.go @@ -1,6 +1,6 @@ package cmd -import dsc "github.com/aserto-dev/topaz/pkg/cli/clients/directory" +import dsc "github.com/aserto-dev/topaz/topaz/pkg/cli/clients/directory" type CLI struct { Init InitCmd `cmd:"" help:"create new database file"` diff --git a/cmd/topaz-db/cmd/init.go b/topaz-db/cmd/init.go similarity index 100% rename from cmd/topaz-db/cmd/init.go rename to topaz-db/cmd/init.go diff --git a/cmd/topaz-db/cmd/load.go b/topaz-db/cmd/load.go similarity index 84% rename from cmd/topaz-db/cmd/load.go rename to topaz-db/cmd/load.go index 4cf7e877..d58b2f4a 100644 --- a/cmd/topaz-db/cmd/load.go +++ b/topaz-db/cmd/load.go @@ -5,9 +5,9 @@ import ( "io" "path/filepath" - "github.com/aserto-dev/topaz/cmd/topaz-db/pkg/inproc" "github.com/aserto-dev/topaz/internal/pkg/eds/pkg/directory" - dsc "github.com/aserto-dev/topaz/pkg/cli/clients/directory" + "github.com/aserto-dev/topaz/topaz-db/pkg/inproc" + dsc "github.com/aserto-dev/topaz/topaz/pkg/cli/clients/directory" "github.com/rs/zerolog" ) diff --git a/cmd/topaz-db/cmd/set.go b/topaz-db/cmd/set.go similarity index 84% rename from cmd/topaz-db/cmd/set.go rename to topaz-db/cmd/set.go index e7c8fea9..103a74e0 100644 --- a/cmd/topaz-db/cmd/set.go +++ b/topaz-db/cmd/set.go @@ -5,9 +5,9 @@ import ( "io" "os" - "github.com/aserto-dev/topaz/cmd/topaz-db/pkg/inproc" "github.com/aserto-dev/topaz/internal/pkg/eds/pkg/directory" - dsc "github.com/aserto-dev/topaz/pkg/cli/clients/directory" + "github.com/aserto-dev/topaz/topaz-db/pkg/inproc" + dsc "github.com/aserto-dev/topaz/topaz/pkg/cli/clients/directory" "github.com/rs/zerolog" ) diff --git a/cmd/topaz-db/cmd/sync.go b/topaz-db/cmd/sync.go similarity index 100% rename from cmd/topaz-db/cmd/sync.go rename to topaz-db/cmd/sync.go diff --git a/cmd/topaz-db/main.go b/topaz-db/main.go similarity index 89% rename from cmd/topaz-db/main.go rename to topaz-db/main.go index 005c7c12..c99c2a2b 100644 --- a/cmd/topaz-db/main.go +++ b/topaz-db/main.go @@ -8,9 +8,9 @@ import ( "syscall" "github.com/alecthomas/kong" - "github.com/aserto-dev/topaz/cmd/topaz-db/cmd" - "github.com/aserto-dev/topaz/pkg/cli/cc" - "github.com/aserto-dev/topaz/pkg/cli/x" + "github.com/aserto-dev/topaz/topaz-db/cmd" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cc" + "github.com/aserto-dev/topaz/topaz/pkg/cli/x" ) func main() { diff --git a/cmd/topaz-db/pkg/inproc/inproc.go b/topaz-db/pkg/inproc/inproc.go similarity index 100% rename from cmd/topaz-db/pkg/inproc/inproc.go rename to topaz-db/pkg/inproc/inproc.go diff --git a/cmd/topaz/main.go b/topaz/main.go similarity index 94% rename from cmd/topaz/main.go rename to topaz/main.go index a7a3d881..40d6c67d 100644 --- a/cmd/topaz/main.go +++ b/topaz/main.go @@ -11,14 +11,14 @@ import ( "github.com/Masterminds/semver/v3" "github.com/aserto-dev/topaz/internal/pkg/fs" - "github.com/aserto-dev/topaz/pkg/cli/cc" - "github.com/aserto-dev/topaz/pkg/cli/cmd" - "github.com/aserto-dev/topaz/pkg/cli/cmd/common" - "github.com/aserto-dev/topaz/pkg/cli/fflag" - "github.com/aserto-dev/topaz/pkg/cli/x" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cc" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cmd" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cmd/common" + "github.com/aserto-dev/topaz/topaz/pkg/cli/fflag" + "github.com/aserto-dev/topaz/topaz/pkg/cli/x" "github.com/pkg/errors" - ver "github.com/aserto-dev/topaz/pkg/version" + ver "github.com/aserto-dev/topaz/topaz/pkg/version" "github.com/alecthomas/kong" "github.com/rs/zerolog" diff --git a/pkg/cli/cc/cc.go b/topaz/pkg/cli/cc/cc.go similarity index 96% rename from pkg/cli/cc/cc.go rename to topaz/pkg/cli/cc/cc.go index 5e98d5ca..17c6e484 100644 --- a/pkg/cli/cc/cc.go +++ b/topaz/pkg/cli/cc/cc.go @@ -9,8 +9,8 @@ import ( "sync" "github.com/aserto-dev/topaz/internal/pkg/fs" - "github.com/aserto-dev/topaz/pkg/cli/cc/iostream" - "github.com/aserto-dev/topaz/pkg/cli/dockerx" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cc/iostream" + "github.com/aserto-dev/topaz/topaz/pkg/cli/dockerx" "github.com/docker/docker/api/types/container" "github.com/pkg/errors" "github.com/samber/lo" diff --git a/pkg/cli/cc/client.go b/topaz/pkg/cli/cc/client.go similarity index 98% rename from pkg/cli/cc/client.go rename to topaz/pkg/cli/cc/client.go index 990f8080..97bcc56f 100644 --- a/pkg/cli/cc/client.go +++ b/topaz/pkg/cli/cc/client.go @@ -5,7 +5,7 @@ import ( "strconv" "time" - "github.com/aserto-dev/topaz/pkg/cli/x" + "github.com/aserto-dev/topaz/topaz/pkg/cli/x" ) const ( diff --git a/pkg/cli/cc/conmsg.go b/topaz/pkg/cli/cc/conmsg.go similarity index 100% rename from pkg/cli/cc/conmsg.go rename to topaz/pkg/cli/cc/conmsg.go diff --git a/pkg/cli/cc/container.go b/topaz/pkg/cli/cc/container.go similarity index 97% rename from pkg/cli/cc/container.go rename to topaz/pkg/cli/cc/container.go index cdc23618..019537c2 100644 --- a/pkg/cli/cc/container.go +++ b/topaz/pkg/cli/cc/container.go @@ -8,8 +8,8 @@ import ( "strings" "github.com/Masterminds/semver/v3" - "github.com/aserto-dev/topaz/pkg/cli/x" - ver "github.com/aserto-dev/topaz/pkg/version" + "github.com/aserto-dev/topaz/topaz/pkg/cli/x" + ver "github.com/aserto-dev/topaz/topaz/pkg/version" "github.com/samber/lo" ) diff --git a/pkg/cli/cc/dir.go b/topaz/pkg/cli/cc/dir.go similarity index 98% rename from pkg/cli/cc/dir.go rename to topaz/pkg/cli/cc/dir.go index 38c3d780..73b99edc 100644 --- a/pkg/cli/cc/dir.go +++ b/topaz/pkg/cli/cc/dir.go @@ -6,7 +6,7 @@ import ( "github.com/aserto-dev/topaz/internal/pkg/fs" "github.com/aserto-dev/topaz/internal/pkg/xdg" - "github.com/aserto-dev/topaz/pkg/cli/x" + "github.com/aserto-dev/topaz/topaz/pkg/cli/x" ) // Common topaz directory paths and operations. diff --git a/pkg/cli/cc/health.go b/topaz/pkg/cli/cc/health.go similarity index 100% rename from pkg/cli/cc/health.go rename to topaz/pkg/cli/cc/health.go diff --git a/pkg/cli/cc/iostream/iostream.go b/topaz/pkg/cli/cc/iostream/iostream.go similarity index 100% rename from pkg/cli/cc/iostream/iostream.go rename to topaz/pkg/cli/cc/iostream/iostream.go diff --git a/pkg/cli/cc/ports.go b/topaz/pkg/cli/cc/ports.go similarity index 100% rename from pkg/cli/cc/ports.go rename to topaz/pkg/cli/cc/ports.go diff --git a/pkg/cli/certs/generator.go b/topaz/pkg/cli/certs/generator.go similarity index 95% rename from pkg/cli/certs/generator.go rename to topaz/pkg/cli/certs/generator.go index af72c461..d8bbec24 100644 --- a/pkg/cli/certs/generator.go +++ b/topaz/pkg/cli/certs/generator.go @@ -5,8 +5,8 @@ import ( "path/filepath" "github.com/aserto-dev/certs" - "github.com/aserto-dev/topaz/pkg/cli/cc" - "github.com/aserto-dev/topaz/pkg/cli/table" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cc" + "github.com/aserto-dev/topaz/topaz/pkg/cli/table" "github.com/pkg/errors" "github.com/rs/zerolog" ) diff --git a/pkg/cli/certs/trust_darwin.go b/topaz/pkg/cli/certs/trust_darwin.go similarity index 100% rename from pkg/cli/certs/trust_darwin.go rename to topaz/pkg/cli/certs/trust_darwin.go diff --git a/pkg/cli/certs/trust_linux.go b/topaz/pkg/cli/certs/trust_linux.go similarity index 100% rename from pkg/cli/certs/trust_linux.go rename to topaz/pkg/cli/certs/trust_linux.go diff --git a/pkg/cli/certs/trust_windows.go b/topaz/pkg/cli/certs/trust_windows.go similarity index 100% rename from pkg/cli/certs/trust_windows.go rename to topaz/pkg/cli/certs/trust_windows.go diff --git a/pkg/cli/clients/authorizer/client.go b/topaz/pkg/cli/clients/authorizer/client.go similarity index 96% rename from pkg/cli/clients/authorizer/client.go rename to topaz/pkg/cli/clients/authorizer/client.go index 7069d61a..521fded6 100644 --- a/pkg/cli/clients/authorizer/client.go +++ b/topaz/pkg/cli/clients/authorizer/client.go @@ -9,8 +9,8 @@ import ( "google.golang.org/grpc" az2 "github.com/aserto-dev/go-authorizer/aserto/authorizer/v2" - "github.com/aserto-dev/topaz/pkg/cli/cc" - "github.com/aserto-dev/topaz/pkg/cli/clients" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cc" + "github.com/aserto-dev/topaz/topaz/pkg/cli/clients" ) type Config struct { diff --git a/pkg/cli/clients/config.go b/topaz/pkg/cli/clients/config.go similarity index 100% rename from pkg/cli/clients/config.go rename to topaz/pkg/cli/clients/config.go diff --git a/pkg/cli/clients/directory/backup.go b/topaz/pkg/cli/clients/directory/backup.go similarity index 98% rename from pkg/cli/clients/directory/backup.go rename to topaz/pkg/cli/clients/directory/backup.go index 22613b5b..48cb2186 100644 --- a/pkg/cli/clients/directory/backup.go +++ b/topaz/pkg/cli/clients/directory/backup.go @@ -12,7 +12,7 @@ import ( dse3 "github.com/aserto-dev/go-directory/aserto/directory/exporter/v3" "github.com/aserto-dev/topaz/internal/pkg/fs" - "github.com/aserto-dev/topaz/pkg/cli/js" + "github.com/aserto-dev/topaz/topaz/pkg/cli/js" "google.golang.org/protobuf/types/known/timestamppb" ) diff --git a/pkg/cli/clients/directory/client.go b/topaz/pkg/cli/clients/directory/client.go similarity index 97% rename from pkg/cli/clients/directory/client.go rename to topaz/pkg/cli/clients/directory/client.go index 9a99817d..80e31592 100644 --- a/pkg/cli/clients/directory/client.go +++ b/topaz/pkg/cli/clients/directory/client.go @@ -11,8 +11,8 @@ import ( dsm3 "github.com/aserto-dev/go-directory/aserto/directory/model/v3" dsr3 "github.com/aserto-dev/go-directory/aserto/directory/reader/v3" dsw3 "github.com/aserto-dev/go-directory/aserto/directory/writer/v3" - "github.com/aserto-dev/topaz/pkg/cli/cc" - "github.com/aserto-dev/topaz/pkg/cli/clients" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cc" + "github.com/aserto-dev/topaz/topaz/pkg/cli/clients" acc1 "github.com/authzen/access.go/api/access/v1" "github.com/pkg/errors" diff --git a/pkg/cli/clients/directory/const.go b/topaz/pkg/cli/clients/directory/const.go similarity index 100% rename from pkg/cli/clients/directory/const.go rename to topaz/pkg/cli/clients/directory/const.go diff --git a/pkg/cli/clients/directory/counter.go b/topaz/pkg/cli/clients/directory/counter.go similarity index 100% rename from pkg/cli/clients/directory/counter.go rename to topaz/pkg/cli/clients/directory/counter.go diff --git a/pkg/cli/clients/directory/export.go b/topaz/pkg/cli/clients/directory/export.go similarity index 96% rename from pkg/cli/clients/directory/export.go rename to topaz/pkg/cli/clients/directory/export.go index 18e24474..5edbdaec 100644 --- a/pkg/cli/clients/directory/export.go +++ b/topaz/pkg/cli/clients/directory/export.go @@ -8,7 +8,7 @@ import ( "os" dse3 "github.com/aserto-dev/go-directory/aserto/directory/exporter/v3" - "github.com/aserto-dev/topaz/pkg/cli/js" + "github.com/aserto-dev/topaz/topaz/pkg/cli/js" "google.golang.org/protobuf/types/known/timestamppb" ) diff --git a/pkg/cli/clients/directory/import.go b/topaz/pkg/cli/clients/directory/import.go similarity index 96% rename from pkg/cli/clients/directory/import.go rename to topaz/pkg/cli/clients/directory/import.go index 0c3d66e0..ab0ba411 100644 --- a/pkg/cli/clients/directory/import.go +++ b/topaz/pkg/cli/clients/directory/import.go @@ -6,7 +6,7 @@ import ( "os" dsi3 "github.com/aserto-dev/go-directory/aserto/directory/importer/v3" - "github.com/aserto-dev/topaz/pkg/cli/js" + "github.com/aserto-dev/topaz/topaz/pkg/cli/js" "github.com/pkg/errors" "golang.org/x/sync/errgroup" diff --git a/pkg/cli/clients/directory/manifest.go b/topaz/pkg/cli/clients/directory/manifest.go similarity index 100% rename from pkg/cli/clients/directory/manifest.go rename to topaz/pkg/cli/clients/directory/manifest.go diff --git a/pkg/cli/clients/directory/restore.go b/topaz/pkg/cli/clients/directory/restore.go similarity index 98% rename from pkg/cli/clients/directory/restore.go rename to topaz/pkg/cli/clients/directory/restore.go index 7da51811..2eff04ba 100644 --- a/pkg/cli/clients/directory/restore.go +++ b/topaz/pkg/cli/clients/directory/restore.go @@ -12,7 +12,7 @@ import ( dsc3 "github.com/aserto-dev/go-directory/aserto/directory/common/v3" dsi3 "github.com/aserto-dev/go-directory/aserto/directory/importer/v3" - "github.com/aserto-dev/topaz/pkg/cli/js" + "github.com/aserto-dev/topaz/topaz/pkg/cli/js" "golang.org/x/sync/errgroup" ) diff --git a/pkg/cli/clients/request.go b/topaz/pkg/cli/clients/request.go similarity index 87% rename from pkg/cli/clients/request.go rename to topaz/pkg/cli/clients/request.go index 667bdcb2..434b4626 100644 --- a/pkg/cli/clients/request.go +++ b/topaz/pkg/cli/clients/request.go @@ -5,11 +5,11 @@ import ( "io" "os" - "github.com/aserto-dev/topaz/pkg/cli/cc" - "github.com/aserto-dev/topaz/pkg/cli/edit" - "github.com/aserto-dev/topaz/pkg/cli/fflag" - "github.com/aserto-dev/topaz/pkg/cli/jsonx" - "github.com/aserto-dev/topaz/pkg/cli/prompter" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cc" + "github.com/aserto-dev/topaz/topaz/pkg/cli/edit" + "github.com/aserto-dev/topaz/topaz/pkg/cli/fflag" + "github.com/aserto-dev/topaz/topaz/pkg/cli/jsonx" + "github.com/aserto-dev/topaz/topaz/pkg/cli/prompter" "github.com/pkg/errors" "google.golang.org/protobuf/encoding/protojson" diff --git a/pkg/cli/clients/validate.go b/topaz/pkg/cli/clients/validate.go similarity index 96% rename from pkg/cli/clients/validate.go rename to topaz/pkg/cli/clients/validate.go index b8f11e3a..c51b6ffa 100644 --- a/pkg/cli/clients/validate.go +++ b/topaz/pkg/cli/clients/validate.go @@ -5,7 +5,7 @@ import ( "io" client "github.com/aserto-dev/go-aserto" - "github.com/aserto-dev/topaz/pkg/version" + "github.com/aserto-dev/topaz/topaz/pkg/version" "github.com/pkg/errors" "golang.org/x/sync/errgroup" "google.golang.org/grpc" diff --git a/pkg/cli/cmd/access/access.go b/topaz/pkg/cli/cmd/access/access.go similarity index 100% rename from pkg/cli/cmd/access/access.go rename to topaz/pkg/cli/cmd/access/access.go diff --git a/pkg/cli/cmd/access/actionsearch.go b/topaz/pkg/cli/cmd/access/actionsearch.go similarity index 84% rename from pkg/cli/cmd/access/actionsearch.go rename to topaz/pkg/cli/cmd/access/actionsearch.go index 1fd74a7d..9ad82866 100644 --- a/pkg/cli/cmd/access/actionsearch.go +++ b/topaz/pkg/cli/cmd/access/actionsearch.go @@ -1,10 +1,10 @@ package access import ( - "github.com/aserto-dev/topaz/pkg/cli/cc" - "github.com/aserto-dev/topaz/pkg/cli/clients" - dsc "github.com/aserto-dev/topaz/pkg/cli/clients/directory" - "github.com/aserto-dev/topaz/pkg/cli/jsonx" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cc" + "github.com/aserto-dev/topaz/topaz/pkg/cli/clients" + dsc "github.com/aserto-dev/topaz/topaz/pkg/cli/clients/directory" + "github.com/aserto-dev/topaz/topaz/pkg/cli/jsonx" dsa1 "github.com/authzen/access.go/api/access/v1" "google.golang.org/protobuf/proto" diff --git a/pkg/cli/cmd/access/evaluation.go b/topaz/pkg/cli/cmd/access/evaluation.go similarity index 83% rename from pkg/cli/cmd/access/evaluation.go rename to topaz/pkg/cli/cmd/access/evaluation.go index e653d8c0..c895c25d 100644 --- a/pkg/cli/cmd/access/evaluation.go +++ b/topaz/pkg/cli/cmd/access/evaluation.go @@ -1,10 +1,10 @@ package access import ( - "github.com/aserto-dev/topaz/pkg/cli/cc" - "github.com/aserto-dev/topaz/pkg/cli/clients" - dsc "github.com/aserto-dev/topaz/pkg/cli/clients/directory" - "github.com/aserto-dev/topaz/pkg/cli/jsonx" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cc" + "github.com/aserto-dev/topaz/topaz/pkg/cli/clients" + dsc "github.com/aserto-dev/topaz/topaz/pkg/cli/clients/directory" + "github.com/aserto-dev/topaz/topaz/pkg/cli/jsonx" dsa1 "github.com/authzen/access.go/api/access/v1" "google.golang.org/protobuf/proto" diff --git a/pkg/cli/cmd/access/evaluations.go b/topaz/pkg/cli/cmd/access/evaluations.go similarity index 84% rename from pkg/cli/cmd/access/evaluations.go rename to topaz/pkg/cli/cmd/access/evaluations.go index b6e847f2..88b2992f 100644 --- a/pkg/cli/cmd/access/evaluations.go +++ b/topaz/pkg/cli/cmd/access/evaluations.go @@ -1,10 +1,10 @@ package access import ( - "github.com/aserto-dev/topaz/pkg/cli/cc" - "github.com/aserto-dev/topaz/pkg/cli/clients" - dsc "github.com/aserto-dev/topaz/pkg/cli/clients/directory" - "github.com/aserto-dev/topaz/pkg/cli/jsonx" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cc" + "github.com/aserto-dev/topaz/topaz/pkg/cli/clients" + dsc "github.com/aserto-dev/topaz/topaz/pkg/cli/clients/directory" + "github.com/aserto-dev/topaz/topaz/pkg/cli/jsonx" dsa1 "github.com/authzen/access.go/api/access/v1" "google.golang.org/protobuf/proto" diff --git a/pkg/cli/cmd/access/resourcesearch.go b/topaz/pkg/cli/cmd/access/resourcesearch.go similarity index 84% rename from pkg/cli/cmd/access/resourcesearch.go rename to topaz/pkg/cli/cmd/access/resourcesearch.go index c3cf6148..97f88a63 100644 --- a/pkg/cli/cmd/access/resourcesearch.go +++ b/topaz/pkg/cli/cmd/access/resourcesearch.go @@ -1,10 +1,10 @@ package access import ( - "github.com/aserto-dev/topaz/pkg/cli/cc" - "github.com/aserto-dev/topaz/pkg/cli/clients" - dsc "github.com/aserto-dev/topaz/pkg/cli/clients/directory" - "github.com/aserto-dev/topaz/pkg/cli/jsonx" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cc" + "github.com/aserto-dev/topaz/topaz/pkg/cli/clients" + dsc "github.com/aserto-dev/topaz/topaz/pkg/cli/clients/directory" + "github.com/aserto-dev/topaz/topaz/pkg/cli/jsonx" dsa1 "github.com/authzen/access.go/api/access/v1" "google.golang.org/protobuf/proto" diff --git a/pkg/cli/cmd/access/subjectsearch.go b/topaz/pkg/cli/cmd/access/subjectsearch.go similarity index 84% rename from pkg/cli/cmd/access/subjectsearch.go rename to topaz/pkg/cli/cmd/access/subjectsearch.go index 1af73ab3..5cbf5dee 100644 --- a/pkg/cli/cmd/access/subjectsearch.go +++ b/topaz/pkg/cli/cmd/access/subjectsearch.go @@ -1,10 +1,10 @@ package access import ( - "github.com/aserto-dev/topaz/pkg/cli/cc" - "github.com/aserto-dev/topaz/pkg/cli/clients" - dsc "github.com/aserto-dev/topaz/pkg/cli/clients/directory" - "github.com/aserto-dev/topaz/pkg/cli/jsonx" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cc" + "github.com/aserto-dev/topaz/topaz/pkg/cli/clients" + dsc "github.com/aserto-dev/topaz/topaz/pkg/cli/clients/directory" + "github.com/aserto-dev/topaz/topaz/pkg/cli/jsonx" dsa1 "github.com/authzen/access.go/api/access/v1" "google.golang.org/protobuf/proto" diff --git a/pkg/cli/cmd/authorizer/authorizer.go b/topaz/pkg/cli/cmd/authorizer/authorizer.go similarity index 100% rename from pkg/cli/cmd/authorizer/authorizer.go rename to topaz/pkg/cli/cmd/authorizer/authorizer.go diff --git a/pkg/cli/cmd/authorizer/decisiontree.go b/topaz/pkg/cli/cmd/authorizer/decisiontree.go similarity index 85% rename from pkg/cli/cmd/authorizer/decisiontree.go rename to topaz/pkg/cli/cmd/authorizer/decisiontree.go index e288b360..2a69d3b6 100644 --- a/pkg/cli/cmd/authorizer/decisiontree.go +++ b/topaz/pkg/cli/cmd/authorizer/decisiontree.go @@ -1,10 +1,10 @@ package authorizer import ( - "github.com/aserto-dev/topaz/pkg/cli/cc" - "github.com/aserto-dev/topaz/pkg/cli/clients" - azc "github.com/aserto-dev/topaz/pkg/cli/clients/authorizer" - "github.com/aserto-dev/topaz/pkg/cli/jsonx" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cc" + "github.com/aserto-dev/topaz/topaz/pkg/cli/clients" + azc "github.com/aserto-dev/topaz/topaz/pkg/cli/clients/authorizer" + "github.com/aserto-dev/topaz/topaz/pkg/cli/jsonx" "google.golang.org/protobuf/proto" "google.golang.org/protobuf/types/known/structpb" diff --git a/pkg/cli/cmd/authorizer/eval.go b/topaz/pkg/cli/cmd/authorizer/eval.go similarity index 83% rename from pkg/cli/cmd/authorizer/eval.go rename to topaz/pkg/cli/cmd/authorizer/eval.go index c456e86c..9e9dfea5 100644 --- a/pkg/cli/cmd/authorizer/eval.go +++ b/topaz/pkg/cli/cmd/authorizer/eval.go @@ -3,10 +3,10 @@ package authorizer import ( "github.com/aserto-dev/go-authorizer/aserto/authorizer/v2" "github.com/aserto-dev/go-authorizer/aserto/authorizer/v2/api" - "github.com/aserto-dev/topaz/pkg/cli/cc" - "github.com/aserto-dev/topaz/pkg/cli/clients" - azc "github.com/aserto-dev/topaz/pkg/cli/clients/authorizer" - "github.com/aserto-dev/topaz/pkg/cli/jsonx" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cc" + "github.com/aserto-dev/topaz/topaz/pkg/cli/clients" + azc "github.com/aserto-dev/topaz/topaz/pkg/cli/clients/authorizer" + "github.com/aserto-dev/topaz/topaz/pkg/cli/jsonx" "google.golang.org/protobuf/proto" "google.golang.org/protobuf/types/known/structpb" ) diff --git a/pkg/cli/cmd/authorizer/get.go b/topaz/pkg/cli/cmd/authorizer/get.go similarity index 84% rename from pkg/cli/cmd/authorizer/get.go rename to topaz/pkg/cli/cmd/authorizer/get.go index 9f7e9899..5dd650dc 100644 --- a/pkg/cli/cmd/authorizer/get.go +++ b/topaz/pkg/cli/cmd/authorizer/get.go @@ -3,10 +3,10 @@ package authorizer import ( "github.com/aserto-dev/go-authorizer/aserto/authorizer/v2" "github.com/aserto-dev/go-authorizer/aserto/authorizer/v2/api" - "github.com/aserto-dev/topaz/pkg/cli/cc" - "github.com/aserto-dev/topaz/pkg/cli/clients" - azc "github.com/aserto-dev/topaz/pkg/cli/clients/authorizer" - "github.com/aserto-dev/topaz/pkg/cli/jsonx" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cc" + "github.com/aserto-dev/topaz/topaz/pkg/cli/clients" + azc "github.com/aserto-dev/topaz/topaz/pkg/cli/clients/authorizer" + "github.com/aserto-dev/topaz/topaz/pkg/cli/jsonx" "google.golang.org/protobuf/proto" "google.golang.org/protobuf/types/known/fieldmaskpb" ) diff --git a/pkg/cli/cmd/authorizer/list.go b/topaz/pkg/cli/cmd/authorizer/list.go similarity index 83% rename from pkg/cli/cmd/authorizer/list.go rename to topaz/pkg/cli/cmd/authorizer/list.go index 5749fadd..f4a8a3ac 100644 --- a/pkg/cli/cmd/authorizer/list.go +++ b/topaz/pkg/cli/cmd/authorizer/list.go @@ -5,11 +5,11 @@ import ( "github.com/aserto-dev/go-authorizer/aserto/authorizer/v2" "github.com/aserto-dev/go-authorizer/aserto/authorizer/v2/api" - "github.com/aserto-dev/topaz/pkg/cli/cc" - "github.com/aserto-dev/topaz/pkg/cli/clients" - azc "github.com/aserto-dev/topaz/pkg/cli/clients/authorizer" - "github.com/aserto-dev/topaz/pkg/cli/jsonx" - "github.com/aserto-dev/topaz/pkg/cli/table" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cc" + "github.com/aserto-dev/topaz/topaz/pkg/cli/clients" + azc "github.com/aserto-dev/topaz/topaz/pkg/cli/clients/authorizer" + "github.com/aserto-dev/topaz/topaz/pkg/cli/jsonx" + "github.com/aserto-dev/topaz/topaz/pkg/cli/table" "google.golang.org/protobuf/proto" "google.golang.org/protobuf/types/known/fieldmaskpb" ) diff --git a/pkg/cli/cmd/authorizer/query.go b/topaz/pkg/cli/cmd/authorizer/query.go similarity index 85% rename from pkg/cli/cmd/authorizer/query.go rename to topaz/pkg/cli/cmd/authorizer/query.go index 29be5b33..b7bfb675 100644 --- a/pkg/cli/cmd/authorizer/query.go +++ b/topaz/pkg/cli/cmd/authorizer/query.go @@ -3,10 +3,10 @@ package authorizer import ( "github.com/aserto-dev/go-authorizer/aserto/authorizer/v2" "github.com/aserto-dev/go-authorizer/aserto/authorizer/v2/api" - "github.com/aserto-dev/topaz/pkg/cli/cc" - "github.com/aserto-dev/topaz/pkg/cli/clients" - azc "github.com/aserto-dev/topaz/pkg/cli/clients/authorizer" - "github.com/aserto-dev/topaz/pkg/cli/jsonx" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cc" + "github.com/aserto-dev/topaz/topaz/pkg/cli/clients" + azc "github.com/aserto-dev/topaz/topaz/pkg/cli/clients/authorizer" + "github.com/aserto-dev/topaz/topaz/pkg/cli/jsonx" "google.golang.org/protobuf/proto" "google.golang.org/protobuf/types/known/structpb" ) diff --git a/pkg/cli/cmd/authorizer/test.go b/topaz/pkg/cli/cmd/authorizer/test.go similarity index 90% rename from pkg/cli/cmd/authorizer/test.go rename to topaz/pkg/cli/cmd/authorizer/test.go index bc18ca5a..80b3d0ac 100644 --- a/pkg/cli/cmd/authorizer/test.go +++ b/topaz/pkg/cli/cmd/authorizer/test.go @@ -6,9 +6,9 @@ import ( "path/filepath" "strings" - "github.com/aserto-dev/topaz/pkg/cli/cc" - azc "github.com/aserto-dev/topaz/pkg/cli/clients/authorizer" - "github.com/aserto-dev/topaz/pkg/cli/cmd/common" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cc" + azc "github.com/aserto-dev/topaz/topaz/pkg/cli/clients/authorizer" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cmd/common" ) type TestCmd struct { diff --git a/pkg/cli/cmd/certs/certs.go b/topaz/pkg/cli/cmd/certs/certs.go similarity index 100% rename from pkg/cli/cmd/certs/certs.go rename to topaz/pkg/cli/cmd/certs/certs.go diff --git a/pkg/cli/cmd/certs/generate.go b/topaz/pkg/cli/cmd/certs/generate.go similarity index 94% rename from pkg/cli/cmd/certs/generate.go rename to topaz/pkg/cli/cmd/certs/generate.go index 95028793..81ababba 100644 --- a/pkg/cli/cmd/certs/generate.go +++ b/topaz/pkg/cli/cmd/certs/generate.go @@ -4,8 +4,8 @@ import ( "path/filepath" "github.com/aserto-dev/topaz/internal/pkg/fs" - "github.com/aserto-dev/topaz/pkg/cli/cc" - "github.com/aserto-dev/topaz/pkg/cli/certs" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cc" + "github.com/aserto-dev/topaz/topaz/pkg/cli/certs" ) type GenerateCertsCmd struct { diff --git a/pkg/cli/cmd/certs/list.go b/topaz/pkg/cli/cmd/certs/list.go similarity index 94% rename from pkg/cli/cmd/certs/list.go rename to topaz/pkg/cli/cmd/certs/list.go index 0c320e07..e5c29593 100644 --- a/pkg/cli/cmd/certs/list.go +++ b/topaz/pkg/cli/cmd/certs/list.go @@ -10,8 +10,8 @@ import ( "strings" "time" - "github.com/aserto-dev/topaz/pkg/cli/cc" - "github.com/aserto-dev/topaz/pkg/cli/table" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cc" + "github.com/aserto-dev/topaz/topaz/pkg/cli/table" "github.com/pkg/errors" ) diff --git a/pkg/cli/cmd/certs/remove.go b/topaz/pkg/cli/cmd/certs/remove.go similarity index 90% rename from pkg/cli/cmd/certs/remove.go rename to topaz/pkg/cli/cmd/certs/remove.go index 28b1709f..ee85ebc0 100644 --- a/pkg/cli/cmd/certs/remove.go +++ b/topaz/pkg/cli/cmd/certs/remove.go @@ -6,9 +6,9 @@ import ( "path/filepath" "strings" - "github.com/aserto-dev/topaz/pkg/cli/cc" - "github.com/aserto-dev/topaz/pkg/cli/certs" - "github.com/aserto-dev/topaz/pkg/cli/table" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cc" + "github.com/aserto-dev/topaz/topaz/pkg/cli/certs" + "github.com/aserto-dev/topaz/topaz/pkg/cli/table" "github.com/pkg/errors" ) diff --git a/pkg/cli/cmd/certs/trust.go b/topaz/pkg/cli/cmd/certs/trust.go similarity index 91% rename from pkg/cli/cmd/certs/trust.go rename to topaz/pkg/cli/cmd/certs/trust.go index 5b414b01..347d9f88 100644 --- a/pkg/cli/cmd/certs/trust.go +++ b/topaz/pkg/cli/cmd/certs/trust.go @@ -7,9 +7,9 @@ import ( "runtime" "strings" - "github.com/aserto-dev/topaz/pkg/cli/cc" - "github.com/aserto-dev/topaz/pkg/cli/certs" - "github.com/aserto-dev/topaz/pkg/cli/table" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cc" + "github.com/aserto-dev/topaz/topaz/pkg/cli/certs" + "github.com/aserto-dev/topaz/topaz/pkg/cli/table" "github.com/pkg/errors" ) diff --git a/pkg/cli/cmd/cli.go b/topaz/pkg/cli/cmd/cli.go similarity index 92% rename from pkg/cli/cmd/cli.go rename to topaz/pkg/cli/cmd/cli.go index 04300e44..598e92de 100644 --- a/pkg/cli/cmd/cli.go +++ b/topaz/pkg/cli/cmd/cli.go @@ -1,14 +1,14 @@ package cmd import ( - "github.com/aserto-dev/topaz/pkg/cli/cc" - "github.com/aserto-dev/topaz/pkg/cli/cmd/access" - "github.com/aserto-dev/topaz/pkg/cli/cmd/authorizer" - "github.com/aserto-dev/topaz/pkg/cli/cmd/certs" - "github.com/aserto-dev/topaz/pkg/cli/cmd/configure" - "github.com/aserto-dev/topaz/pkg/cli/cmd/directory" - "github.com/aserto-dev/topaz/pkg/cli/cmd/templates" - "github.com/aserto-dev/topaz/pkg/cli/cmd/topaz" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cc" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cmd/access" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cmd/authorizer" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cmd/certs" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cmd/configure" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cmd/directory" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cmd/templates" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cmd/topaz" "github.com/pkg/errors" ) diff --git a/pkg/cli/cmd/common/common.go b/topaz/pkg/cli/cmd/common/common.go similarity index 100% rename from pkg/cli/cmd/common/common.go rename to topaz/pkg/cli/cmd/common/common.go diff --git a/pkg/cli/cmd/common/test.go b/topaz/pkg/cli/cmd/common/test.go similarity index 100% rename from pkg/cli/cmd/common/test.go rename to topaz/pkg/cli/cmd/common/test.go diff --git a/pkg/cli/cmd/common/testrunner.go b/topaz/pkg/cli/cmd/common/testrunner.go similarity index 98% rename from pkg/cli/cmd/common/testrunner.go rename to topaz/pkg/cli/cmd/common/testrunner.go index a286d1e8..1c3913f4 100644 --- a/pkg/cli/cmd/common/testrunner.go +++ b/topaz/pkg/cli/cmd/common/testrunner.go @@ -12,9 +12,9 @@ import ( cerr "github.com/aserto-dev/errors" az2 "github.com/aserto-dev/go-authorizer/aserto/authorizer/v2" dsr3 "github.com/aserto-dev/go-directory/aserto/directory/reader/v3" - "github.com/aserto-dev/topaz/pkg/cli/cc" - azc "github.com/aserto-dev/topaz/pkg/cli/clients/authorizer" - dsc "github.com/aserto-dev/topaz/pkg/cli/clients/directory" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cc" + azc "github.com/aserto-dev/topaz/topaz/pkg/cli/clients/authorizer" + dsc "github.com/aserto-dev/topaz/topaz/pkg/cli/clients/directory" acc1 "github.com/authzen/access.go/api/access/v1" "github.com/pkg/errors" diff --git a/pkg/cli/cmd/configure/configure.go b/topaz/pkg/cli/cmd/configure/configure.go similarity index 92% rename from pkg/cli/cmd/configure/configure.go rename to topaz/pkg/cli/cmd/configure/configure.go index 03752f3a..a0fc0b2b 100644 --- a/pkg/cli/cmd/configure/configure.go +++ b/topaz/pkg/cli/cmd/configure/configure.go @@ -4,8 +4,8 @@ import ( "regexp" "github.com/alecthomas/kong" - "github.com/aserto-dev/topaz/pkg/cli/cc" - "github.com/aserto-dev/topaz/pkg/cli/fflag" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cc" + "github.com/aserto-dev/topaz/topaz/pkg/cli/fflag" "github.com/pkg/errors" ) diff --git a/pkg/cli/cmd/configure/delete.go b/topaz/pkg/cli/cmd/configure/delete.go similarity index 90% rename from pkg/cli/cmd/configure/delete.go rename to topaz/pkg/cli/cmd/configure/delete.go index c4074b5c..0ca848a1 100644 --- a/pkg/cli/cmd/configure/delete.go +++ b/topaz/pkg/cli/cmd/configure/delete.go @@ -5,8 +5,8 @@ import ( "os" "path/filepath" - "github.com/aserto-dev/topaz/pkg/cli/cc" - "github.com/aserto-dev/topaz/pkg/cli/cmd/common" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cc" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cmd/common" "github.com/pkg/errors" ) diff --git a/pkg/cli/cmd/configure/edit.go b/topaz/pkg/cli/cmd/configure/edit.go similarity index 81% rename from pkg/cli/cmd/configure/edit.go rename to topaz/pkg/cli/cmd/configure/edit.go index 2f8a32f9..e68e1ca5 100644 --- a/pkg/cli/cmd/configure/edit.go +++ b/topaz/pkg/cli/cmd/configure/edit.go @@ -5,9 +5,9 @@ import ( "os" "path/filepath" - "github.com/aserto-dev/topaz/pkg/cli/cc" - "github.com/aserto-dev/topaz/pkg/cli/cmd/common" - "github.com/aserto-dev/topaz/pkg/cli/editor" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cc" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cmd/common" + "github.com/aserto-dev/topaz/topaz/pkg/cli/editor" ) type EditConfigCmd struct { diff --git a/pkg/cli/cmd/configure/info.go b/topaz/pkg/cli/cmd/configure/info.go similarity index 97% rename from pkg/cli/cmd/configure/info.go rename to topaz/pkg/cli/cmd/configure/info.go index 4db30973..a372d155 100644 --- a/pkg/cli/cmd/configure/info.go +++ b/topaz/pkg/cli/cmd/configure/info.go @@ -7,8 +7,8 @@ import ( "path/filepath" "github.com/aserto-dev/topaz/internal/pkg/xdg" - "github.com/aserto-dev/topaz/pkg/cli/cc" - "github.com/aserto-dev/topaz/pkg/cli/cmd/common" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cc" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cmd/common" "github.com/itchyny/gojq" ) diff --git a/pkg/cli/cmd/configure/list.go b/topaz/pkg/cli/cmd/configure/list.go similarity index 88% rename from pkg/cli/cmd/configure/list.go rename to topaz/pkg/cli/cmd/configure/list.go index c0a37dd4..a63e5feb 100644 --- a/pkg/cli/cmd/configure/list.go +++ b/topaz/pkg/cli/cmd/configure/list.go @@ -5,8 +5,8 @@ import ( "path/filepath" "strings" - "github.com/aserto-dev/topaz/pkg/cli/cc" - "github.com/aserto-dev/topaz/pkg/cli/table" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cc" + "github.com/aserto-dev/topaz/topaz/pkg/cli/table" ) type ListConfigCmd struct { diff --git a/pkg/cli/cmd/configure/new.go b/topaz/pkg/cli/cmd/configure/new.go similarity index 91% rename from pkg/cli/cmd/configure/new.go rename to topaz/pkg/cli/cmd/configure/new.go index aed45534..70a3da69 100644 --- a/pkg/cli/cmd/configure/new.go +++ b/topaz/pkg/cli/cmd/configure/new.go @@ -5,10 +5,10 @@ import ( "os" "path/filepath" - "github.com/aserto-dev/topaz/pkg/cli/cc" - "github.com/aserto-dev/topaz/pkg/cli/cmd/certs" - "github.com/aserto-dev/topaz/pkg/cli/cmd/common" - "github.com/aserto-dev/topaz/pkg/cli/config" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cc" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cmd/certs" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cmd/common" + "github.com/aserto-dev/topaz/topaz/pkg/cli/config" ) const ( diff --git a/pkg/cli/cmd/configure/rename.go b/topaz/pkg/cli/cmd/configure/rename.go similarity index 91% rename from pkg/cli/cmd/configure/rename.go rename to topaz/pkg/cli/cmd/configure/rename.go index ad39e6d1..bb637e24 100644 --- a/pkg/cli/cmd/configure/rename.go +++ b/topaz/pkg/cli/cmd/configure/rename.go @@ -5,8 +5,8 @@ import ( "os" "path/filepath" - "github.com/aserto-dev/topaz/pkg/cli/cc" - "github.com/aserto-dev/topaz/pkg/cli/cmd/common" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cc" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cmd/common" "github.com/pkg/errors" ) diff --git a/pkg/cli/cmd/configure/use.go b/topaz/pkg/cli/cmd/configure/use.go similarity index 89% rename from pkg/cli/cmd/configure/use.go rename to topaz/pkg/cli/cmd/configure/use.go index 5a49a2e2..38494f50 100644 --- a/pkg/cli/cmd/configure/use.go +++ b/topaz/pkg/cli/cmd/configure/use.go @@ -5,8 +5,8 @@ import ( "os" "path/filepath" - "github.com/aserto-dev/topaz/pkg/cli/cc" - "github.com/aserto-dev/topaz/pkg/cli/cmd/common" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cc" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cmd/common" ) type UseConfigCmd struct { diff --git a/pkg/cli/cmd/directory/backup.go b/topaz/pkg/cli/cmd/directory/backup.go similarity index 80% rename from pkg/cli/cmd/directory/backup.go rename to topaz/pkg/cli/cmd/directory/backup.go index 586a3bb8..e1dac52d 100644 --- a/pkg/cli/cmd/directory/backup.go +++ b/topaz/pkg/cli/cmd/directory/backup.go @@ -4,9 +4,9 @@ import ( "os" "path" - "github.com/aserto-dev/topaz/pkg/cli/cc" - "github.com/aserto-dev/topaz/pkg/cli/clients" - dsc "github.com/aserto-dev/topaz/pkg/cli/clients/directory" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cc" + "github.com/aserto-dev/topaz/topaz/pkg/cli/clients" + dsc "github.com/aserto-dev/topaz/topaz/pkg/cli/clients/directory" ) type BackupCmd struct { diff --git a/pkg/cli/cmd/directory/check.go b/topaz/pkg/cli/cmd/directory/check.go similarity index 79% rename from pkg/cli/cmd/directory/check.go rename to topaz/pkg/cli/cmd/directory/check.go index a51148ea..2cdaf951 100644 --- a/pkg/cli/cmd/directory/check.go +++ b/topaz/pkg/cli/cmd/directory/check.go @@ -2,10 +2,10 @@ package directory import ( "github.com/aserto-dev/go-directory/aserto/directory/reader/v3" - "github.com/aserto-dev/topaz/pkg/cli/cc" - "github.com/aserto-dev/topaz/pkg/cli/clients" - dsc "github.com/aserto-dev/topaz/pkg/cli/clients/directory" - "github.com/aserto-dev/topaz/pkg/cli/jsonx" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cc" + "github.com/aserto-dev/topaz/topaz/pkg/cli/clients" + dsc "github.com/aserto-dev/topaz/topaz/pkg/cli/clients/directory" + "github.com/aserto-dev/topaz/topaz/pkg/cli/jsonx" "google.golang.org/protobuf/proto" ) diff --git a/pkg/cli/cmd/directory/checks.go b/topaz/pkg/cli/cmd/directory/checks.go similarity index 82% rename from pkg/cli/cmd/directory/checks.go rename to topaz/pkg/cli/cmd/directory/checks.go index b6d9bf61..47f72ef9 100644 --- a/pkg/cli/cmd/directory/checks.go +++ b/topaz/pkg/cli/cmd/directory/checks.go @@ -2,10 +2,10 @@ package directory import ( "github.com/aserto-dev/go-directory/aserto/directory/reader/v3" - "github.com/aserto-dev/topaz/pkg/cli/cc" - "github.com/aserto-dev/topaz/pkg/cli/clients" - dsc "github.com/aserto-dev/topaz/pkg/cli/clients/directory" - "github.com/aserto-dev/topaz/pkg/cli/jsonx" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cc" + "github.com/aserto-dev/topaz/topaz/pkg/cli/clients" + dsc "github.com/aserto-dev/topaz/topaz/pkg/cli/clients/directory" + "github.com/aserto-dev/topaz/topaz/pkg/cli/jsonx" "google.golang.org/protobuf/proto" ) diff --git a/pkg/cli/cmd/directory/directory.go b/topaz/pkg/cli/cmd/directory/directory.go similarity index 100% rename from pkg/cli/cmd/directory/directory.go rename to topaz/pkg/cli/cmd/directory/directory.go diff --git a/pkg/cli/cmd/directory/exporter.go b/topaz/pkg/cli/cmd/directory/exporter.go similarity index 79% rename from pkg/cli/cmd/directory/exporter.go rename to topaz/pkg/cli/cmd/directory/exporter.go index 0a7c5584..cc72024e 100644 --- a/pkg/cli/cmd/directory/exporter.go +++ b/topaz/pkg/cli/cmd/directory/exporter.go @@ -3,9 +3,9 @@ package directory import ( "path/filepath" - "github.com/aserto-dev/topaz/pkg/cli/cc" - "github.com/aserto-dev/topaz/pkg/cli/clients" - dsc "github.com/aserto-dev/topaz/pkg/cli/clients/directory" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cc" + "github.com/aserto-dev/topaz/topaz/pkg/cli/clients" + dsc "github.com/aserto-dev/topaz/topaz/pkg/cli/clients/directory" ) type ExportCmd struct { diff --git a/pkg/cli/cmd/directory/importer.go b/topaz/pkg/cli/cmd/directory/importer.go similarity index 83% rename from pkg/cli/cmd/directory/importer.go rename to topaz/pkg/cli/cmd/directory/importer.go index cde4be69..e7ccf8b0 100644 --- a/pkg/cli/cmd/directory/importer.go +++ b/topaz/pkg/cli/cmd/directory/importer.go @@ -4,9 +4,9 @@ import ( "os" "path/filepath" - "github.com/aserto-dev/topaz/pkg/cli/cc" - "github.com/aserto-dev/topaz/pkg/cli/clients" - dsc "github.com/aserto-dev/topaz/pkg/cli/clients/directory" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cc" + "github.com/aserto-dev/topaz/topaz/pkg/cli/clients" + dsc "github.com/aserto-dev/topaz/topaz/pkg/cli/clients/directory" "github.com/pkg/errors" ) diff --git a/pkg/cli/cmd/directory/manifest.go b/topaz/pkg/cli/cmd/directory/manifest.go similarity index 90% rename from pkg/cli/cmd/directory/manifest.go rename to topaz/pkg/cli/cmd/directory/manifest.go index 005f364b..2bb3775d 100644 --- a/pkg/cli/cmd/directory/manifest.go +++ b/topaz/pkg/cli/cmd/directory/manifest.go @@ -4,10 +4,10 @@ import ( "io" "os" - "github.com/aserto-dev/topaz/pkg/cli/cc" - "github.com/aserto-dev/topaz/pkg/cli/clients" - dsc "github.com/aserto-dev/topaz/pkg/cli/clients/directory" - "github.com/aserto-dev/topaz/pkg/cli/cmd/common" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cc" + "github.com/aserto-dev/topaz/topaz/pkg/cli/clients" + dsc "github.com/aserto-dev/topaz/topaz/pkg/cli/clients/directory" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cmd/common" ) type GetManifestCmd struct { diff --git a/pkg/cli/cmd/directory/object.go b/topaz/pkg/cli/cmd/directory/object.go similarity index 92% rename from pkg/cli/cmd/directory/object.go rename to topaz/pkg/cli/cmd/directory/object.go index 3b44b0c5..297fc1dc 100644 --- a/pkg/cli/cmd/directory/object.go +++ b/topaz/pkg/cli/cmd/directory/object.go @@ -5,12 +5,12 @@ import ( "github.com/aserto-dev/go-directory/aserto/directory/common/v3" "github.com/aserto-dev/go-directory/aserto/directory/reader/v3" "github.com/aserto-dev/go-directory/aserto/directory/writer/v3" - "github.com/aserto-dev/topaz/pkg/cli/cc" - "github.com/aserto-dev/topaz/pkg/cli/clients" - dsc "github.com/aserto-dev/topaz/pkg/cli/clients/directory" - "github.com/aserto-dev/topaz/pkg/cli/fflag" - "github.com/aserto-dev/topaz/pkg/cli/jsonx" - "github.com/aserto-dev/topaz/pkg/cli/x" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cc" + "github.com/aserto-dev/topaz/topaz/pkg/cli/clients" + dsc "github.com/aserto-dev/topaz/topaz/pkg/cli/clients/directory" + "github.com/aserto-dev/topaz/topaz/pkg/cli/fflag" + "github.com/aserto-dev/topaz/topaz/pkg/cli/jsonx" + "github.com/aserto-dev/topaz/topaz/pkg/cli/x" "google.golang.org/protobuf/proto" "google.golang.org/protobuf/types/known/structpb" diff --git a/pkg/cli/cmd/directory/relation.go b/topaz/pkg/cli/cmd/directory/relation.go similarity index 93% rename from pkg/cli/cmd/directory/relation.go rename to topaz/pkg/cli/cmd/directory/relation.go index b1067af2..a00b0791 100644 --- a/pkg/cli/cmd/directory/relation.go +++ b/topaz/pkg/cli/cmd/directory/relation.go @@ -4,11 +4,11 @@ import ( "github.com/aserto-dev/go-directory/aserto/directory/common/v3" "github.com/aserto-dev/go-directory/aserto/directory/reader/v3" "github.com/aserto-dev/go-directory/aserto/directory/writer/v3" - "github.com/aserto-dev/topaz/pkg/cli/cc" - "github.com/aserto-dev/topaz/pkg/cli/clients" - dsc "github.com/aserto-dev/topaz/pkg/cli/clients/directory" - "github.com/aserto-dev/topaz/pkg/cli/jsonx" - "github.com/aserto-dev/topaz/pkg/cli/x" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cc" + "github.com/aserto-dev/topaz/topaz/pkg/cli/clients" + dsc "github.com/aserto-dev/topaz/topaz/pkg/cli/clients/directory" + "github.com/aserto-dev/topaz/topaz/pkg/cli/jsonx" + "github.com/aserto-dev/topaz/topaz/pkg/cli/x" "google.golang.org/protobuf/proto" "google.golang.org/protobuf/types/known/timestamppb" ) diff --git a/pkg/cli/cmd/directory/restore.go b/topaz/pkg/cli/cmd/directory/restore.go similarity index 79% rename from pkg/cli/cmd/directory/restore.go rename to topaz/pkg/cli/cmd/directory/restore.go index e72b4649..737dd808 100644 --- a/pkg/cli/cmd/directory/restore.go +++ b/topaz/pkg/cli/cmd/directory/restore.go @@ -4,9 +4,9 @@ import ( "os" "path" - "github.com/aserto-dev/topaz/pkg/cli/cc" - "github.com/aserto-dev/topaz/pkg/cli/clients" - dsc "github.com/aserto-dev/topaz/pkg/cli/clients/directory" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cc" + "github.com/aserto-dev/topaz/topaz/pkg/cli/clients" + dsc "github.com/aserto-dev/topaz/topaz/pkg/cli/clients/directory" ) type RestoreCmd struct { diff --git a/pkg/cli/cmd/directory/search.go b/topaz/pkg/cli/cmd/directory/search.go similarity index 80% rename from pkg/cli/cmd/directory/search.go rename to topaz/pkg/cli/cmd/directory/search.go index 6ac1b412..27239e7f 100644 --- a/pkg/cli/cmd/directory/search.go +++ b/topaz/pkg/cli/cmd/directory/search.go @@ -2,10 +2,10 @@ package directory import ( "github.com/aserto-dev/go-directory/aserto/directory/reader/v3" - "github.com/aserto-dev/topaz/pkg/cli/cc" - "github.com/aserto-dev/topaz/pkg/cli/clients" - dsc "github.com/aserto-dev/topaz/pkg/cli/clients/directory" - "github.com/aserto-dev/topaz/pkg/cli/jsonx" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cc" + "github.com/aserto-dev/topaz/topaz/pkg/cli/clients" + dsc "github.com/aserto-dev/topaz/topaz/pkg/cli/clients/directory" + "github.com/aserto-dev/topaz/topaz/pkg/cli/jsonx" "google.golang.org/protobuf/proto" ) diff --git a/pkg/cli/cmd/directory/stats.go b/topaz/pkg/cli/cmd/directory/stats.go similarity index 91% rename from pkg/cli/cmd/directory/stats.go rename to topaz/pkg/cli/cmd/directory/stats.go index 5ce2014a..9d247c4a 100644 --- a/pkg/cli/cmd/directory/stats.go +++ b/topaz/pkg/cli/cmd/directory/stats.go @@ -7,10 +7,10 @@ import ( "github.com/aserto-dev/azm/stats" dse3 "github.com/aserto-dev/go-directory/aserto/directory/exporter/v3" - "github.com/aserto-dev/topaz/pkg/cli/cc" - dsc "github.com/aserto-dev/topaz/pkg/cli/clients/directory" - "github.com/aserto-dev/topaz/pkg/cli/jsonx" - "github.com/aserto-dev/topaz/pkg/cli/table" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cc" + dsc "github.com/aserto-dev/topaz/topaz/pkg/cli/clients/directory" + "github.com/aserto-dev/topaz/topaz/pkg/cli/jsonx" + "github.com/aserto-dev/topaz/topaz/pkg/cli/table" "github.com/pkg/errors" "google.golang.org/protobuf/types/known/structpb" diff --git a/pkg/cli/cmd/directory/test.go b/topaz/pkg/cli/cmd/directory/test.go similarity index 89% rename from pkg/cli/cmd/directory/test.go rename to topaz/pkg/cli/cmd/directory/test.go index 09108ea8..0104e7ec 100644 --- a/pkg/cli/cmd/directory/test.go +++ b/topaz/pkg/cli/cmd/directory/test.go @@ -5,9 +5,9 @@ import ( "path/filepath" "strings" - "github.com/aserto-dev/topaz/pkg/cli/cc" - dsc "github.com/aserto-dev/topaz/pkg/cli/clients/directory" - "github.com/aserto-dev/topaz/pkg/cli/cmd/common" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cc" + dsc "github.com/aserto-dev/topaz/topaz/pkg/cli/clients/directory" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cmd/common" ) type TestCmd struct { diff --git a/pkg/cli/cmd/templates/apply.go b/topaz/pkg/cli/cmd/templates/apply.go similarity index 91% rename from pkg/cli/cmd/templates/apply.go rename to topaz/pkg/cli/cmd/templates/apply.go index 76f846a9..4ac2d467 100644 --- a/pkg/cli/cmd/templates/apply.go +++ b/topaz/pkg/cli/cmd/templates/apply.go @@ -6,11 +6,11 @@ import ( "path/filepath" "github.com/aserto-dev/topaz/internal/pkg/fs" - "github.com/aserto-dev/topaz/pkg/cli/cc" - azc "github.com/aserto-dev/topaz/pkg/cli/clients/authorizer" - dsc "github.com/aserto-dev/topaz/pkg/cli/clients/directory" - "github.com/aserto-dev/topaz/pkg/cli/cmd/common" - "github.com/aserto-dev/topaz/pkg/cli/cmd/directory" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cc" + azc "github.com/aserto-dev/topaz/topaz/pkg/cli/clients/authorizer" + dsc "github.com/aserto-dev/topaz/topaz/pkg/cli/clients/directory" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cmd/common" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cmd/directory" "github.com/pkg/errors" ) diff --git a/pkg/cli/cmd/templates/download.go b/topaz/pkg/cli/cmd/templates/download.go similarity index 93% rename from pkg/cli/cmd/templates/download.go rename to topaz/pkg/cli/cmd/templates/download.go index 66b0b3b5..114ebd6e 100644 --- a/pkg/cli/cmd/templates/download.go +++ b/topaz/pkg/cli/cmd/templates/download.go @@ -3,9 +3,9 @@ package templates import ( "path" - "github.com/aserto-dev/topaz/pkg/cli/cc" - "github.com/aserto-dev/topaz/pkg/cli/cmd/common" - "github.com/aserto-dev/topaz/pkg/cli/x" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cc" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cmd/common" + "github.com/aserto-dev/topaz/topaz/pkg/cli/x" "github.com/pkg/errors" ) diff --git a/pkg/cli/cmd/templates/install.go b/topaz/pkg/cli/cmd/templates/install.go similarity index 95% rename from pkg/cli/cmd/templates/install.go rename to topaz/pkg/cli/cmd/templates/install.go index 441c98d9..204f7d5e 100644 --- a/pkg/cli/cmd/templates/install.go +++ b/topaz/pkg/cli/cmd/templates/install.go @@ -9,16 +9,16 @@ import ( client "github.com/aserto-dev/go-aserto" "github.com/aserto-dev/topaz/internal/pkg/fs" - "github.com/aserto-dev/topaz/pkg/cli/cc" - azc "github.com/aserto-dev/topaz/pkg/cli/clients/authorizer" - dsc "github.com/aserto-dev/topaz/pkg/cli/clients/directory" - "github.com/aserto-dev/topaz/pkg/cli/cmd/common" - "github.com/aserto-dev/topaz/pkg/cli/cmd/configure" - "github.com/aserto-dev/topaz/pkg/cli/cmd/directory" - "github.com/aserto-dev/topaz/pkg/cli/cmd/topaz" - clicfg "github.com/aserto-dev/topaz/pkg/cli/config" - "github.com/aserto-dev/topaz/pkg/cli/x" - "github.com/aserto-dev/topaz/pkg/servers" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cc" + azc "github.com/aserto-dev/topaz/topaz/pkg/cli/clients/authorizer" + dsc "github.com/aserto-dev/topaz/topaz/pkg/cli/clients/directory" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cmd/common" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cmd/configure" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cmd/directory" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cmd/topaz" + clicfg "github.com/aserto-dev/topaz/topaz/pkg/cli/config" + "github.com/aserto-dev/topaz/topaz/pkg/cli/x" + "github.com/aserto-dev/topaz/topazd/servers" "github.com/pkg/errors" "github.com/samber/lo" ) diff --git a/pkg/cli/cmd/templates/list.go b/topaz/pkg/cli/cmd/templates/list.go similarity index 82% rename from pkg/cli/cmd/templates/list.go rename to topaz/pkg/cli/cmd/templates/list.go index 2f3e0899..c6690804 100644 --- a/pkg/cli/cmd/templates/list.go +++ b/topaz/pkg/cli/cmd/templates/list.go @@ -1,9 +1,9 @@ package templates import ( - "github.com/aserto-dev/topaz/pkg/cli/cc" - "github.com/aserto-dev/topaz/pkg/cli/table" - "github.com/aserto-dev/topaz/pkg/cli/x" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cc" + "github.com/aserto-dev/topaz/topaz/pkg/cli/table" + "github.com/aserto-dev/topaz/topaz/pkg/cli/x" ) type ListTemplatesCmd struct { diff --git a/pkg/cli/cmd/templates/template.go b/topaz/pkg/cli/cmd/templates/template.go similarity index 100% rename from pkg/cli/cmd/templates/template.go rename to topaz/pkg/cli/cmd/templates/template.go diff --git a/pkg/cli/cmd/templates/verify.go b/topaz/pkg/cli/cmd/templates/verify.go similarity index 94% rename from pkg/cli/cmd/templates/verify.go rename to topaz/pkg/cli/cmd/templates/verify.go index 7f56fbe4..8a4faf40 100644 --- a/pkg/cli/cmd/templates/verify.go +++ b/topaz/pkg/cli/cmd/templates/verify.go @@ -6,9 +6,9 @@ import ( "strconv" v3 "github.com/aserto-dev/azm/v3" - "github.com/aserto-dev/topaz/pkg/cli/cc" - "github.com/aserto-dev/topaz/pkg/cli/table" - "github.com/aserto-dev/topaz/pkg/cli/x" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cc" + "github.com/aserto-dev/topaz/topaz/pkg/cli/table" + "github.com/aserto-dev/topaz/topaz/pkg/cli/x" "github.com/rs/zerolog" ) diff --git a/pkg/cli/cmd/topaz/console.go b/topaz/pkg/cli/cmd/topaz/console.go similarity index 91% rename from pkg/cli/cmd/topaz/console.go rename to topaz/pkg/cli/cmd/topaz/console.go index 31db9009..85ea83cd 100644 --- a/pkg/cli/cmd/topaz/console.go +++ b/topaz/pkg/cli/cmd/topaz/console.go @@ -3,7 +3,7 @@ package topaz import ( "strings" - "github.com/aserto-dev/topaz/pkg/cli/cc" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cc" "github.com/cli/browser" ) diff --git a/pkg/cli/cmd/topaz/install.go b/topaz/pkg/cli/cmd/topaz/install.go similarity index 93% rename from pkg/cli/cmd/topaz/install.go rename to topaz/pkg/cli/cmd/topaz/install.go index c3d0fe1d..a6ba9c8f 100644 --- a/pkg/cli/cmd/topaz/install.go +++ b/topaz/pkg/cli/cmd/topaz/install.go @@ -1,8 +1,8 @@ package topaz import ( - "github.com/aserto-dev/topaz/pkg/cli/cc" - "github.com/aserto-dev/topaz/pkg/cli/dockerx" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cc" + "github.com/aserto-dev/topaz/topaz/pkg/cli/dockerx" ) type InstallCmd struct { diff --git a/pkg/cli/cmd/topaz/restart.go b/topaz/pkg/cli/cmd/topaz/restart.go similarity index 90% rename from pkg/cli/cmd/topaz/restart.go rename to topaz/pkg/cli/cmd/topaz/restart.go index c4254e46..e330651b 100644 --- a/pkg/cli/cmd/topaz/restart.go +++ b/topaz/pkg/cli/cmd/topaz/restart.go @@ -1,6 +1,6 @@ package topaz -import "github.com/aserto-dev/topaz/pkg/cli/cc" +import "github.com/aserto-dev/topaz/topaz/pkg/cli/cc" type RestartCmd struct { StartRunCmd diff --git a/pkg/cli/cmd/topaz/run.go b/topaz/pkg/cli/cmd/topaz/run.go similarity index 75% rename from pkg/cli/cmd/topaz/run.go rename to topaz/pkg/cli/cmd/topaz/run.go index 1f97053e..c1b0fb0f 100644 --- a/pkg/cli/cmd/topaz/run.go +++ b/topaz/pkg/cli/cmd/topaz/run.go @@ -1,7 +1,7 @@ package topaz import ( - "github.com/aserto-dev/topaz/pkg/cli/cc" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cc" ) type RunCmd struct { diff --git a/pkg/cli/cmd/topaz/start.go b/topaz/pkg/cli/cmd/topaz/start.go similarity index 88% rename from pkg/cli/cmd/topaz/start.go rename to topaz/pkg/cli/cmd/topaz/start.go index 6eba1e23..2f6f25ec 100644 --- a/pkg/cli/cmd/topaz/start.go +++ b/topaz/pkg/cli/cmd/topaz/start.go @@ -1,7 +1,7 @@ package topaz import ( - "github.com/aserto-dev/topaz/pkg/cli/cc" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cc" ) type StartCmd struct { diff --git a/pkg/cli/cmd/topaz/startrun.go b/topaz/pkg/cli/cmd/topaz/startrun.go similarity index 95% rename from pkg/cli/cmd/topaz/startrun.go rename to topaz/pkg/cli/cmd/topaz/startrun.go index bfef816c..adece1a7 100644 --- a/pkg/cli/cmd/topaz/startrun.go +++ b/topaz/pkg/cli/cmd/topaz/startrun.go @@ -9,14 +9,14 @@ import ( "slices" "strings" - "github.com/aserto-dev/topaz/pkg/cli/cc" - "github.com/aserto-dev/topaz/pkg/cli/cmd/common" - clicfg "github.com/aserto-dev/topaz/pkg/cli/config" - "github.com/aserto-dev/topaz/pkg/cli/dockerx" - "github.com/aserto-dev/topaz/pkg/cli/x" cfgutil "github.com/aserto-dev/topaz/pkg/config" "github.com/aserto-dev/topaz/pkg/config/v3" - "github.com/aserto-dev/topaz/pkg/loiter" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cc" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cmd/common" + clicfg "github.com/aserto-dev/topaz/topaz/pkg/cli/config" + "github.com/aserto-dev/topaz/topaz/pkg/cli/dockerx" + "github.com/aserto-dev/topaz/topaz/pkg/cli/x" + "github.com/aserto-dev/topaz/topazd/loiter" "github.com/hashicorp/go-multierror" "github.com/pkg/errors" "github.com/samber/lo" diff --git a/pkg/cli/cmd/topaz/status.go b/topaz/pkg/cli/cmd/topaz/status.go similarity index 91% rename from pkg/cli/cmd/topaz/status.go rename to topaz/pkg/cli/cmd/topaz/status.go index d45893e3..a9c8d24c 100644 --- a/pkg/cli/cmd/topaz/status.go +++ b/topaz/pkg/cli/cmd/topaz/status.go @@ -1,7 +1,7 @@ package topaz import ( - "github.com/aserto-dev/topaz/pkg/cli/cc" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cc" ) type StatusCmd struct { diff --git a/pkg/cli/cmd/topaz/stop.go b/topaz/pkg/cli/cmd/topaz/stop.go similarity index 83% rename from pkg/cli/cmd/topaz/stop.go rename to topaz/pkg/cli/cmd/topaz/stop.go index 3cfd5145..be8b3c39 100644 --- a/pkg/cli/cmd/topaz/stop.go +++ b/topaz/pkg/cli/cmd/topaz/stop.go @@ -4,10 +4,10 @@ import ( "fmt" "os" - "github.com/aserto-dev/topaz/pkg/cli/cc" - "github.com/aserto-dev/topaz/pkg/cli/cmd/common" - clicfg "github.com/aserto-dev/topaz/pkg/cli/config" - "github.com/aserto-dev/topaz/pkg/cli/dockerx" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cc" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cmd/common" + clicfg "github.com/aserto-dev/topaz/topaz/pkg/cli/config" + "github.com/aserto-dev/topaz/topaz/pkg/cli/dockerx" ) type StopCmd struct { diff --git a/pkg/cli/cmd/topaz/uninstall.go b/topaz/pkg/cli/cmd/topaz/uninstall.go similarity index 95% rename from pkg/cli/cmd/topaz/uninstall.go rename to topaz/pkg/cli/cmd/topaz/uninstall.go index 22d858f3..684da702 100644 --- a/pkg/cli/cmd/topaz/uninstall.go +++ b/topaz/pkg/cli/cmd/topaz/uninstall.go @@ -4,8 +4,8 @@ import ( "os" "path/filepath" - "github.com/aserto-dev/topaz/pkg/cli/cc" - "github.com/aserto-dev/topaz/pkg/cli/dockerx" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cc" + "github.com/aserto-dev/topaz/topaz/pkg/cli/dockerx" "github.com/pkg/errors" ) diff --git a/pkg/cli/cmd/topaz/update.go b/topaz/pkg/cli/cmd/topaz/update.go similarity index 92% rename from pkg/cli/cmd/topaz/update.go rename to topaz/pkg/cli/cmd/topaz/update.go index cbdd2cf2..bcab5595 100644 --- a/pkg/cli/cmd/topaz/update.go +++ b/topaz/pkg/cli/cmd/topaz/update.go @@ -1,8 +1,8 @@ package topaz import ( - "github.com/aserto-dev/topaz/pkg/cli/cc" - "github.com/aserto-dev/topaz/pkg/cli/dockerx" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cc" + "github.com/aserto-dev/topaz/topaz/pkg/cli/dockerx" ) type UpdateCmd struct { diff --git a/pkg/cli/cmd/version.go b/topaz/pkg/cli/cmd/version.go similarity index 89% rename from pkg/cli/cmd/version.go rename to topaz/pkg/cli/cmd/version.go index c51cce41..3f4e3abf 100644 --- a/pkg/cli/cmd/version.go +++ b/topaz/pkg/cli/cmd/version.go @@ -3,10 +3,10 @@ package cmd import ( "fmt" - "github.com/aserto-dev/topaz/pkg/cli/cc" - "github.com/aserto-dev/topaz/pkg/cli/dockerx" - "github.com/aserto-dev/topaz/pkg/cli/x" - "github.com/aserto-dev/topaz/pkg/version" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cc" + "github.com/aserto-dev/topaz/topaz/pkg/cli/dockerx" + "github.com/aserto-dev/topaz/topaz/pkg/cli/x" + "github.com/aserto-dev/topaz/topaz/pkg/version" ) type VersionCmd struct { diff --git a/pkg/cli/config/container.go b/topaz/pkg/cli/config/container.go similarity index 93% rename from pkg/cli/config/container.go rename to topaz/pkg/cli/config/container.go index 3470e4e1..40ebdb46 100644 --- a/pkg/cli/config/container.go +++ b/topaz/pkg/cli/config/container.go @@ -6,8 +6,8 @@ import ( cfgutil "github.com/aserto-dev/topaz/pkg/config" "github.com/aserto-dev/topaz/pkg/config/v3" - "github.com/aserto-dev/topaz/pkg/loiter" - "github.com/aserto-dev/topaz/pkg/servers" + "github.com/aserto-dev/topaz/topazd/loiter" + "github.com/aserto-dev/topaz/topazd/servers" ) type Container struct { diff --git a/pkg/cli/config/generator.go b/topaz/pkg/cli/config/generator.go similarity index 97% rename from pkg/cli/config/generator.go rename to topaz/pkg/cli/config/generator.go index fe9d4723..c27c9231 100644 --- a/pkg/cli/config/generator.go +++ b/topaz/pkg/cli/config/generator.go @@ -10,10 +10,10 @@ import ( "github.com/open-policy-agent/opa/v1/plugins/bundle" "github.com/samber/lo" - "github.com/aserto-dev/topaz/pkg/cli/x" cfgutil "github.com/aserto-dev/topaz/pkg/config" "github.com/aserto-dev/topaz/pkg/config/v3" - "github.com/aserto-dev/topaz/pkg/servers" + "github.com/aserto-dev/topaz/topaz/pkg/cli/x" + "github.com/aserto-dev/topaz/topazd/servers" ) const ( diff --git a/pkg/cli/dockerx/docker.go b/topaz/pkg/cli/dockerx/docker.go similarity index 99% rename from pkg/cli/dockerx/docker.go rename to topaz/pkg/cli/dockerx/docker.go index 4558260d..e09e8c3e 100644 --- a/pkg/cli/dockerx/docker.go +++ b/topaz/pkg/cli/dockerx/docker.go @@ -11,7 +11,7 @@ import ( "strings" "syscall" - "github.com/aserto-dev/topaz/pkg/cli/x" + "github.com/aserto-dev/topaz/topaz/pkg/cli/x" "github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/filters" "github.com/docker/docker/api/types/image" diff --git a/pkg/cli/edit/edit.go b/topaz/pkg/cli/edit/edit.go similarity index 83% rename from pkg/cli/edit/edit.go rename to topaz/pkg/cli/edit/edit.go index 49620af5..7a5d48e9 100644 --- a/pkg/cli/edit/edit.go +++ b/topaz/pkg/cli/edit/edit.go @@ -4,8 +4,8 @@ import ( "bytes" "os" - "github.com/aserto-dev/topaz/pkg/cli/editor" - "github.com/aserto-dev/topaz/pkg/cli/jsonx" + "github.com/aserto-dev/topaz/topaz/pkg/cli/editor" + "github.com/aserto-dev/topaz/topaz/pkg/cli/jsonx" "google.golang.org/protobuf/proto" ) diff --git a/pkg/cli/editor/README.md b/topaz/pkg/cli/editor/README.md similarity index 100% rename from pkg/cli/editor/README.md rename to topaz/pkg/cli/editor/README.md diff --git a/pkg/cli/editor/crlf/crlf.go b/topaz/pkg/cli/editor/crlf/crlf.go similarity index 100% rename from pkg/cli/editor/crlf/crlf.go rename to topaz/pkg/cli/editor/crlf/crlf.go diff --git a/pkg/cli/editor/editor.go b/topaz/pkg/cli/editor/editor.go similarity index 98% rename from pkg/cli/editor/editor.go rename to topaz/pkg/cli/editor/editor.go index 2cf0653c..168d6fef 100644 --- a/pkg/cli/editor/editor.go +++ b/topaz/pkg/cli/editor/editor.go @@ -25,7 +25,7 @@ import ( "runtime" "strings" - "github.com/aserto-dev/topaz/pkg/cli/editor/internal/term" + "github.com/aserto-dev/topaz/topaz/pkg/cli/editor/internal/term" "github.com/pkg/errors" ) diff --git a/pkg/cli/editor/editor_export_test.go b/topaz/pkg/cli/editor/editor_export_test.go similarity index 100% rename from pkg/cli/editor/editor_export_test.go rename to topaz/pkg/cli/editor/editor_export_test.go diff --git a/pkg/cli/editor/editor_test.go b/topaz/pkg/cli/editor/editor_test.go similarity index 97% rename from pkg/cli/editor/editor_test.go rename to topaz/pkg/cli/editor/editor_test.go index 980fe125..0706a54d 100644 --- a/pkg/cli/editor/editor_test.go +++ b/topaz/pkg/cli/editor/editor_test.go @@ -23,7 +23,7 @@ import ( "strings" "testing" - "github.com/aserto-dev/topaz/pkg/cli/editor" + "github.com/aserto-dev/topaz/topaz/pkg/cli/editor" ) func TestArgs(t *testing.T) { diff --git a/pkg/cli/editor/internal/interrupt/interrupt.go b/topaz/pkg/cli/editor/internal/interrupt/interrupt.go similarity index 100% rename from pkg/cli/editor/internal/interrupt/interrupt.go rename to topaz/pkg/cli/editor/internal/interrupt/interrupt.go diff --git a/pkg/cli/editor/internal/printers/terminal.go b/topaz/pkg/cli/editor/internal/printers/terminal.go similarity index 100% rename from pkg/cli/editor/internal/printers/terminal.go rename to topaz/pkg/cli/editor/internal/printers/terminal.go diff --git a/pkg/cli/editor/internal/remotecommand/resize.go b/topaz/pkg/cli/editor/internal/remotecommand/resize.go similarity index 100% rename from pkg/cli/editor/internal/remotecommand/resize.go rename to topaz/pkg/cli/editor/internal/remotecommand/resize.go diff --git a/pkg/cli/editor/internal/runtime/runtime.go b/topaz/pkg/cli/editor/internal/runtime/runtime.go similarity index 100% rename from pkg/cli/editor/internal/runtime/runtime.go rename to topaz/pkg/cli/editor/internal/runtime/runtime.go diff --git a/pkg/cli/editor/internal/term/resize.go b/topaz/pkg/cli/editor/internal/term/resize.go similarity index 96% rename from pkg/cli/editor/internal/term/resize.go rename to topaz/pkg/cli/editor/internal/term/resize.go index 2b2f5b9f..2bac348f 100644 --- a/pkg/cli/editor/internal/term/resize.go +++ b/topaz/pkg/cli/editor/internal/term/resize.go @@ -17,8 +17,8 @@ limitations under the License. package term import ( - "github.com/aserto-dev/topaz/pkg/cli/editor/internal/remotecommand" - "github.com/aserto-dev/topaz/pkg/cli/editor/internal/runtime" + "github.com/aserto-dev/topaz/topaz/pkg/cli/editor/internal/remotecommand" + "github.com/aserto-dev/topaz/topaz/pkg/cli/editor/internal/runtime" "github.com/moby/term" "github.com/pkg/errors" ) diff --git a/pkg/cli/editor/internal/term/resizeevents.go b/topaz/pkg/cli/editor/internal/term/resizeevents.go similarity index 91% rename from pkg/cli/editor/internal/term/resizeevents.go rename to topaz/pkg/cli/editor/internal/term/resizeevents.go index e0cd06de..cda86829 100644 --- a/pkg/cli/editor/internal/term/resizeevents.go +++ b/topaz/pkg/cli/editor/internal/term/resizeevents.go @@ -23,8 +23,8 @@ import ( "os" "os/signal" - "github.com/aserto-dev/topaz/pkg/cli/editor/internal/remotecommand" - "github.com/aserto-dev/topaz/pkg/cli/editor/internal/runtime" + "github.com/aserto-dev/topaz/topaz/pkg/cli/editor/internal/remotecommand" + "github.com/aserto-dev/topaz/topaz/pkg/cli/editor/internal/runtime" "golang.org/x/sys/unix" ) diff --git a/pkg/cli/editor/internal/term/resizeevents_windows.go b/topaz/pkg/cli/editor/internal/term/resizeevents_windows.go similarity index 91% rename from pkg/cli/editor/internal/term/resizeevents_windows.go rename to topaz/pkg/cli/editor/internal/term/resizeevents_windows.go index 7458cca6..37e5e08d 100644 --- a/pkg/cli/editor/internal/term/resizeevents_windows.go +++ b/topaz/pkg/cli/editor/internal/term/resizeevents_windows.go @@ -19,8 +19,8 @@ package term import ( "time" - "github.com/aserto-dev/topaz/pkg/cli/editor/internal/remotecommand" - "github.com/aserto-dev/topaz/pkg/cli/editor/internal/runtime" + "github.com/aserto-dev/topaz/topaz/pkg/cli/editor/internal/remotecommand" + "github.com/aserto-dev/topaz/topaz/pkg/cli/editor/internal/runtime" ) // monitorResizeEvents spawns a goroutine that periodically gets the terminal size and tries to send diff --git a/pkg/cli/editor/internal/term/term.go b/topaz/pkg/cli/editor/internal/term/term.go similarity index 96% rename from pkg/cli/editor/internal/term/term.go rename to topaz/pkg/cli/editor/internal/term/term.go index 76c63975..74b829aa 100644 --- a/pkg/cli/editor/internal/term/term.go +++ b/topaz/pkg/cli/editor/internal/term/term.go @@ -20,8 +20,8 @@ import ( "io" "os" - "github.com/aserto-dev/topaz/pkg/cli/editor/internal/interrupt" - "github.com/aserto-dev/topaz/pkg/cli/editor/internal/printers" + "github.com/aserto-dev/topaz/topaz/pkg/cli/editor/internal/interrupt" + "github.com/aserto-dev/topaz/topaz/pkg/cli/editor/internal/printers" "github.com/moby/term" ) diff --git a/pkg/cli/editor/internal/term/term_writer.go b/topaz/pkg/cli/editor/internal/term/term_writer.go similarity index 97% rename from pkg/cli/editor/internal/term/term_writer.go rename to topaz/pkg/cli/editor/internal/term/term_writer.go index 0a05655e..c0094a02 100644 --- a/pkg/cli/editor/internal/term/term_writer.go +++ b/topaz/pkg/cli/editor/internal/term/term_writer.go @@ -24,7 +24,7 @@ import ( wordwrap "github.com/mitchellh/go-wordwrap" "github.com/moby/term" - "github.com/aserto-dev/topaz/pkg/cli/editor/internal/remotecommand" + "github.com/aserto-dev/topaz/topaz/pkg/cli/editor/internal/remotecommand" ) type wordWrapWriter struct { diff --git a/pkg/cli/editor/internal/term/term_writer_test.go b/topaz/pkg/cli/editor/internal/term/term_writer_test.go similarity index 98% rename from pkg/cli/editor/internal/term/term_writer_test.go rename to topaz/pkg/cli/editor/internal/term/term_writer_test.go index 606120f1..76e40d1e 100644 --- a/pkg/cli/editor/internal/term/term_writer_test.go +++ b/topaz/pkg/cli/editor/internal/term/term_writer_test.go @@ -21,7 +21,7 @@ import ( "strings" "testing" - "github.com/aserto-dev/topaz/pkg/cli/editor/internal/term" + "github.com/aserto-dev/topaz/topaz/pkg/cli/editor/internal/term" ) const test = "Kube Kube Kube Kube Kube Kube Kube Kube Kube Kube Kube Kube Kube Kube Kube Kube Kube Kube Kube Kube Kube Kube Kube Kube Kube Kube Kube Kube Kube Kube Kube Kube Kube Kube Kube Kube Kube Kube Kube Kube Kube Kube Kube Kube Kube Kube Kube Kube Kube Kube Kube Kube Kube Kube Kube Kube Kube Kube Kube Kube Kube Kube Kube Kube Kube Kube Kube Kube" diff --git a/pkg/cli/fflag/fflag.go b/topaz/pkg/cli/fflag/fflag.go similarity index 95% rename from pkg/cli/fflag/fflag.go rename to topaz/pkg/cli/fflag/fflag.go index 218b322f..e8553ec1 100644 --- a/pkg/cli/fflag/fflag.go +++ b/topaz/pkg/cli/fflag/fflag.go @@ -6,7 +6,7 @@ import ( "strings" "sync" - "github.com/aserto-dev/topaz/pkg/cli/x" + "github.com/aserto-dev/topaz/topaz/pkg/cli/x" ) // feature flags package. diff --git a/pkg/cli/fflag/fflag_test.go b/topaz/pkg/cli/fflag/fflag_test.go similarity index 94% rename from pkg/cli/fflag/fflag_test.go rename to topaz/pkg/cli/fflag/fflag_test.go index 988fd457..32ec2172 100644 --- a/pkg/cli/fflag/fflag_test.go +++ b/topaz/pkg/cli/fflag/fflag_test.go @@ -3,7 +3,7 @@ package fflag_test import ( "testing" - "github.com/aserto-dev/topaz/pkg/cli/fflag" + "github.com/aserto-dev/topaz/topaz/pkg/cli/fflag" "github.com/stretchr/testify/assert" ) diff --git a/pkg/cli/fflag/kong.go b/topaz/pkg/cli/fflag/kong.go similarity index 100% rename from pkg/cli/fflag/kong.go rename to topaz/pkg/cli/fflag/kong.go diff --git a/pkg/cli/js/reader.go b/topaz/pkg/cli/js/reader.go similarity index 100% rename from pkg/cli/js/reader.go rename to topaz/pkg/cli/js/reader.go diff --git a/pkg/cli/js/writer.go b/topaz/pkg/cli/js/writer.go similarity index 100% rename from pkg/cli/js/writer.go rename to topaz/pkg/cli/js/writer.go diff --git a/pkg/cli/jsonx/json.go b/topaz/pkg/cli/jsonx/json.go similarity index 100% rename from pkg/cli/jsonx/json.go rename to topaz/pkg/cli/jsonx/json.go diff --git a/pkg/cli/pb/unmarshal.go b/topaz/pkg/cli/pb/unmarshal.go similarity index 100% rename from pkg/cli/pb/unmarshal.go rename to topaz/pkg/cli/pb/unmarshal.go diff --git a/pkg/cli/prompter/prompter.go b/topaz/pkg/cli/prompter/prompter.go similarity index 100% rename from pkg/cli/prompter/prompter.go rename to topaz/pkg/cli/prompter/prompter.go diff --git a/pkg/cli/prompter/prompter_test.go b/topaz/pkg/cli/prompter/prompter_test.go similarity index 98% rename from pkg/cli/prompter/prompter_test.go rename to topaz/pkg/cli/prompter/prompter_test.go index f53cb43b..3e2af290 100644 --- a/pkg/cli/prompter/prompter_test.go +++ b/topaz/pkg/cli/prompter/prompter_test.go @@ -9,8 +9,8 @@ import ( "github.com/aserto-dev/go-directory/aserto/directory/common/v3" "github.com/aserto-dev/go-directory/aserto/directory/reader/v3" "github.com/aserto-dev/go-directory/aserto/directory/writer/v3" - "github.com/aserto-dev/topaz/pkg/cli/prompter" - "github.com/aserto-dev/topaz/pkg/cli/x" + "github.com/aserto-dev/topaz/topaz/pkg/cli/prompter" + "github.com/aserto-dev/topaz/topaz/pkg/cli/x" "github.com/authzen/access.go/api/access/v1" "github.com/stretchr/testify/require" diff --git a/pkg/cli/table/table.go b/topaz/pkg/cli/table/table.go similarity index 100% rename from pkg/cli/table/table.go rename to topaz/pkg/cli/table/table.go diff --git a/pkg/cli/x/constants.go b/topaz/pkg/cli/x/constants.go similarity index 100% rename from pkg/cli/x/constants.go rename to topaz/pkg/cli/x/constants.go diff --git a/pkg/cli/x/default.go b/topaz/pkg/cli/x/default.go similarity index 100% rename from pkg/cli/x/default.go rename to topaz/pkg/cli/x/default.go diff --git a/pkg/cli/x/dir.go b/topaz/pkg/cli/x/dir.go similarity index 100% rename from pkg/cli/x/dir.go rename to topaz/pkg/cli/x/dir.go diff --git a/pkg/cli/x/env.go b/topaz/pkg/cli/x/env.go similarity index 100% rename from pkg/cli/x/env.go rename to topaz/pkg/cli/x/env.go diff --git a/pkg/version/version.go b/topaz/pkg/version/version.go similarity index 95% rename from pkg/version/version.go rename to topaz/pkg/version/version.go index fcc28259..114bd004 100644 --- a/pkg/version/version.go +++ b/topaz/pkg/version/version.go @@ -5,7 +5,7 @@ import ( "runtime" "time" - "github.com/aserto-dev/topaz/pkg/cli/x" + "github.com/aserto-dev/topaz/topaz/pkg/cli/x" ) var ( diff --git a/pkg/authentication/authentication.go b/topazd/authentication/authentication.go similarity index 98% rename from pkg/authentication/authentication.go rename to topazd/authentication/authentication.go index 159764f9..50e53073 100644 --- a/pkg/authentication/authentication.go +++ b/topazd/authentication/authentication.go @@ -7,7 +7,7 @@ import ( "text/template" "github.com/aserto-dev/topaz/pkg/config" - "github.com/aserto-dev/topaz/pkg/loiter" + "github.com/aserto-dev/topaz/topazd/loiter" ) // authentication: diff --git a/pkg/authentication/middleware.go b/topazd/authentication/middleware.go similarity index 98% rename from pkg/authentication/middleware.go rename to topazd/authentication/middleware.go index 521bc757..a7d3a55c 100644 --- a/pkg/authentication/middleware.go +++ b/topazd/authentication/middleware.go @@ -7,7 +7,7 @@ import ( "strings" "github.com/aserto-dev/go-authorizer/pkg/aerr" - "github.com/aserto-dev/topaz/pkg/middleware" + "github.com/aserto-dev/topaz/topazd/middleware" grpc_middleware "github.com/grpc-ecosystem/go-grpc-middleware" "github.com/grpc-ecosystem/go-grpc-middleware/util/metautils" "github.com/rs/zerolog" diff --git a/builtins/az/action_search.go b/topazd/authorizer/builtins/az/action_search.go similarity index 95% rename from builtins/az/action_search.go rename to topazd/authorizer/builtins/az/action_search.go index 140ae97e..bc07ca3a 100644 --- a/builtins/az/action_search.go +++ b/topazd/authorizer/builtins/az/action_search.go @@ -1,7 +1,7 @@ package az import ( - "github.com/aserto-dev/topaz/builtins" + "github.com/aserto-dev/topaz/topazd/authorizer/builtins" "github.com/authzen/access.go/api/access/v1" "github.com/open-policy-agent/opa/v1/ast" diff --git a/builtins/az/evaluation.go b/topazd/authorizer/builtins/az/evaluation.go similarity index 95% rename from builtins/az/evaluation.go rename to topazd/authorizer/builtins/az/evaluation.go index 2502a505..93ef7fa3 100644 --- a/builtins/az/evaluation.go +++ b/topazd/authorizer/builtins/az/evaluation.go @@ -3,7 +3,7 @@ package az import ( "github.com/authzen/access.go/api/access/v1" - "github.com/aserto-dev/topaz/builtins" + "github.com/aserto-dev/topaz/topazd/authorizer/builtins" "github.com/open-policy-agent/opa/v1/ast" "github.com/open-policy-agent/opa/v1/rego" diff --git a/builtins/az/evaluations.go b/topazd/authorizer/builtins/az/evaluations.go similarity index 96% rename from builtins/az/evaluations.go rename to topazd/authorizer/builtins/az/evaluations.go index 36cc5c0d..455865b4 100644 --- a/builtins/az/evaluations.go +++ b/topazd/authorizer/builtins/az/evaluations.go @@ -3,7 +3,7 @@ package az import ( "github.com/authzen/access.go/api/access/v1" - "github.com/aserto-dev/topaz/builtins" + "github.com/aserto-dev/topaz/topazd/authorizer/builtins" "github.com/open-policy-agent/opa/v1/ast" "github.com/open-policy-agent/opa/v1/rego" diff --git a/builtins/az/resource_search.go b/topazd/authorizer/builtins/az/resource_search.go similarity index 95% rename from builtins/az/resource_search.go rename to topazd/authorizer/builtins/az/resource_search.go index 9f665b23..f1620987 100644 --- a/builtins/az/resource_search.go +++ b/topazd/authorizer/builtins/az/resource_search.go @@ -3,7 +3,7 @@ package az import ( "github.com/authzen/access.go/api/access/v1" - "github.com/aserto-dev/topaz/builtins" + "github.com/aserto-dev/topaz/topazd/authorizer/builtins" "github.com/open-policy-agent/opa/v1/ast" "github.com/open-policy-agent/opa/v1/rego" diff --git a/builtins/az/subject_search.go b/topazd/authorizer/builtins/az/subject_search.go similarity index 96% rename from builtins/az/subject_search.go rename to topazd/authorizer/builtins/az/subject_search.go index d5d5edc3..ee6c80bf 100644 --- a/builtins/az/subject_search.go +++ b/topazd/authorizer/builtins/az/subject_search.go @@ -3,7 +3,7 @@ package az import ( "github.com/authzen/access.go/api/access/v1" - "github.com/aserto-dev/topaz/builtins" + "github.com/aserto-dev/topaz/topazd/authorizer/builtins" "github.com/open-policy-agent/opa/v1/ast" "github.com/open-policy-agent/opa/v1/rego" diff --git a/builtins/ds/check.go b/topazd/authorizer/builtins/ds/check.go similarity index 95% rename from builtins/ds/check.go rename to topazd/authorizer/builtins/ds/check.go index b38198a0..ba28558d 100644 --- a/builtins/ds/check.go +++ b/topazd/authorizer/builtins/ds/check.go @@ -2,7 +2,7 @@ package ds import ( "github.com/aserto-dev/go-directory/aserto/directory/reader/v3" - "github.com/aserto-dev/topaz/builtins" + "github.com/aserto-dev/topaz/topazd/authorizer/builtins" "github.com/open-policy-agent/opa/v1/ast" "github.com/open-policy-agent/opa/v1/rego" diff --git a/builtins/ds/check_permission.go b/topazd/authorizer/builtins/ds/check_permission.go similarity index 96% rename from builtins/ds/check_permission.go rename to topazd/authorizer/builtins/ds/check_permission.go index 1aa39dcf..25f9a3b5 100644 --- a/builtins/ds/check_permission.go +++ b/topazd/authorizer/builtins/ds/check_permission.go @@ -2,7 +2,7 @@ package ds import ( "github.com/aserto-dev/go-directory/aserto/directory/reader/v3" - "github.com/aserto-dev/topaz/builtins" + "github.com/aserto-dev/topaz/topazd/authorizer/builtins" "github.com/open-policy-agent/opa/v1/ast" "github.com/open-policy-agent/opa/v1/rego" diff --git a/builtins/ds/check_relation.go b/topazd/authorizer/builtins/ds/check_relation.go similarity index 95% rename from builtins/ds/check_relation.go rename to topazd/authorizer/builtins/ds/check_relation.go index fa460aa4..98da22b3 100644 --- a/builtins/ds/check_relation.go +++ b/topazd/authorizer/builtins/ds/check_relation.go @@ -2,7 +2,7 @@ package ds import ( "github.com/aserto-dev/go-directory/aserto/directory/reader/v3" - "github.com/aserto-dev/topaz/builtins" + "github.com/aserto-dev/topaz/topazd/authorizer/builtins" "github.com/open-policy-agent/opa/v1/ast" "github.com/open-policy-agent/opa/v1/rego" diff --git a/builtins/ds/checks.go b/topazd/authorizer/builtins/ds/checks.go similarity index 97% rename from builtins/ds/checks.go rename to topazd/authorizer/builtins/ds/checks.go index 35a112ed..504d9bca 100644 --- a/builtins/ds/checks.go +++ b/topazd/authorizer/builtins/ds/checks.go @@ -4,7 +4,7 @@ import ( "bytes" "github.com/aserto-dev/go-directory/aserto/directory/reader/v3" - "github.com/aserto-dev/topaz/builtins" + "github.com/aserto-dev/topaz/topazd/authorizer/builtins" "github.com/open-policy-agent/opa/v1/ast" "github.com/open-policy-agent/opa/v1/rego" diff --git a/builtins/ds/graph.go b/topazd/authorizer/builtins/ds/graph.go similarity index 96% rename from builtins/ds/graph.go rename to topazd/authorizer/builtins/ds/graph.go index 28a6a9bc..8ebd5602 100644 --- a/builtins/ds/graph.go +++ b/topazd/authorizer/builtins/ds/graph.go @@ -4,7 +4,7 @@ import ( "bytes" "github.com/aserto-dev/go-directory/aserto/directory/reader/v3" - "github.com/aserto-dev/topaz/builtins" + "github.com/aserto-dev/topaz/topazd/authorizer/builtins" "github.com/open-policy-agent/opa/v1/ast" "github.com/open-policy-agent/opa/v1/rego" diff --git a/builtins/ds/identity.go b/topazd/authorizer/builtins/ds/identity.go similarity index 93% rename from builtins/ds/identity.go rename to topazd/authorizer/builtins/ds/identity.go index 28643aa5..dc21dea0 100644 --- a/builtins/ds/identity.go +++ b/topazd/authorizer/builtins/ds/identity.go @@ -2,8 +2,8 @@ package ds import ( "github.com/aserto-dev/go-directory/aserto/directory/reader/v3" - "github.com/aserto-dev/topaz/builtins" - "github.com/aserto-dev/topaz/pkg/directory" + "github.com/aserto-dev/topaz/topazd/authorizer/builtins" + "github.com/aserto-dev/topaz/topazd/directory" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" diff --git a/builtins/ds/object.go b/topazd/authorizer/builtins/ds/object.go similarity index 97% rename from builtins/ds/object.go rename to topazd/authorizer/builtins/ds/object.go index 2af0d424..1c25e451 100644 --- a/builtins/ds/object.go +++ b/topazd/authorizer/builtins/ds/object.go @@ -4,7 +4,7 @@ import ( "bytes" "github.com/aserto-dev/go-directory/aserto/directory/reader/v3" - "github.com/aserto-dev/topaz/builtins" + "github.com/aserto-dev/topaz/topazd/authorizer/builtins" "google.golang.org/protobuf/encoding/protojson" "github.com/open-policy-agent/opa/v1/ast" diff --git a/builtins/ds/relation.go b/topazd/authorizer/builtins/ds/relation.go similarity index 96% rename from builtins/ds/relation.go rename to topazd/authorizer/builtins/ds/relation.go index 179f49a6..67185790 100644 --- a/builtins/ds/relation.go +++ b/topazd/authorizer/builtins/ds/relation.go @@ -4,7 +4,7 @@ import ( "bytes" "github.com/aserto-dev/go-directory/aserto/directory/reader/v3" - "github.com/aserto-dev/topaz/builtins" + "github.com/aserto-dev/topaz/topazd/authorizer/builtins" "github.com/open-policy-agent/opa/v1/ast" "github.com/open-policy-agent/opa/v1/rego" diff --git a/builtins/ds/relations.go b/topazd/authorizer/builtins/ds/relations.go similarity index 95% rename from builtins/ds/relations.go rename to topazd/authorizer/builtins/ds/relations.go index f5572714..e895e272 100644 --- a/builtins/ds/relations.go +++ b/topazd/authorizer/builtins/ds/relations.go @@ -5,8 +5,8 @@ import ( "github.com/aserto-dev/go-directory/aserto/directory/common/v3" "github.com/aserto-dev/go-directory/aserto/directory/reader/v3" - "github.com/aserto-dev/topaz/builtins" - "github.com/aserto-dev/topaz/pkg/cli/x" + "github.com/aserto-dev/topaz/topaz/pkg/cli/x" + "github.com/aserto-dev/topaz/topazd/authorizer/builtins" "github.com/samber/lo" "github.com/open-policy-agent/opa/v1/ast" diff --git a/builtins/ds/user.go b/topazd/authorizer/builtins/ds/user.go similarity index 96% rename from builtins/ds/user.go rename to topazd/authorizer/builtins/ds/user.go index cb2c653b..93113870 100644 --- a/builtins/ds/user.go +++ b/topazd/authorizer/builtins/ds/user.go @@ -4,7 +4,7 @@ import ( "bytes" "github.com/aserto-dev/go-directory/aserto/directory/reader/v3" - "github.com/aserto-dev/topaz/builtins" + "github.com/aserto-dev/topaz/topazd/authorizer/builtins" "github.com/open-policy-agent/opa/v1/ast" "github.com/open-policy-agent/opa/v1/rego" diff --git a/builtins/helper.go b/topazd/authorizer/builtins/helper.go similarity index 100% rename from builtins/helper.go rename to topazd/authorizer/builtins/helper.go diff --git a/builtins/names.go b/topazd/authorizer/builtins/names.go similarity index 100% rename from builtins/names.go rename to topazd/authorizer/builtins/names.go diff --git a/pkg/authorizer/config.go b/topazd/authorizer/config.go similarity index 97% rename from pkg/authorizer/config.go rename to topazd/authorizer/config.go index cb765a0b..ac8fa205 100644 --- a/pkg/authorizer/config.go +++ b/topazd/authorizer/config.go @@ -7,7 +7,7 @@ import ( "text/template" "github.com/aserto-dev/topaz/pkg/config" - "github.com/aserto-dev/topaz/pkg/loiter" + "github.com/aserto-dev/topaz/topazd/loiter" "github.com/samber/lo" ) diff --git a/pkg/authorizer/config_test.go b/topazd/authorizer/config_test.go similarity index 96% rename from pkg/authorizer/config_test.go rename to topazd/authorizer/config_test.go index 413f10ed..ad4352b3 100644 --- a/pkg/authorizer/config_test.go +++ b/topazd/authorizer/config_test.go @@ -8,8 +8,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/aserto-dev/topaz/pkg/authorizer" "github.com/aserto-dev/topaz/pkg/config" + "github.com/aserto-dev/topaz/topazd/authorizer" ) func TestMarshaling(t *testing.T) { diff --git a/pkg/authorizer/controller.go b/topazd/authorizer/controller.go similarity index 94% rename from pkg/authorizer/controller.go rename to topazd/authorizer/controller.go index a204f713..9ca61e8e 100644 --- a/pkg/authorizer/controller.go +++ b/topazd/authorizer/controller.go @@ -16,11 +16,11 @@ import ( rt "github.com/aserto-dev/runtime" "github.com/open-policy-agent/opa/v1/plugins/discovery" - ctrl "github.com/aserto-dev/topaz/controller" - "github.com/aserto-dev/topaz/pkg/cli/x" "github.com/aserto-dev/topaz/pkg/config" - "github.com/aserto-dev/topaz/pkg/loiter" - "github.com/aserto-dev/topaz/plugins/edge" + "github.com/aserto-dev/topaz/topaz/pkg/cli/x" + ctrl "github.com/aserto-dev/topaz/topazd/authorizer/controller" + "github.com/aserto-dev/topaz/topazd/authorizer/plugins/edge" + "github.com/aserto-dev/topaz/topazd/loiter" ) type ControllerConfig ctrl.Config diff --git a/controller/config.go b/topazd/authorizer/controller/config.go similarity index 100% rename from controller/config.go rename to topazd/authorizer/controller/config.go diff --git a/controller/controller.go b/topazd/authorizer/controller/controller.go similarity index 100% rename from controller/controller.go rename to topazd/authorizer/controller/controller.go diff --git a/controller/controller_test.go b/topazd/authorizer/controller/controller_test.go similarity index 97% rename from controller/controller_test.go rename to topazd/authorizer/controller/controller_test.go index b7b70e3d..630eb69c 100644 --- a/controller/controller_test.go +++ b/topazd/authorizer/controller/controller_test.go @@ -8,8 +8,8 @@ import ( client "github.com/aserto-dev/go-aserto" api "github.com/aserto-dev/go-grpc/aserto/api/v2" - "github.com/aserto-dev/topaz/controller" "github.com/aserto-dev/topaz/pkg/config" + "github.com/aserto-dev/topaz/topazd/authorizer/controller" "github.com/rs/zerolog" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/decisionlog/interface.go b/topazd/authorizer/decisionlog/interface.go similarity index 100% rename from decisionlog/interface.go rename to topazd/authorizer/decisionlog/interface.go diff --git a/decisionlog/logger/file/config.go b/topazd/authorizer/decisionlog/logger/file/config.go similarity index 100% rename from decisionlog/logger/file/config.go rename to topazd/authorizer/decisionlog/logger/file/config.go diff --git a/decisionlog/logger/file/logger.go b/topazd/authorizer/decisionlog/logger/file/logger.go similarity index 93% rename from decisionlog/logger/file/logger.go rename to topazd/authorizer/decisionlog/logger/file/logger.go index 824526f4..b5c881cf 100644 --- a/decisionlog/logger/file/logger.go +++ b/topazd/authorizer/decisionlog/logger/file/logger.go @@ -5,7 +5,7 @@ import ( "encoding/json" api "github.com/aserto-dev/go-authorizer/aserto/authorizer/v2/api" - "github.com/aserto-dev/topaz/decisionlog" + "github.com/aserto-dev/topaz/topazd/authorizer/decisionlog" "github.com/pkg/errors" "github.com/rs/zerolog" diff --git a/decisionlog/logger/nop/logger.go b/topazd/authorizer/decisionlog/logger/nop/logger.go similarity index 87% rename from decisionlog/logger/nop/logger.go rename to topazd/authorizer/decisionlog/logger/nop/logger.go index b7f079f9..f7bded8b 100644 --- a/decisionlog/logger/nop/logger.go +++ b/topazd/authorizer/decisionlog/logger/nop/logger.go @@ -4,7 +4,7 @@ import ( "context" api "github.com/aserto-dev/go-authorizer/aserto/authorizer/v2/api" - "github.com/aserto-dev/topaz/decisionlog" + "github.com/aserto-dev/topaz/topazd/authorizer/decisionlog" "github.com/rs/zerolog" ) diff --git a/pkg/authorizer/decisionlogger.go b/topazd/authorizer/decisionlogger.go similarity index 97% rename from pkg/authorizer/decisionlogger.go rename to topazd/authorizer/decisionlogger.go index 245691f9..6a861b6e 100644 --- a/pkg/authorizer/decisionlogger.go +++ b/topazd/authorizer/decisionlogger.go @@ -6,7 +6,7 @@ import ( "text/template" "github.com/aserto-dev/topaz/pkg/config" - "github.com/aserto-dev/topaz/pkg/loiter" + "github.com/aserto-dev/topaz/topazd/loiter" ) const ( diff --git a/pkg/authorizer/filelogger.go b/topazd/authorizer/filelogger.go similarity index 91% rename from pkg/authorizer/filelogger.go rename to topazd/authorizer/filelogger.go index 93333d74..64486324 100644 --- a/pkg/authorizer/filelogger.go +++ b/topazd/authorizer/filelogger.go @@ -5,9 +5,9 @@ import ( "iter" "text/template" - "github.com/aserto-dev/topaz/decisionlog/logger/file" "github.com/aserto-dev/topaz/pkg/config" - "github.com/aserto-dev/topaz/pkg/loiter" + "github.com/aserto-dev/topaz/topazd/authorizer/decisionlog/logger/file" + "github.com/aserto-dev/topaz/topazd/loiter" "github.com/samber/lo" ) diff --git a/pkg/app/impl/authz-compile.go b/topazd/authorizer/impl/authz-compile.go similarity index 100% rename from pkg/app/impl/authz-compile.go rename to topazd/authorizer/impl/authz-compile.go diff --git a/pkg/app/impl/authz-decisiontree.go b/topazd/authorizer/impl/authz-decisiontree.go similarity index 100% rename from pkg/app/impl/authz-decisiontree.go rename to topazd/authorizer/impl/authz-decisiontree.go diff --git a/pkg/app/impl/authz-is.go b/topazd/authorizer/impl/authz-is.go similarity index 98% rename from pkg/app/impl/authz-is.go rename to topazd/authorizer/impl/authz-is.go index 9ca69955..23677eb0 100644 --- a/pkg/app/impl/authz-is.go +++ b/topazd/authorizer/impl/authz-is.go @@ -11,7 +11,7 @@ import ( "github.com/aserto-dev/go-authorizer/pkg/aerr" "github.com/aserto-dev/go-directory/pkg/pb" "github.com/aserto-dev/header" - decisionlog_plugin "github.com/aserto-dev/topaz/plugins/decisionlog" + decisionlog_plugin "github.com/aserto-dev/topaz/topazd/authorizer/plugins/decisionlog" "github.com/google/uuid" "github.com/open-policy-agent/opa/v1/rego" diff --git a/pkg/app/impl/authz-policy.go b/topazd/authorizer/impl/authz-policy.go similarity index 100% rename from pkg/app/impl/authz-policy.go rename to topazd/authorizer/impl/authz-policy.go diff --git a/pkg/app/impl/authz-query.go b/topazd/authorizer/impl/authz-query.go similarity index 100% rename from pkg/app/impl/authz-query.go rename to topazd/authorizer/impl/authz-query.go diff --git a/pkg/app/impl/authz.go b/topazd/authorizer/impl/authz.go similarity index 97% rename from pkg/app/impl/authz.go rename to topazd/authorizer/impl/authz.go index 4b17c7c3..0f96364d 100644 --- a/pkg/app/impl/authz.go +++ b/topazd/authorizer/impl/authz.go @@ -21,8 +21,8 @@ import ( dsr3 "github.com/aserto-dev/go-directory/aserto/directory/reader/v3" runtime "github.com/aserto-dev/runtime" - "github.com/aserto-dev/topaz/pkg/version" - "github.com/aserto-dev/topaz/resolvers" + "github.com/aserto-dev/topaz/topazd/authorizer/resolvers" + "github.com/aserto-dev/topaz/topazd/version" ) const ( diff --git a/pkg/app/impl/jwt.go b/topazd/authorizer/impl/jwt.go similarity index 99% rename from pkg/app/impl/jwt.go rename to topazd/authorizer/impl/jwt.go index c93b4545..4a25a679 100644 --- a/pkg/app/impl/jwt.go +++ b/topazd/authorizer/impl/jwt.go @@ -14,7 +14,7 @@ import ( dsc3 "github.com/aserto-dev/go-directory/aserto/directory/common/v3" dsr3 "github.com/aserto-dev/go-directory/aserto/directory/reader/v3" "github.com/aserto-dev/go-directory/pkg/pb" - "github.com/aserto-dev/topaz/pkg/directory" + "github.com/aserto-dev/topaz/topazd/directory" "github.com/lestrrat-go/jwx/v2/jwk" "github.com/lestrrat-go/jwx/v2/jwt" diff --git a/pkg/authorizer/jwt.go b/topazd/authorizer/jwt.go similarity index 95% rename from pkg/authorizer/jwt.go rename to topazd/authorizer/jwt.go index 756f9bb5..63411f6f 100644 --- a/pkg/authorizer/jwt.go +++ b/topazd/authorizer/jwt.go @@ -7,7 +7,7 @@ import ( "time" "github.com/aserto-dev/topaz/pkg/config" - "github.com/aserto-dev/topaz/pkg/loiter" + "github.com/aserto-dev/topaz/topazd/loiter" ) const DefaultAcceptableTimeSkew = time.Second * 5 diff --git a/pkg/authorizer/opa.go b/topazd/authorizer/opa.go similarity index 98% rename from pkg/authorizer/opa.go rename to topazd/authorizer/opa.go index ba10d875..75e4b3be 100644 --- a/pkg/authorizer/opa.go +++ b/topazd/authorizer/opa.go @@ -9,7 +9,7 @@ import ( "github.com/aserto-dev/runtime" "github.com/aserto-dev/topaz/pkg/config" - "github.com/aserto-dev/topaz/pkg/loiter" + "github.com/aserto-dev/topaz/topazd/loiter" ) type OPAConfig runtime.Config diff --git a/plugins/decisionlog/factory.go b/topazd/authorizer/plugins/decisionlog/factory.go similarity index 95% rename from plugins/decisionlog/factory.go rename to topazd/authorizer/plugins/decisionlog/factory.go index f9780f1f..84a4ae7e 100644 --- a/plugins/decisionlog/factory.go +++ b/topazd/authorizer/plugins/decisionlog/factory.go @@ -3,7 +3,7 @@ package decisionlog import ( "bytes" - "github.com/aserto-dev/topaz/decisionlog" + "github.com/aserto-dev/topaz/topazd/authorizer/decisionlog" "github.com/go-viper/mapstructure/v2" "github.com/open-policy-agent/opa/v1/plugins" "github.com/open-policy-agent/opa/v1/util" diff --git a/plugins/decisionlog/plugin.go b/topazd/authorizer/plugins/decisionlog/plugin.go similarity index 97% rename from plugins/decisionlog/plugin.go rename to topazd/authorizer/plugins/decisionlog/plugin.go index e3bd3e2f..8819a1e4 100644 --- a/plugins/decisionlog/plugin.go +++ b/topazd/authorizer/plugins/decisionlog/plugin.go @@ -4,8 +4,8 @@ import ( "context" "github.com/aserto-dev/go-authorizer/aserto/authorizer/v2/api" - "github.com/aserto-dev/topaz/decisionlog" "github.com/aserto-dev/topaz/pkg/config" + "github.com/aserto-dev/topaz/topazd/authorizer/decisionlog" "github.com/open-policy-agent/opa/v1/plugins" ) diff --git a/plugins/edge/factory.go b/topazd/authorizer/plugins/edge/factory.go similarity index 96% rename from plugins/edge/factory.go rename to topazd/authorizer/plugins/edge/factory.go index 445a2e77..2b548c3f 100644 --- a/plugins/edge/factory.go +++ b/topazd/authorizer/plugins/edge/factory.go @@ -14,7 +14,7 @@ import ( client "github.com/aserto-dev/go-aserto" - "github.com/aserto-dev/topaz/plugins/noop" + "github.com/aserto-dev/topaz/topazd/authorizer/plugins/noop" ) type HealthReporter interface { diff --git a/plugins/edge/plugin.go b/topazd/authorizer/plugins/edge/plugin.go similarity index 100% rename from plugins/edge/plugin.go rename to topazd/authorizer/plugins/edge/plugin.go diff --git a/plugins/noop/factory.go b/topazd/authorizer/plugins/noop/factory.go similarity index 100% rename from plugins/noop/factory.go rename to topazd/authorizer/plugins/noop/factory.go diff --git a/plugins/noop/plugin.go b/topazd/authorizer/plugins/noop/plugin.go similarity index 100% rename from plugins/noop/plugin.go rename to topazd/authorizer/plugins/noop/plugin.go diff --git a/resolvers/runtime_resolver.go b/topazd/authorizer/resolvers/runtime_resolver.go similarity index 100% rename from resolvers/runtime_resolver.go rename to topazd/authorizer/resolvers/runtime_resolver.go diff --git a/pkg/authorizer/runtime.go b/topazd/authorizer/runtime.go similarity index 86% rename from pkg/authorizer/runtime.go rename to topazd/authorizer/runtime.go index c7b4c2cf..a685d507 100644 --- a/pkg/authorizer/runtime.go +++ b/topazd/authorizer/runtime.go @@ -8,14 +8,14 @@ import ( "github.com/aserto-dev/go-authorizer/pkg/aerr" dsr3 "github.com/aserto-dev/go-directory/aserto/directory/reader/v3" rt "github.com/aserto-dev/runtime" - "github.com/aserto-dev/topaz/builtins" - "github.com/aserto-dev/topaz/builtins/az" - "github.com/aserto-dev/topaz/builtins/ds" - ctrl "github.com/aserto-dev/topaz/controller" - "github.com/aserto-dev/topaz/decisionlog" - decisionlog_plugin "github.com/aserto-dev/topaz/plugins/decisionlog" - "github.com/aserto-dev/topaz/plugins/edge" - "github.com/aserto-dev/topaz/resolvers" + "github.com/aserto-dev/topaz/topazd/authorizer/builtins" + "github.com/aserto-dev/topaz/topazd/authorizer/builtins/az" + "github.com/aserto-dev/topaz/topazd/authorizer/builtins/ds" + ctrl "github.com/aserto-dev/topaz/topazd/authorizer/controller" + "github.com/aserto-dev/topaz/topazd/authorizer/decisionlog" + decisionlog_plugin "github.com/aserto-dev/topaz/topazd/authorizer/plugins/decisionlog" + "github.com/aserto-dev/topaz/topazd/authorizer/plugins/edge" + "github.com/aserto-dev/topaz/topazd/authorizer/resolvers" "github.com/authzen/access.go/api/access/v1" "github.com/rs/zerolog" "google.golang.org/grpc" diff --git a/pkg/authorizer/selflogger.go b/topazd/authorizer/selflogger.go similarity index 97% rename from pkg/authorizer/selflogger.go rename to topazd/authorizer/selflogger.go index 7d6366f1..c0e9ad27 100644 --- a/pkg/authorizer/selflogger.go +++ b/topazd/authorizer/selflogger.go @@ -7,7 +7,7 @@ import ( "github.com/aserto-dev/self-decision-logger/logger/self" "github.com/aserto-dev/topaz/pkg/config" - "github.com/aserto-dev/topaz/pkg/loiter" + "github.com/aserto-dev/topaz/topazd/loiter" "github.com/samber/lo" ) diff --git a/pkg/authorizer/service.go b/topazd/authorizer/service.go similarity index 90% rename from pkg/authorizer/service.go rename to topazd/authorizer/service.go index ce7fd24b..c55fb499 100644 --- a/pkg/authorizer/service.go +++ b/topazd/authorizer/service.go @@ -18,12 +18,12 @@ import ( azOpenAPI "github.com/aserto-dev/openapi-authorizer/publish/authorizer" "github.com/aserto-dev/self-decision-logger/logger/self" - "github.com/aserto-dev/topaz/decisionlog" - "github.com/aserto-dev/topaz/decisionlog/logger/file" - "github.com/aserto-dev/topaz/pkg/app/impl" - "github.com/aserto-dev/topaz/pkg/servers" - "github.com/aserto-dev/topaz/pkg/x" - "github.com/aserto-dev/topaz/plugins/edge" + "github.com/aserto-dev/topaz/topazd/authorizer/decisionlog" + "github.com/aserto-dev/topaz/topazd/authorizer/decisionlog/logger/file" + "github.com/aserto-dev/topaz/topazd/authorizer/impl" + "github.com/aserto-dev/topaz/topazd/authorizer/plugins/edge" + "github.com/aserto-dev/topaz/topazd/servers" + "github.com/aserto-dev/topaz/topazd/x" ) type Service struct { diff --git a/pkg/console/app.go b/topazd/console/app.go similarity index 100% rename from pkg/console/app.go rename to topazd/console/app.go diff --git a/pkg/console/config.go b/topazd/console/config.go similarity index 96% rename from pkg/console/config.go rename to topazd/console/config.go index e692a672..f16cf56c 100644 --- a/pkg/console/config.go +++ b/topazd/console/config.go @@ -6,9 +6,9 @@ import ( "strconv" "strings" - "github.com/aserto-dev/topaz/pkg/authentication" "github.com/aserto-dev/topaz/pkg/config/v3" - "github.com/aserto-dev/topaz/pkg/servers" + "github.com/aserto-dev/topaz/topazd/authentication" + "github.com/aserto-dev/topaz/topazd/servers" "github.com/samber/lo" ) diff --git a/pkg/debug/debug.go b/topazd/debug/debug.go similarity index 97% rename from pkg/debug/debug.go rename to topazd/debug/debug.go index 90935579..0934b6b2 100644 --- a/pkg/debug/debug.go +++ b/topazd/debug/debug.go @@ -13,7 +13,7 @@ import ( "github.com/rs/zerolog" "github.com/aserto-dev/topaz/pkg/config" - "github.com/aserto-dev/topaz/pkg/servers" + "github.com/aserto-dev/topaz/topazd/servers" ) type Config struct { diff --git a/pkg/directory/boltdb.go b/topazd/directory/boltdb.go similarity index 96% rename from pkg/directory/boltdb.go rename to topazd/directory/boltdb.go index b951d341..f778e71a 100644 --- a/pkg/directory/boltdb.go +++ b/topazd/directory/boltdb.go @@ -8,7 +8,7 @@ import ( "github.com/aserto-dev/topaz/internal/pkg/eds/pkg/directory" "github.com/aserto-dev/topaz/pkg/config" - "github.com/aserto-dev/topaz/pkg/loiter" + "github.com/aserto-dev/topaz/topazd/loiter" "github.com/samber/lo" ) diff --git a/pkg/directory/config.go b/topazd/directory/config.go similarity index 100% rename from pkg/directory/config.go rename to topazd/directory/config.go diff --git a/pkg/directory/config_test.go b/topazd/directory/config_test.go similarity index 98% rename from pkg/directory/config_test.go rename to topazd/directory/config_test.go index 6f9a8e5e..a966f50a 100644 --- a/pkg/directory/config_test.go +++ b/topazd/directory/config_test.go @@ -10,7 +10,7 @@ import ( "github.com/stretchr/testify/require" "github.com/aserto-dev/topaz/pkg/config" - "github.com/aserto-dev/topaz/pkg/directory" + "github.com/aserto-dev/topaz/topazd/directory" ) func TestMarshaling(t *testing.T) { diff --git a/pkg/directory/identity.go b/topazd/directory/identity.go similarity index 100% rename from pkg/directory/identity.go rename to topazd/directory/identity.go diff --git a/pkg/directory/natskv.go b/topazd/directory/natskv.go similarity index 92% rename from pkg/directory/natskv.go rename to topazd/directory/natskv.go index 9ff5d747..bd9b1ce6 100644 --- a/pkg/directory/natskv.go +++ b/topazd/directory/natskv.go @@ -5,7 +5,7 @@ import ( "iter" "github.com/aserto-dev/topaz/pkg/config" - "github.com/aserto-dev/topaz/pkg/loiter" + "github.com/aserto-dev/topaz/topazd/loiter" ) const NATSKeyValueStorePlugin string = "nats_kv" diff --git a/pkg/directory/postgresql.go b/topazd/directory/postgresql.go similarity index 92% rename from pkg/directory/postgresql.go rename to topazd/directory/postgresql.go index 2b6a4df3..db1f2d0d 100644 --- a/pkg/directory/postgresql.go +++ b/topazd/directory/postgresql.go @@ -5,7 +5,7 @@ import ( "iter" "github.com/aserto-dev/topaz/pkg/config" - "github.com/aserto-dev/topaz/pkg/loiter" + "github.com/aserto-dev/topaz/topazd/loiter" ) const PostgresStorePlugin string = "postgres" diff --git a/pkg/directory/remote.go b/topazd/directory/remote.go similarity index 97% rename from pkg/directory/remote.go rename to topazd/directory/remote.go index 1eb1164b..93442f48 100644 --- a/pkg/directory/remote.go +++ b/topazd/directory/remote.go @@ -7,7 +7,7 @@ import ( client "github.com/aserto-dev/go-aserto" "github.com/aserto-dev/topaz/pkg/config" - "github.com/aserto-dev/topaz/pkg/loiter" + "github.com/aserto-dev/topaz/topazd/loiter" ) const RemoteDirectoryStorePlugin string = "remote_directory" diff --git a/pkg/directory/service.go b/topazd/directory/service.go similarity index 97% rename from pkg/directory/service.go rename to topazd/directory/service.go index 7a219534..a3bcb29c 100644 --- a/pkg/directory/service.go +++ b/topazd/directory/service.go @@ -21,8 +21,8 @@ import ( dsa1 "github.com/authzen/access.go/api/access/v1" "github.com/aserto-dev/topaz/pkg/config" - "github.com/aserto-dev/topaz/pkg/servers" - "github.com/aserto-dev/topaz/pkg/service" + "github.com/aserto-dev/topaz/topazd/servers" + "github.com/aserto-dev/topaz/topazd/service" ) type Service struct { diff --git a/pkg/directory/store.go b/topazd/directory/store.go similarity index 94% rename from pkg/directory/store.go rename to topazd/directory/store.go index f46871b5..0ea90b1d 100644 --- a/pkg/directory/store.go +++ b/topazd/directory/store.go @@ -4,7 +4,7 @@ import ( "iter" "github.com/aserto-dev/topaz/pkg/config" - "github.com/aserto-dev/topaz/pkg/loiter" + "github.com/aserto-dev/topaz/topazd/loiter" ) type Store struct { diff --git a/pkg/directory/wellknown.go b/topazd/directory/wellknown.go similarity index 100% rename from pkg/directory/wellknown.go rename to topazd/directory/wellknown.go diff --git a/pkg/health/health.go b/topazd/health/health.go similarity index 95% rename from pkg/health/health.go rename to topazd/health/health.go index 7881041e..c1b55207 100644 --- a/pkg/health/health.go +++ b/topazd/health/health.go @@ -6,7 +6,7 @@ import ( "time" "github.com/aserto-dev/topaz/pkg/config" - "github.com/aserto-dev/topaz/pkg/servers" + "github.com/aserto-dev/topaz/topazd/servers" ) type Config struct { diff --git a/pkg/health/service.go b/topazd/health/service.go similarity index 92% rename from pkg/health/service.go rename to topazd/health/service.go index 40d7667a..23f75509 100644 --- a/pkg/health/service.go +++ b/topazd/health/service.go @@ -1,7 +1,7 @@ package health import ( - "github.com/aserto-dev/topaz/pkg/servers" + "github.com/aserto-dev/topaz/topazd/servers" "google.golang.org/grpc" "google.golang.org/grpc/health" healthpb "google.golang.org/grpc/health/grpc_health_v1" diff --git a/pkg/loiter/dyadic.go b/topazd/loiter/dyadic.go similarity index 100% rename from pkg/loiter/dyadic.go rename to topazd/loiter/dyadic.go diff --git a/pkg/loiter/monadic.go b/topazd/loiter/monadic.go similarity index 100% rename from pkg/loiter/monadic.go rename to topazd/loiter/monadic.go diff --git a/cmd/topazd/main.go b/topazd/main.go similarity index 96% rename from cmd/topazd/main.go rename to topazd/main.go index 8931bdd3..2ab602e5 100644 --- a/cmd/topazd/main.go +++ b/topazd/main.go @@ -4,7 +4,7 @@ import ( "fmt" "log" - "github.com/aserto-dev/topaz/pkg/version" + "github.com/aserto-dev/topaz/topazd/version" "github.com/spf13/cobra" ) diff --git a/pkg/metrics/metrics.go b/topazd/metrics/metrics.go similarity index 100% rename from pkg/metrics/metrics.go rename to topazd/metrics/metrics.go diff --git a/pkg/middleware/logging.go b/topazd/middleware/logging.go similarity index 100% rename from pkg/middleware/logging.go rename to topazd/middleware/logging.go diff --git a/pkg/middleware/middleware.go b/topazd/middleware/middleware.go similarity index 100% rename from pkg/middleware/middleware.go rename to topazd/middleware/middleware.go diff --git a/pkg/servers/config.go b/topazd/servers/config.go similarity index 99% rename from pkg/servers/config.go rename to topazd/servers/config.go index babbc9d3..a182a4c3 100644 --- a/pkg/servers/config.go +++ b/topazd/servers/config.go @@ -14,7 +14,7 @@ import ( "github.com/samber/lo" "github.com/aserto-dev/topaz/pkg/config" - "github.com/aserto-dev/topaz/pkg/loiter" + "github.com/aserto-dev/topaz/topazd/loiter" ) type ( diff --git a/pkg/servers/config_test.go b/topazd/servers/config_test.go similarity index 98% rename from pkg/servers/config_test.go rename to topazd/servers/config_test.go index 2ec51186..0bcc79ba 100644 --- a/pkg/servers/config_test.go +++ b/topazd/servers/config_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/aserto-dev/topaz/pkg/config" - "github.com/aserto-dev/topaz/pkg/servers" + "github.com/aserto-dev/topaz/topazd/servers" "github.com/samber/lo" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/pkg/servers/grpc.go b/topazd/servers/grpc.go similarity index 100% rename from pkg/servers/grpc.go rename to topazd/servers/grpc.go diff --git a/pkg/servers/http.go b/topazd/servers/http.go similarity index 100% rename from pkg/servers/http.go rename to topazd/servers/http.go diff --git a/pkg/service/registrar.go b/topazd/service/registrar.go similarity index 97% rename from pkg/service/registrar.go rename to topazd/service/registrar.go index 2f60995d..fd8392d8 100644 --- a/pkg/service/registrar.go +++ b/topazd/service/registrar.go @@ -6,7 +6,7 @@ import ( gorilla "github.com/gorilla/mux" "google.golang.org/grpc" - "github.com/aserto-dev/topaz/pkg/servers" + "github.com/aserto-dev/topaz/topazd/servers" "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" ) diff --git a/pkg/signals/signal.go b/topazd/signals/signal.go similarity index 100% rename from pkg/signals/signal.go rename to topazd/signals/signal.go diff --git a/pkg/signals/signal_posix.go b/topazd/signals/signal_posix.go similarity index 97% rename from pkg/signals/signal_posix.go rename to topazd/signals/signal_posix.go index a0f00a73..2b24faa4 100644 --- a/pkg/signals/signal_posix.go +++ b/topazd/signals/signal_posix.go @@ -1,5 +1,4 @@ //go:build !windows -// +build !windows /* Copyright 2017 The Kubernetes Authors. diff --git a/pkg/signals/signal_windows.go b/topazd/signals/signal_windows.go similarity index 100% rename from pkg/signals/signal_windows.go rename to topazd/signals/signal_windows.go diff --git a/pkg/app/tests/assets/assets.go b/topazd/tests/assets/assets.go similarity index 100% rename from pkg/app/tests/assets/assets.go rename to topazd/tests/assets/assets.go diff --git a/pkg/app/tests/assets/config/config-no-tls-v2.yaml b/topazd/tests/assets/config/config-no-tls-v2.yaml similarity index 100% rename from pkg/app/tests/assets/config/config-no-tls-v2.yaml rename to topazd/tests/assets/config/config-no-tls-v2.yaml diff --git a/pkg/app/tests/assets/config/config-no-tls.yaml b/topazd/tests/assets/config/config-no-tls.yaml similarity index 100% rename from pkg/app/tests/assets/config/config-no-tls.yaml rename to topazd/tests/assets/config/config-no-tls.yaml diff --git a/pkg/app/tests/assets/config/config-with-tls-v2.yaml b/topazd/tests/assets/config/config-with-tls-v2.yaml similarity index 100% rename from pkg/app/tests/assets/config/config-with-tls-v2.yaml rename to topazd/tests/assets/config/config-with-tls-v2.yaml diff --git a/pkg/app/tests/assets/config/config-with-tls.yaml b/topazd/tests/assets/config/config-with-tls.yaml similarity index 100% rename from pkg/app/tests/assets/config/config-with-tls.yaml rename to topazd/tests/assets/config/config-with-tls.yaml diff --git a/pkg/app/tests/assets/config/peoplefinder.yaml b/topazd/tests/assets/config/peoplefinder.yaml similarity index 100% rename from pkg/app/tests/assets/config/peoplefinder.yaml rename to topazd/tests/assets/config/peoplefinder.yaml diff --git a/pkg/app/tests/assets/config/peoplefinderv2.yaml b/topazd/tests/assets/config/peoplefinderv2.yaml similarity index 100% rename from pkg/app/tests/assets/config/peoplefinderv2.yaml rename to topazd/tests/assets/config/peoplefinderv2.yaml diff --git a/pkg/app/tests/assets/db/acmecorp.db b/topazd/tests/assets/db/acmecorp.db similarity index 100% rename from pkg/app/tests/assets/db/acmecorp.db rename to topazd/tests/assets/db/acmecorp.db diff --git a/pkg/app/tests/assets/gdrive/manifest.yaml b/topazd/tests/assets/gdrive/manifest.yaml similarity index 100% rename from pkg/app/tests/assets/gdrive/manifest.yaml rename to topazd/tests/assets/gdrive/manifest.yaml diff --git a/pkg/app/tests/authz/authz_test.go b/topazd/tests/authz/authz_test.go similarity index 97% rename from pkg/app/tests/authz/authz_test.go rename to topazd/tests/authz/authz_test.go index b9636c15..04a8648a 100644 --- a/pkg/app/tests/authz/authz_test.go +++ b/topazd/tests/authz/authz_test.go @@ -10,9 +10,9 @@ import ( "github.com/aserto-dev/go-authorizer/aserto/authorizer/v2" api "github.com/aserto-dev/go-authorizer/aserto/authorizer/v2/api" "github.com/aserto-dev/topaz/internal/pkg/fs" - assets_test "github.com/aserto-dev/topaz/pkg/app/tests/assets" - tc "github.com/aserto-dev/topaz/pkg/app/tests/common" - "github.com/aserto-dev/topaz/pkg/cli/x" + "github.com/aserto-dev/topaz/topaz/pkg/cli/x" + assets_test "github.com/aserto-dev/topaz/topazd/tests/assets" + tc "github.com/aserto-dev/topaz/topazd/tests/common" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/pkg/app/tests/builtin/builtin_test.go b/topazd/tests/builtin/builtin_test.go similarity index 98% rename from pkg/app/tests/builtin/builtin_test.go rename to topazd/tests/builtin/builtin_test.go index a66a5146..7da59f42 100644 --- a/pkg/app/tests/builtin/builtin_test.go +++ b/topazd/tests/builtin/builtin_test.go @@ -9,9 +9,9 @@ import ( azc "github.com/aserto-dev/go-aserto/az" "github.com/aserto-dev/go-authorizer/aserto/authorizer/v2" "github.com/aserto-dev/go-authorizer/aserto/authorizer/v2/api" - assets_test "github.com/aserto-dev/topaz/pkg/app/tests/assets" - tc "github.com/aserto-dev/topaz/pkg/app/tests/common" - "github.com/aserto-dev/topaz/pkg/cli/x" + "github.com/aserto-dev/topaz/topaz/pkg/cli/x" + assets_test "github.com/aserto-dev/topaz/topazd/tests/assets" + tc "github.com/aserto-dev/topaz/topazd/tests/common" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/pkg/app/tests/common/common.go b/topazd/tests/common/common.go similarity index 100% rename from pkg/app/tests/common/common.go rename to topazd/tests/common/common.go diff --git a/pkg/app/tests/common/template.go b/topazd/tests/common/template.go similarity index 89% rename from pkg/app/tests/common/template.go rename to topazd/tests/common/template.go index c2b31d48..6f718b0b 100644 --- a/pkg/app/tests/common/template.go +++ b/topazd/tests/common/template.go @@ -4,12 +4,12 @@ import ( "path/filepath" "testing" - "github.com/aserto-dev/topaz/pkg/cli/cc" - azc "github.com/aserto-dev/topaz/pkg/cli/clients/authorizer" - dsc "github.com/aserto-dev/topaz/pkg/cli/clients/directory" - "github.com/aserto-dev/topaz/pkg/cli/cmd/common" - "github.com/aserto-dev/topaz/pkg/cli/cmd/directory" - "github.com/aserto-dev/topaz/pkg/cli/cmd/templates" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cc" + azc "github.com/aserto-dev/topaz/topaz/pkg/cli/clients/authorizer" + dsc "github.com/aserto-dev/topaz/topaz/pkg/cli/clients/directory" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cmd/common" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cmd/directory" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cmd/templates" "google.golang.org/protobuf/types/known/structpb" "github.com/stretchr/testify/assert" diff --git a/pkg/app/tests/ds/check_test.go b/topazd/tests/ds/check_test.go similarity index 98% rename from pkg/app/tests/ds/check_test.go rename to topazd/tests/ds/check_test.go index 1ed01db4..8d2c14d7 100644 --- a/pkg/app/tests/ds/check_test.go +++ b/topazd/tests/ds/check_test.go @@ -7,7 +7,7 @@ import ( dsr3 "github.com/aserto-dev/go-directory/aserto/directory/reader/v3" "github.com/aserto-dev/go-directory/pkg/prop" - tc "github.com/aserto-dev/topaz/pkg/app/tests/common" + tc "github.com/aserto-dev/topaz/topazd/tests/common" "github.com/stretchr/testify/require" ) diff --git a/pkg/app/tests/ds/checks_test.go b/topazd/tests/ds/checks_test.go similarity index 99% rename from pkg/app/tests/ds/checks_test.go rename to topazd/tests/ds/checks_test.go index 2254b0e3..de82adc2 100644 --- a/pkg/app/tests/ds/checks_test.go +++ b/topazd/tests/ds/checks_test.go @@ -7,7 +7,7 @@ import ( dsr3 "github.com/aserto-dev/go-directory/aserto/directory/reader/v3" "github.com/aserto-dev/go-directory/pkg/prop" - tc "github.com/aserto-dev/topaz/pkg/app/tests/common" + tc "github.com/aserto-dev/topaz/topazd/tests/common" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/pkg/app/tests/ds/ds_test.go b/topazd/tests/ds/ds_test.go similarity index 87% rename from pkg/app/tests/ds/ds_test.go rename to topazd/tests/ds/ds_test.go index e26fadfe..2d1a78ef 100644 --- a/pkg/app/tests/ds/ds_test.go +++ b/topazd/tests/ds/ds_test.go @@ -6,14 +6,14 @@ import ( "time" "github.com/aserto-dev/topaz/internal/pkg/fs" - azc "github.com/aserto-dev/topaz/pkg/cli/clients/authorizer" - dsc "github.com/aserto-dev/topaz/pkg/cli/clients/directory" - "github.com/aserto-dev/topaz/pkg/cli/x" + azc "github.com/aserto-dev/topaz/topaz/pkg/cli/clients/authorizer" + dsc "github.com/aserto-dev/topaz/topaz/pkg/cli/clients/directory" + "github.com/aserto-dev/topaz/topaz/pkg/cli/x" client "github.com/aserto-dev/go-aserto" dsr3 "github.com/aserto-dev/go-directory/aserto/directory/reader/v3" - assets_test "github.com/aserto-dev/topaz/pkg/app/tests/assets" - tc "github.com/aserto-dev/topaz/pkg/app/tests/common" + assets_test "github.com/aserto-dev/topaz/topazd/tests/assets" + tc "github.com/aserto-dev/topaz/topazd/tests/common" "github.com/stretchr/testify/require" "github.com/testcontainers/testcontainers-go" @@ -103,7 +103,7 @@ func testDirectory(dsConfig *dsc.Config, azConfig *azc.Config) func(*testing.T) ctx, cancel := context.WithCancel(t.Context()) t.Cleanup(cancel) - t.Run("", tc.InstallTemplate(dsConfig, azConfig, "../../../../assets/v32/gdrive.json")) + t.Run("", tc.InstallTemplate(dsConfig, azConfig, "../../../assets/v32/gdrive.json")) tests := []struct { name string diff --git a/pkg/app/tests/manifest/manifest_test.go b/topazd/tests/manifest/manifest_test.go similarity index 96% rename from pkg/app/tests/manifest/manifest_test.go rename to topazd/tests/manifest/manifest_test.go index c7b3edeb..65d773e6 100644 --- a/pkg/app/tests/manifest/manifest_test.go +++ b/topazd/tests/manifest/manifest_test.go @@ -14,9 +14,9 @@ import ( dsc "github.com/aserto-dev/go-aserto/ds/v3" dsm3 "github.com/aserto-dev/go-directory/aserto/directory/model/v3" "github.com/aserto-dev/topaz/internal/pkg/fs" - assets_test "github.com/aserto-dev/topaz/pkg/app/tests/assets" - tc "github.com/aserto-dev/topaz/pkg/app/tests/common" - "github.com/aserto-dev/topaz/pkg/cli/x" + "github.com/aserto-dev/topaz/topaz/pkg/cli/x" + assets_test "github.com/aserto-dev/topaz/topazd/tests/assets" + tc "github.com/aserto-dev/topaz/topazd/tests/common" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/pkg/app/tests/policy/policy_test.go b/topazd/tests/policy/policy_test.go similarity index 98% rename from pkg/app/tests/policy/policy_test.go rename to topazd/tests/policy/policy_test.go index fdc8e3ac..c0baa691 100644 --- a/pkg/app/tests/policy/policy_test.go +++ b/topazd/tests/policy/policy_test.go @@ -10,9 +10,9 @@ import ( "github.com/aserto-dev/go-authorizer/aserto/authorizer/v2" api "github.com/aserto-dev/go-authorizer/aserto/authorizer/v2/api" "github.com/aserto-dev/topaz/internal/pkg/fs" - assets_test "github.com/aserto-dev/topaz/pkg/app/tests/assets" - tc "github.com/aserto-dev/topaz/pkg/app/tests/common" - "github.com/aserto-dev/topaz/pkg/cli/x" + "github.com/aserto-dev/topaz/topaz/pkg/cli/x" + assets_test "github.com/aserto-dev/topaz/topazd/tests/assets" + tc "github.com/aserto-dev/topaz/topazd/tests/common" "github.com/stretchr/testify/require" "github.com/testcontainers/testcontainers-go" diff --git a/pkg/app/tests/query/query_test.go b/topazd/tests/query/query_test.go similarity index 97% rename from pkg/app/tests/query/query_test.go rename to topazd/tests/query/query_test.go index af11e3af..3de0dbb4 100644 --- a/pkg/app/tests/query/query_test.go +++ b/topazd/tests/query/query_test.go @@ -12,9 +12,9 @@ import ( api "github.com/aserto-dev/go-authorizer/aserto/authorizer/v2/api" rt "github.com/aserto-dev/runtime" "github.com/aserto-dev/topaz/internal/pkg/fs" - assets_test "github.com/aserto-dev/topaz/pkg/app/tests/assets" - tc "github.com/aserto-dev/topaz/pkg/app/tests/common" - "github.com/aserto-dev/topaz/pkg/cli/x" + "github.com/aserto-dev/topaz/topaz/pkg/cli/x" + assets_test "github.com/aserto-dev/topaz/topazd/tests/assets" + tc "github.com/aserto-dev/topaz/topazd/tests/common" "github.com/stretchr/testify/require" "github.com/testcontainers/testcontainers-go" diff --git a/pkg/app/tests/template-no-tls/template-no-tls_test.go b/topazd/tests/template-no-tls/template-no-tls_test.go similarity index 58% rename from pkg/app/tests/template-no-tls/template-no-tls_test.go rename to topazd/tests/template-no-tls/template-no-tls_test.go index 6cfe21ab..e6ea0069 100644 --- a/pkg/app/tests/template-no-tls/template-no-tls_test.go +++ b/topazd/tests/template-no-tls/template-no-tls_test.go @@ -5,11 +5,11 @@ import ( "testing" "time" - assets_test "github.com/aserto-dev/topaz/pkg/app/tests/assets" - tc "github.com/aserto-dev/topaz/pkg/app/tests/common" - azc "github.com/aserto-dev/topaz/pkg/cli/clients/authorizer" - dsc "github.com/aserto-dev/topaz/pkg/cli/clients/directory" - "github.com/aserto-dev/topaz/pkg/cli/x" + azc "github.com/aserto-dev/topaz/topaz/pkg/cli/clients/authorizer" + dsc "github.com/aserto-dev/topaz/topaz/pkg/cli/clients/directory" + "github.com/aserto-dev/topaz/topaz/pkg/cli/x" + assets_test "github.com/aserto-dev/topaz/topazd/tests/assets" + tc "github.com/aserto-dev/topaz/topazd/tests/common" "github.com/stretchr/testify/require" "github.com/testcontainers/testcontainers-go" @@ -80,29 +80,29 @@ func TestTemplatesNoTLS(t *testing.T) { } var tcs = []string{ - "../../../../assets/v32/acmecorp.json", - "../../../../assets/v32/peoplefinder.json", - - "../../../../assets/v32/citadel.json", - "../../../../assets/v32/api-auth.json", - // "../../../../assets/v32/api-gateway.json", // v32/api-gateway.json does not exist. - "../../../../assets/v32/gdrive.json", - "../../../../assets/v32/github.json", - "../../../../assets/v32/multi-tenant.json", - "../../../../assets/v32/simple-rbac.json", - "../../../../assets/v32/slack.json", - "../../../../assets/v32/todo.json", - - "../../../../assets/v33/acmecorp.json", - "../../../../assets/v33/peoplefinder.json", - - "../../../../assets/v33/citadel.json", - "../../../../assets/v33/api-auth.json", - "../../../../assets/v33/api-gateway.json", - "../../../../assets/v33/gdrive.json", - "../../../../assets/v33/github.json", - "../../../../assets/v33/multi-tenant.json", - "../../../../assets/v33/simple-rbac.json", - "../../../../assets/v33/slack.json", - "../../../../assets/v33/todo.json", + "../../../assets/v32/acmecorp.json", + "../../../assets/v32/peoplefinder.json", + + "../../../assets/v32/citadel.json", + "../../../assets/v32/api-auth.json", + // "../../../assets/v32/api-gateway.json", // v32/api-gateway.json does not exist. + "../../../assets/v32/gdrive.json", + "../../../assets/v32/github.json", + "../../../assets/v32/multi-tenant.json", + "../../../assets/v32/simple-rbac.json", + "../../../assets/v32/slack.json", + "../../../assets/v32/todo.json", + + "../../../assets/v33/acmecorp.json", + "../../../assets/v33/peoplefinder.json", + + "../../../assets/v33/citadel.json", + "../../../assets/v33/api-auth.json", + "../../../assets/v33/api-gateway.json", + "../../../assets/v33/gdrive.json", + "../../../assets/v33/github.json", + "../../../assets/v33/multi-tenant.json", + "../../../assets/v33/simple-rbac.json", + "../../../assets/v33/slack.json", + "../../../assets/v33/todo.json", } diff --git a/pkg/app/tests/template-with-tls/template-with-tls_test.go b/topazd/tests/template-with-tls/template-with-tls_test.go similarity index 66% rename from pkg/app/tests/template-with-tls/template-with-tls_test.go rename to topazd/tests/template-with-tls/template-with-tls_test.go index a02c7568..5902d046 100644 --- a/pkg/app/tests/template-with-tls/template-with-tls_test.go +++ b/topazd/tests/template-with-tls/template-with-tls_test.go @@ -6,13 +6,13 @@ import ( "time" "github.com/aserto-dev/topaz/internal/pkg/fs" - assets_test "github.com/aserto-dev/topaz/pkg/app/tests/assets" - tc "github.com/aserto-dev/topaz/pkg/app/tests/common" - "github.com/aserto-dev/topaz/pkg/cli/cc" - azc "github.com/aserto-dev/topaz/pkg/cli/clients/authorizer" - dsc "github.com/aserto-dev/topaz/pkg/cli/clients/directory" - "github.com/aserto-dev/topaz/pkg/cli/cmd/certs" - "github.com/aserto-dev/topaz/pkg/cli/x" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cc" + azc "github.com/aserto-dev/topaz/topaz/pkg/cli/clients/authorizer" + dsc "github.com/aserto-dev/topaz/topaz/pkg/cli/clients/directory" + "github.com/aserto-dev/topaz/topaz/pkg/cli/cmd/certs" + "github.com/aserto-dev/topaz/topaz/pkg/cli/x" + assets_test "github.com/aserto-dev/topaz/topazd/tests/assets" + tc "github.com/aserto-dev/topaz/topazd/tests/common" "github.com/samber/lo" "github.com/stretchr/testify/require" @@ -114,29 +114,29 @@ func certFiles(certsDir string) []testcontainers.ContainerFile { } var tcs = []string{ - "../../../../assets/v32/acmecorp.json", - "../../../../assets/v32/peoplefinder.json", - - "../../../../assets/v32/citadel.json", - "../../../../assets/v32/api-auth.json", - // "../../../../assets/v32/api-gateway.json", // v32/api-gateway.json does not exist. - "../../../../assets/v32/gdrive.json", - "../../../../assets/v32/github.json", - "../../../../assets/v32/multi-tenant.json", - "../../../../assets/v32/simple-rbac.json", - "../../../../assets/v32/slack.json", - "../../../../assets/v32/todo.json", - - "../../../../assets/v33/acmecorp.json", - "../../../../assets/v33/peoplefinder.json", - - "../../../../assets/v33/citadel.json", - "../../../../assets/v33/api-auth.json", - "../../../../assets/v33/api-gateway.json", - "../../../../assets/v33/gdrive.json", - "../../../../assets/v33/github.json", - "../../../../assets/v33/multi-tenant.json", - "../../../../assets/v33/simple-rbac.json", - "../../../../assets/v33/slack.json", - "../../../../assets/v33/todo.json", + "../../../assets/v32/acmecorp.json", + "../../../assets/v32/peoplefinder.json", + + "../../../assets/v32/citadel.json", + "../../../assets/v32/api-auth.json", + // "../../../assets/v32/api-gateway.json", // v32/api-gateway.json does not exist. + "../../../assets/v32/gdrive.json", + "../../../assets/v32/github.json", + "../../../assets/v32/multi-tenant.json", + "../../../assets/v32/simple-rbac.json", + "../../../assets/v32/slack.json", + "../../../assets/v32/todo.json", + + "../../../assets/v33/acmecorp.json", + "../../../assets/v33/peoplefinder.json", + + "../../../assets/v33/citadel.json", + "../../../assets/v33/api-auth.json", + "../../../assets/v33/api-gateway.json", + "../../../assets/v33/gdrive.json", + "../../../assets/v33/github.json", + "../../../assets/v33/multi-tenant.json", + "../../../assets/v33/simple-rbac.json", + "../../../assets/v33/slack.json", + "../../../assets/v33/todo.json", } diff --git a/pkg/app/tests/workaround.go b/topazd/tests/workaround.go similarity index 100% rename from pkg/app/tests/workaround.go rename to topazd/tests/workaround.go diff --git a/pkg/topaz/builder/builder.go b/topazd/topaz/builder/builder.go similarity index 92% rename from pkg/topaz/builder/builder.go rename to topazd/topaz/builder/builder.go index f16b5359..457889f4 100644 --- a/pkg/topaz/builder/builder.go +++ b/topazd/topaz/builder/builder.go @@ -13,16 +13,16 @@ import ( healthpb "google.golang.org/grpc/health/grpc_health_v1" "google.golang.org/grpc/reflection" - "github.com/aserto-dev/topaz/pkg/authentication" - "github.com/aserto-dev/topaz/pkg/authorizer" "github.com/aserto-dev/topaz/pkg/config/v3" - "github.com/aserto-dev/topaz/pkg/console" - "github.com/aserto-dev/topaz/pkg/debug" - "github.com/aserto-dev/topaz/pkg/directory" - "github.com/aserto-dev/topaz/pkg/health" - "github.com/aserto-dev/topaz/pkg/middleware" - "github.com/aserto-dev/topaz/pkg/servers" - "github.com/aserto-dev/topaz/pkg/service" + "github.com/aserto-dev/topaz/topazd/authentication" + "github.com/aserto-dev/topaz/topazd/authorizer" + "github.com/aserto-dev/topaz/topazd/console" + "github.com/aserto-dev/topaz/topazd/debug" + "github.com/aserto-dev/topaz/topazd/directory" + "github.com/aserto-dev/topaz/topazd/health" + "github.com/aserto-dev/topaz/topazd/middleware" + "github.com/aserto-dev/topaz/topazd/servers" + "github.com/aserto-dev/topaz/topazd/service" ) type TopazServices interface { diff --git a/pkg/topaz/builder/gateway.go b/topazd/topaz/builder/gateway.go similarity index 100% rename from pkg/topaz/builder/gateway.go rename to topazd/topaz/builder/gateway.go diff --git a/pkg/topaz/builder/grpc.go b/topazd/topaz/builder/grpc.go similarity index 96% rename from pkg/topaz/builder/grpc.go rename to topazd/topaz/builder/grpc.go index a66eb7d9..c4b7f0c9 100644 --- a/pkg/topaz/builder/grpc.go +++ b/topazd/topaz/builder/grpc.go @@ -4,7 +4,7 @@ import ( "context" "net" - "github.com/aserto-dev/topaz/pkg/servers" + "github.com/aserto-dev/topaz/topazd/servers" "github.com/rs/zerolog" "google.golang.org/grpc" ) diff --git a/pkg/topaz/builder/http.go b/topazd/topaz/builder/http.go similarity index 98% rename from pkg/topaz/builder/http.go rename to topazd/topaz/builder/http.go index 63b6be21..a4dd69c6 100644 --- a/pkg/topaz/builder/http.go +++ b/topazd/topaz/builder/http.go @@ -5,7 +5,7 @@ import ( "errors" "net/http" - "github.com/aserto-dev/topaz/pkg/servers" + "github.com/aserto-dev/topaz/topazd/servers" gorilla "github.com/gorilla/mux" "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" "github.com/rs/zerolog" diff --git a/pkg/topaz/builder/middleware.go b/topazd/topaz/builder/middleware.go similarity index 88% rename from pkg/topaz/builder/middleware.go rename to topazd/topaz/builder/middleware.go index 6283f7ef..33c9a53d 100644 --- a/pkg/topaz/builder/middleware.go +++ b/topazd/topaz/builder/middleware.go @@ -1,7 +1,7 @@ package builder import ( - "github.com/aserto-dev/topaz/pkg/middleware" + "github.com/aserto-dev/topaz/topazd/middleware" "google.golang.org/grpc" ) diff --git a/pkg/topaz/builder/server.go b/topazd/topaz/builder/server.go similarity index 100% rename from pkg/topaz/builder/server.go rename to topazd/topaz/builder/server.go diff --git a/pkg/topaz/services.go b/topazd/topaz/services.go similarity index 91% rename from pkg/topaz/services.go rename to topazd/topaz/services.go index 171fcc82..d113f8cf 100644 --- a/pkg/topaz/services.go +++ b/topazd/topaz/services.go @@ -10,13 +10,13 @@ import ( client "github.com/aserto-dev/go-aserto" - "github.com/aserto-dev/topaz/pkg/authorizer" "github.com/aserto-dev/topaz/pkg/config/v3" - "github.com/aserto-dev/topaz/pkg/directory" - "github.com/aserto-dev/topaz/pkg/health" - "github.com/aserto-dev/topaz/pkg/servers" - "github.com/aserto-dev/topaz/pkg/service" - "github.com/aserto-dev/topaz/plugins/edge" + "github.com/aserto-dev/topaz/topazd/authorizer" + "github.com/aserto-dev/topaz/topazd/authorizer/plugins/edge" + "github.com/aserto-dev/topaz/topazd/directory" + "github.com/aserto-dev/topaz/topazd/health" + "github.com/aserto-dev/topaz/topazd/servers" + "github.com/aserto-dev/topaz/topazd/service" ) type topazServices struct { diff --git a/pkg/topaz/topaz.go b/topazd/topaz/topaz.go similarity index 97% rename from pkg/topaz/topaz.go rename to topazd/topaz/topaz.go index 35d158a5..bc85ee47 100644 --- a/pkg/topaz/topaz.go +++ b/topazd/topaz/topaz.go @@ -13,7 +13,7 @@ import ( "github.com/aserto-dev/logger" "github.com/aserto-dev/topaz/pkg/config/v3" - sbuilder "github.com/aserto-dev/topaz/pkg/topaz/builder" + sbuilder "github.com/aserto-dev/topaz/topazd/topaz/builder" ) type Topaz struct { diff --git a/cmd/topazd/topaz_run.go b/topazd/topaz_run.go similarity index 94% rename from cmd/topazd/topaz_run.go rename to topazd/topaz_run.go index c070fef3..85dc346c 100644 --- a/cmd/topazd/topaz_run.go +++ b/topazd/topaz_run.go @@ -7,8 +7,8 @@ import ( "github.com/spf13/cobra" "github.com/aserto-dev/topaz/pkg/config/v3" - "github.com/aserto-dev/topaz/pkg/signals" - "github.com/aserto-dev/topaz/pkg/topaz" + "github.com/aserto-dev/topaz/topazd/signals" + "github.com/aserto-dev/topaz/topazd/topaz" ) var ( diff --git a/topazd/version/version.go b/topazd/version/version.go new file mode 100644 index 00000000..114bd004 --- /dev/null +++ b/topazd/version/version.go @@ -0,0 +1,58 @@ +package version + +import ( + "fmt" + "runtime" + "time" + + "github.com/aserto-dev/topaz/topaz/pkg/cli/x" +) + +var ( + ver string //nolint:gochecknoglobals // set by linker + date string //nolint:gochecknoglobals // set by linker + commit string //nolint:gochecknoglobals // set by linker +) + +// Info - version info. +type Info struct { + Version string + Date string + Commit string +} + +// GetInfo - get version stamp information. +func GetInfo() Info { + if ver == "" { + ver = "0.0.0-dev" + } + + if date == "" { + date = time.Now().Format(time.RFC3339) + } + + if commit == "" { + commit = "undefined" + } + + return Info{ + Version: ver, + Date: date, + Commit: commit, + } +} + +// String() -- return version info string. +func (vi Info) String() string { + return fmt.Sprintf("%s g%s %s-%s [%s]", + vi.Version, + vi.Commit, + runtime.GOOS, + runtime.GOARCH, + vi.Date, + ) +} + +func UserAgent() string { + return fmt.Sprintf("%s/%s", x.AppName, GetInfo().Version) +} diff --git a/pkg/x/closer.go b/topazd/x/closer.go similarity index 100% rename from pkg/x/closer.go rename to topazd/x/closer.go