From 7577d33778dcfc271b9b5e920c9f39d714b5d7c7 Mon Sep 17 00:00:00 2001 From: Samir Faci Date: Mon, 13 Nov 2023 15:11:25 -0500 Subject: [PATCH] [TechDebt] Changing entrypoint and package names ChangeLog: - Updating Taskfile and goreleaser to reflect new main.go location. - renamed cmd package to cli --- .goreleaser.yml | 3 +- Taskfile.yml | 25 +------ {cmd => cli}/backup/alertnotifications.go | 2 +- {cmd => cli}/backup/backup.go | 2 +- {cmd => cli}/backup/connection_permissions.go | 2 +- {cmd => cli}/backup/connections.go | 2 +- {cmd => cli}/backup/dashboard.go | 2 +- {cmd => cli}/backup/folder_permissions.go | 2 +- {cmd => cli}/backup/folders.go | 2 +- {cmd => cli}/backup/library.go | 4 +- {cmd => cli}/backup/organizations.go | 2 +- {cmd => cli}/backup/team.go | 2 +- {cmd => cli}/backup/users.go | 2 +- {cmd => cli}/commandeer.go | 16 ++-- {cmd => cli}/context.go | 4 +- {cmd => cli}/support/root.go | 0 {cmd => cli}/support/simple.go | 0 {cmd => cli}/test/conections_test.go | 9 +-- {cmd => cli}/test/devel_test.go | 8 +- {cmd => cli}/test/support.go | 2 +- {cmd => cli}/test/version_test.go | 8 +- {cmd => cli}/tools/auth.go | 2 +- {cmd => cli}/tools/auth_service_accounts.go | 2 +- {cmd => cli}/tools/auth_tokens.go | 2 +- {cmd => cli}/tools/devel.go | 2 +- {cmd => cli}/tools/organizations.go | 2 +- {cmd => cli}/tools/tools.go | 2 +- {cmd => cli}/tools/users.go | 2 +- {cmd => cli}/version.go | 4 +- config/assets.go | 6 ++ docker/Dockerfile | 54 ++------------ docker/Dockerfile-gorelease | 8 -- go.mod | 73 ++++++++++--------- go.sum | 70 ++++++++++++++++++ main.go | 33 --------- 35 files changed, 172 insertions(+), 189 deletions(-) rename {cmd => cli}/backup/alertnotifications.go (99%) rename {cmd => cli}/backup/backup.go (96%) rename {cmd => cli}/backup/connection_permissions.go (99%) rename {cmd => cli}/backup/connections.go (99%) rename {cmd => cli}/backup/dashboard.go (99%) rename {cmd => cli}/backup/folder_permissions.go (99%) rename {cmd => cli}/backup/folders.go (99%) rename {cmd => cli}/backup/library.go (98%) rename {cmd => cli}/backup/organizations.go (99%) rename {cmd => cli}/backup/team.go (99%) rename {cmd => cli}/backup/users.go (99%) rename {cmd => cli}/commandeer.go (66%) rename {cmd => cli}/context.go (99%) rename {cmd => cli}/support/root.go (100%) rename {cmd => cli}/support/simple.go (100%) rename {cmd => cli}/test/conections_test.go (82%) rename {cmd => cli}/test/devel_test.go (90%) rename {cmd => cli}/test/support.go (98%) rename {cmd => cli}/test/version_test.go (87%) rename {cmd => cli}/tools/auth.go (93%) rename {cmd => cli}/tools/auth_service_accounts.go (99%) rename {cmd => cli}/tools/auth_tokens.go (99%) rename {cmd => cli}/tools/devel.go (98%) rename {cmd => cli}/tools/organizations.go (99%) rename {cmd => cli}/tools/tools.go (95%) rename {cmd => cli}/tools/users.go (98%) rename {cmd => cli}/version.go (95%) create mode 100644 config/assets.go delete mode 100644 docker/Dockerfile-gorelease delete mode 100644 main.go diff --git a/.goreleaser.yml b/.goreleaser.yml index 7537533f..318bf021 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -15,6 +15,7 @@ builds: - CGO_ENABLED=0 binary: gdg ldflags: -s -w -X github.com/esnet/gdg/internal/version.GitCommit={{ .Commit }} -X github.com/esnet/gdg/internal/version.BuildDate={{ .Date }} -X github.com/esnet/gdg/internal/version.Version={{ .Tag }} + main: ./cmd/gdg goos: - linux - windows @@ -74,7 +75,7 @@ dockers: - "ghcr.io/esnet/gdg:{{ .Major }}.{{ .Minor }}" skip_push: false - dockerfile: "docker/Dockerfile-gorelease" + dockerfile: "docker/Dockerfile" brews: diff --git a/Taskfile.yml b/Taskfile.yml index 62a20701..71d98be5 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -22,10 +22,6 @@ tasks: - go install github.com/client9/misspell/cmd/misspell@latest - go install github.com/securego/gosec/v2/cmd/gosec@master - go install golang.org/x/vuln/cmd/govulncheck@latest - format: - desc: "Format code" - cmds: - - gofmt -w -s . security: desc: "Run security scan" cmds: @@ -55,33 +51,18 @@ tasks: linux: desc: "Build linux binary" cmds: - - env GOOS='linux' GOARCH='amd64' go build -ldflags "{{ .LD_FLAGS }} " -o bin/{{ .BIN_NAME }}_linux + - env GOOS='linux' GOARCH='amd64' go build -ldflags "{{ .LD_FLAGS }}" -o bin/{{ .BIN_NAME }}_linux cmd/gdg/main.go build: desc: "Buiding {{ .BIN_NAME }} {{ .VERSION }}" cmds: - echo "GOPATH=${GOPATH}" - - go build -ldflags "{{ .LD_FLAGS }}" -o bin/{{ .BIN_NAME }} + - go build -ldflags "{{ .LD_FLAGS }}" -o bin/{{ .BIN_NAME }} cmd/gdg/main.go install: desc: "installing {{ .BIN_NAME }} {{ .VERSION }}" cmds: - echo "GOPATH=${GOPATH}" - - go install -ldflags "{{ .LD_FLAGS}}" - - mv ${GOPATH}/bin/gdg ${GOPATH}/bin/{{ .BIN_NAME }} + - go install -ldflags "{{ .LD_FLAGS}}" cmd/gdg/main.go silent: false - get-deps: - desc: "Tidy Deps" - cmds: - - go mod tidy - pakcage: - desc: "building image {{ .BIN_NAME }} {{ .VERSION }} {{ .GIT_COMMIT }}" - cmds: - - docker build --build-arg VERSION={{ .VERSION }} --build-arg GIT_COMMIT={{ .GIT_COMMIT }} -t $(IMAGE_NAME):local . - tag: - desc: "Tagging: latest {{ .VERSION }} {{ .GIT_COMMIT }}" - cmds: - - docker tag $(IMAGE_NAME):local $(IMAGE_NAME):{{ .GIT_COMMIT }} - - docker tag $(IMAGE_NAME):local $(IMAGE_NAME):{{ .VERSION }} - - docker tag $(IMAGE_NAME):local $(IMAGE_NAME):latest push: desc: "Pushing docker image to registry: latest {{ .VERSION }} {{ .GIT_COMMIT }}" deps: [tag] diff --git a/cmd/backup/alertnotifications.go b/cli/backup/alertnotifications.go similarity index 99% rename from cmd/backup/alertnotifications.go rename to cli/backup/alertnotifications.go index aed8a53f..e5a6279a 100644 --- a/cmd/backup/alertnotifications.go +++ b/cli/backup/alertnotifications.go @@ -4,7 +4,7 @@ import ( "context" "fmt" "github.com/bep/simplecobra" - "github.com/esnet/gdg/cmd/support" + "github.com/esnet/gdg/cli/support" "github.com/esnet/gdg/internal/config" "github.com/esnet/gdg/internal/service" "github.com/jedib0t/go-pretty/v6/table" diff --git a/cmd/backup/backup.go b/cli/backup/backup.go similarity index 96% rename from cmd/backup/backup.go rename to cli/backup/backup.go index e048c217..dc92ae5c 100644 --- a/cmd/backup/backup.go +++ b/cli/backup/backup.go @@ -3,7 +3,7 @@ package backup import ( "context" "github.com/bep/simplecobra" - "github.com/esnet/gdg/cmd/support" + "github.com/esnet/gdg/cli/support" "github.com/spf13/cobra" ) diff --git a/cmd/backup/connection_permissions.go b/cli/backup/connection_permissions.go similarity index 99% rename from cmd/backup/connection_permissions.go rename to cli/backup/connection_permissions.go index b6600477..ea25cef3 100644 --- a/cmd/backup/connection_permissions.go +++ b/cli/backup/connection_permissions.go @@ -4,7 +4,7 @@ import ( "context" "fmt" "github.com/bep/simplecobra" - "github.com/esnet/gdg/cmd/support" + "github.com/esnet/gdg/cli/support" "github.com/esnet/gdg/internal/config" "github.com/esnet/gdg/internal/service" "github.com/esnet/gdg/internal/tools" diff --git a/cmd/backup/connections.go b/cli/backup/connections.go similarity index 99% rename from cmd/backup/connections.go rename to cli/backup/connections.go index 76ca4b5f..f20cefc2 100644 --- a/cmd/backup/connections.go +++ b/cli/backup/connections.go @@ -4,7 +4,7 @@ import ( "context" "fmt" "github.com/bep/simplecobra" - "github.com/esnet/gdg/cmd/support" + "github.com/esnet/gdg/cli/support" "github.com/esnet/gdg/internal/config" "github.com/esnet/gdg/internal/service" "github.com/jedib0t/go-pretty/v6/table" diff --git a/cmd/backup/dashboard.go b/cli/backup/dashboard.go similarity index 99% rename from cmd/backup/dashboard.go rename to cli/backup/dashboard.go index 5613baed..c9d18616 100644 --- a/cmd/backup/dashboard.go +++ b/cli/backup/dashboard.go @@ -4,7 +4,7 @@ import ( "context" "fmt" "github.com/bep/simplecobra" - "github.com/esnet/gdg/cmd/support" + "github.com/esnet/gdg/cli/support" "github.com/esnet/gdg/internal/config" "github.com/esnet/gdg/internal/service" "github.com/esnet/gdg/internal/tools" diff --git a/cmd/backup/folder_permissions.go b/cli/backup/folder_permissions.go similarity index 99% rename from cmd/backup/folder_permissions.go rename to cli/backup/folder_permissions.go index 1614a64f..cdd06b3e 100644 --- a/cmd/backup/folder_permissions.go +++ b/cli/backup/folder_permissions.go @@ -3,7 +3,7 @@ package backup import ( "context" "github.com/bep/simplecobra" - "github.com/esnet/gdg/cmd/support" + "github.com/esnet/gdg/cli/support" "github.com/esnet/gdg/internal/config" "github.com/jedib0t/go-pretty/v6/table" "github.com/spf13/cobra" diff --git a/cmd/backup/folders.go b/cli/backup/folders.go similarity index 99% rename from cmd/backup/folders.go rename to cli/backup/folders.go index 86955a72..798f61e9 100644 --- a/cmd/backup/folders.go +++ b/cli/backup/folders.go @@ -3,7 +3,7 @@ package backup import ( "context" "github.com/bep/simplecobra" - "github.com/esnet/gdg/cmd/support" + "github.com/esnet/gdg/cli/support" "github.com/esnet/gdg/internal/config" "github.com/esnet/gdg/internal/service" "github.com/esnet/gdg/internal/service/filters" diff --git a/cmd/backup/library.go b/cli/backup/library.go similarity index 98% rename from cmd/backup/library.go rename to cli/backup/library.go index f9d234bc..b0b57dc8 100644 --- a/cmd/backup/library.go +++ b/cli/backup/library.go @@ -4,7 +4,7 @@ import ( "context" "encoding/json" "github.com/bep/simplecobra" - "github.com/esnet/gdg/cmd/support" + "github.com/esnet/gdg/cli/support" "github.com/esnet/gdg/internal/config" "github.com/esnet/gdg/internal/service/filters" "github.com/jedib0t/go-pretty/v6/table" @@ -45,7 +45,7 @@ func newLibraryElementsClearCmd() simplecobra.Commander { cmd.Aliases = []string{"c"} }, RunFunc: func(ctx context.Context, cd *simplecobra.Commandeer, rootCmd *support.RootCommand, args []string) error { - //filter := getLibraryGlobalFlags(cmd) + //filter := getLibraryGlobalFlags(cli) deletedLibrarys := rootCmd.GrafanaSvc().DeleteAllLibraryElements(nil) rootCmd.TableObj.AppendHeader(table.Row{"type", "filename"}) for _, file := range deletedLibrarys { diff --git a/cmd/backup/organizations.go b/cli/backup/organizations.go similarity index 99% rename from cmd/backup/organizations.go rename to cli/backup/organizations.go index 535f33d8..c602d195 100644 --- a/cmd/backup/organizations.go +++ b/cli/backup/organizations.go @@ -3,7 +3,7 @@ package backup import ( "context" "github.com/bep/simplecobra" - "github.com/esnet/gdg/cmd/support" + "github.com/esnet/gdg/cli/support" "github.com/esnet/gdg/internal/config" "github.com/jedib0t/go-pretty/v6/table" "github.com/spf13/cobra" diff --git a/cmd/backup/team.go b/cli/backup/team.go similarity index 99% rename from cmd/backup/team.go rename to cli/backup/team.go index b96e4574..c414518e 100644 --- a/cmd/backup/team.go +++ b/cli/backup/team.go @@ -3,7 +3,7 @@ package backup import ( "context" "github.com/bep/simplecobra" - "github.com/esnet/gdg/cmd/support" + "github.com/esnet/gdg/cli/support" "github.com/esnet/gdg/internal/config" api "github.com/esnet/gdg/internal/service" "github.com/esnet/grafana-swagger-api-golang/goclient/models" diff --git a/cmd/backup/users.go b/cli/backup/users.go similarity index 99% rename from cmd/backup/users.go rename to cli/backup/users.go index c30282fc..a686c38b 100644 --- a/cmd/backup/users.go +++ b/cli/backup/users.go @@ -3,7 +3,7 @@ package backup import ( "context" "github.com/bep/simplecobra" - "github.com/esnet/gdg/cmd/support" + "github.com/esnet/gdg/cli/support" "github.com/esnet/gdg/internal/config" "github.com/esnet/gdg/internal/service" "github.com/jedib0t/go-pretty/v6/table" diff --git a/cmd/commandeer.go b/cli/commandeer.go similarity index 66% rename from cmd/commandeer.go rename to cli/commandeer.go index a84ac087..2b8543af 100644 --- a/cmd/commandeer.go +++ b/cli/commandeer.go @@ -1,16 +1,22 @@ -package cmd +package cli import ( "context" "github.com/bep/simplecobra" - "github.com/esnet/gdg/cmd/backup" - "github.com/esnet/gdg/cmd/support" - "github.com/esnet/gdg/cmd/tools" + "github.com/esnet/gdg/cli/backup" + "github.com/esnet/gdg/cli/support" + "github.com/esnet/gdg/cli/tools" + assets "github.com/esnet/gdg/config" + "log/slog" ) // Execute executes a command. func Execute(defaultCfg string, args []string, options ...support.RootOption) error { - support.DefaultConfig = defaultCfg + data, err := assets.Assets.ReadFile(defaultCfg) + if err != nil { + slog.Info("unable to find load default configuration", "err", err) + } + support.DefaultConfig = string(data) rootCmd := support.NewRootCmd(getNewRootCmd(), options...) x, err := simplecobra.New(rootCmd) if err != nil { diff --git a/cmd/context.go b/cli/context.go similarity index 99% rename from cmd/context.go rename to cli/context.go index 35061708..fba3f337 100644 --- a/cmd/context.go +++ b/cli/context.go @@ -1,11 +1,11 @@ -package cmd +package cli import ( "context" "errors" "fmt" "github.com/bep/simplecobra" - "github.com/esnet/gdg/cmd/support" + "github.com/esnet/gdg/cli/support" "github.com/esnet/gdg/internal/config" "github.com/jedib0t/go-pretty/v6/table" "log/slog" diff --git a/cmd/support/root.go b/cli/support/root.go similarity index 100% rename from cmd/support/root.go rename to cli/support/root.go diff --git a/cmd/support/simple.go b/cli/support/simple.go similarity index 100% rename from cmd/support/simple.go rename to cli/support/simple.go diff --git a/cmd/test/conections_test.go b/cli/test/conections_test.go similarity index 82% rename from cmd/test/conections_test.go rename to cli/test/conections_test.go index a12ddf00..85251a0b 100644 --- a/cmd/test/conections_test.go +++ b/cli/test/conections_test.go @@ -1,15 +1,14 @@ package test import ( - "github.com/esnet/gdg/cmd" - "github.com/esnet/gdg/cmd/support" + "github.com/esnet/gdg/cli" + "github.com/esnet/gdg/cli/support" "github.com/esnet/gdg/internal/service" "github.com/esnet/gdg/internal/service/mocks" "github.com/esnet/grafana-swagger-api-golang/goclient/models" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" "io" - "os" "strings" "testing" ) @@ -38,10 +37,8 @@ func TestConnectionCommand(t *testing.T) { } } r, w, cleanup := InterceptStdout() - data, err := os.ReadFile("../../config/testing.yml") - assert.Nil(t, err) - err = cmd.Execute(string(data), []string{"backup", "connections", "list"}, optionMockSvc()) + err := cli.Execute("testing.yml", []string{"backup", "connections", "list"}, optionMockSvc()) assert.Nil(t, err) defer cleanup() w.Close() diff --git a/cmd/test/devel_test.go b/cli/test/devel_test.go similarity index 90% rename from cmd/test/devel_test.go rename to cli/test/devel_test.go index a5a6d8fd..b953dc4a 100644 --- a/cmd/test/devel_test.go +++ b/cli/test/devel_test.go @@ -1,8 +1,8 @@ package test import ( - "github.com/esnet/gdg/cmd" - "github.com/esnet/gdg/cmd/support" + "github.com/esnet/gdg/cli" + "github.com/esnet/gdg/cli/support" "github.com/esnet/gdg/internal/service/mocks" "github.com/stretchr/testify/assert" "strings" @@ -17,7 +17,7 @@ func TestDevelSrvInfo(t *testing.T) { expected["Version"] = "version" mock.On("GetServerInfo").Return(expected) - err := cmd.Execute(string(data), []string{"tools", "devel", "srvinfo"}, optionMockSvc()) + err := cli.Execute(string(data), []string{"tools", "devel", "srvinfo"}, optionMockSvc()) return err } outStr, closeReader := setupAndExecuteMockingServices(t, execMe) @@ -31,7 +31,7 @@ func TestDevelSrvInfo(t *testing.T) { func TestDevelSrvCompletion(t *testing.T) { fn := func(args []string) func(mock *mocks.GrafanaService, data []byte, optionMockSvc func() support.RootOption) error { return func(mock *mocks.GrafanaService, data []byte, optionMockSvc func() support.RootOption) error { - err := cmd.Execute(string(data), args, optionMockSvc()) + err := cli.Execute(string(data), args, optionMockSvc()) return err } } diff --git a/cmd/test/support.go b/cli/test/support.go similarity index 98% rename from cmd/test/support.go rename to cli/test/support.go index 5fda9c55..55311d9b 100644 --- a/cmd/test/support.go +++ b/cli/test/support.go @@ -1,7 +1,7 @@ package test import ( - "github.com/esnet/gdg/cmd/support" + "github.com/esnet/gdg/cli/support" "github.com/esnet/gdg/internal/config" applog "github.com/esnet/gdg/internal/log" "github.com/esnet/gdg/internal/service" diff --git a/cmd/test/version_test.go b/cli/test/version_test.go similarity index 87% rename from cmd/test/version_test.go rename to cli/test/version_test.go index 54e82d64..4d0b5a92 100644 --- a/cmd/test/version_test.go +++ b/cli/test/version_test.go @@ -2,8 +2,8 @@ package test import ( "fmt" - "github.com/esnet/gdg/cmd" - "github.com/esnet/gdg/cmd/support" + "github.com/esnet/gdg/cli" + "github.com/esnet/gdg/cli/support" "github.com/esnet/gdg/internal/service" "github.com/esnet/gdg/internal/service/mocks" "github.com/esnet/gdg/internal/version" @@ -15,7 +15,7 @@ import ( func TestVersionCommand(t *testing.T) { var execMe = func(mock *mocks.GrafanaService, data []byte, optionMockSvc func() support.RootOption) error { - err := cmd.Execute(string(data), []string{"version"}, optionMockSvc()) + err := cli.Execute(string(data), []string{"version"}, optionMockSvc()) return err } outStr, closeReader := setupAndExecuteMockingServices(t, execMe) @@ -46,7 +46,7 @@ func TestVersionErrCommand(t *testing.T) { data, err := os.ReadFile("../../config/testing.yml") assert.Nil(t, err) - err = cmd.Execute(string(data), []string{"dumb", "dumb"}, optionMockSvc()) + err = cli.Execute(string(data), []string{"dumb", "dumb"}, optionMockSvc()) assert.NotNil(t, err) assert.Equal(t, err.Error(), `command error: unknown command "dumb" for "gdg"`) } diff --git a/cmd/tools/auth.go b/cli/tools/auth.go similarity index 93% rename from cmd/tools/auth.go rename to cli/tools/auth.go index 9c5b948b..ae873ebe 100644 --- a/cmd/tools/auth.go +++ b/cli/tools/auth.go @@ -3,7 +3,7 @@ package tools import ( "context" "github.com/bep/simplecobra" - "github.com/esnet/gdg/cmd/support" + "github.com/esnet/gdg/cli/support" ) func newAuthCmd() simplecobra.Commander { diff --git a/cmd/tools/auth_service_accounts.go b/cli/tools/auth_service_accounts.go similarity index 99% rename from cmd/tools/auth_service_accounts.go rename to cli/tools/auth_service_accounts.go index 568dc59d..0e909521 100644 --- a/cmd/tools/auth_service_accounts.go +++ b/cli/tools/auth_service_accounts.go @@ -4,7 +4,7 @@ import ( "context" "errors" "github.com/bep/simplecobra" - "github.com/esnet/gdg/cmd/support" + "github.com/esnet/gdg/cli/support" "github.com/esnet/gdg/internal/config" "github.com/jedib0t/go-pretty/v6/table" "log" diff --git a/cmd/tools/auth_tokens.go b/cli/tools/auth_tokens.go similarity index 99% rename from cmd/tools/auth_tokens.go rename to cli/tools/auth_tokens.go index d7038f81..5883b93e 100644 --- a/cmd/tools/auth_tokens.go +++ b/cli/tools/auth_tokens.go @@ -4,7 +4,7 @@ import ( "context" "errors" "github.com/bep/simplecobra" - "github.com/esnet/gdg/cmd/support" + "github.com/esnet/gdg/cli/support" "github.com/esnet/gdg/internal/config" "github.com/jedib0t/go-pretty/v6/table" "github.com/spf13/cobra" diff --git a/cmd/tools/devel.go b/cli/tools/devel.go similarity index 98% rename from cmd/tools/devel.go rename to cli/tools/devel.go index 95053cc5..b2749344 100644 --- a/cmd/tools/devel.go +++ b/cli/tools/devel.go @@ -3,7 +3,7 @@ package tools import ( "context" "github.com/bep/simplecobra" - "github.com/esnet/gdg/cmd/support" + "github.com/esnet/gdg/cli/support" "github.com/spf13/cobra" "log/slog" "os" diff --git a/cmd/tools/organizations.go b/cli/tools/organizations.go similarity index 99% rename from cmd/tools/organizations.go rename to cli/tools/organizations.go index 96b56c64..32dd24e3 100644 --- a/cmd/tools/organizations.go +++ b/cli/tools/organizations.go @@ -5,7 +5,7 @@ import ( "errors" "fmt" "github.com/bep/simplecobra" - "github.com/esnet/gdg/cmd/support" + "github.com/esnet/gdg/cli/support" "github.com/esnet/gdg/internal/config" "github.com/jedib0t/go-pretty/v6/table" "github.com/spf13/cobra" diff --git a/cmd/tools/tools.go b/cli/tools/tools.go similarity index 95% rename from cmd/tools/tools.go rename to cli/tools/tools.go index 0db633bb..1c046e63 100644 --- a/cmd/tools/tools.go +++ b/cli/tools/tools.go @@ -3,7 +3,7 @@ package tools import ( "context" "github.com/bep/simplecobra" - "github.com/esnet/gdg/cmd/support" + "github.com/esnet/gdg/cli/support" "github.com/spf13/cobra" ) diff --git a/cmd/tools/users.go b/cli/tools/users.go similarity index 98% rename from cmd/tools/users.go rename to cli/tools/users.go index 932db809..cb1428dc 100644 --- a/cmd/tools/users.go +++ b/cli/tools/users.go @@ -3,7 +3,7 @@ package tools import ( "context" "github.com/bep/simplecobra" - "github.com/esnet/gdg/cmd/support" + "github.com/esnet/gdg/cli/support" "github.com/esnet/gdg/internal/config" "github.com/spf13/cobra" "log/slog" diff --git a/cmd/version.go b/cli/version.go similarity index 95% rename from cmd/version.go rename to cli/version.go index bdfc8804..75cbf29a 100644 --- a/cmd/version.go +++ b/cli/version.go @@ -1,10 +1,10 @@ -package cmd +package cli import ( "context" "fmt" "github.com/bep/simplecobra" - "github.com/esnet/gdg/cmd/support" + "github.com/esnet/gdg/cli/support" "github.com/esnet/gdg/internal/version" "github.com/spf13/cobra" "os" diff --git a/config/assets.go b/config/assets.go new file mode 100644 index 00000000..2b851ecd --- /dev/null +++ b/config/assets.go @@ -0,0 +1,6 @@ +package config + +import "embed" + +//go:embed * +var Assets embed.FS diff --git a/docker/Dockerfile b/docker/Dockerfile index 0da58c3b..4bbc3ea9 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,46 +1,8 @@ -# Build Stage -FROM golang:1.21.3 AS build-stage - -LABEL app="build-gdg" -LABEL REPO="https://github.com/esnet/gdg" - -ENV PROJPATH=/go/src/github.com/esnet/gdg - -# Because of https://github.com/docker/docker/issues/14914 -ENV PATH=$PATH:$GOROOT/bin:$GOPATH/bin - -ADD . /go/src/github.com/esnet/gdg -WORKDIR /go/src/github.com/esnet/gdg - -RUN make build-alpine - -# Final Stage -FROM golang:1.21.3 - -ARG GIT_COMMIT -ARG VERSION -LABEL REPO="https://github.com/esnet/gdg" -LABEL GIT_COMMIT=$GIT_COMMIT -LABEL VERSION=$VERSION - -# Because of https://github.com/docker/docker/issues/14914 -ENV PATH=$PATH:/opt/gdg/bin - -WORKDIR /opt/gdg/bin - -COPY --from=build-stage /go/src/github.com/esnet/gdg/bin/gdg /opt/gdg/bin/ -RUN \ - apt-get update && \ - apt install -y dumb-init && \ - apt-get clean autoclean && \ - apt-get autoremove --yes && \ - rm -rf /var/lib/{apt,dpkg,cache,log}/ && \ - chmod +x /opt/gdg/bin/gdg - -# Create appuser -RUN useradd -m gdg -USER gdg - -ENTRYPOINT ["/usr/bin/dumb-init", "--"] - -CMD ["/opt/gdg/bin/gdg"] +FROM alpine:latest +RUN mkdir /app +COPY gdg /app/gdg +VOLUME /app/conf +VOLUME /app/exports + +WORKDIR /app +ENTRYPOINT ["/app/gdg"] diff --git a/docker/Dockerfile-gorelease b/docker/Dockerfile-gorelease deleted file mode 100644 index 4bbc3ea9..00000000 --- a/docker/Dockerfile-gorelease +++ /dev/null @@ -1,8 +0,0 @@ -FROM alpine:latest -RUN mkdir /app -COPY gdg /app/gdg -VOLUME /app/conf -VOLUME /app/exports - -WORKDIR /app -ENTRYPOINT ["/app/gdg"] diff --git a/go.mod b/go.mod index b6bd348c..cc31a8a9 100644 --- a/go.mod +++ b/go.mod @@ -1,10 +1,10 @@ module github.com/esnet/gdg -go 1.21.3 +go 1.21.4 require ( github.com/AlecAivazis/survey/v2 v2.3.7 - github.com/aws/aws-sdk-go v1.47.3 + github.com/aws/aws-sdk-go v1.47.10 github.com/bep/simplecobra v0.3.2 github.com/carlmjohnson/requests v0.23.5 github.com/esnet/grafana-swagger-api-golang v0.0.0-20230904013855-9a47b55d30d3 @@ -23,7 +23,7 @@ require ( github.com/tidwall/gjson v1.17.0 github.com/tidwall/pretty v1.2.1 gocloud.dev v0.34.0 - golang.org/x/exp v0.0.0-20231006140011-7918f672742d + golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa gopkg.in/yaml.v3 v3.0.1 ) @@ -32,8 +32,8 @@ require ( cloud.google.com/go/compute v1.23.3 // indirect cloud.google.com/go/compute/metadata v0.2.3 // indirect cloud.google.com/go/iam v1.1.5 // indirect - cloud.google.com/go/storage v1.34.1 // indirect - github.com/Azure/azure-sdk-for-go/sdk/azcore v1.8.0 // indirect + cloud.google.com/go/storage v1.35.1 // indirect + github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.4.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.2.0 // indirect @@ -44,24 +44,24 @@ require ( github.com/Microsoft/go-winio v0.6.0 // indirect github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 // indirect github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect - github.com/aws/aws-sdk-go-v2 v1.22.1 // indirect + github.com/aws/aws-sdk-go-v2 v1.22.2 // indirect github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.0 // indirect - github.com/aws/aws-sdk-go-v2/config v1.22.0 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.15.1 // indirect - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.2 // indirect - github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.13.1 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.1 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.1 // indirect - github.com/aws/aws-sdk-go-v2/internal/ini v1.5.0 // indirect - github.com/aws/aws-sdk-go-v2/internal/v4a v1.2.1 // indirect + github.com/aws/aws-sdk-go-v2/config v1.24.0 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.15.2 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.3 // indirect + github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.13.6 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.2 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.2 // indirect + github.com/aws/aws-sdk-go-v2/internal/ini v1.7.0 // indirect + github.com/aws/aws-sdk-go-v2/internal/v4a v1.2.2 // indirect github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.0 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.2.1 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.1 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.1 // indirect - github.com/aws/aws-sdk-go-v2/service/s3 v1.42.0 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.17.0 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.19.0 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.25.0 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.2.2 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.2 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.2 // indirect + github.com/aws/aws-sdk-go-v2/service/s3 v1.42.1 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.17.1 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.19.1 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.25.1 // indirect github.com/aws/smithy-go v1.16.0 // indirect github.com/cenkalti/backoff/v4 v4.1.3 // indirect github.com/containerd/continuity v0.3.0 // indirect @@ -84,7 +84,7 @@ require ( github.com/go-openapi/swag v0.22.4 // indirect github.com/go-openapi/validate v0.22.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang-jwt/jwt/v5 v5.0.0 // indirect + github.com/golang-jwt/jwt/v5 v5.1.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/google/s2a-go v0.1.7 // indirect @@ -131,27 +131,28 @@ require ( github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xeipuuv/gojsonschema v1.2.0 // indirect - go.mongodb.org/mongo-driver v1.12.1 // indirect + go.mongodb.org/mongo-driver v1.13.0 // indirect go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/otel v1.19.0 // indirect - go.opentelemetry.io/otel/metric v1.19.0 // indirect - go.opentelemetry.io/otel/trace v1.19.0 // indirect + go.opentelemetry.io/otel v1.20.0 // indirect + go.opentelemetry.io/otel/metric v1.20.0 // indirect + go.opentelemetry.io/otel/trace v1.20.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/crypto v0.14.0 // indirect - golang.org/x/mod v0.13.0 // indirect - golang.org/x/net v0.17.0 // indirect - golang.org/x/oauth2 v0.13.0 // indirect + golang.org/x/crypto v0.15.0 // indirect + golang.org/x/mod v0.14.0 // indirect + golang.org/x/net v0.18.0 // indirect + golang.org/x/oauth2 v0.14.0 // indirect golang.org/x/sync v0.5.0 // indirect golang.org/x/sys v0.14.0 // indirect - golang.org/x/term v0.13.0 // indirect + golang.org/x/term v0.14.0 // indirect golang.org/x/text v0.14.0 // indirect - golang.org/x/tools v0.14.0 // indirect + golang.org/x/time v0.4.0 // indirect + golang.org/x/tools v0.15.0 // indirect golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect - google.golang.org/api v0.149.0 // indirect + google.golang.org/api v0.150.0 // indirect google.golang.org/appengine v1.6.8 // indirect - google.golang.org/genproto v0.0.0-20231030173426-d783a09b4405 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20231030173426-d783a09b4405 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405 // indirect + google.golang.org/genproto v0.0.0-20231106174013-bbf56f31fb17 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17 // indirect google.golang.org/grpc v1.59.0 // indirect google.golang.org/protobuf v1.31.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect diff --git a/go.sum b/go.sum index a9ebed55..a7429bbd 100644 --- a/go.sum +++ b/go.sum @@ -45,11 +45,15 @@ cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9 cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= cloud.google.com/go/storage v1.34.1 h1:H2Af2dU5J0PF7A5B+ECFIce+RqxVnrVilO+cu0TS3MI= cloud.google.com/go/storage v1.34.1/go.mod h1:VN1ElqqvR9adg1k9xlkUJ55cMOP1/QjnNNuT5xQL6dY= +cloud.google.com/go/storage v1.35.1 h1:B59ahL//eDfx2IIKFBeT5Atm9wnNmj3+8xG/W4WB//w= +cloud.google.com/go/storage v1.35.1/go.mod h1:M6M/3V/D3KpzMTJyPOR/HU6n2Si5QdaXYEsng2xgOs8= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/AlecAivazis/survey/v2 v2.3.7 h1:6I/u8FvytdGsgonrYsVn2t8t4QiRnh6QSTqkkhIiSjQ= github.com/AlecAivazis/survey/v2 v2.3.7/go.mod h1:xUTIdE4KCOIjsBAE1JYsUPoCqYdZ1reCfTwbto0Fduo= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.8.0 h1:9kDVnTz3vbfweTqAUmk/a/pH5pWFCHtvRpHYC0G/dcA= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.8.0/go.mod h1:3Ug6Qzto9anB6mGlEdgYMDF5zHQ+wwhEaYR4s17PHMw= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.0 h1:fb8kj/Dh4CSwgsOzHeZY4Xh68cFVbzXx+ONXGMY//4w= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.0/go.mod h1:uReU2sSxZExRPBAg3qKzmAucSi51+SP1OhohieR821Q= github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.4.0 h1:BMAjVKJM0U/CYF27gA0ZMmXGkOcvfFtD0oHVZ1TIPRI= github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.4.0/go.mod h1:1fXstnBMas5kzG+S3q8UoJcmyU6nUeunJcMDHcRYHhs= github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.0 h1:d81/ng9rET2YqdVkVwkb6EXeRrLJIwyGnJcAlAWKwhs= @@ -81,42 +85,76 @@ github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3d github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= github.com/aws/aws-sdk-go v1.47.3 h1:e0H6NFXiniCpR8Lu3lTphVdRaeRCDLAeRyTHd1tJSd8= github.com/aws/aws-sdk-go v1.47.3/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= +github.com/aws/aws-sdk-go v1.47.10 h1:cvufN7WkD1nlOgpRopsmxKQlFp5X1MfyAw4r7BBORQc= +github.com/aws/aws-sdk-go v1.47.10/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= github.com/aws/aws-sdk-go-v2 v1.22.1 h1:sjnni/AuoTXxHitsIdT0FwmqUuNUuHtufcVDErVFT9U= github.com/aws/aws-sdk-go-v2 v1.22.1/go.mod h1:Kd0OJtkW3Q0M0lUWGszapWjEvrXDzRW+D21JNsroB+c= +github.com/aws/aws-sdk-go-v2 v1.22.2 h1:lV0U8fnhAnPz8YcdmZVV60+tr6CakHzqA6P8T46ExJI= +github.com/aws/aws-sdk-go-v2 v1.22.2/go.mod h1:Kd0OJtkW3Q0M0lUWGszapWjEvrXDzRW+D21JNsroB+c= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.0 h1:hHgLiIrTRtddC0AKcJr5s7i/hLgcpTt+q/FKxf1Zayk= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.0/go.mod h1:w4I/v3NOWgD+qvs1NPEwhd++1h3XPHFaVxasfY6HlYQ= github.com/aws/aws-sdk-go-v2/config v1.22.0 h1:9Mm99OalzZRz0ab5fpodMoHBApHS6pqRNp3M9NmzvDg= github.com/aws/aws-sdk-go-v2/config v1.22.0/go.mod h1:2eWgw5lps8fKI7LZVTrRTYP6HE6k/uEFUuTSHfXwqP0= +github.com/aws/aws-sdk-go-v2/config v1.24.0 h1:4LEk29JO3w+y9dEo/5Tq5QTP7uIEw+KQrKiHOs4xlu4= +github.com/aws/aws-sdk-go-v2/config v1.24.0/go.mod h1:11nNDAuK86kOUHeuEQo8f3CkcV5xuUxvPwFjTZE/PnQ= github.com/aws/aws-sdk-go-v2/credentials v1.15.1 h1:hmf6lAm9hk7uLCfapZn/jL05lm6Uwdbn1B0fgjyuf4M= github.com/aws/aws-sdk-go-v2/credentials v1.15.1/go.mod h1:QTcHga3ZbQOneJuxmGBOCxiClxmp+TlvmjFexAnJ790= +github.com/aws/aws-sdk-go-v2/credentials v1.15.2 h1:rKH7khRMxPdD0u3dHecd0Q7NOVw3EUe7AqdkUOkiOGI= +github.com/aws/aws-sdk-go-v2/credentials v1.15.2/go.mod h1:tXM8wmaeAhfC7nZoCxb0FzM/aRaB1m1WQ7x0qlBLq80= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.2 h1:gIeH4+o1MN/caGBWjoGQTUTIu94xD6fI5B2+TcwBf70= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.2/go.mod h1:wLyMIo/zPOhQhPXTddpfdkSleyigtFi8iMnC+2m/SK4= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.3 h1:G5KawTAkyHH6WyKQCdHiW4h3PmAXNJpOgwKg3H7sDRE= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.3/go.mod h1:hugKmSFnZB+HgNI1sYGT14BUPZkO6alC/e0AWu+0IAQ= github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.13.1 h1:ULswbgGNVrW8zEhkCNwrwXrs1mUvy2JTqWaCRsD2ZZw= github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.13.1/go.mod h1:pAXgsDPk1rRwwfkz8/9ISO75vXEHqTGIgbLhGqqQ1GY= +github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.13.6 h1:IpQbitxCZeC64C1ALz9QZu6AHHWundnU2evQ9xbp5k8= +github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.13.6/go.mod h1:27jIVQK+al9s0yTo3pkMdahRinbscqSC6zNGfNWXPZc= github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.1 h1:fi1ga6WysOyYb5PAf3Exd6B5GiSNpnZim4h1rhlBqx0= github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.1/go.mod h1:V5CY8wNurvPUibTi9mwqUqpiFZ5LnioKWIFUDtIzdI8= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.2 h1:AaQsr5vvGR7rmeSWBtTCcw16tT9r51mWijuCQhzLnq8= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.2/go.mod h1:o1IiRn7CWocIFTXJjGKJDOwxv1ibL53NpcvcqGWyRBA= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.1 h1:ZpaV/j48RlPc4AmOZuPv22pJliXjXq8/reL63YzyFnw= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.1/go.mod h1:R8aXraabD2e3qv1csxM14/X9WF4wFMIY0kH4YEtYD5M= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.2 h1:UZx8SXZ0YtzRiALzYAWcjb9Y9hZUR7MBKaBQ5ouOjPs= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.2/go.mod h1:ipuRpcSaklmxR6C39G187TpBAO132gUfleTGccUPs8c= github.com/aws/aws-sdk-go-v2/internal/ini v1.5.0 h1:DqOQvIfmGkXZUVJnl9VRk0AnxyS59tCtX9k1Pyss4Ak= github.com/aws/aws-sdk-go-v2/internal/ini v1.5.0/go.mod h1:VV/Kbw9Mg1GWJOT9WK+oTL3cWZiXtapnNvDSRqTZLsg= +github.com/aws/aws-sdk-go-v2/internal/ini v1.7.0 h1:usgqiJtamuGIBj+OvYmMq89+Z1hIKkMJToz1WpoeNUY= +github.com/aws/aws-sdk-go-v2/internal/ini v1.7.0/go.mod h1:6fQQgfuGmw8Al/3M2IgIllycxV7ZW7WCdVSqfBeUiCY= github.com/aws/aws-sdk-go-v2/internal/v4a v1.2.1 h1:vzYLDkwTw4CY0vUk84MeSufRf8XIsC/GsoIFXD60sTg= github.com/aws/aws-sdk-go-v2/internal/v4a v1.2.1/go.mod h1:ToBFBnjeGR2ruMx8IWp/y7vSK3Irj5/oPwifruiqoOM= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.2.2 h1:pyVrNAf7Hwz0u39dLKN5t+n0+K/3rMYKuiOoIum3AsU= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.2.2/go.mod h1:mydrfOb9uiOYCxuCPR8YHQNQyGQwUQ7gPMZGBKbH8NY= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.0 h1:CJxo7ZBbaIzmXfV3hjcx36n9V87gJsIUPJflwqEHl3Q= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.0/go.mod h1:yjVfjuY4nD1EW9i387Kau+I6V5cBA5YnC/mWNopjZrI= github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.2.1 h1:15FUCJzAP9Y25nioTqTrGlZmhOtthaXBWlt4pS+d3Xo= github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.2.1/go.mod h1:5655NW53Un6l7JzkI6AA3rZvf0m532cSnLThA1fVXcA= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.2.2 h1:f2LhPofnjcdOQKRtumKjMvIHkfSQ8aH/rwKUDEQ/SB4= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.2.2/go.mod h1:q+xX0H4OfuWDuBy7y/LDi4v8IBOWuF+vtp8Z6ex+lw4= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.1 h1:2OXw3ppu1XsB6rqKEMV4tnecTjIY3PRV2U6IP6KPJQo= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.1/go.mod h1:FZB4AdakIqW/yERVdGJA6Z9jraax1beXfhBBnK2wwR8= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.2 h1:h7j73yuAVVjic8pqswh+L/7r2IHP43QwRyOu6zcCDDE= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.2/go.mod h1:H07AHdK5LSy8F7EJUQhoxyiCNkePoHj2D8P2yGTWafo= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.1 h1:dnl0klXYX9EKpzZbWlH5LJL+YTcEZcJEMPFFr/rAHUQ= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.1/go.mod h1:Mfk/9Joso4tCQYzM4q4HRUIqwln8lnIIMB/OE8Zebdc= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.2 h1:gbIaOzpXixUpoPK+js/bCBK1QBDXM22SigsnzGZio0U= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.2/go.mod h1:p+S7RNbdGN8qgHDSg2SCQJ9FeMAmvcETQiVpeGhYnNM= github.com/aws/aws-sdk-go-v2/service/s3 v1.42.0 h1:u0YoSrxjr3Lm+IqIlRAV+4YTFwkXjyB9db9CfUFge2w= github.com/aws/aws-sdk-go-v2/service/s3 v1.42.0/go.mod h1:98EIdRu+BNsdqITsXfy+57TZfwlUQC9aDn9a9qoo90U= +github.com/aws/aws-sdk-go-v2/service/s3 v1.42.1 h1:o6MCcX1rJW8Y3g+hvg2xpjF6JR6DftuYhfl3Nc1WV9Q= +github.com/aws/aws-sdk-go-v2/service/s3 v1.42.1/go.mod h1:UDtxEWbREX6y4KREapT+jjtjoH0TiVSS6f5nfaY1UaM= github.com/aws/aws-sdk-go-v2/service/sso v1.17.0 h1:I/Oh3IxGPfHXiGnwM54TD6hNr/8TlUrBXAtTyGhR+zw= github.com/aws/aws-sdk-go-v2/service/sso v1.17.0/go.mod h1:H6NCMvDBqA+CvIaXzaSqM6LWtzv9BzZrqBOqz+PzRF8= +github.com/aws/aws-sdk-go-v2/service/sso v1.17.1 h1:km+ZNjtLtpXYf42RdaDZnNHm9s7SYAuDGTafy6nd89A= +github.com/aws/aws-sdk-go-v2/service/sso v1.17.1/go.mod h1:aHBr3pvBSD5MbzOvQtYutyPLLRPbl/y9x86XyJJnUXQ= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.19.0 h1:irbXQkfVYIRaewYSXcu4yVk0m2T+JzZd0dkop7FjmO0= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.19.0/go.mod h1:4wPNCkM22+oRe71oydP66K50ojDUC33XutSMi2pEF/M= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.19.1 h1:iRFNqZH4a67IqPvK8xxtyQYnyrlsvwmpHOe9r55ggBA= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.19.1/go.mod h1:pTy5WM+6sNv2tB24JNKFtn6EvciQ5k40ZJ0pq/Iaxj0= github.com/aws/aws-sdk-go-v2/service/sts v1.25.0 h1:sYIFy8tm1xQwRvVQ4CRuBGXKIg9sHNuG6+3UAQuoujk= github.com/aws/aws-sdk-go-v2/service/sts v1.25.0/go.mod h1:S/LOQUeYDfJeJpFCIJDMjy7dwL4aA33HUdVi+i7uH8k= +github.com/aws/aws-sdk-go-v2/service/sts v1.25.1 h1:txgVXIXWPXyqdiVn92BV6a/rgtpX31HYdsOYj0sVQQQ= +github.com/aws/aws-sdk-go-v2/service/sts v1.25.1/go.mod h1:VAiJiNaoP1L89STFlEMgmHX1bKixY+FaP+TpRFrmyZ4= github.com/aws/smithy-go v1.16.0 h1:gJZEH/Fqh+RsvlJ1Zt4tVAtV6bKkp3cC+R6FCZMNzik= github.com/aws/smithy-go v1.16.0/go.mod h1:NukqUGpCZIILqqiV0NIjeFh24kd/FAa4beRb6nbIUPE= github.com/bep/simplecobra v0.3.2 h1:dVcflWm7l31zxV8QUrJqQ/de/satzqY8ukq0aL0pZDE= @@ -257,6 +295,8 @@ github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang-jwt/jwt/v5 v5.0.0 h1:1n1XNM9hk7O9mnQoNBGolZvzebBQ7p93ULHRc28XJUE= github.com/golang-jwt/jwt/v5 v5.0.0/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= +github.com/golang-jwt/jwt/v5 v5.1.0 h1:UGKbA/IPjtS6zLcdB7i5TyACMgSbOTiR8qzXgw8HWQU= +github.com/golang-jwt/jwt/v5 v5.1.0/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -554,6 +594,8 @@ go.mongodb.org/mongo-driver v1.7.5/go.mod h1:VXEWRZ6URJIkUq2SCAyapmhH0ZLRBP+FT4x go.mongodb.org/mongo-driver v1.10.0/go.mod h1:wsihk0Kdgv8Kqu1Anit4sfK+22vSFbUrAVEYRhCXrA8= go.mongodb.org/mongo-driver v1.12.1 h1:nLkghSU8fQNaK7oUmDhQFsnrtcoNy7Z6LVFKsEecqgE= go.mongodb.org/mongo-driver v1.12.1/go.mod h1:/rGBTebI3XYboVmgz+Wv3Bcbl3aD0QF9zl6kDDw18rQ= +go.mongodb.org/mongo-driver v1.13.0 h1:67DgFFjYOCMWdtTEmKFpV3ffWlFnh+CYZ8ZS/tXWUfY= +go.mongodb.org/mongo-driver v1.13.0/go.mod h1:/rGBTebI3XYboVmgz+Wv3Bcbl3aD0QF9zl6kDDw18rQ= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= @@ -564,12 +606,18 @@ go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= go.opentelemetry.io/otel v1.19.0 h1:MuS/TNf4/j4IXsZuJegVzI1cwut7Qc00344rgH7p8bs= go.opentelemetry.io/otel v1.19.0/go.mod h1:i0QyjOq3UPoTzff0PJB2N66fb4S0+rSbSB15/oyH9fY= +go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= +go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= go.opentelemetry.io/otel/metric v1.19.0 h1:aTzpGtV0ar9wlV4Sna9sdJyII5jTVJEvKETPiOKwvpE= go.opentelemetry.io/otel/metric v1.19.0/go.mod h1:L5rUsV9kM1IxCj1MmSdS+JQAcVm319EUrDVLrt7jqt8= +go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= +go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= go.opentelemetry.io/otel/sdk v1.14.0 h1:PDCppFRDq8A1jL9v6KMI6dYesaq+DFcDZvjsoGvxGzY= go.opentelemetry.io/otel/sdk v1.14.0/go.mod h1:bwIC5TjrNG6QDCHNWvW4HLHtUQ4I+VQDsnjhvyZCALM= go.opentelemetry.io/otel/trace v1.19.0 h1:DFVQmlVbfVeOuBRrwdtaehRrWiL1JoVs9CPIQ1Dzxpg= go.opentelemetry.io/otel/trace v1.19.0/go.mod h1:mfaSyvGyEJEI0nyV2I4qhNQnbBOUUmYZpYojqMnX2vo= +go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= +go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= gocloud.dev v0.34.0 h1:LzlQY+4l2cMtuNfwT2ht4+fiXwWf/NmPTnXUlLmGif4= @@ -588,6 +636,8 @@ golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0 golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= +golang.org/x/crypto v0.15.0 h1:frVn1TEaCEaZcn3Tmd7Y2b5KKPaZ+I32Q2OA3kYp5TA= +golang.org/x/crypto v0.15.0/go.mod h1:4ChreQoLWfG3xLDer1WdlH5NdlQ3+mwnQq1YTKY+72g= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -600,6 +650,8 @@ golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EH golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20231006140011-7918f672742d h1:jtJma62tbqLibJ5sFQz8bKtEM8rJBtfilJ2qTU199MI= golang.org/x/exp v0.0.0-20231006140011-7918f672742d/go.mod h1:ldy0pHrwJyGW56pPQzzkH36rKxoZW1tw7ZJpeKx+hdo= +golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa h1:FRnLl4eNAQl8hwxVVC17teOw8kdjVDVAiFMtgUdTSRQ= +golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa/go.mod h1:zk2irFbV9DP96SEBUUAy67IdHUaZuSnrz1n472HUCLE= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -626,6 +678,7 @@ golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.13.0 h1:I/DsJXRlw/8l/0c24sM9yb0T4z9liZTduXvdAWYiysY= golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -663,6 +716,8 @@ golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= +golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= +golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -674,6 +729,8 @@ golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.13.0 h1:jDDenyj+WgFtmV3zYVoi8aE2BwtXFLWOA67ZfNWftiY= golang.org/x/oauth2 v0.13.0/go.mod h1:/JMhi4ZRXAf4HG9LiNmxvk+45+96RUlVThiH8FzNBn0= +golang.org/x/oauth2 v0.14.0 h1:P0Vrf/2538nmC0H+pEQ3MNFRRnVR7RlqyVw+bvm26z0= +golang.org/x/oauth2 v0.14.0/go.mod h1:lAtNWgaWfL4cm7j2OV8TxGi9Qb7ECORx8DktCY74OwM= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -751,6 +808,8 @@ golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9sn golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= +golang.org/x/term v0.14.0 h1:LGK9IlZ8T9jvdy6cTdfKUCltatMFOehAQo9SRC46UQ8= +golang.org/x/term v0.14.0/go.mod h1:TySc+nGkYR6qt8km8wUhuFRTVSMIX3XPR58y2lC8vww= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -768,6 +827,8 @@ golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.4.0 h1:Z81tqI5ddIoXDPvVQ7/7CC9TnLM7ubaFG2qXYd5BbYY= +golang.org/x/time v0.4.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= @@ -826,6 +887,7 @@ golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.14.0 h1:jvNa2pY0M4r62jkRQ6RwEZZyPcymeL9XZMLBbV7U2nc= golang.org/x/tools v0.14.0/go.mod h1:uYBEerGOWcJyEORxN+Ek8+TT266gXkNlHdJBwexUsBg= +golang.org/x/tools v0.15.0/go.mod h1:hpksKq4dtpQWS1uQ61JkdqWM3LscIS6Slf+VVkm+wQk= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -853,6 +915,8 @@ google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34q google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= google.golang.org/api v0.149.0 h1:b2CqT6kG+zqJIVKRQ3ELJVLN1PwHZ6DJ3dW8yl82rgY= google.golang.org/api v0.149.0/go.mod h1:Mwn1B7JTXrzXtnvmzQE2BD6bYZQ8DShKZDZbeN9I7qI= +google.golang.org/api v0.150.0 h1:Z9k22qD289SZ8gCJrk4DrWXkNjtfvKAUo/l1ma8eBYE= +google.golang.org/api v0.150.0/go.mod h1:ccy+MJ6nrYFgE3WgRx/AMXOxOmU8Q4hSa+jjibzhxcg= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -900,10 +964,16 @@ google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20231030173426-d783a09b4405 h1:I6WNifs6pF9tNdSob2W24JtyxIYjzFB9qDlpUC76q+U= google.golang.org/genproto v0.0.0-20231030173426-d783a09b4405/go.mod h1:3WDQMjmJk36UQhjQ89emUzb1mdaHcPeeAh4SCBKznB4= +google.golang.org/genproto v0.0.0-20231106174013-bbf56f31fb17 h1:wpZ8pe2x1Q3f2KyT5f8oP/fa9rHAKgFPr/HZdNuS+PQ= +google.golang.org/genproto v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:J7XzRzVy1+IPwWHZUzoD0IccYZIrXILAQpc+Qy9CMhY= google.golang.org/genproto/googleapis/api v0.0.0-20231030173426-d783a09b4405 h1:HJMDndgxest5n2y77fnErkM62iUsptE/H8p0dC2Huo4= google.golang.org/genproto/googleapis/api v0.0.0-20231030173426-d783a09b4405/go.mod h1:oT32Z4o8Zv2xPQTg0pbVaPr0MPOH6f14RgXt7zfIpwg= +google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17 h1:JpwMPBpFN3uKhdaekDpiNlImDdkUAyiJ6ez/uxGaUSo= +google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:0xJLfVdJqpAPl8tDg1ujOCGzx6LFLttXT5NhllGOXY4= google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405 h1:AB/lmRny7e2pLhFEYIbl5qkDAUt2h0ZRO4wGPhZf+ik= google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405/go.mod h1:67X1fPuzjcrkymZzZV1vvkFeTn2Rvc6lYF9MYFGCcwE= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17 h1:Jyp0Hsi0bmHXG6k9eATXoYtjd6e2UzZ1SCn/wIupY14= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:oQ5rr10WTTMvP4A36n8JpR1OrO1BEiV4f78CneXZxkA= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= diff --git a/main.go b/main.go deleted file mode 100644 index dc8e61a4..00000000 --- a/main.go +++ /dev/null @@ -1,33 +0,0 @@ -package main - -import ( - _ "embed" - "github.com/esnet/gdg/cmd" - "github.com/esnet/gdg/cmd/support" - "log" - "os" - - api "github.com/esnet/gdg/internal/service" -) - -//go:embed config/importer-example.yml -var defaultConfig string - -var ( - getGrafanaSvc = func() api.GrafanaService { - return api.NewApiService() - } -) - -func main() { - setGrafanaSvc := func() support.RootOption { - return func(response *support.RootCommand) { - response.GrafanaSvc = getGrafanaSvc - } - } - - err := cmd.Execute(defaultConfig, os.Args[1:], setGrafanaSvc()) - if err != nil { - log.Fatalf("Error: %s", err) - } -}