Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 5 additions & 9 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,7 @@ linters:
yaml: snake

overrides:
- pkg: pkg/console
rules:
json: camel
- pkg: pkg/app/handlers
- pkg: topazd/console
rules:
json: camel

Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .goreleaser-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ dist: dist-test
builds:
# https://goreleaser.com/customization/build/
- id: topazd
main: ./cmd/topazd
main: ./topazd
binary: topazd
goos:
- linux
Expand All @@ -40,7 +40,7 @@ builds:
post: make container-tag

- id: topaz
main: ./cmd/topaz
main: ./topaz
binary: topaz
goos:
- linux
Expand Down
8 changes: 4 additions & 4 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ before:
builds:
# https://goreleaser.com/customization/build/
- id: topazd
main: ./cmd/topazd
main: ./topazd
binary: topazd
goos:
- darwin
Expand All @@ -40,7 +40,7 @@ builds:
mod_timestamp: "{{ .CommitTimestamp }}"

- id: topaz
main: ./cmd/topaz
main: ./topaz
binary: topaz
goos:
- darwin
Expand All @@ -63,7 +63,7 @@ builds:
mod_timestamp: "{{ .CommitTimestamp }}"

- id: topaz-db
main: ./cmd/topaz-db
main: ./topaz-db
binary: topaz-db
goos:
- darwin
Expand All @@ -86,7 +86,7 @@ builds:
mod_timestamp: "{{ .CommitTimestamp }}"

- id: topaz-backup
main: ./cmd/topaz-backup
main: ./topaz-backup
binary: topaz-backup
goos:
- darwin
Expand Down
8 changes: 4 additions & 4 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
18 changes: 9 additions & 9 deletions pkg/config/migrate/migrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion pkg/config/mixins.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion pkg/config/v2/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
4 changes: 2 additions & 2 deletions pkg/config/v2/loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion pkg/config/v2/topaz_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
16 changes: 8 additions & 8 deletions pkg/config/v3/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pkg/config/v3/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
18 changes: 9 additions & 9 deletions pkg/config/v3/serialize_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/topaz-backup/main.go → topaz-backup/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
2 changes: 1 addition & 1 deletion cmd/topaz-db/cmd/cli.go → topaz-db/cmd/cli.go
Original file line number Diff line number Diff line change
@@ -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"`
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions cmd/topaz-db/cmd/load.go → topaz-db/cmd/load.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
4 changes: 2 additions & 2 deletions cmd/topaz-db/cmd/set.go → topaz-db/cmd/set.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions cmd/topaz-db/main.go → topaz-db/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
File renamed without changes.
12 changes: 6 additions & 6 deletions cmd/topaz/main.go → topaz/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions pkg/cli/cc/cc.go → topaz/pkg/cli/cc/cc.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion pkg/cli/cc/client.go → topaz/pkg/cli/cc/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions pkg/cli/cc/container.go → topaz/pkg/cli/cc/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/cli/cc/dir.go → topaz/pkg/cli/cc/dir.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading
Loading