From cd90feb622ff629210fec3d3cf9d3f34286ce46a Mon Sep 17 00:00:00 2001 From: Abduh Date: Mon, 25 Sep 2023 12:16:06 +0700 Subject: [PATCH] fix(siren): provider plugin interface (#30) * fix: add better logging for plugins provider (#29) * feat: bump up go --- .github/workflows/e2e_test.yaml | 2 +- .github/workflows/lint.yaml | 8 +- .github/workflows/release.yaml | 2 +- .../release_cortex_provider_plugin.yaml | 2 +- .github/workflows/test.yaml | 7 +- README.md | 2 +- cli/deps.go | 10 +- core/alert/service_test.go | 20 +- core/namespace/service_test.go | 132 +- .../dispatch_receiver_service_test.go | 12 +- .../dispatch_subscriber_service_test.go | 50 +- core/notification/handler_test.go | 32 +- core/notification/message_test.go | 2 +- core/notification/service_test.go | 22 +- core/provider/service.go | 25 +- core/provider/service_test.go | 82 +- core/provider/type.go | 18 - core/receiver/service_test.go | 74 +- core/rule/service_test.go | 54 +- core/subscription/service_test.go | 42 +- core/template/service_test.go | 26 +- docs/docs/installation.md | 2 +- go.mod | 2 +- go.sum | 4 + go.work.sum | 1135 +---------------- internal/api/v1beta1/alert_test.go | 37 +- internal/api/v1beta1/health_test.go | 2 +- internal/api/v1beta1/namespace_test.go | 68 +- internal/api/v1beta1/notification_test.go | 2 +- internal/api/v1beta1/provider_test.go | 38 +- internal/api/v1beta1/receiver_test.go | 64 +- internal/api/v1beta1/rule_test.go | 10 +- internal/api/v1beta1/silence_test.go | 16 +- internal/api/v1beta1/subscription_test.go | 64 +- internal/api/v1beta1/template_test.go | 52 +- plugins/providers/cortex/go.mod | 2 +- .../receivers/httpreceiver/service_test.go | 2 +- plugins/receivers/pagerduty/service_test.go | 6 +- plugins/receivers/slack/service_test.go | 10 +- .../receivers/slackchannel/service_test.go | 6 +- 40 files changed, 511 insertions(+), 1635 deletions(-) delete mode 100644 core/provider/type.go diff --git a/.github/workflows/e2e_test.yaml b/.github/workflows/e2e_test.yaml index d8250d2e..aa0cce1d 100644 --- a/.github/workflows/e2e_test.yaml +++ b/.github/workflows/e2e_test.yaml @@ -18,7 +18,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v2 with: - go-version: 1.18 + go-version: 1.21 - name: Install dependencies run: go mod tidy - name: Test end-to-end diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index b0944acd..a97b84af 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -1,5 +1,5 @@ name: Lint -on: [ push, pull_request, workflow_dispatch ] +on: [push, workflow_dispatch] jobs: golangci-lint: @@ -8,10 +8,10 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-go@v2 with: - go-version: 1.18 + go-version: 1.21 - name: golangci-lint uses: golangci/golangci-lint-action@v2 with: skip-go-installation: true - version: v1.50.1 - args: --timeout=10m \ No newline at end of file + version: v1.54.2 + args: --timeout=10m diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 57395ee1..894e40c3 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -22,7 +22,7 @@ jobs: - name: Set up Go 1.x uses: actions/setup-go@v2 with: - go-version: 1.18 + go-version: 1.21 id: go - name: Check out code into the Go module directory uses: actions/checkout@v2 diff --git a/.github/workflows/release_cortex_provider_plugin.yaml b/.github/workflows/release_cortex_provider_plugin.yaml index 9d37a013..613eb5bb 100644 --- a/.github/workflows/release_cortex_provider_plugin.yaml +++ b/.github/workflows/release_cortex_provider_plugin.yaml @@ -10,7 +10,7 @@ jobs: - name: Set up Go 1.x uses: actions/setup-go@v2 with: - go-version: 1.18 + go-version: 1.21 id: go - name: Check out code into the Go module directory uses: actions/checkout@v2 diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 82cd9c79..3173881e 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -1,6 +1,5 @@ - name: Test -on: [push, pull_request] +on: [push] jobs: test: @@ -20,10 +19,10 @@ jobs: steps: - name: Check out code into the Go module directory uses: actions/checkout@v2 - - name: Set up Go 1.18 + - name: Set up Go 1.21 uses: actions/setup-go@v2 with: - go-version: 1.18 + go-version: 1.21 id: go - name: Install dependencies run: sudo apt-get install build-essential diff --git a/README.md b/README.md index 1c42a50f..bf84fda9 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ Explore the following resources to get started with Siren: Siren requires the following dependencies: - Docker -- Golang (version 1.18 or above) +- Golang (version 1.21 or above) - Git Run the application dependencies using Docker: diff --git a/cli/deps.go b/cli/deps.go index 0721a29b..645225a1 100644 --- a/cli/deps.go +++ b/cli/deps.go @@ -73,9 +73,6 @@ func InitDeps( templateRepository := postgres.NewTemplateRepository(pgClient) templateService := template.NewService(templateRepository) - providerRepository := postgres.NewProviderRepository(pgClient) - providerService := provider.NewService(providerRepository) - logRepository := postgres.NewLogRepository(pgClient) logService := log.NewService(logRepository) @@ -89,6 +86,13 @@ func InitDeps( return nil, nil, nil, nil, nil, err } + var supportedProviderTypes = []string{} + for typ := range providerPlugins { + supportedProviderTypes = append(supportedProviderTypes, typ) + } + providerRepository := postgres.NewProviderRepository(pgClient) + providerService := provider.NewService(providerRepository, supportedProviderTypes) + var configSyncers = make(map[string]namespace.ConfigSyncer, 0) var alertTransformers = make(map[string]alert.AlertTransformer, 0) var ruleUploaders = make(map[string]rule.RuleUploader, 0) diff --git a/core/alert/service_test.go b/core/alert/service_test.go index 1f318940..abaa7816 100644 --- a/core/alert/service_test.go +++ b/core/alert/service_test.go @@ -26,7 +26,7 @@ func TestService_List(t *testing.T) { {ID: 2, ProviderID: 1, ResourceName: "foo", Severity: "CRITICAL", MetricName: "baz", MetricValue: "0", Rule: "bar", TriggeredAt: timenow}, } - repositoryMock.EXPECT().List(mock.AnythingOfType("*context.emptyCtx"), alert.Filter{ + repositoryMock.EXPECT().List(mock.AnythingOfType("context.todoCtx"), alert.Filter{ ProviderID: 1, ResourceName: "foo", StartTime: 0, @@ -53,7 +53,7 @@ func TestService_List(t *testing.T) { {ID: 2, ProviderID: 1, ResourceName: "foo", Severity: "CRITICAL", MetricName: "baz", MetricValue: "0", Rule: "bar", TriggeredAt: timenow}, } - repositoryMock.EXPECT().List(mock.AnythingOfType("*context.emptyCtx"), mock.Anything).Return(dummyAlerts, nil) + repositoryMock.EXPECT().List(mock.AnythingOfType("context.todoCtx"), mock.Anything).Return(dummyAlerts, nil) actualAlerts, err := dummyService.List(ctx, alert.Filter{ ProviderID: 1, ResourceName: "foo", @@ -68,7 +68,7 @@ func TestService_List(t *testing.T) { t.Run("should call repository List method and handle errors", func(t *testing.T) { repositoryMock := &mocks.AlertRepository{} dummyService := alert.NewService(repositoryMock, nil, nil) - repositoryMock.EXPECT().List(mock.AnythingOfType("*context.emptyCtx"), mock.Anything). + repositoryMock.EXPECT().List(mock.AnythingOfType("context.todoCtx"), mock.Anything). Return(nil, errors.New("random error")) actualAlerts, err := dummyService.List(ctx, alert.Filter{ ProviderID: 1, @@ -116,7 +116,7 @@ func TestService_CreateAlerts(t *testing.T) { { name: "should return error if TransformToAlerts return error", setup: func(ar *mocks.AlertRepository, at *mocks.AlertTransformer) { - at.EXPECT().TransformToAlerts(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("uint64"), mock.AnythingOfType("uint64"), mock.AnythingOfType("map[string]interface {}")).Return(nil, 0, errors.New("some error")) + at.EXPECT().TransformToAlerts(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("uint64"), mock.AnythingOfType("uint64"), mock.AnythingOfType("map[string]interface {}")).Return(nil, 0, errors.New("some error")) }, alertsToBeCreated: alertsToBeCreated, wantErr: true, @@ -124,11 +124,11 @@ func TestService_CreateAlerts(t *testing.T) { { name: "should call repository Create method with proper arguments", setup: func(ar *mocks.AlertRepository, at *mocks.AlertTransformer) { - at.EXPECT().TransformToAlerts(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("uint64"), mock.AnythingOfType("uint64"), mock.AnythingOfType("map[string]interface {}")).Return([]alert.Alert{ + at.EXPECT().TransformToAlerts(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("uint64"), mock.AnythingOfType("uint64"), mock.AnythingOfType("map[string]interface {}")).Return([]alert.Alert{ {ID: 1, ProviderID: 1, ResourceName: "foo", Severity: "CRITICAL", MetricName: "lag", MetricValue: "20", Rule: "lagHigh", TriggeredAt: timenow}, }, 1, nil) - ar.EXPECT().Create(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("alert.Alert")).Return(alert.Alert{ID: 1, ProviderID: 1, ResourceName: "foo", Severity: "CRITICAL", MetricName: "lag", MetricValue: "20", + ar.EXPECT().Create(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("alert.Alert")).Return(alert.Alert{ID: 1, ProviderID: 1, ResourceName: "foo", Severity: "CRITICAL", MetricName: "lag", MetricValue: "20", Rule: "lagHigh", TriggeredAt: timenow}, nil) }, alertsToBeCreated: alertsToBeCreated, @@ -141,11 +141,11 @@ func TestService_CreateAlerts(t *testing.T) { { name: "should return error not found if repository return err relation", setup: func(ar *mocks.AlertRepository, at *mocks.AlertTransformer) { - at.EXPECT().TransformToAlerts(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("uint64"), mock.AnythingOfType("uint64"), mock.AnythingOfType("map[string]interface {}")).Return([]alert.Alert{ + at.EXPECT().TransformToAlerts(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("uint64"), mock.AnythingOfType("uint64"), mock.AnythingOfType("map[string]interface {}")).Return([]alert.Alert{ {ID: 1, ProviderID: 1, ResourceName: "foo", Severity: "CRITICAL", MetricName: "lag", MetricValue: "20", Rule: "lagHigh", TriggeredAt: timenow}, }, 1, nil) - ar.EXPECT().Create(mock.AnythingOfType("*context.emptyCtx"), mock.Anything).Return(alert.Alert{}, alert.ErrRelation) + ar.EXPECT().Create(mock.AnythingOfType("context.todoCtx"), mock.Anything).Return(alert.Alert{}, alert.ErrRelation) }, alertsToBeCreated: alertsToBeCreated, wantErr: true, @@ -153,11 +153,11 @@ func TestService_CreateAlerts(t *testing.T) { { name: "should handle errors from repository", setup: func(ar *mocks.AlertRepository, at *mocks.AlertTransformer) { - at.EXPECT().TransformToAlerts(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("uint64"), mock.AnythingOfType("uint64"), mock.AnythingOfType("map[string]interface {}")).Return([]alert.Alert{ + at.EXPECT().TransformToAlerts(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("uint64"), mock.AnythingOfType("uint64"), mock.AnythingOfType("map[string]interface {}")).Return([]alert.Alert{ {ID: 1, ProviderID: 1, ResourceName: "foo", Severity: "CRITICAL", MetricName: "lag", MetricValue: "20", Rule: "lagHigh", TriggeredAt: timenow}, }, 1, nil) - ar.EXPECT().Create(mock.AnythingOfType("*context.emptyCtx"), mock.Anything).Return(alert.Alert{}, errors.New("random error")) + ar.EXPECT().Create(mock.AnythingOfType("context.todoCtx"), mock.Anything).Return(alert.Alert{}, errors.New("random error")) }, alertsToBeCreated: alertsToBeCreated, wantErr: true, diff --git a/core/namespace/service_test.go b/core/namespace/service_test.go index 8a2e9b80..9e57511a 100644 --- a/core/namespace/service_test.go +++ b/core/namespace/service_test.go @@ -32,14 +32,14 @@ func TestService_ListNamespaces(t *testing.T) { { Description: "should return error if List repository error", Setup: func(rr *mocks.NamespaceRepository, e *mocks.Encryptor, tc testCase) { - rr.EXPECT().List(mock.AnythingOfType("*context.emptyCtx")).Return(nil, errors.New("some error")) + rr.EXPECT().List(mock.AnythingOfType("context.todoCtx")).Return(nil, errors.New("some error")) }, Err: errors.New("some error"), }, { Description: "should return error if List repository success and decrypt error", Setup: func(rr *mocks.NamespaceRepository, e *mocks.Encryptor, tc testCase) { - rr.EXPECT().List(mock.AnythingOfType("*context.emptyCtx")).Return([]namespace.EncryptedNamespace{ + rr.EXPECT().List(mock.AnythingOfType("context.todoCtx")).Return([]namespace.EncryptedNamespace{ { Namespace: &namespace.Namespace{ ID: 1, @@ -74,7 +74,7 @@ func TestService_ListNamespaces(t *testing.T) { { Description: "should return error if list repository success and decrypted object is not json", Setup: func(rr *mocks.NamespaceRepository, e *mocks.Encryptor, tc testCase) { - rr.EXPECT().List(mock.AnythingOfType("*context.emptyCtx")).Return([]namespace.EncryptedNamespace{ + rr.EXPECT().List(mock.AnythingOfType("context.todoCtx")).Return([]namespace.EncryptedNamespace{ { Namespace: &namespace.Namespace{ ID: 1, @@ -109,7 +109,7 @@ func TestService_ListNamespaces(t *testing.T) { { Description: "should success if list repository and decrypt success", Setup: func(rr *mocks.NamespaceRepository, e *mocks.Encryptor, tc testCase) { - rr.EXPECT().List(mock.AnythingOfType("*context.emptyCtx")).Return([]namespace.EncryptedNamespace{ + rr.EXPECT().List(mock.AnythingOfType("context.todoCtx")).Return([]namespace.EncryptedNamespace{ { Namespace: &namespace.Namespace{ ID: 1, @@ -214,7 +214,7 @@ func TestService_CreateNamespace(t *testing.T) { { Description: "should return error if provider service return error", Setup: func(rr *mocks.NamespaceRepository, e *mocks.Encryptor, ps *mocks.ProviderService, cs *mocks.ConfigSyncer, tc testCase) { - ps.EXPECT().Get(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("uint64")).Return(nil, errors.New("some error")) + ps.EXPECT().Get(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("uint64")).Return(nil, errors.New("some error")) }, NSpace: &namespace.Namespace{ Credentials: map[string]any{}, @@ -224,7 +224,7 @@ func TestService_CreateNamespace(t *testing.T) { { Description: "should return error if encrypt return error caused credential is not in json", Setup: func(rr *mocks.NamespaceRepository, e *mocks.Encryptor, ps *mocks.ProviderService, cs *mocks.ConfigSyncer, tc testCase) { - ps.EXPECT().Get(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("uint64")).Return(&provider.Provider{Type: testProviderType}, nil) + ps.EXPECT().Get(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("uint64")).Return(&provider.Provider{Type: testProviderType}, nil) }, NSpace: &namespace.Namespace{ Credentials: map[string]any{ @@ -236,7 +236,7 @@ func TestService_CreateNamespace(t *testing.T) { { Description: "should return error if encrypt return error", Setup: func(rr *mocks.NamespaceRepository, e *mocks.Encryptor, ps *mocks.ProviderService, cs *mocks.ConfigSyncer, tc testCase) { - ps.EXPECT().Get(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("uint64")).Return(&provider.Provider{Type: testProviderType}, nil) + ps.EXPECT().Get(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("uint64")).Return(&provider.Provider{Type: testProviderType}, nil) e.EXPECT().Encrypt(mock.AnythingOfType("secret.MaskableString")).Return("", errors.New("some error")) }, NSpace: &namespace.Namespace{ @@ -249,14 +249,14 @@ func TestService_CreateNamespace(t *testing.T) { { Description: "should return error if create repository error", Setup: func(rr *mocks.NamespaceRepository, e *mocks.Encryptor, ps *mocks.ProviderService, cs *mocks.ConfigSyncer, tc testCase) { - ps.EXPECT().Get(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("uint64")).Return(&provider.Provider{Type: testProviderType}, nil) + ps.EXPECT().Get(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("uint64")).Return(&provider.Provider{Type: testProviderType}, nil) e.EXPECT().Encrypt(mock.AnythingOfType("secret.MaskableString")).Return("some-ciphertext", nil) - rr.EXPECT().WithTransaction(mock.AnythingOfType("*context.emptyCtx")).Return(ctx) - rr.EXPECT().Create(mock.AnythingOfType("*context.emptyCtx"), &namespace.EncryptedNamespace{ + rr.EXPECT().WithTransaction(mock.AnythingOfType("context.todoCtx")).Return(ctx) + rr.EXPECT().Create(mock.AnythingOfType("context.todoCtx"), &namespace.EncryptedNamespace{ Namespace: tc.NSpace, CredentialString: "some-ciphertext", }).Return(errors.New("some error")) - rr.EXPECT().Rollback(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("*errors.errorString")).Return(nil) + rr.EXPECT().Rollback(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("*errors.errorString")).Return(nil) }, NSpace: &namespace.Namespace{ Credentials: map[string]any{ @@ -268,14 +268,14 @@ func TestService_CreateNamespace(t *testing.T) { { Description: "should return error conflict if create repository return duplicate error", Setup: func(rr *mocks.NamespaceRepository, e *mocks.Encryptor, ps *mocks.ProviderService, cs *mocks.ConfigSyncer, tc testCase) { - ps.EXPECT().Get(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("uint64")).Return(&provider.Provider{Type: testProviderType}, nil) + ps.EXPECT().Get(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("uint64")).Return(&provider.Provider{Type: testProviderType}, nil) e.EXPECT().Encrypt(mock.AnythingOfType("secret.MaskableString")).Return("some-ciphertext", nil) - rr.EXPECT().WithTransaction(mock.AnythingOfType("*context.emptyCtx")).Return(ctx) - rr.EXPECT().Create(mock.AnythingOfType("*context.emptyCtx"), &namespace.EncryptedNamespace{ + rr.EXPECT().WithTransaction(mock.AnythingOfType("context.todoCtx")).Return(ctx) + rr.EXPECT().Create(mock.AnythingOfType("context.todoCtx"), &namespace.EncryptedNamespace{ Namespace: tc.NSpace, CredentialString: "some-ciphertext", }).Return(namespace.ErrDuplicate) - rr.EXPECT().Rollback(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("*errors.errorString")).Return(nil) + rr.EXPECT().Rollback(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("*errors.errorString")).Return(nil) }, NSpace: &namespace.Namespace{ Credentials: map[string]any{ @@ -287,14 +287,14 @@ func TestService_CreateNamespace(t *testing.T) { { Description: "should return error not found if create repository return relation error", Setup: func(rr *mocks.NamespaceRepository, e *mocks.Encryptor, ps *mocks.ProviderService, cs *mocks.ConfigSyncer, tc testCase) { - ps.EXPECT().Get(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("uint64")).Return(&provider.Provider{Type: testProviderType}, nil) + ps.EXPECT().Get(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("uint64")).Return(&provider.Provider{Type: testProviderType}, nil) e.EXPECT().Encrypt(mock.AnythingOfType("secret.MaskableString")).Return("some-ciphertext", nil) - rr.EXPECT().WithTransaction(mock.AnythingOfType("*context.emptyCtx")).Return(ctx) - rr.EXPECT().Create(mock.AnythingOfType("*context.emptyCtx"), &namespace.EncryptedNamespace{ + rr.EXPECT().WithTransaction(mock.AnythingOfType("context.todoCtx")).Return(ctx) + rr.EXPECT().Create(mock.AnythingOfType("context.todoCtx"), &namespace.EncryptedNamespace{ Namespace: tc.NSpace, CredentialString: "some-ciphertext", }).Return(namespace.ErrRelation) - rr.EXPECT().Rollback(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("*errors.errorString")).Return(nil) + rr.EXPECT().Rollback(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("*errors.errorString")).Return(nil) }, NSpace: &namespace.Namespace{ Credentials: map[string]any{ @@ -306,15 +306,15 @@ func TestService_CreateNamespace(t *testing.T) { { Description: "should return error if create repository success & sync config return error", Setup: func(rr *mocks.NamespaceRepository, e *mocks.Encryptor, ps *mocks.ProviderService, cs *mocks.ConfigSyncer, tc testCase) { - ps.EXPECT().Get(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("uint64")).Return(&provider.Provider{Type: testProviderType}, nil) + ps.EXPECT().Get(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("uint64")).Return(&provider.Provider{Type: testProviderType}, nil) e.EXPECT().Encrypt(mock.AnythingOfType("secret.MaskableString")).Return("some-ciphertext", nil) - rr.EXPECT().WithTransaction(mock.AnythingOfType("*context.emptyCtx")).Return(ctx) - rr.EXPECT().Create(mock.AnythingOfType("*context.emptyCtx"), &namespace.EncryptedNamespace{ + rr.EXPECT().WithTransaction(mock.AnythingOfType("context.todoCtx")).Return(ctx) + rr.EXPECT().Create(mock.AnythingOfType("context.todoCtx"), &namespace.EncryptedNamespace{ Namespace: tc.NSpace, CredentialString: "some-ciphertext", }).Return(nil) - cs.EXPECT().SyncRuntimeConfig(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("uint64"), mock.AnythingOfType("string"), mock.AnythingOfType("provider.Provider")).Return(errors.New("some error")) - rr.EXPECT().Rollback(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("*errors.errorString")).Return(nil) + cs.EXPECT().SyncRuntimeConfig(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("uint64"), mock.AnythingOfType("string"), mock.AnythingOfType("provider.Provider")).Return(errors.New("some error")) + rr.EXPECT().Rollback(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("*errors.errorString")).Return(nil) }, NSpace: &namespace.Namespace{ Credentials: map[string]any{ @@ -326,15 +326,15 @@ func TestService_CreateNamespace(t *testing.T) { { Description: "should return nil error if create repository success & sync config success", Setup: func(rr *mocks.NamespaceRepository, e *mocks.Encryptor, ps *mocks.ProviderService, cs *mocks.ConfigSyncer, tc testCase) { - ps.EXPECT().Get(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("uint64")).Return(&provider.Provider{Type: testProviderType}, nil) + ps.EXPECT().Get(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("uint64")).Return(&provider.Provider{Type: testProviderType}, nil) e.EXPECT().Encrypt(mock.AnythingOfType("secret.MaskableString")).Return("some-ciphertext", nil) - rr.EXPECT().WithTransaction(mock.AnythingOfType("*context.emptyCtx")).Return(ctx) - rr.EXPECT().Create(mock.AnythingOfType("*context.emptyCtx"), &namespace.EncryptedNamespace{ + rr.EXPECT().WithTransaction(mock.AnythingOfType("context.todoCtx")).Return(ctx) + rr.EXPECT().Create(mock.AnythingOfType("context.todoCtx"), &namespace.EncryptedNamespace{ Namespace: tc.NSpace, CredentialString: "some-ciphertext", }).Return(nil) - cs.EXPECT().SyncRuntimeConfig(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("uint64"), mock.AnythingOfType("string"), mock.AnythingOfType("provider.Provider")).Return(nil) - rr.EXPECT().Commit(mock.AnythingOfType("*context.emptyCtx")).Return(nil) + cs.EXPECT().SyncRuntimeConfig(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("uint64"), mock.AnythingOfType("string"), mock.AnythingOfType("provider.Provider")).Return(nil) + rr.EXPECT().Commit(mock.AnythingOfType("context.todoCtx")).Return(nil) }, NSpace: &namespace.Namespace{ Credentials: map[string]any{ @@ -390,21 +390,21 @@ func TestService_GetNamespace(t *testing.T) { { Description: "should return error if Get repository error", Setup: func(rr *mocks.NamespaceRepository, e *mocks.Encryptor, tc testCase) { - rr.EXPECT().Get(mock.AnythingOfType("*context.emptyCtx"), testID).Return(nil, errors.New("some error")) + rr.EXPECT().Get(mock.AnythingOfType("context.todoCtx"), testID).Return(nil, errors.New("some error")) }, Err: errors.New("some error"), }, { Description: "should return error not found if Get repository return not found error", Setup: func(rr *mocks.NamespaceRepository, e *mocks.Encryptor, tc testCase) { - rr.EXPECT().Get(mock.AnythingOfType("*context.emptyCtx"), testID).Return(nil, namespace.NotFoundError{}) + rr.EXPECT().Get(mock.AnythingOfType("context.todoCtx"), testID).Return(nil, namespace.NotFoundError{}) }, Err: errors.New("namespace not found"), }, { Description: "should return error if Get repository success and decrypt return error", Setup: func(rr *mocks.NamespaceRepository, e *mocks.Encryptor, tc testCase) { - rr.EXPECT().Get(mock.AnythingOfType("*context.emptyCtx"), testID).Return(&namespace.EncryptedNamespace{ + rr.EXPECT().Get(mock.AnythingOfType("context.todoCtx"), testID).Return(&namespace.EncryptedNamespace{ Namespace: tc.NSpace, CredentialString: "some-ciphertext", }, nil) @@ -415,7 +415,7 @@ func TestService_GetNamespace(t *testing.T) { { Description: "should return error if Get repository success and decrypted credentials is not json marshallable", Setup: func(rr *mocks.NamespaceRepository, e *mocks.Encryptor, tc testCase) { - rr.EXPECT().Get(mock.AnythingOfType("*context.emptyCtx"), testID).Return(&namespace.EncryptedNamespace{ + rr.EXPECT().Get(mock.AnythingOfType("context.todoCtx"), testID).Return(&namespace.EncryptedNamespace{ Namespace: tc.NSpace, CredentialString: "some-ciphertext", }, nil) @@ -426,7 +426,7 @@ func TestService_GetNamespace(t *testing.T) { { Description: "should return nil error if Get repository success and decrypt success", Setup: func(rr *mocks.NamespaceRepository, e *mocks.Encryptor, tc testCase) { - rr.EXPECT().Get(mock.AnythingOfType("*context.emptyCtx"), testID).Return(&namespace.EncryptedNamespace{ + rr.EXPECT().Get(mock.AnythingOfType("context.todoCtx"), testID).Return(&namespace.EncryptedNamespace{ Namespace: tc.NSpace, CredentialString: "some-ciphertext", }, nil) @@ -484,7 +484,7 @@ func TestService_UpdateNamespace(t *testing.T) { { Description: "should return error if provider service return error", Setup: func(rr *mocks.NamespaceRepository, e *mocks.Encryptor, cs *mocks.ConfigSyncer, tc testCase) { - rr.EXPECT().Get(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("uint64")).Return(nil, errors.New("some error")) + rr.EXPECT().Get(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("uint64")).Return(nil, errors.New("some error")) }, NSpace: &namespace.Namespace{ Credentials: map[string]any{}, @@ -494,7 +494,7 @@ func TestService_UpdateNamespace(t *testing.T) { { Description: "should return error if decrypt return error", Setup: func(rr *mocks.NamespaceRepository, e *mocks.Encryptor, cs *mocks.ConfigSyncer, tc testCase) { - rr.EXPECT().Get(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("uint64")).Return(&namespace.EncryptedNamespace{Namespace: &namespace.Namespace{Provider: provider.Provider{Type: testProviderType}}}, nil) + rr.EXPECT().Get(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("uint64")).Return(&namespace.EncryptedNamespace{Namespace: &namespace.Namespace{Provider: provider.Provider{Type: testProviderType}}}, nil) e.EXPECT().Decrypt(mock.AnythingOfType("secret.MaskableString")).Return("", errors.New("some error")) }, NSpace: &namespace.Namespace{ @@ -505,7 +505,7 @@ func TestService_UpdateNamespace(t *testing.T) { { Description: "should return error if encrypt return error caused credential is not in json", Setup: func(rr *mocks.NamespaceRepository, e *mocks.Encryptor, cs *mocks.ConfigSyncer, tc testCase) { - rr.EXPECT().Get(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("uint64")).Return(&namespace.EncryptedNamespace{Namespace: &namespace.Namespace{Provider: provider.Provider{Type: testProviderType}}}, nil) + rr.EXPECT().Get(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("uint64")).Return(&namespace.EncryptedNamespace{Namespace: &namespace.Namespace{Provider: provider.Provider{Type: testProviderType}}}, nil) e.EXPECT().Decrypt(mock.AnythingOfType("secret.MaskableString")).Return("{ \"key\": \"value\" }", nil) }, NSpace: &namespace.Namespace{ @@ -518,7 +518,7 @@ func TestService_UpdateNamespace(t *testing.T) { { Description: "should return error if encrypt return error", Setup: func(rr *mocks.NamespaceRepository, e *mocks.Encryptor, cs *mocks.ConfigSyncer, tc testCase) { - rr.EXPECT().Get(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("uint64")).Return(&namespace.EncryptedNamespace{Namespace: &namespace.Namespace{Provider: provider.Provider{Type: testProviderType}}}, nil) + rr.EXPECT().Get(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("uint64")).Return(&namespace.EncryptedNamespace{Namespace: &namespace.Namespace{Provider: provider.Provider{Type: testProviderType}}}, nil) e.EXPECT().Decrypt(mock.AnythingOfType("secret.MaskableString")).Return("{ \"key\": \"value\" }", nil) e.EXPECT().Encrypt(mock.AnythingOfType("secret.MaskableString")).Return("", errors.New("some error")) }, @@ -532,15 +532,15 @@ func TestService_UpdateNamespace(t *testing.T) { { Description: "should return error if update repository error", Setup: func(rr *mocks.NamespaceRepository, e *mocks.Encryptor, cs *mocks.ConfigSyncer, tc testCase) { - rr.EXPECT().Get(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("uint64")).Return(&namespace.EncryptedNamespace{Namespace: &namespace.Namespace{Provider: provider.Provider{Type: testProviderType}}}, nil) + rr.EXPECT().Get(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("uint64")).Return(&namespace.EncryptedNamespace{Namespace: &namespace.Namespace{Provider: provider.Provider{Type: testProviderType}}}, nil) e.EXPECT().Decrypt(mock.AnythingOfType("secret.MaskableString")).Return("{ \"key\": \"value\" }", nil) e.EXPECT().Encrypt(mock.AnythingOfType("secret.MaskableString")).Return("some-ciphertext", nil) - rr.EXPECT().WithTransaction(mock.AnythingOfType("*context.emptyCtx")).Return(ctx) - rr.EXPECT().Update(mock.AnythingOfType("*context.emptyCtx"), &namespace.EncryptedNamespace{ + rr.EXPECT().WithTransaction(mock.AnythingOfType("context.todoCtx")).Return(ctx) + rr.EXPECT().Update(mock.AnythingOfType("context.todoCtx"), &namespace.EncryptedNamespace{ Namespace: tc.NSpace, CredentialString: "some-ciphertext", }).Return(errors.New("some error")) - rr.EXPECT().Rollback(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("*errors.errorString")).Return(nil) + rr.EXPECT().Rollback(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("*errors.errorString")).Return(nil) }, NSpace: &namespace.Namespace{ Credentials: map[string]any{ @@ -552,15 +552,15 @@ func TestService_UpdateNamespace(t *testing.T) { { Description: "should return error not found if update repository return not found error", Setup: func(rr *mocks.NamespaceRepository, e *mocks.Encryptor, cs *mocks.ConfigSyncer, tc testCase) { - rr.EXPECT().Get(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("uint64")).Return(&namespace.EncryptedNamespace{Namespace: &namespace.Namespace{Provider: provider.Provider{Type: testProviderType}}}, nil) + rr.EXPECT().Get(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("uint64")).Return(&namespace.EncryptedNamespace{Namespace: &namespace.Namespace{Provider: provider.Provider{Type: testProviderType}}}, nil) e.EXPECT().Decrypt(mock.AnythingOfType("secret.MaskableString")).Return("{ \"key\": \"value\" }", nil) e.EXPECT().Encrypt(mock.AnythingOfType("secret.MaskableString")).Return("some-ciphertext", nil) - rr.EXPECT().WithTransaction(mock.AnythingOfType("*context.emptyCtx")).Return(ctx) - rr.EXPECT().Update(mock.AnythingOfType("*context.emptyCtx"), &namespace.EncryptedNamespace{ + rr.EXPECT().WithTransaction(mock.AnythingOfType("context.todoCtx")).Return(ctx) + rr.EXPECT().Update(mock.AnythingOfType("context.todoCtx"), &namespace.EncryptedNamespace{ Namespace: tc.NSpace, CredentialString: "some-ciphertext", }).Return(namespace.NotFoundError{}) - rr.EXPECT().Rollback(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("namespace.NotFoundError")).Return(nil) + rr.EXPECT().Rollback(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("namespace.NotFoundError")).Return(nil) }, NSpace: &namespace.Namespace{ Credentials: map[string]any{ @@ -572,15 +572,15 @@ func TestService_UpdateNamespace(t *testing.T) { { Description: "should return error not found if update repository return relation error", Setup: func(rr *mocks.NamespaceRepository, e *mocks.Encryptor, cs *mocks.ConfigSyncer, tc testCase) { - rr.EXPECT().Get(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("uint64")).Return(&namespace.EncryptedNamespace{Namespace: &namespace.Namespace{Provider: provider.Provider{Type: testProviderType}}}, nil) + rr.EXPECT().Get(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("uint64")).Return(&namespace.EncryptedNamespace{Namespace: &namespace.Namespace{Provider: provider.Provider{Type: testProviderType}}}, nil) e.EXPECT().Decrypt(mock.AnythingOfType("secret.MaskableString")).Return("{ \"key\": \"value\" }", nil) e.EXPECT().Encrypt(mock.AnythingOfType("secret.MaskableString")).Return("some-ciphertext", nil) - rr.EXPECT().WithTransaction(mock.AnythingOfType("*context.emptyCtx")).Return(ctx) - rr.EXPECT().Update(mock.AnythingOfType("*context.emptyCtx"), &namespace.EncryptedNamespace{ + rr.EXPECT().WithTransaction(mock.AnythingOfType("context.todoCtx")).Return(ctx) + rr.EXPECT().Update(mock.AnythingOfType("context.todoCtx"), &namespace.EncryptedNamespace{ Namespace: tc.NSpace, CredentialString: "some-ciphertext", }).Return(namespace.ErrRelation) - rr.EXPECT().Rollback(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("*errors.errorString")).Return(nil) + rr.EXPECT().Rollback(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("*errors.errorString")).Return(nil) }, NSpace: &namespace.Namespace{ Credentials: map[string]any{ @@ -592,15 +592,15 @@ func TestService_UpdateNamespace(t *testing.T) { { Description: "should return error conflict if update repository return error duplicate", Setup: func(rr *mocks.NamespaceRepository, e *mocks.Encryptor, cs *mocks.ConfigSyncer, tc testCase) { - rr.EXPECT().Get(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("uint64")).Return(&namespace.EncryptedNamespace{Namespace: &namespace.Namespace{Provider: provider.Provider{Type: testProviderType}}}, nil) + rr.EXPECT().Get(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("uint64")).Return(&namespace.EncryptedNamespace{Namespace: &namespace.Namespace{Provider: provider.Provider{Type: testProviderType}}}, nil) e.EXPECT().Decrypt(mock.AnythingOfType("secret.MaskableString")).Return("{ \"key\": \"value\" }", nil) e.EXPECT().Encrypt(mock.AnythingOfType("secret.MaskableString")).Return("some-ciphertext", nil) - rr.EXPECT().WithTransaction(mock.AnythingOfType("*context.emptyCtx")).Return(ctx) - rr.EXPECT().Update(mock.AnythingOfType("*context.emptyCtx"), &namespace.EncryptedNamespace{ + rr.EXPECT().WithTransaction(mock.AnythingOfType("context.todoCtx")).Return(ctx) + rr.EXPECT().Update(mock.AnythingOfType("context.todoCtx"), &namespace.EncryptedNamespace{ Namespace: tc.NSpace, CredentialString: "some-ciphertext", }).Return(namespace.ErrDuplicate) - rr.EXPECT().Rollback(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("*errors.errorString")).Return(nil) + rr.EXPECT().Rollback(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("*errors.errorString")).Return(nil) }, NSpace: &namespace.Namespace{ Credentials: map[string]any{ @@ -612,16 +612,16 @@ func TestService_UpdateNamespace(t *testing.T) { { Description: "should return error if sync config return error", Setup: func(rr *mocks.NamespaceRepository, e *mocks.Encryptor, cs *mocks.ConfigSyncer, tc testCase) { - rr.EXPECT().Get(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("uint64")).Return(&namespace.EncryptedNamespace{Namespace: &namespace.Namespace{Provider: provider.Provider{Type: testProviderType}}}, nil) + rr.EXPECT().Get(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("uint64")).Return(&namespace.EncryptedNamespace{Namespace: &namespace.Namespace{Provider: provider.Provider{Type: testProviderType}}}, nil) e.EXPECT().Decrypt(mock.AnythingOfType("secret.MaskableString")).Return("{ \"key\": \"value\" }", nil) e.EXPECT().Encrypt(mock.AnythingOfType("secret.MaskableString")).Return("some-ciphertext", nil) - rr.EXPECT().WithTransaction(mock.AnythingOfType("*context.emptyCtx")).Return(ctx) - rr.EXPECT().Update(mock.AnythingOfType("*context.emptyCtx"), &namespace.EncryptedNamespace{ + rr.EXPECT().WithTransaction(mock.AnythingOfType("context.todoCtx")).Return(ctx) + rr.EXPECT().Update(mock.AnythingOfType("context.todoCtx"), &namespace.EncryptedNamespace{ Namespace: tc.NSpace, CredentialString: "some-ciphertext", }).Return(nil) - cs.EXPECT().SyncRuntimeConfig(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("uint64"), mock.AnythingOfType("string"), mock.AnythingOfType("provider.Provider")).Return(errors.New("some error")) - rr.EXPECT().Rollback(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("*errors.errorString")).Return(nil) + cs.EXPECT().SyncRuntimeConfig(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("uint64"), mock.AnythingOfType("string"), mock.AnythingOfType("provider.Provider")).Return(errors.New("some error")) + rr.EXPECT().Rollback(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("*errors.errorString")).Return(nil) }, NSpace: &namespace.Namespace{ Credentials: map[string]any{ @@ -633,16 +633,16 @@ func TestService_UpdateNamespace(t *testing.T) { { Description: "should return nil error if update repository success", Setup: func(rr *mocks.NamespaceRepository, e *mocks.Encryptor, cs *mocks.ConfigSyncer, tc testCase) { - rr.EXPECT().Get(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("uint64")).Return(&namespace.EncryptedNamespace{Namespace: &namespace.Namespace{Provider: provider.Provider{Type: testProviderType}}}, nil) + rr.EXPECT().Get(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("uint64")).Return(&namespace.EncryptedNamespace{Namespace: &namespace.Namespace{Provider: provider.Provider{Type: testProviderType}}}, nil) e.EXPECT().Decrypt(mock.AnythingOfType("secret.MaskableString")).Return("{ \"key\": \"value\" }", nil) e.EXPECT().Encrypt(mock.AnythingOfType("secret.MaskableString")).Return("some-ciphertext", nil) - rr.EXPECT().WithTransaction(mock.AnythingOfType("*context.emptyCtx")).Return(ctx) - rr.EXPECT().Update(mock.AnythingOfType("*context.emptyCtx"), &namespace.EncryptedNamespace{ + rr.EXPECT().WithTransaction(mock.AnythingOfType("context.todoCtx")).Return(ctx) + rr.EXPECT().Update(mock.AnythingOfType("context.todoCtx"), &namespace.EncryptedNamespace{ Namespace: tc.NSpace, CredentialString: "some-ciphertext", }).Return(nil) - cs.EXPECT().SyncRuntimeConfig(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("uint64"), mock.AnythingOfType("string"), mock.AnythingOfType("provider.Provider")).Return(nil) - rr.EXPECT().Commit(mock.AnythingOfType("*context.emptyCtx")).Return(nil) + cs.EXPECT().SyncRuntimeConfig(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("uint64"), mock.AnythingOfType("string"), mock.AnythingOfType("provider.Provider")).Return(nil) + rr.EXPECT().Commit(mock.AnythingOfType("context.todoCtx")).Return(nil) }, NSpace: &namespace.Namespace{ Credentials: map[string]any{ @@ -691,7 +691,7 @@ func TestDeleteNamespace(t *testing.T) { t.Run("should call repository Delete method and return nil if no error", func(t *testing.T) { repositoryMock := &mocks.NamespaceRepository{} dummyService := namespace.NewService(nil, repositoryMock, nil, nil) - repositoryMock.EXPECT().Delete(mock.AnythingOfType("*context.emptyCtx"), namespaceID).Return(nil).Once() + repositoryMock.EXPECT().Delete(mock.AnythingOfType("context.todoCtx"), namespaceID).Return(nil).Once() err := dummyService.Delete(ctx, namespaceID) assert.Nil(t, err) repositoryMock.AssertExpectations(t) @@ -700,7 +700,7 @@ func TestDeleteNamespace(t *testing.T) { t.Run("should call repository Delete method and return error if any", func(t *testing.T) { repositoryMock := &mocks.NamespaceRepository{} dummyService := namespace.NewService(nil, repositoryMock, nil, nil) - repositoryMock.EXPECT().Delete(mock.AnythingOfType("*context.emptyCtx"), namespaceID).Return(errors.New("random error")).Once() + repositoryMock.EXPECT().Delete(mock.AnythingOfType("context.todoCtx"), namespaceID).Return(errors.New("random error")).Once() err := dummyService.Delete(ctx, namespaceID) assert.EqualError(t, err, "random error") repositoryMock.AssertExpectations(t) diff --git a/core/notification/dispatch_receiver_service_test.go b/core/notification/dispatch_receiver_service_test.go index 985f29a7..7923c643 100644 --- a/core/notification/dispatch_receiver_service_test.go +++ b/core/notification/dispatch_receiver_service_test.go @@ -41,7 +41,7 @@ func TestDispatchReceiverService_PrepareMessage(t *testing.T) { }, }, setup: func(rs *mocks.ReceiverService, n *mocks.Notifier) { - rs.EXPECT().Get(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("uint64")).Return(nil, errors.New("some error")) + rs.EXPECT().Get(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("uint64")).Return(nil, errors.New("some error")) }, wantErr: true, }, @@ -53,7 +53,7 @@ func TestDispatchReceiverService_PrepareMessage(t *testing.T) { }, }, setup: func(rs *mocks.ReceiverService, n *mocks.Notifier) { - rs.EXPECT().Get(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("uint64")).Return(&receiver.Receiver{}, nil) + rs.EXPECT().Get(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("uint64")).Return(&receiver.Receiver{}, nil) }, wantErr: true, }, @@ -65,10 +65,10 @@ func TestDispatchReceiverService_PrepareMessage(t *testing.T) { }, }, setup: func(rs *mocks.ReceiverService, n *mocks.Notifier) { - rs.EXPECT().Get(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("uint64")).Return(&receiver.Receiver{ + rs.EXPECT().Get(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("uint64")).Return(&receiver.Receiver{ Type: testPluginType, }, nil) - n.EXPECT().PreHookQueueTransformConfigs(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("map[string]interface {}")).Return(nil, errors.New("some error")) + n.EXPECT().PreHookQueueTransformConfigs(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("map[string]interface {}")).Return(nil, errors.New("some error")) }, wantErr: true, }, @@ -80,11 +80,11 @@ func TestDispatchReceiverService_PrepareMessage(t *testing.T) { }, }, setup: func(rs *mocks.ReceiverService, n *mocks.Notifier) { - rs.EXPECT().Get(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("uint64")).Return(&receiver.Receiver{ + rs.EXPECT().Get(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("uint64")).Return(&receiver.Receiver{ ID: 11, Type: testPluginType, }, nil) - n.EXPECT().PreHookQueueTransformConfigs(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("map[string]interface {}")).Return(map[string]any{}, nil) + n.EXPECT().PreHookQueueTransformConfigs(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("map[string]interface {}")).Return(map[string]any{}, nil) }, want: []notification.Message{ { diff --git a/core/notification/dispatch_subscriber_service_test.go b/core/notification/dispatch_subscriber_service_test.go index 0a3ae382..fffcd8b3 100644 --- a/core/notification/dispatch_subscriber_service_test.go +++ b/core/notification/dispatch_subscriber_service_test.go @@ -29,21 +29,21 @@ func TestDispatchSubscriberService_PrepareMessage(t *testing.T) { { name: "should return error if subscription service match by labels return error", setup: func(ss1 *mocks.SubscriptionService, ss2 *mocks.SilenceService, n *mocks.Notifier) { - ss1.EXPECT().MatchByLabels(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("uint64"), mock.AnythingOfType("map[string]string")).Return(nil, errors.New("some error")) + ss1.EXPECT().MatchByLabels(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("uint64"), mock.AnythingOfType("map[string]string")).Return(nil, errors.New("some error")) }, wantErr: true, }, { name: "should return error if no matching subscriptions", setup: func(ss1 *mocks.SubscriptionService, ss2 *mocks.SilenceService, n *mocks.Notifier) { - ss1.EXPECT().MatchByLabels(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("uint64"), mock.AnythingOfType("map[string]string")).Return(nil, nil) + ss1.EXPECT().MatchByLabels(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("uint64"), mock.AnythingOfType("map[string]string")).Return(nil, nil) }, wantErr: true, }, { name: "should return error if match subscription exist but list silences return error", setup: func(ss1 *mocks.SubscriptionService, ss2 *mocks.SilenceService, n *mocks.Notifier) { - ss1.EXPECT().MatchByLabels(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("uint64"), mock.AnythingOfType("map[string]string")).Return([]subscription.Subscription{ + ss1.EXPECT().MatchByLabels(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("uint64"), mock.AnythingOfType("map[string]string")).Return([]subscription.Subscription{ { ID: 123, Receivers: []subscription.Receiver{ @@ -53,14 +53,14 @@ func TestDispatchSubscriberService_PrepareMessage(t *testing.T) { }, }, }, nil) - ss2.EXPECT().List(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("silence.Filter")).Return(nil, errors.New("some error")) + ss2.EXPECT().List(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("silence.Filter")).Return(nil, errors.New("some error")) }, wantErr: true, }, { name: "should return error if match subscription exist but list silences by label return error", setup: func(ss1 *mocks.SubscriptionService, ss2 *mocks.SilenceService, n *mocks.Notifier) { - ss1.EXPECT().MatchByLabels(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("uint64"), mock.AnythingOfType("map[string]string")).Return([]subscription.Subscription{ + ss1.EXPECT().MatchByLabels(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("uint64"), mock.AnythingOfType("map[string]string")).Return([]subscription.Subscription{ { ID: 123, Receivers: []subscription.Receiver{ @@ -70,7 +70,7 @@ func TestDispatchSubscriberService_PrepareMessage(t *testing.T) { }, }, }, nil) - ss2.EXPECT().List(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("silence.Filter")).Return(nil, errors.New("some error")) + ss2.EXPECT().List(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("silence.Filter")).Return(nil, errors.New("some error")) }, wantErr: true, }, @@ -80,7 +80,7 @@ func TestDispatchSubscriberService_PrepareMessage(t *testing.T) { NamespaceID: 1, }, setup: func(ss1 *mocks.SubscriptionService, ss2 *mocks.SilenceService, n *mocks.Notifier) { - ss1.EXPECT().MatchByLabels(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("uint64"), mock.AnythingOfType("map[string]string")).Return([]subscription.Subscription{ + ss1.EXPECT().MatchByLabels(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("uint64"), mock.AnythingOfType("map[string]string")).Return([]subscription.Subscription{ { ID: 123, Match: map[string]string{ @@ -93,7 +93,7 @@ func TestDispatchSubscriberService_PrepareMessage(t *testing.T) { }, }, }, nil) - ss2.EXPECT().List(mock.AnythingOfType("*context.emptyCtx"), silence.Filter{ + ss2.EXPECT().List(mock.AnythingOfType("context.todoCtx"), silence.Filter{ NamespaceID: 1, SubscriptionMatch: map[string]string{ "k1": "v1", @@ -116,7 +116,7 @@ func TestDispatchSubscriberService_PrepareMessage(t *testing.T) { NamespaceID: 1, }, setup: func(ss1 *mocks.SubscriptionService, ss2 *mocks.SilenceService, n *mocks.Notifier) { - ss1.EXPECT().MatchByLabels(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("uint64"), mock.AnythingOfType("map[string]string")).Return([]subscription.Subscription{ + ss1.EXPECT().MatchByLabels(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("uint64"), mock.AnythingOfType("map[string]string")).Return([]subscription.Subscription{ { ID: 123, Namespace: 1, @@ -130,13 +130,13 @@ func TestDispatchSubscriberService_PrepareMessage(t *testing.T) { }, }, }, nil) - ss2.EXPECT().List(mock.AnythingOfType("*context.emptyCtx"), silence.Filter{ + ss2.EXPECT().List(mock.AnythingOfType("context.todoCtx"), silence.Filter{ NamespaceID: 1, SubscriptionMatch: map[string]string{ "k1": "v1", }, }).Return(nil, nil) - ss2.EXPECT().List(mock.AnythingOfType("*context.emptyCtx"), silence.Filter{ + ss2.EXPECT().List(mock.AnythingOfType("context.todoCtx"), silence.Filter{ NamespaceID: 1, SubscriptionID: 123, }).Return([]silence.Silence{ @@ -154,7 +154,7 @@ func TestDispatchSubscriberService_PrepareMessage(t *testing.T) { NamespaceID: 1, }, setup: func(ss1 *mocks.SubscriptionService, ss2 *mocks.SilenceService, n *mocks.Notifier) { - ss1.EXPECT().MatchByLabels(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("uint64"), mock.AnythingOfType("map[string]string")).Return([]subscription.Subscription{ + ss1.EXPECT().MatchByLabels(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("uint64"), mock.AnythingOfType("map[string]string")).Return([]subscription.Subscription{ { ID: 123, Namespace: 1, @@ -168,13 +168,13 @@ func TestDispatchSubscriberService_PrepareMessage(t *testing.T) { }, }, }, nil) - ss2.EXPECT().List(mock.AnythingOfType("*context.emptyCtx"), silence.Filter{ + ss2.EXPECT().List(mock.AnythingOfType("context.todoCtx"), silence.Filter{ NamespaceID: 1, SubscriptionMatch: map[string]string{ "k1": "v1", }, }).Return(nil, nil) - ss2.EXPECT().List(mock.AnythingOfType("*context.emptyCtx"), silence.Filter{ + ss2.EXPECT().List(mock.AnythingOfType("context.todoCtx"), silence.Filter{ NamespaceID: 1, SubscriptionID: 123, }).Return([]silence.Silence{ @@ -195,7 +195,7 @@ func TestDispatchSubscriberService_PrepareMessage(t *testing.T) { NamespaceID: 1, }, setup: func(ss1 *mocks.SubscriptionService, ss2 *mocks.SilenceService, n *mocks.Notifier) { - ss1.EXPECT().MatchByLabels(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("uint64"), mock.AnythingOfType("map[string]string")).Return([]subscription.Subscription{ + ss1.EXPECT().MatchByLabels(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("uint64"), mock.AnythingOfType("map[string]string")).Return([]subscription.Subscription{ { ID: 123, Namespace: 1, @@ -209,13 +209,13 @@ func TestDispatchSubscriberService_PrepareMessage(t *testing.T) { }, }, }, nil) - ss2.EXPECT().List(mock.AnythingOfType("*context.emptyCtx"), silence.Filter{ + ss2.EXPECT().List(mock.AnythingOfType("context.todoCtx"), silence.Filter{ NamespaceID: 1, SubscriptionMatch: map[string]string{ "k1": "v1", }, }).Return(nil, nil) - ss2.EXPECT().List(mock.AnythingOfType("*context.emptyCtx"), silence.Filter{ + ss2.EXPECT().List(mock.AnythingOfType("context.todoCtx"), silence.Filter{ NamespaceID: 1, SubscriptionID: 123, }).Return(nil, nil) @@ -228,7 +228,7 @@ func TestDispatchSubscriberService_PrepareMessage(t *testing.T) { NamespaceID: 1, }, setup: func(ss1 *mocks.SubscriptionService, ss2 *mocks.SilenceService, n *mocks.Notifier) { - ss1.EXPECT().MatchByLabels(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("uint64"), mock.AnythingOfType("map[string]string")).Return([]subscription.Subscription{ + ss1.EXPECT().MatchByLabels(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("uint64"), mock.AnythingOfType("map[string]string")).Return([]subscription.Subscription{ { ID: 123, Namespace: 1, @@ -243,17 +243,17 @@ func TestDispatchSubscriberService_PrepareMessage(t *testing.T) { }, }, }, nil) - ss2.EXPECT().List(mock.AnythingOfType("*context.emptyCtx"), silence.Filter{ + ss2.EXPECT().List(mock.AnythingOfType("context.todoCtx"), silence.Filter{ NamespaceID: 1, SubscriptionMatch: map[string]string{ "k1": "v1", }, }).Return(nil, nil) - ss2.EXPECT().List(mock.AnythingOfType("*context.emptyCtx"), silence.Filter{ + ss2.EXPECT().List(mock.AnythingOfType("context.todoCtx"), silence.Filter{ NamespaceID: 1, SubscriptionID: 123, }).Return(nil, nil) - n.EXPECT().PreHookQueueTransformConfigs(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("map[string]interface {}")).Return(nil, errors.New("some error")) + n.EXPECT().PreHookQueueTransformConfigs(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("map[string]interface {}")).Return(nil, errors.New("some error")) }, wantErr: true, }, @@ -263,7 +263,7 @@ func TestDispatchSubscriberService_PrepareMessage(t *testing.T) { NamespaceID: 1, }, setup: func(ss1 *mocks.SubscriptionService, ss2 *mocks.SilenceService, n *mocks.Notifier) { - ss1.EXPECT().MatchByLabels(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("uint64"), mock.AnythingOfType("map[string]string")).Return([]subscription.Subscription{ + ss1.EXPECT().MatchByLabels(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("uint64"), mock.AnythingOfType("map[string]string")).Return([]subscription.Subscription{ { ID: 123, Namespace: 1, @@ -278,17 +278,17 @@ func TestDispatchSubscriberService_PrepareMessage(t *testing.T) { }, }, }, nil) - ss2.EXPECT().List(mock.AnythingOfType("*context.emptyCtx"), silence.Filter{ + ss2.EXPECT().List(mock.AnythingOfType("context.todoCtx"), silence.Filter{ NamespaceID: 1, SubscriptionMatch: map[string]string{ "k1": "v1", }, }).Return(nil, nil) - ss2.EXPECT().List(mock.AnythingOfType("*context.emptyCtx"), silence.Filter{ + ss2.EXPECT().List(mock.AnythingOfType("context.todoCtx"), silence.Filter{ NamespaceID: 1, SubscriptionID: 123, }).Return(nil, nil) - n.EXPECT().PreHookQueueTransformConfigs(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("map[string]interface {}")).Return(map[string]any{}, nil) + n.EXPECT().PreHookQueueTransformConfigs(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("map[string]interface {}")).Return(map[string]any{}, nil) }, want: []notification.Message{ { diff --git a/core/notification/handler_test.go b/core/notification/handler_test.go index 65237c7c..b426a362 100644 --- a/core/notification/handler_test.go +++ b/core/notification/handler_test.go @@ -42,8 +42,8 @@ func TestHandler_MessageHandler(t *testing.T) { }, setup: func(q *mocks.Queuer, n *mocks.Notifier) { q.EXPECT().Type().Return("postgresql") - n.EXPECT().PostHookQueueTransformConfigs(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("map[string]interface {}")).Return(nil, errors.New("some error")) - q.EXPECT().ErrorCallback(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("notification.Message")).Return(nil) + n.EXPECT().PostHookQueueTransformConfigs(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("map[string]interface {}")).Return(nil, errors.New("some error")) + q.EXPECT().ErrorCallback(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("notification.Message")).Return(nil) }, wantErr: true, }, @@ -56,8 +56,8 @@ func TestHandler_MessageHandler(t *testing.T) { }, setup: func(q *mocks.Queuer, n *mocks.Notifier) { q.EXPECT().Type().Return("postgresql") - n.EXPECT().PostHookQueueTransformConfigs(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("map[string]interface {}")).Return(nil, errors.New("some error")) - q.EXPECT().ErrorCallback(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("notification.Message")).Return(errors.New("some error")) + n.EXPECT().PostHookQueueTransformConfigs(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("map[string]interface {}")).Return(nil, errors.New("some error")) + q.EXPECT().ErrorCallback(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("notification.Message")).Return(errors.New("some error")) }, wantErr: true, }, @@ -70,9 +70,9 @@ func TestHandler_MessageHandler(t *testing.T) { }, setup: func(q *mocks.Queuer, n *mocks.Notifier) { q.EXPECT().Type().Return("postgresql") - n.EXPECT().PostHookQueueTransformConfigs(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("map[string]interface {}")).Return(map[string]any{}, nil) - n.EXPECT().Send(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("notification.Message")).Return(false, errors.New("some error")) - q.EXPECT().ErrorCallback(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("notification.Message")).Return(errors.New("some error")) + n.EXPECT().PostHookQueueTransformConfigs(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("map[string]interface {}")).Return(map[string]any{}, nil) + n.EXPECT().Send(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("notification.Message")).Return(false, errors.New("some error")) + q.EXPECT().ErrorCallback(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("notification.Message")).Return(errors.New("some error")) }, wantErr: true, }, @@ -85,9 +85,9 @@ func TestHandler_MessageHandler(t *testing.T) { }, setup: func(q *mocks.Queuer, n *mocks.Notifier) { q.EXPECT().Type().Return("postgresql") - n.EXPECT().PostHookQueueTransformConfigs(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("map[string]interface {}")).Return(map[string]any{}, nil) - n.EXPECT().Send(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("notification.Message")).Return(false, errors.New("some error")) - q.EXPECT().ErrorCallback(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("notification.Message")).Return(nil) + n.EXPECT().PostHookQueueTransformConfigs(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("map[string]interface {}")).Return(map[string]any{}, nil) + n.EXPECT().Send(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("notification.Message")).Return(false, errors.New("some error")) + q.EXPECT().ErrorCallback(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("notification.Message")).Return(nil) }, wantErr: true, }, @@ -100,9 +100,9 @@ func TestHandler_MessageHandler(t *testing.T) { }, setup: func(q *mocks.Queuer, n *mocks.Notifier) { q.EXPECT().Type().Return("postgresql") - n.EXPECT().PostHookQueueTransformConfigs(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("map[string]interface {}")).Return(map[string]any{}, nil) - n.EXPECT().Send(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("notification.Message")).Return(false, nil) - q.EXPECT().SuccessCallback(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("notification.Message")).Return(errors.New("some error")) + n.EXPECT().PostHookQueueTransformConfigs(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("map[string]interface {}")).Return(map[string]any{}, nil) + n.EXPECT().Send(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("notification.Message")).Return(false, nil) + q.EXPECT().SuccessCallback(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("notification.Message")).Return(errors.New("some error")) }, wantErr: true, }, @@ -115,9 +115,9 @@ func TestHandler_MessageHandler(t *testing.T) { }, setup: func(q *mocks.Queuer, n *mocks.Notifier) { q.EXPECT().Type().Return("postgresql") - n.EXPECT().PostHookQueueTransformConfigs(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("map[string]interface {}")).Return(map[string]any{}, nil) - n.EXPECT().Send(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("notification.Message")).Return(false, nil) - q.EXPECT().SuccessCallback(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("notification.Message")).Return(nil) + n.EXPECT().PostHookQueueTransformConfigs(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("map[string]interface {}")).Return(map[string]any{}, nil) + n.EXPECT().Send(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("notification.Message")).Return(false, nil) + q.EXPECT().SuccessCallback(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("notification.Message")).Return(nil) }, wantErr: false, }, diff --git a/core/notification/message_test.go b/core/notification/message_test.go index 3033c532..84669db7 100644 --- a/core/notification/message_test.go +++ b/core/notification/message_test.go @@ -31,7 +31,7 @@ func TestMessage_InitMessage(t *testing.T) { { name: "all notification labels and data should be merged to message detail and data takes precedence if key conflict", setup: func(n *mocks.Notifier) { - n.EXPECT().PreHookQueueTransformConfigs(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("map[string]interface {}")).Return(nil, nil) + n.EXPECT().PreHookQueueTransformConfigs(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("map[string]interface {}")).Return(nil, nil) }, n: notification.Notification{ Type: notification.TypeSubscriber, diff --git a/core/notification/service_test.go b/core/notification/service_test.go index 0736a3f5..fdd47636 100644 --- a/core/notification/service_test.go +++ b/core/notification/service_test.go @@ -35,7 +35,7 @@ func TestService_CheckAndInsertIdempotency(t *testing.T) { { name: "should return error if idempotency exist and success", setup: func(ir *mocks.IdempotencyRepository) { - ir.EXPECT().InsertOnConflictReturning(mock.AnythingOfType("*context.emptyCtx"), scope, key).Return(nil, errors.ErrConflict) + ir.EXPECT().InsertOnConflictReturning(mock.AnythingOfType("context.todoCtx"), scope, key).Return(nil, errors.ErrConflict) }, scope: scope, key: key, @@ -44,7 +44,7 @@ func TestService_CheckAndInsertIdempotency(t *testing.T) { { name: "should return error if repository returning some error", setup: func(ir *mocks.IdempotencyRepository) { - ir.EXPECT().InsertOnConflictReturning(mock.AnythingOfType("*context.emptyCtx"), scope, key).Return(nil, errors.New("some error")) + ir.EXPECT().InsertOnConflictReturning(mock.AnythingOfType("context.todoCtx"), scope, key).Return(nil, errors.New("some error")) }, scope: scope, key: key, @@ -53,7 +53,7 @@ func TestService_CheckAndInsertIdempotency(t *testing.T) { { name: "should return id and nil error if no idempotency exists", setup: func(ir *mocks.IdempotencyRepository) { - ir.EXPECT().InsertOnConflictReturning(mock.AnythingOfType("*context.emptyCtx"), scope, key).Return(¬ification.Idempotency{ + ir.EXPECT().InsertOnConflictReturning(mock.AnythingOfType("context.todoCtx"), scope, key).Return(¬ification.Idempotency{ ID: 1, }, nil) }, @@ -72,7 +72,7 @@ func TestService_CheckAndInsertIdempotency(t *testing.T) { ns := notification.NewService(saltlog.NewNoop(), notification.Config{}, nil, nil, nil, notification.Deps{IdempotencyRepository: mockIdempotencyRepository}) - _, err := ns.CheckAndInsertIdempotency(context.Background(), tc.scope, tc.key) + _, err := ns.CheckAndInsertIdempotency(context.TODO(), tc.scope, tc.key) if (err != nil) != tc.wantErr { t.Errorf("NotificationService.CheckAndInsertIdempotency() error = %v, wantErr %v", err, tc.wantErr) @@ -104,7 +104,7 @@ func TestService_Dispatch(t *testing.T) { }, }, setup: func(n notification.Notification, r *mocks.Repository, _ *mocks.LogService, _ *mocks.AlertService, _ *mocks.Queuer, _ *mocks.Dispatcher) { - r.EXPECT().Create(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("notification.Notification")).Return(notification.Notification{}, errors.New("some error")) + r.EXPECT().Create(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("notification.Notification")).Return(notification.Notification{}, errors.New("some error")) }, wantErr: true, }, @@ -117,7 +117,7 @@ func TestService_Dispatch(t *testing.T) { }, }, setup: func(n notification.Notification, r *mocks.Repository, _ *mocks.LogService, _ *mocks.AlertService, _ *mocks.Queuer, d *mocks.Dispatcher) { - r.EXPECT().Create(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("notification.Notification")).Return(notification.Notification{}, nil) + r.EXPECT().Create(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("notification.Notification")).Return(notification.Notification{}, nil) d.EXPECT().PrepareMessage(mock.AnythingOfType("*context.valueCtx"), mock.AnythingOfType("notification.Notification")).Return(nil, nil, false, errors.New("some error")) }, wantErr: true, @@ -131,7 +131,7 @@ func TestService_Dispatch(t *testing.T) { }, }, setup: func(n notification.Notification, r *mocks.Repository, _ *mocks.LogService, _ *mocks.AlertService, _ *mocks.Queuer, d *mocks.Dispatcher) { - r.EXPECT().Create(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("notification.Notification")).Return(notification.Notification{}, nil) + r.EXPECT().Create(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("notification.Notification")).Return(notification.Notification{}, nil) d.EXPECT().PrepareMessage(mock.AnythingOfType("*context.valueCtx"), mock.AnythingOfType("notification.Notification")).Return(nil, nil, false, nil) }, wantErr: true, @@ -145,7 +145,7 @@ func TestService_Dispatch(t *testing.T) { }, }, setup: func(n notification.Notification, r *mocks.Repository, l *mocks.LogService, _ *mocks.AlertService, _ *mocks.Queuer, d *mocks.Dispatcher) { - r.EXPECT().Create(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("notification.Notification")).Return(notification.Notification{}, nil) + r.EXPECT().Create(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("notification.Notification")).Return(notification.Notification{}, nil) d.EXPECT().PrepareMessage(mock.AnythingOfType("*context.valueCtx"), mock.AnythingOfType("notification.Notification")).Return([]notification.Message{{ID: "123"}}, []log.Notification{{ReceiverID: 123}}, false, nil) l.EXPECT().LogNotifications(mock.AnythingOfType("*context.valueCtx"), mock.AnythingOfType("log.Notification")).Return(errors.New("some error")) }, @@ -160,7 +160,7 @@ func TestService_Dispatch(t *testing.T) { }, }, setup: func(n notification.Notification, r *mocks.Repository, l *mocks.LogService, a *mocks.AlertService, _ *mocks.Queuer, d *mocks.Dispatcher) { - r.EXPECT().Create(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("notification.Notification")).Return(notification.Notification{}, nil) + r.EXPECT().Create(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("notification.Notification")).Return(notification.Notification{}, nil) d.EXPECT().PrepareMessage(mock.AnythingOfType("*context.valueCtx"), mock.AnythingOfType("notification.Notification")).Return([]notification.Message{{ID: "123"}}, []log.Notification{{ReceiverID: 123}}, false, nil) l.EXPECT().LogNotifications(mock.AnythingOfType("*context.valueCtx"), mock.AnythingOfType("log.Notification")).Return(nil) a.EXPECT().UpdateSilenceStatus(mock.AnythingOfType("*context.valueCtx"), mock.AnythingOfType("[]int64"), mock.AnythingOfType("bool"), mock.AnythingOfType("bool")).Return(errors.New("some error")) @@ -176,7 +176,7 @@ func TestService_Dispatch(t *testing.T) { }, }, setup: func(n notification.Notification, r *mocks.Repository, l *mocks.LogService, a *mocks.AlertService, q *mocks.Queuer, d *mocks.Dispatcher) { - r.EXPECT().Create(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("notification.Notification")).Return(notification.Notification{}, nil) + r.EXPECT().Create(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("notification.Notification")).Return(notification.Notification{}, nil) d.EXPECT().PrepareMessage(mock.AnythingOfType("*context.valueCtx"), mock.AnythingOfType("notification.Notification")).Return([]notification.Message{{ID: "123"}}, []log.Notification{{ReceiverID: 123}}, false, nil) l.EXPECT().LogNotifications(mock.AnythingOfType("*context.valueCtx"), mock.AnythingOfType("log.Notification")).Return(nil) a.EXPECT().UpdateSilenceStatus(mock.AnythingOfType("*context.valueCtx"), mock.AnythingOfType("[]int64"), mock.AnythingOfType("bool"), mock.AnythingOfType("bool")).Return(nil) @@ -193,7 +193,7 @@ func TestService_Dispatch(t *testing.T) { }, }, setup: func(n notification.Notification, r *mocks.Repository, l *mocks.LogService, a *mocks.AlertService, q *mocks.Queuer, d *mocks.Dispatcher) { - r.EXPECT().Create(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("notification.Notification")).Return(n, nil) + r.EXPECT().Create(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("notification.Notification")).Return(n, nil) d.EXPECT().PrepareMessage(mock.AnythingOfType("*context.valueCtx"), mock.AnythingOfType("notification.Notification")).Return([]notification.Message{{ID: "123"}}, []log.Notification{{ReceiverID: 123}}, false, nil) l.EXPECT().LogNotifications(mock.AnythingOfType("*context.valueCtx"), mock.AnythingOfType("log.Notification")).Return(nil) a.EXPECT().UpdateSilenceStatus(mock.AnythingOfType("*context.valueCtx"), mock.AnythingOfType("[]int64"), mock.AnythingOfType("bool"), mock.AnythingOfType("bool")).Return(nil) diff --git a/core/provider/service.go b/core/provider/service.go index 6d00b523..af832e82 100644 --- a/core/provider/service.go +++ b/core/provider/service.go @@ -8,13 +8,15 @@ import ( // Service handles business logic type Service struct { - repository Repository + supportedTypes []string + repository Repository } // NewService returns repository struct -func NewService(repository Repository) *Service { +func NewService(repository Repository, supportedProviders []string) *Service { return &Service{ - repository: repository, + repository: repository, + supportedTypes: supportedProviders, } } @@ -27,6 +29,10 @@ func (s *Service) Create(ctx context.Context, prov *Provider) error { return errors.ErrInvalid.WithMsgf("provider is nil") } + if !s.isTypeSupported(prov.Type) { + return errors.ErrInvalid.WithMsgf("type %s is not supported, supported types are: %+v", prov.Type, s.supportedTypes) + } + err := s.repository.Create(ctx, prov) if err != nil { if errors.Is(err, ErrDuplicate) { @@ -54,6 +60,10 @@ func (s *Service) Update(ctx context.Context, prov *Provider) error { return errors.ErrInvalid.WithMsgf("provider is nil") } + if !s.isTypeSupported(prov.Type) { + return errors.ErrInvalid.WithMsgf("type %s is not supported, supported types are: %+v", prov.Type, s.supportedTypes) + } + err := s.repository.Update(ctx, prov) if err != nil { if errors.Is(err, ErrDuplicate) { @@ -71,3 +81,12 @@ func (s *Service) Update(ctx context.Context, prov *Provider) error { func (s *Service) Delete(ctx context.Context, id uint64) error { return s.repository.Delete(ctx, id) } + +func (s *Service) isTypeSupported(providerType string) bool { + for _, st := range s.supportedTypes { + if st == providerType { + return true + } + } + return false +} diff --git a/core/provider/service_test.go b/core/provider/service_test.go index 7b013e99..a81a488a 100644 --- a/core/provider/service_test.go +++ b/core/provider/service_test.go @@ -13,21 +13,23 @@ import ( "github.com/stretchr/testify/mock" ) +var supportedTypes = []string{"cortex"} + func TestList(t *testing.T) { ctx := context.TODO() credentials := make(pgc.StringAnyMap) - credentials["foo"] = "bar" + credentials["foo"] = "cortex" labels := make(pgc.StringStringMap) - labels["foo"] = "bar" + labels["foo"] = "cortex" t.Run("should call repository List method and return result in domain's type", func(t *testing.T) { repositoryMock := &mocks.ProviderRepository{} - dummyService := provider.NewService(repositoryMock) + dummyService := provider.NewService(repositoryMock, supportedTypes) dummyProviders := []provider.Provider{ { ID: 10, Host: "foo", - Type: "bar", + Type: "cortex", Name: "foo", Credentials: credentials, Labels: labels, @@ -35,7 +37,7 @@ func TestList(t *testing.T) { UpdatedAt: time.Now(), }, } - repositoryMock.EXPECT().List(mock.AnythingOfType("*context.emptyCtx"), provider.Filter{}).Return(dummyProviders, nil).Once() + repositoryMock.EXPECT().List(mock.AnythingOfType("context.todoCtx"), provider.Filter{}).Return(dummyProviders, nil).Once() result, err := dummyService.List(ctx, provider.Filter{}) assert.Nil(t, err) assert.Equal(t, len(dummyProviders), len(result)) @@ -45,8 +47,8 @@ func TestList(t *testing.T) { t.Run("should call repository List method and return error if any", func(t *testing.T) { repositoryMock := &mocks.ProviderRepository{} - dummyService := provider.NewService(repositoryMock) - repositoryMock.EXPECT().List(mock.AnythingOfType("*context.emptyCtx"), provider.Filter{}).Return(nil, errors.New("random error")).Once() + dummyService := provider.NewService(repositoryMock, supportedTypes) + repositoryMock.EXPECT().List(mock.AnythingOfType("context.todoCtx"), provider.Filter{}).Return(nil, errors.New("random error")).Once() result, err := dummyService.List(ctx, provider.Filter{}) assert.Nil(t, result) assert.EqualError(t, err, "random error") @@ -57,15 +59,15 @@ func TestList(t *testing.T) { func TestCreate(t *testing.T) { ctx := context.TODO() credentials := make(pgc.StringAnyMap) - credentials["foo"] = "bar" + credentials["foo"] = "cortex" labels := make(pgc.StringStringMap) - labels["foo"] = "bar" + labels["foo"] = "cortex" timenow := time.Now() dummyProviderID := uint64(10) dummyProvider := &provider.Provider{ ID: dummyProviderID, Host: "foo", - Type: "bar", + Type: "cortex", Name: "foo", Credentials: credentials, Labels: labels, @@ -75,8 +77,8 @@ func TestCreate(t *testing.T) { t.Run("should call repository Create method and return result in domain's type", func(t *testing.T) { repositoryMock := &mocks.ProviderRepository{} - dummyService := provider.NewService(repositoryMock) - repositoryMock.EXPECT().Create(mock.AnythingOfType("*context.emptyCtx"), dummyProvider).Return(nil).Once() + dummyService := provider.NewService(repositoryMock, supportedTypes) + repositoryMock.EXPECT().Create(mock.AnythingOfType("context.todoCtx"), dummyProvider).Return(nil).Once() err := dummyService.Create(ctx, dummyProvider) assert.Nil(t, err) repositoryMock.AssertExpectations(t) @@ -84,8 +86,8 @@ func TestCreate(t *testing.T) { t.Run("should call repository Create method and return error if any", func(t *testing.T) { repositoryMock := &mocks.ProviderRepository{} - dummyService := provider.NewService(repositoryMock) - repositoryMock.EXPECT().Create(mock.AnythingOfType("*context.emptyCtx"), dummyProvider).Return(errors.New("random error")).Once() + dummyService := provider.NewService(repositoryMock, supportedTypes) + repositoryMock.EXPECT().Create(mock.AnythingOfType("context.todoCtx"), dummyProvider).Return(errors.New("random error")).Once() err := dummyService.Create(ctx, dummyProvider) assert.EqualError(t, err, "random error") repositoryMock.AssertExpectations(t) @@ -93,8 +95,8 @@ func TestCreate(t *testing.T) { t.Run("should call repository Create method and return conflict error if duplicated", func(t *testing.T) { repositoryMock := &mocks.ProviderRepository{} - dummyService := provider.NewService(repositoryMock) - repositoryMock.EXPECT().Create(mock.AnythingOfType("*context.emptyCtx"), dummyProvider).Return(provider.ErrDuplicate).Once() + dummyService := provider.NewService(repositoryMock, supportedTypes) + repositoryMock.EXPECT().Create(mock.AnythingOfType("context.todoCtx"), dummyProvider).Return(provider.ErrDuplicate).Once() err := dummyService.Create(ctx, dummyProvider) assert.EqualError(t, err, "urn already exist") repositoryMock.AssertExpectations(t) @@ -105,14 +107,14 @@ func TestGetProvider(t *testing.T) { ctx := context.TODO() dummyProviderID := uint64(10) credentials := make(pgc.StringAnyMap) - credentials["foo"] = "bar" + credentials["foo"] = "cortex" labels := make(pgc.StringStringMap) - labels["foo"] = "bar" + labels["foo"] = "cortex" timenow := time.Now() dummyProvider := &provider.Provider{ ID: dummyProviderID, Host: "foo", - Type: "bar", + Type: "cortex", Name: "foo", Credentials: credentials, Labels: labels, @@ -122,8 +124,8 @@ func TestGetProvider(t *testing.T) { t.Run("should call repository Get method and return result in domain's type", func(t *testing.T) { repositoryMock := &mocks.ProviderRepository{} - dummyService := provider.NewService(repositoryMock) - repositoryMock.EXPECT().Get(mock.AnythingOfType("*context.emptyCtx"), dummyProviderID).Return(dummyProvider, nil).Once() + dummyService := provider.NewService(repositoryMock, supportedTypes) + repositoryMock.EXPECT().Get(mock.AnythingOfType("context.todoCtx"), dummyProviderID).Return(dummyProvider, nil).Once() result, err := dummyService.Get(ctx, dummyProviderID) assert.Nil(t, err) assert.Equal(t, dummyProvider, result) @@ -132,8 +134,8 @@ func TestGetProvider(t *testing.T) { t.Run("should call repository Get method and return error if any", func(t *testing.T) { repositoryMock := &mocks.ProviderRepository{} - dummyService := provider.NewService(repositoryMock) - repositoryMock.EXPECT().Get(mock.AnythingOfType("*context.emptyCtx"), dummyProviderID).Return(nil, errors.New("random error")).Once() + dummyService := provider.NewService(repositoryMock, supportedTypes) + repositoryMock.EXPECT().Get(mock.AnythingOfType("context.todoCtx"), dummyProviderID).Return(nil, errors.New("random error")).Once() result, err := dummyService.Get(ctx, dummyProviderID) assert.Empty(t, result) assert.EqualError(t, err, "random error") @@ -142,8 +144,8 @@ func TestGetProvider(t *testing.T) { t.Run("should call repository Get method and return error if repository return not found error", func(t *testing.T) { repositoryMock := &mocks.ProviderRepository{} - dummyService := provider.NewService(repositoryMock) - repositoryMock.EXPECT().Get(mock.AnythingOfType("*context.emptyCtx"), dummyProviderID).Return(nil, provider.NotFoundError{}).Once() + dummyService := provider.NewService(repositoryMock, supportedTypes) + repositoryMock.EXPECT().Get(mock.AnythingOfType("context.todoCtx"), dummyProviderID).Return(nil, provider.NotFoundError{}).Once() result, err := dummyService.Get(ctx, dummyProviderID) assert.Empty(t, result) assert.EqualError(t, err, "provider not found") @@ -156,13 +158,13 @@ func TestUpdateProvider(t *testing.T) { dummyProviderID := uint64(10) timenow := time.Now() credentials := make(pgc.StringAnyMap) - credentials["foo"] = "bar" + credentials["foo"] = "cortex" labels := make(pgc.StringStringMap) - labels["foo"] = "bar" + labels["foo"] = "cortex" dummyProvider := &provider.Provider{ ID: dummyProviderID, Host: "foo", - Type: "bar", + Type: "cortex", Name: "foo", Credentials: credentials, Labels: labels, @@ -172,8 +174,8 @@ func TestUpdateProvider(t *testing.T) { t.Run("should call repository Update method and return result in domain's type", func(t *testing.T) { repositoryMock := &mocks.ProviderRepository{} - dummyService := provider.NewService(repositoryMock) - repositoryMock.EXPECT().Update(mock.AnythingOfType("*context.emptyCtx"), dummyProvider).Return(nil).Once() + dummyService := provider.NewService(repositoryMock, supportedTypes) + repositoryMock.EXPECT().Update(mock.AnythingOfType("context.todoCtx"), dummyProvider).Return(nil).Once() err := dummyService.Update(ctx, dummyProvider) assert.Nil(t, err) repositoryMock.AssertExpectations(t) @@ -181,8 +183,8 @@ func TestUpdateProvider(t *testing.T) { t.Run("should call repository Update method and return error if any", func(t *testing.T) { repositoryMock := &mocks.ProviderRepository{} - dummyService := provider.NewService(repositoryMock) - repositoryMock.EXPECT().Update(mock.AnythingOfType("*context.emptyCtx"), dummyProvider).Return(errors.New("random error")).Once() + dummyService := provider.NewService(repositoryMock, supportedTypes) + repositoryMock.EXPECT().Update(mock.AnythingOfType("context.todoCtx"), dummyProvider).Return(errors.New("random error")).Once() err := dummyService.Update(ctx, dummyProvider) assert.EqualError(t, err, "random error") repositoryMock.AssertExpectations(t) @@ -190,8 +192,8 @@ func TestUpdateProvider(t *testing.T) { t.Run("should call repository Update method and return error not found if repository return not found error", func(t *testing.T) { repositoryMock := &mocks.ProviderRepository{} - dummyService := provider.NewService(repositoryMock) - repositoryMock.EXPECT().Update(mock.AnythingOfType("*context.emptyCtx"), dummyProvider).Return(provider.NotFoundError{}).Once() + dummyService := provider.NewService(repositoryMock, supportedTypes) + repositoryMock.EXPECT().Update(mock.AnythingOfType("context.todoCtx"), dummyProvider).Return(provider.NotFoundError{}).Once() err := dummyService.Update(ctx, dummyProvider) assert.EqualError(t, err, "provider not found") repositoryMock.AssertExpectations(t) @@ -199,8 +201,8 @@ func TestUpdateProvider(t *testing.T) { t.Run("should call repository Update method and return conflict error if repository return duplicate error", func(t *testing.T) { repositoryMock := &mocks.ProviderRepository{} - dummyService := provider.NewService(repositoryMock) - repositoryMock.EXPECT().Update(mock.AnythingOfType("*context.emptyCtx"), dummyProvider).Return(provider.ErrDuplicate).Once() + dummyService := provider.NewService(repositoryMock, supportedTypes) + repositoryMock.EXPECT().Update(mock.AnythingOfType("context.todoCtx"), dummyProvider).Return(provider.ErrDuplicate).Once() err := dummyService.Update(ctx, dummyProvider) assert.EqualError(t, err, "urn already exist") repositoryMock.AssertExpectations(t) @@ -213,8 +215,8 @@ func TestDeleteProvider(t *testing.T) { t.Run("should call repository Delete method and return nil if no error", func(t *testing.T) { repositoryMock := &mocks.ProviderRepository{} - dummyService := provider.NewService(repositoryMock) - repositoryMock.EXPECT().Delete(mock.AnythingOfType("*context.emptyCtx"), providerID).Return(nil).Once() + dummyService := provider.NewService(repositoryMock, supportedTypes) + repositoryMock.EXPECT().Delete(mock.AnythingOfType("context.todoCtx"), providerID).Return(nil).Once() err := dummyService.Delete(ctx, providerID) assert.Nil(t, err) repositoryMock.AssertExpectations(t) @@ -222,8 +224,8 @@ func TestDeleteProvider(t *testing.T) { t.Run("should call repository Delete method and return error if any", func(t *testing.T) { repositoryMock := &mocks.ProviderRepository{} - dummyService := provider.NewService(repositoryMock) - repositoryMock.EXPECT().Delete(mock.AnythingOfType("*context.emptyCtx"), providerID).Return(errors.New("random error")).Once() + dummyService := provider.NewService(repositoryMock, supportedTypes) + repositoryMock.EXPECT().Delete(mock.AnythingOfType("context.todoCtx"), providerID).Return(errors.New("random error")).Once() err := dummyService.Delete(ctx, providerID) assert.EqualError(t, err, "random error") repositoryMock.AssertExpectations(t) diff --git a/core/provider/type.go b/core/provider/type.go deleted file mode 100644 index 1513edc7..00000000 --- a/core/provider/type.go +++ /dev/null @@ -1,18 +0,0 @@ -package provider - -const ( - TypeCortex string = "cortex" -) - -var SupportedTypes = []string{ - TypeCortex, -} - -func IsTypeSupported(providerType string) bool { - for _, st := range SupportedTypes { - if st == providerType { - return true - } - } - return false -} diff --git a/core/receiver/service_test.go b/core/receiver/service_test.go index 7c074966..b9eca77d 100644 --- a/core/receiver/service_test.go +++ b/core/receiver/service_test.go @@ -28,14 +28,14 @@ func TestService_ListReceivers(t *testing.T) { { Description: "should return error if List repository error", Setup: func(rr *mocks.ReceiverRepository, ss *mocks.ConfigResolver) { - rr.EXPECT().List(mock.AnythingOfType("*context.emptyCtx"), receiver.Filter{Expanded: true}).Return(nil, errors.New("some error")) + rr.EXPECT().List(mock.AnythingOfType("context.todoCtx"), receiver.Filter{Expanded: true}).Return(nil, errors.New("some error")) }, Err: errors.New("some error"), }, { Description: "should return error if List repository success and decrypt error", Setup: func(rr *mocks.ReceiverRepository, ss *mocks.ConfigResolver) { - rr.EXPECT().List(mock.AnythingOfType("*context.emptyCtx"), receiver.Filter{ + rr.EXPECT().List(mock.AnythingOfType("context.todoCtx"), receiver.Filter{ Expanded: true, }).Return([]receiver.Receiver{ { @@ -52,7 +52,7 @@ func TestService_ListReceivers(t *testing.T) { UpdatedAt: timeNow, }, }, nil) - ss.EXPECT().PostHookDBTransformConfigs(mock.AnythingOfType("*context.emptyCtx"), map[string]any{ + ss.EXPECT().PostHookDBTransformConfigs(mock.AnythingOfType("context.todoCtx"), map[string]any{ "token": "key", }).Return(nil, errors.New("decrypt error")) }, @@ -61,7 +61,7 @@ func TestService_ListReceivers(t *testing.T) { { Description: "should return error if type unknown", Setup: func(rr *mocks.ReceiverRepository, ss *mocks.ConfigResolver) { - rr.EXPECT().List(mock.AnythingOfType("*context.emptyCtx"), receiver.Filter{Expanded: true}).Return([]receiver.Receiver{ + rr.EXPECT().List(mock.AnythingOfType("context.todoCtx"), receiver.Filter{Expanded: true}).Return([]receiver.Receiver{ { Type: "random", }, @@ -72,7 +72,7 @@ func TestService_ListReceivers(t *testing.T) { { Description: "should success if list repository and decrypt success", Setup: func(rr *mocks.ReceiverRepository, ss *mocks.ConfigResolver) { - rr.EXPECT().List(mock.AnythingOfType("*context.emptyCtx"), receiver.Filter{Expanded: true}).Return([]receiver.Receiver{ + rr.EXPECT().List(mock.AnythingOfType("context.todoCtx"), receiver.Filter{Expanded: true}).Return([]receiver.Receiver{ { ID: 10, Name: "foo", @@ -87,7 +87,7 @@ func TestService_ListReceivers(t *testing.T) { UpdatedAt: timeNow, }, }, nil) - ss.EXPECT().PostHookDBTransformConfigs(mock.AnythingOfType("*context.emptyCtx"), map[string]any{ + ss.EXPECT().PostHookDBTransformConfigs(mock.AnythingOfType("context.todoCtx"), map[string]any{ "token": "key", }).Return(map[string]any{ "token": "decrypted_key", @@ -164,7 +164,7 @@ func TestService_CreateReceiver(t *testing.T) { { Description: "should return error if type child but wrong parent", Setup: func(rr *mocks.ReceiverRepository, ss *mocks.ConfigResolver) { - rr.EXPECT().Get(mock.AnythingOfType("*context.emptyCtx"), uint64(2)).Return(&receiver.Receiver{Type: receiver.TypeFile}, nil) + rr.EXPECT().Get(mock.AnythingOfType("context.todoCtx"), uint64(2)).Return(&receiver.Receiver{Type: receiver.TypeFile}, nil) }, Rcv: &receiver.Receiver{ ID: 123, @@ -179,7 +179,7 @@ func TestService_CreateReceiver(t *testing.T) { { Description: "should return error if validateParent return error", Setup: func(rr *mocks.ReceiverRepository, ss *mocks.ConfigResolver) { - rr.EXPECT().Get(mock.AnythingOfType("*context.emptyCtx"), uint64(2)).Return(nil, errors.New("some error")) + rr.EXPECT().Get(mock.AnythingOfType("context.todoCtx"), uint64(2)).Return(nil, errors.New("some error")) }, Rcv: &receiver.Receiver{ ID: 123, @@ -194,7 +194,7 @@ func TestService_CreateReceiver(t *testing.T) { { Description: "should return error if PreHookDBTransformConfigs return error", Setup: func(rr *mocks.ReceiverRepository, ss *mocks.ConfigResolver) { - ss.EXPECT().PreHookDBTransformConfigs(mock.AnythingOfType("*context.emptyCtx"), map[string]any{"token": "key"}).Return(nil, errors.New("some error")) + ss.EXPECT().PreHookDBTransformConfigs(mock.AnythingOfType("context.todoCtx"), map[string]any{"token": "key"}).Return(nil, errors.New("some error")) }, Rcv: &receiver.Receiver{ @@ -209,10 +209,10 @@ func TestService_CreateReceiver(t *testing.T) { { Description: "should return error if Create repository return error", Setup: func(rr *mocks.ReceiverRepository, ss *mocks.ConfigResolver) { - ss.EXPECT().PreHookDBTransformConfigs(mock.AnythingOfType("*context.emptyCtx"), map[string]any{"token": "key"}).Return(map[string]any{ + ss.EXPECT().PreHookDBTransformConfigs(mock.AnythingOfType("context.todoCtx"), map[string]any{"token": "key"}).Return(map[string]any{ "token": "encrypted_key", }, nil) - rr.EXPECT().Create(mock.AnythingOfType("*context.emptyCtx"), &receiver.Receiver{ + rr.EXPECT().Create(mock.AnythingOfType("context.todoCtx"), &receiver.Receiver{ ID: 123, Type: receiver.TypeSlack, Configurations: map[string]any{ @@ -232,10 +232,10 @@ func TestService_CreateReceiver(t *testing.T) { { Description: "should return nil error if no error returned", Setup: func(rr *mocks.ReceiverRepository, ss *mocks.ConfigResolver) { - ss.EXPECT().PreHookDBTransformConfigs(mock.AnythingOfType("*context.emptyCtx"), map[string]any{"token": "key"}).Return(map[string]any{ + ss.EXPECT().PreHookDBTransformConfigs(mock.AnythingOfType("context.todoCtx"), map[string]any{"token": "key"}).Return(map[string]any{ "token": "encrypted_key", }, nil) - rr.EXPECT().Create(mock.AnythingOfType("*context.emptyCtx"), &receiver.Receiver{ + rr.EXPECT().Create(mock.AnythingOfType("context.todoCtx"), &receiver.Receiver{ ID: 123, Type: receiver.TypeSlack, Configurations: map[string]any{ @@ -298,14 +298,14 @@ func TestService_GetReceiver(t *testing.T) { { Description: "should return error if Get repository error", Setup: func(rr *mocks.ReceiverRepository, ss *mocks.ConfigResolver) { - rr.EXPECT().Get(mock.AnythingOfType("*context.emptyCtx"), testID).Return(nil, errors.New("some error")) + rr.EXPECT().Get(mock.AnythingOfType("context.todoCtx"), testID).Return(nil, errors.New("some error")) }, Err: errors.New("some error"), }, { Description: "should return error if type unknown", Setup: func(rr *mocks.ReceiverRepository, ss *mocks.ConfigResolver) { - rr.EXPECT().Get(mock.AnythingOfType("*context.emptyCtx"), testID).Return(&receiver.Receiver{ + rr.EXPECT().Get(mock.AnythingOfType("context.todoCtx"), testID).Return(&receiver.Receiver{ Type: "random", }, nil) }, @@ -314,14 +314,14 @@ func TestService_GetReceiver(t *testing.T) { { Description: "should return error not found if Get repository return not found error", Setup: func(rr *mocks.ReceiverRepository, ss *mocks.ConfigResolver) { - rr.EXPECT().Get(mock.AnythingOfType("*context.emptyCtx"), testID).Return(nil, receiver.NotFoundError{}) + rr.EXPECT().Get(mock.AnythingOfType("context.todoCtx"), testID).Return(nil, receiver.NotFoundError{}) }, Err: errors.New("receiver not found"), }, { Description: "should return error if Get repository success and decrypt error", Setup: func(rr *mocks.ReceiverRepository, ss *mocks.ConfigResolver) { - rr.EXPECT().Get(mock.AnythingOfType("*context.emptyCtx"), testID).Return(&receiver.Receiver{ + rr.EXPECT().Get(mock.AnythingOfType("context.todoCtx"), testID).Return(&receiver.Receiver{ ID: 10, Name: "foo", Type: receiver.TypeSlack, @@ -334,7 +334,7 @@ func TestService_GetReceiver(t *testing.T) { CreatedAt: timeNow, UpdatedAt: timeNow, }, nil) - ss.EXPECT().PostHookDBTransformConfigs(mock.AnythingOfType("*context.emptyCtx"), map[string]any{ + ss.EXPECT().PostHookDBTransformConfigs(mock.AnythingOfType("context.todoCtx"), map[string]any{ "token": "key", }).Return(nil, errors.New("decrypt error")) }, @@ -343,7 +343,7 @@ func TestService_GetReceiver(t *testing.T) { { Description: "should success if Get repository and decrypt success", Setup: func(rr *mocks.ReceiverRepository, ss *mocks.ConfigResolver) { - rr.EXPECT().Get(mock.AnythingOfType("*context.emptyCtx"), testID).Return(&receiver.Receiver{ + rr.EXPECT().Get(mock.AnythingOfType("context.todoCtx"), testID).Return(&receiver.Receiver{ ID: 10, Name: "foo", Type: receiver.TypeSlack, @@ -356,12 +356,12 @@ func TestService_GetReceiver(t *testing.T) { CreatedAt: timeNow, UpdatedAt: timeNow, }, nil) - ss.EXPECT().PostHookDBTransformConfigs(mock.AnythingOfType("*context.emptyCtx"), map[string]any{ + ss.EXPECT().PostHookDBTransformConfigs(mock.AnythingOfType("context.todoCtx"), map[string]any{ "token": "key", }).Return(map[string]any{ "token": "decrypted_key", }, nil) - ss.EXPECT().BuildData(mock.AnythingOfType("*context.emptyCtx"), map[string]any{ + ss.EXPECT().BuildData(mock.AnythingOfType("context.todoCtx"), map[string]any{ "token": "decrypted_key", }).Return(map[string]any{ "newdata": "populated", @@ -431,7 +431,7 @@ func TestService_UpdateReceiver(t *testing.T) { { Description: "should return error if get receiver return error", Setup: func(rr *mocks.ReceiverRepository, ss *mocks.ConfigResolver) { - rr.EXPECT().Get(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("uint64")).Return(nil, errors.New("some error")) + rr.EXPECT().Get(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("uint64")).Return(nil, errors.New("some error")) }, Rcv: &receiver.Receiver{ ID: 123, @@ -441,7 +441,7 @@ func TestService_UpdateReceiver(t *testing.T) { { Description: "should return error if type unknown", Setup: func(rr *mocks.ReceiverRepository, ss *mocks.ConfigResolver) { - rr.EXPECT().Get(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("uint64")).Return(&receiver.Receiver{ + rr.EXPECT().Get(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("uint64")).Return(&receiver.Receiver{ Type: "random", }, nil) }, @@ -453,14 +453,14 @@ func TestService_UpdateReceiver(t *testing.T) { { Description: "should return error if PreHookDBTransformConfigs return error", Setup: func(rr *mocks.ReceiverRepository, ss *mocks.ConfigResolver) { - rr.EXPECT().Get(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("uint64")).Return(&receiver.Receiver{ + rr.EXPECT().Get(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("uint64")).Return(&receiver.Receiver{ ID: 123, Type: receiver.TypeSlack, Configurations: map[string]any{ "token": "key", }, }, nil) - ss.EXPECT().PreHookDBTransformConfigs(mock.AnythingOfType("*context.emptyCtx"), map[string]any{"token": "key"}).Return(nil, errors.New("some error")) + ss.EXPECT().PreHookDBTransformConfigs(mock.AnythingOfType("context.todoCtx"), map[string]any{"token": "key"}).Return(nil, errors.New("some error")) }, Rcv: &receiver.Receiver{ ID: 123, @@ -474,17 +474,17 @@ func TestService_UpdateReceiver(t *testing.T) { { Description: "should return error if Update repository return error", Setup: func(rr *mocks.ReceiverRepository, ss *mocks.ConfigResolver) { - rr.EXPECT().Get(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("uint64")).Return(&receiver.Receiver{ + rr.EXPECT().Get(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("uint64")).Return(&receiver.Receiver{ ID: 123, Type: receiver.TypeSlack, Configurations: map[string]any{ "token": "key", }, }, nil) - ss.EXPECT().PreHookDBTransformConfigs(mock.AnythingOfType("*context.emptyCtx"), map[string]any{"token": "key"}).Return(map[string]any{ + ss.EXPECT().PreHookDBTransformConfigs(mock.AnythingOfType("context.todoCtx"), map[string]any{"token": "key"}).Return(map[string]any{ "token": "encrypted_key", }, nil) - rr.EXPECT().Update(mock.AnythingOfType("*context.emptyCtx"), &receiver.Receiver{ + rr.EXPECT().Update(mock.AnythingOfType("context.todoCtx"), &receiver.Receiver{ ID: 123, Type: receiver.TypeSlack, Configurations: map[string]any{ @@ -504,17 +504,17 @@ func TestService_UpdateReceiver(t *testing.T) { { Description: "should return nil error if no error returned", Setup: func(rr *mocks.ReceiverRepository, ss *mocks.ConfigResolver) { - rr.EXPECT().Get(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("uint64")).Return(&receiver.Receiver{ + rr.EXPECT().Get(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("uint64")).Return(&receiver.Receiver{ ID: 123, Type: receiver.TypeSlack, Configurations: map[string]any{ "token": "old-key", }, }, nil) - ss.EXPECT().PreHookDBTransformConfigs(mock.AnythingOfType("*context.emptyCtx"), map[string]any{"token": "key"}).Return(map[string]any{ + ss.EXPECT().PreHookDBTransformConfigs(mock.AnythingOfType("context.todoCtx"), map[string]any{"token": "key"}).Return(map[string]any{ "token": "encrypted_key", }, nil) - rr.EXPECT().Update(mock.AnythingOfType("*context.emptyCtx"), &receiver.Receiver{ + rr.EXPECT().Update(mock.AnythingOfType("context.todoCtx"), &receiver.Receiver{ ID: 123, Type: receiver.TypeSlack, Configurations: map[string]any{ @@ -533,17 +533,17 @@ func TestService_UpdateReceiver(t *testing.T) { }, { Description: "should return error not found if repository return not found error", Setup: func(rr *mocks.ReceiverRepository, ss *mocks.ConfigResolver) { - rr.EXPECT().Get(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("uint64")).Return(&receiver.Receiver{ + rr.EXPECT().Get(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("uint64")).Return(&receiver.Receiver{ ID: 123, Type: receiver.TypeSlack, Configurations: map[string]any{ "token": "key", }, }, nil) - ss.EXPECT().PreHookDBTransformConfigs(mock.AnythingOfType("*context.emptyCtx"), map[string]any{"token": "key"}).Return(map[string]any{ + ss.EXPECT().PreHookDBTransformConfigs(mock.AnythingOfType("context.todoCtx"), map[string]any{"token": "key"}).Return(map[string]any{ "token": "encrypted_key", }, nil) - rr.EXPECT().Update(mock.AnythingOfType("*context.emptyCtx"), &receiver.Receiver{ + rr.EXPECT().Update(mock.AnythingOfType("context.todoCtx"), &receiver.Receiver{ ID: 123, Type: receiver.TypeSlack, Configurations: map[string]any{ @@ -597,7 +597,7 @@ func TestDeleteReceiver(t *testing.T) { t.Run("should call repository Delete method and return nil if no error", func(t *testing.T) { repositoryMock := &mocks.ReceiverRepository{} dummyService := receiver.NewService(repositoryMock, nil) - repositoryMock.EXPECT().Delete(mock.AnythingOfType("*context.emptyCtx"), receiverID).Return(nil).Once() + repositoryMock.EXPECT().Delete(mock.AnythingOfType("context.todoCtx"), receiverID).Return(nil).Once() err := dummyService.Delete(ctx, receiverID) assert.Nil(t, err) repositoryMock.AssertExpectations(t) @@ -606,7 +606,7 @@ func TestDeleteReceiver(t *testing.T) { t.Run("should call repository Delete method and return error if any", func(t *testing.T) { repositoryMock := &mocks.ReceiverRepository{} dummyService := receiver.NewService(repositoryMock, nil) - repositoryMock.EXPECT().Delete(mock.AnythingOfType("*context.emptyCtx"), receiverID).Return(errors.New("random error")).Once() + repositoryMock.EXPECT().Delete(mock.AnythingOfType("context.todoCtx"), receiverID).Return(errors.New("random error")).Once() err := dummyService.Delete(ctx, receiverID) assert.EqualError(t, err, "random error") repositoryMock.AssertExpectations(t) @@ -672,7 +672,7 @@ func TestService_ExpandParents(t *testing.T) { { Description: "should return expanded receivers if there is any child receivers found", Setup: func(rr *mocks.ReceiverRepository, ss *mocks.ConfigResolver, sc *mocks.ConfigResolver) { - rr.EXPECT().List(mock.AnythingOfType("*context.emptyCtx"), receiver.Filter{ + rr.EXPECT().List(mock.AnythingOfType("context.todoCtx"), receiver.Filter{ ReceiverIDs: []uint64{1, 2}, Expanded: false, }).Return([]receiver.Receiver{ diff --git a/core/rule/service_test.go b/core/rule/service_test.go index 96257b22..b66fa105 100644 --- a/core/rule/service_test.go +++ b/core/rule/service_test.go @@ -39,7 +39,7 @@ func TestService_Upsert(t *testing.T) { }, }, Setup: func(rr *mocks.RuleRepository, ts *mocks.TemplateService, ns *mocks.NamespaceService, ru *mocks.RuleUploader) { - ns.EXPECT().Get(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("uint64")).Return(nil, errors.New("some error")) + ns.EXPECT().Get(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("uint64")).Return(nil, errors.New("some error")) }, ErrString: "some error", }, @@ -58,8 +58,8 @@ func TestService_Upsert(t *testing.T) { }, }, Setup: func(rr *mocks.RuleRepository, ts *mocks.TemplateService, ns *mocks.NamespaceService, ru *mocks.RuleUploader) { - ns.EXPECT().Get(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("uint64")).Return(&namespace.Namespace{}, nil) - ts.EXPECT().GetByName(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("string")).Return(nil, errors.New("some error")) + ns.EXPECT().Get(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("uint64")).Return(&namespace.Namespace{}, nil) + ts.EXPECT().GetByName(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("string")).Return(nil, errors.New("some error")) }, ErrString: "some error", }, @@ -78,15 +78,15 @@ func TestService_Upsert(t *testing.T) { }, }, Setup: func(rr *mocks.RuleRepository, ts *mocks.TemplateService, ns *mocks.NamespaceService, ru *mocks.RuleUploader) { - ts.EXPECT().GetByName(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("string")).Return(&template.Template{}, nil) - ns.EXPECT().Get(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("uint64")).Return(&namespace.Namespace{ + ts.EXPECT().GetByName(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("string")).Return(&template.Template{}, nil) + ns.EXPECT().Get(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("uint64")).Return(&namespace.Namespace{ Provider: provider.Provider{ - Type: provider.TypeCortex, + Type: "cortex", }, }, nil) rr.EXPECT().WithTransaction(ctx).Return(ctx) - rr.EXPECT().Upsert(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("*rule.Rule")).Return(errors.New("some error")) + rr.EXPECT().Upsert(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("*rule.Rule")).Return(errors.New("some error")) rr.EXPECT().Rollback(ctx, mock.Anything).Return(nil) }, ErrString: "some error", @@ -106,11 +106,11 @@ func TestService_Upsert(t *testing.T) { }, }, Setup: func(rr *mocks.RuleRepository, ts *mocks.TemplateService, ns *mocks.NamespaceService, ru *mocks.RuleUploader) { - ts.EXPECT().GetByName(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("string")).Return(&template.Template{}, nil) - ns.EXPECT().Get(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("uint64")).Return(&namespace.Namespace{}, nil) + ts.EXPECT().GetByName(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("string")).Return(&template.Template{}, nil) + ns.EXPECT().Get(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("uint64")).Return(&namespace.Namespace{}, nil) rr.EXPECT().WithTransaction(ctx).Return(ctx) - rr.EXPECT().Upsert(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("*rule.Rule")).Return(errors.New("some error")) + rr.EXPECT().Upsert(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("*rule.Rule")).Return(errors.New("some error")) rr.EXPECT().Rollback(ctx, errors.New("some error")).Return(nil) }, ErrString: "some error", @@ -129,15 +129,15 @@ func TestService_Upsert(t *testing.T) { }, }, Setup: func(rr *mocks.RuleRepository, ts *mocks.TemplateService, ns *mocks.NamespaceService, ru *mocks.RuleUploader) { - ts.EXPECT().GetByName(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("string")).Return(&template.Template{}, nil) - ns.EXPECT().Get(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("uint64")).Return(&namespace.Namespace{ + ts.EXPECT().GetByName(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("string")).Return(&template.Template{}, nil) + ns.EXPECT().Get(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("uint64")).Return(&namespace.Namespace{ Provider: provider.Provider{ - Type: provider.TypeCortex, + Type: "cortex", }, }, nil) rr.EXPECT().WithTransaction(ctx).Return(ctx) - rr.EXPECT().Upsert(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("*rule.Rule")).Return(nil) + rr.EXPECT().Upsert(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("*rule.Rule")).Return(nil) ru.EXPECT().UpsertRule(mock.Anything, mock.AnythingOfType("string"), mock.AnythingOfType("provider.Provider"), mock.AnythingOfType("*rule.Rule"), mock.AnythingOfType("*template.Template")).Return(nil) rr.EXPECT().Commit(ctx).Return(nil) }, @@ -157,7 +157,7 @@ func TestService_Upsert(t *testing.T) { }, }, Setup: func(rr *mocks.RuleRepository, ts *mocks.TemplateService, ns *mocks.NamespaceService, ru *mocks.RuleUploader) { - ts.EXPECT().GetByName(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("string")).Return(&template.Template{ + ts.EXPECT().GetByName(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("string")).Return(&template.Template{ Variables: []template.Variable{ { Name: "var1", @@ -167,14 +167,14 @@ func TestService_Upsert(t *testing.T) { }, }, }, nil) - ns.EXPECT().Get(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("uint64")).Return(&namespace.Namespace{ + ns.EXPECT().Get(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("uint64")).Return(&namespace.Namespace{ Provider: provider.Provider{ - Type: provider.TypeCortex, + Type: "cortex", }, }, nil) rr.EXPECT().WithTransaction(ctx).Return(ctx) - rr.EXPECT().Upsert(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("*rule.Rule")).Return(nil) + rr.EXPECT().Upsert(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("*rule.Rule")).Return(nil) ru.EXPECT().UpsertRule(mock.Anything, mock.AnythingOfType("string"), mock.AnythingOfType("provider.Provider"), mock.AnythingOfType("*rule.Rule"), mock.AnythingOfType("*template.Template")).Return(errors.New("some error")) rr.EXPECT().Rollback(ctx, mock.Anything).Return(nil) }, @@ -195,7 +195,7 @@ func TestService_Upsert(t *testing.T) { }, }, Setup: func(rr *mocks.RuleRepository, ts *mocks.TemplateService, ns *mocks.NamespaceService, ru *mocks.RuleUploader) { - ts.EXPECT().GetByName(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("string")).Return(&template.Template{ + ts.EXPECT().GetByName(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("string")).Return(&template.Template{ Variables: []template.Variable{ { Name: "var1", @@ -205,14 +205,14 @@ func TestService_Upsert(t *testing.T) { }, }, }, nil) - ns.EXPECT().Get(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("uint64")).Return(&namespace.Namespace{ + ns.EXPECT().Get(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("uint64")).Return(&namespace.Namespace{ Provider: provider.Provider{ - Type: provider.TypeCortex, + Type: "cortex", }, }, nil) rr.EXPECT().WithTransaction(ctx).Return(ctx) - rr.EXPECT().Upsert(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("*rule.Rule")).Return(nil) + rr.EXPECT().Upsert(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("*rule.Rule")).Return(nil) ru.EXPECT().UpsertRule(mock.Anything, mock.AnythingOfType("string"), mock.AnythingOfType("provider.Provider"), mock.AnythingOfType("*rule.Rule"), mock.AnythingOfType("*template.Template")).Return(errors.New("some error")) rr.EXPECT().Rollback(ctx, mock.Anything).Return(errors.New("rollback error")) }, @@ -233,7 +233,7 @@ func TestService_Upsert(t *testing.T) { }, }, Setup: func(rr *mocks.RuleRepository, ts *mocks.TemplateService, ns *mocks.NamespaceService, ru *mocks.RuleUploader) { - ts.EXPECT().GetByName(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("string")).Return(&template.Template{ + ts.EXPECT().GetByName(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("string")).Return(&template.Template{ Variables: []template.Variable{ { Name: "var1", @@ -243,14 +243,14 @@ func TestService_Upsert(t *testing.T) { }, }, }, nil) - ns.EXPECT().Get(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("uint64")).Return(&namespace.Namespace{ + ns.EXPECT().Get(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("uint64")).Return(&namespace.Namespace{ Provider: provider.Provider{ - Type: provider.TypeCortex, + Type: "cortex", }, }, nil) rr.EXPECT().WithTransaction(ctx).Return(ctx) - rr.EXPECT().Upsert(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("*rule.Rule")).Return(nil) + rr.EXPECT().Upsert(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("*rule.Rule")).Return(nil) ru.EXPECT().UpsertRule(mock.Anything, mock.AnythingOfType("string"), mock.AnythingOfType("provider.Provider"), mock.AnythingOfType("*rule.Rule"), mock.AnythingOfType("*template.Template")).Return(nil) rr.EXPECT().Commit(ctx).Return(errors.New("some commit error")) }, @@ -272,7 +272,7 @@ func TestService_Upsert(t *testing.T) { templateServiceMock, namespaceServiceMock, map[string]rule.RuleUploader{ - provider.TypeCortex: ruleUploaderMock, + "cortex": ruleUploaderMock, }, ) diff --git a/core/subscription/service_test.go b/core/subscription/service_test.go index 2adae050..91d7d753 100644 --- a/core/subscription/service_test.go +++ b/core/subscription/service_test.go @@ -24,13 +24,13 @@ func TestService_List(t *testing.T) { { Description: "should return nil error if subscription list repository return no error", Setup: func(sr *mocks.SubscriptionRepository) { - sr.EXPECT().List(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("subscription.Filter")).Return([]subscription.Subscription{}, nil) + sr.EXPECT().List(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("subscription.Filter")).Return([]subscription.Subscription{}, nil) }, }, { Description: "should return error if subscription list repository return error", Setup: func(sr *mocks.SubscriptionRepository) { - sr.EXPECT().List(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("subscription.Filter")).Return(nil, errors.New("some error")) + sr.EXPECT().List(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("subscription.Filter")).Return(nil, errors.New("some error")) }, ErrString: "some error", }, @@ -71,20 +71,20 @@ func TestService_Get(t *testing.T) { { Description: "should return nil error if subscription get repository return no error", Setup: func(sr *mocks.SubscriptionRepository) { - sr.EXPECT().Get(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("uint64")).Return(&subscription.Subscription{}, nil) + sr.EXPECT().Get(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("uint64")).Return(&subscription.Subscription{}, nil) }, }, { Description: "should return error if subscription get repository return error", Setup: func(sr *mocks.SubscriptionRepository) { - sr.EXPECT().Get(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("uint64")).Return(nil, errors.New("some error")) + sr.EXPECT().Get(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("uint64")).Return(nil, errors.New("some error")) }, ErrString: "some error", }, { Description: "should return error not found if subscription get repository return not found", Setup: func(sr *mocks.SubscriptionRepository) { - sr.EXPECT().Get(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("uint64")).Return(nil, subscription.NotFoundError{}) + sr.EXPECT().Get(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("uint64")).Return(nil, subscription.NotFoundError{}) }, ErrString: "subscription not found", }, @@ -127,28 +127,28 @@ func TestService_Create(t *testing.T) { { Description: "should return error conflict if create subscription return error duplicate", Setup: func(sr *mocks.SubscriptionRepository, ns *mocks.NamespaceService, rs *mocks.ReceiverService) { - sr.EXPECT().Create(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("*subscription.Subscription")).Return(subscription.ErrDuplicate) + sr.EXPECT().Create(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("*subscription.Subscription")).Return(subscription.ErrDuplicate) }, ErrString: "urn already exist", }, { Description: "should return error not found if create subscription return error relation", Setup: func(sr *mocks.SubscriptionRepository, ns *mocks.NamespaceService, rs *mocks.ReceiverService) { - sr.EXPECT().Create(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("*subscription.Subscription")).Return(subscription.ErrRelation) + sr.EXPECT().Create(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("*subscription.Subscription")).Return(subscription.ErrRelation) }, ErrString: "namespace id does not exist", }, { Description: "should return error if create subscription return some error", Setup: func(sr *mocks.SubscriptionRepository, ns *mocks.NamespaceService, rs *mocks.ReceiverService) { - sr.EXPECT().Create(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("*subscription.Subscription")).Return(errors.New("some error")) + sr.EXPECT().Create(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("*subscription.Subscription")).Return(errors.New("some error")) }, ErrString: "some error", }, { Description: "should return no error if create subscription return no error", Setup: func(sr *mocks.SubscriptionRepository, ns *mocks.NamespaceService, rs *mocks.ReceiverService) { - sr.EXPECT().Create(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("*subscription.Subscription")).Return(nil) + sr.EXPECT().Create(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("*subscription.Subscription")).Return(nil) }, }, } @@ -197,35 +197,35 @@ func TestService_Update(t *testing.T) { { Description: "should return error conflict if update subscription return error duplicate", Setup: func(sr *mocks.SubscriptionRepository, ns *mocks.NamespaceService, rs *mocks.ReceiverService) { - sr.EXPECT().Update(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("*subscription.Subscription")).Return(subscription.ErrDuplicate) + sr.EXPECT().Update(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("*subscription.Subscription")).Return(subscription.ErrDuplicate) }, ErrString: "urn already exist", }, { Description: "should return error not found if update subscription return error relation", Setup: func(sr *mocks.SubscriptionRepository, ns *mocks.NamespaceService, rs *mocks.ReceiverService) { - sr.EXPECT().Update(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("*subscription.Subscription")).Return(subscription.ErrRelation) + sr.EXPECT().Update(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("*subscription.Subscription")).Return(subscription.ErrRelation) }, ErrString: "namespace id does not exist", }, { Description: "should return error not found if update subscription return not found error", Setup: func(sr *mocks.SubscriptionRepository, ns *mocks.NamespaceService, rs *mocks.ReceiverService) { - sr.EXPECT().Update(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("*subscription.Subscription")).Return(subscription.NotFoundError{}) + sr.EXPECT().Update(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("*subscription.Subscription")).Return(subscription.NotFoundError{}) }, ErrString: "subscription not found", }, { Description: "should return error if update subscription return some error", Setup: func(sr *mocks.SubscriptionRepository, ns *mocks.NamespaceService, rs *mocks.ReceiverService) { - sr.EXPECT().Update(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("*subscription.Subscription")).Return(errors.New("some error")) + sr.EXPECT().Update(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("*subscription.Subscription")).Return(errors.New("some error")) }, ErrString: "some error", }, { Description: "should return no error if update subscription return no error", Setup: func(sr *mocks.SubscriptionRepository, ns *mocks.NamespaceService, rs *mocks.ReceiverService) { - sr.EXPECT().Update(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("*subscription.Subscription")).Return(nil) + sr.EXPECT().Update(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("*subscription.Subscription")).Return(nil) }, }, } @@ -274,21 +274,21 @@ func TestService_Delete(t *testing.T) { { Description: "should return error if delete subscription return error", Setup: func(sr *mocks.SubscriptionRepository, ns *mocks.NamespaceService, rs *mocks.ReceiverService) { - sr.EXPECT().Delete(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("uint64")).Return(errors.New("some error")) + sr.EXPECT().Delete(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("uint64")).Return(errors.New("some error")) }, ErrString: "some error", }, { Description: "should return error if delete subscription return error", Setup: func(sr *mocks.SubscriptionRepository, ns *mocks.NamespaceService, rs *mocks.ReceiverService) { - sr.EXPECT().Delete(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("uint64")).Return(errors.New("some error")) + sr.EXPECT().Delete(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("uint64")).Return(errors.New("some error")) }, ErrString: "some error", }, { Description: "should return no error if delete subscription return no error", Setup: func(sr *mocks.SubscriptionRepository, ns *mocks.NamespaceService, rs *mocks.ReceiverService) { - sr.EXPECT().Delete(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("uint64")).Return(nil) + sr.EXPECT().Delete(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("uint64")).Return(nil) }, }, } @@ -352,7 +352,7 @@ func TestCreateReceiversMap(t *testing.T) { }, }, Setup: func(rs *mocks.ReceiverService) { - rs.EXPECT().List(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("receiver.Filter")).Return(nil, errors.New("some error")) + rs.EXPECT().List(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("receiver.Filter")).Return(nil, errors.New("some error")) }, ErrString: "some error", }, @@ -366,7 +366,7 @@ func TestCreateReceiversMap(t *testing.T) { }, }, Setup: func(rs *mocks.ReceiverService) { - rs.EXPECT().List(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("receiver.Filter")).Return([]receiver.Receiver{ + rs.EXPECT().List(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("receiver.Filter")).Return([]receiver.Receiver{ {ID: 1}, {ID: 2}, {ID: 5}, {ID: 7}, {ID: 9}, {ID: 11}, }, nil) }, @@ -391,7 +391,7 @@ func TestCreateReceiversMap(t *testing.T) { 12: {ID: 12}, }, Setup: func(rs *mocks.ReceiverService) { - rs.EXPECT().List(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("receiver.Filter")).Return([]receiver.Receiver{ + rs.EXPECT().List(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("receiver.Filter")).Return([]receiver.Receiver{ {ID: 1}, {ID: 2}, {ID: 5}, {ID: 7}, {ID: 9}, {ID: 11}, {ID: 12}, }, nil) }, @@ -406,7 +406,7 @@ func TestCreateReceiversMap(t *testing.T) { tc.Setup(receiverServiceMock) - got, err := subscription.CreateReceiversMap(context.Background(), receiverServiceMock, tc.Subscriptions) + got, err := subscription.CreateReceiversMap(context.TODO(), receiverServiceMock, tc.Subscriptions) if tc.ErrString != "" { if tc.ErrString != err.Error() { t.Fatalf("got error %s, expected was %s", err.Error(), tc.ErrString) diff --git a/core/template/service_test.go b/core/template/service_test.go index 2eb20392..fd8307b4 100644 --- a/core/template/service_test.go +++ b/core/template/service_test.go @@ -23,7 +23,7 @@ func TestService_Upsert(t *testing.T) { { Description: "should return error if upsert repository error", Setup: func(tr *mocks.TemplateRepository) { - tr.EXPECT().Upsert(mock.AnythingOfType("*context.emptyCtx"), &template.Template{ + tr.EXPECT().Upsert(mock.AnythingOfType("context.todoCtx"), &template.Template{ ID: 1, Name: "template-1", Body: "body of a template", @@ -39,7 +39,7 @@ func TestService_Upsert(t *testing.T) { { Description: "should return error conflict if upsert repository return error duplicate", Setup: func(tr *mocks.TemplateRepository) { - tr.EXPECT().Upsert(mock.AnythingOfType("*context.emptyCtx"), &template.Template{ + tr.EXPECT().Upsert(mock.AnythingOfType("context.todoCtx"), &template.Template{ ID: 1, Name: "template-1", Body: "body of a template", @@ -55,7 +55,7 @@ func TestService_Upsert(t *testing.T) { { Description: "should return nil error if upsert repository not error", Setup: func(tr *mocks.TemplateRepository) { - tr.EXPECT().Upsert(mock.AnythingOfType("*context.emptyCtx"), &template.Template{ + tr.EXPECT().Upsert(mock.AnythingOfType("context.todoCtx"), &template.Template{ ID: 1, Name: "template-1", Body: "body of a template", @@ -102,21 +102,21 @@ func TestService_GetTemplate(t *testing.T) { { Description: "should return error if get repository return error", Setup: func(tr *mocks.TemplateRepository) { - tr.EXPECT().GetByName(mock.AnythingOfType("*context.emptyCtx"), templateName).Return(nil, errors.New("some error")) + tr.EXPECT().GetByName(mock.AnythingOfType("context.todoCtx"), templateName).Return(nil, errors.New("some error")) }, Err: errors.New("some error"), }, { Description: "should return error not found if get repository return error not found", Setup: func(tr *mocks.TemplateRepository) { - tr.EXPECT().GetByName(mock.AnythingOfType("*context.emptyCtx"), templateName).Return(nil, template.NotFoundError{}) + tr.EXPECT().GetByName(mock.AnythingOfType("context.todoCtx"), templateName).Return(nil, template.NotFoundError{}) }, Err: errors.New("template not found"), }, { Description: "should return nil error if get by name repository not error", Setup: func(tr *mocks.TemplateRepository) { - tr.EXPECT().GetByName(mock.AnythingOfType("*context.emptyCtx"), templateName).Return(&template.Template{ + tr.EXPECT().GetByName(mock.AnythingOfType("context.todoCtx"), templateName).Return(&template.Template{ ID: 1, Name: "template-1", Body: "body of a template", @@ -160,7 +160,7 @@ func TestService_Render(t *testing.T) { { Description: "should render template body from the input", Setup: func(tr *mocks.TemplateRepository) { - tr.EXPECT().GetByName(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("string")).Return(&template.Template{ + tr.EXPECT().GetByName(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("string")).Return(&template.Template{ Name: "foo", Body: "The quick [[.color]] fox jumped over the [[.adjective]] dog.", Tags: []string{"baz"}, @@ -189,7 +189,7 @@ func TestService_Render(t *testing.T) { { Description: "should render template body enriched with defaults", Setup: func(tr *mocks.TemplateRepository) { - tr.EXPECT().GetByName(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("string")).Return(&template.Template{ + tr.EXPECT().GetByName(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("string")).Return(&template.Template{ Name: "foo", Body: "The quick [[.color]] fox jumped over the [[.adjective]] dog.", Tags: []string{"baz"}, @@ -217,7 +217,7 @@ func TestService_Render(t *testing.T) { { Description: "should return not found if name does not exist", Setup: func(tr *mocks.TemplateRepository) { - tr.EXPECT().GetByName(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("string")).Return(nil, template.NotFoundError{}) + tr.EXPECT().GetByName(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("string")).Return(nil, template.NotFoundError{}) }, ErrString: "template not found", }, @@ -253,7 +253,7 @@ func TestService_List(t *testing.T) { t.Run("should call repository List method and return no error if repository return nil error", func(t *testing.T) { repositoryMock := &mocks.TemplateRepository{} dummyService := template.NewService(repositoryMock) - repositoryMock.EXPECT().List(mock.AnythingOfType("*context.emptyCtx"), template.Filter{}).Return([]template.Template{}, nil).Once() + repositoryMock.EXPECT().List(mock.AnythingOfType("context.todoCtx"), template.Filter{}).Return([]template.Template{}, nil).Once() _, err := dummyService.List(ctx, template.Filter{}) assert.Nil(t, err) repositoryMock.AssertExpectations(t) @@ -262,7 +262,7 @@ func TestService_List(t *testing.T) { t.Run("should call repository Delete method and return error if any", func(t *testing.T) { repositoryMock := &mocks.TemplateRepository{} dummyService := template.NewService(repositoryMock) - repositoryMock.EXPECT().List(mock.AnythingOfType("*context.emptyCtx"), template.Filter{}).Return(nil, errors.New("random error")).Once() + repositoryMock.EXPECT().List(mock.AnythingOfType("context.todoCtx"), template.Filter{}).Return(nil, errors.New("random error")).Once() _, err := dummyService.List(ctx, template.Filter{}) assert.EqualError(t, err, "random error") repositoryMock.AssertExpectations(t) @@ -276,7 +276,7 @@ func TestService_Delete(t *testing.T) { t.Run("should call repository Delete method and return nil if no error", func(t *testing.T) { repositoryMock := &mocks.TemplateRepository{} dummyService := template.NewService(repositoryMock) - repositoryMock.EXPECT().Delete(mock.AnythingOfType("*context.emptyCtx"), templateName).Return(nil).Once() + repositoryMock.EXPECT().Delete(mock.AnythingOfType("context.todoCtx"), templateName).Return(nil).Once() err := dummyService.Delete(ctx, templateName) assert.Nil(t, err) repositoryMock.AssertExpectations(t) @@ -285,7 +285,7 @@ func TestService_Delete(t *testing.T) { t.Run("should call repository Delete method and return error if any", func(t *testing.T) { repositoryMock := &mocks.TemplateRepository{} dummyService := template.NewService(repositoryMock) - repositoryMock.EXPECT().Delete(mock.AnythingOfType("*context.emptyCtx"), templateName).Return(errors.New("random error")).Once() + repositoryMock.EXPECT().Delete(mock.AnythingOfType("context.todoCtx"), templateName).Return(errors.New("random error")).Once() err := dummyService.Delete(ctx, templateName) assert.EqualError(t, err, "random error") repositoryMock.AssertExpectations(t) diff --git a/docs/docs/installation.md b/docs/docs/installation.md index 3cf4e84f..1b0e5165 100644 --- a/docs/docs/installation.md +++ b/docs/docs/installation.md @@ -58,7 +58,7 @@ scoop update siren Siren requires the following dependencies: -- Golang (version 1.18 or above) +- Golang (version 1.21 or above) - Git #### Build diff --git a/go.mod b/go.mod index 86345baf..8dba464d 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/goto/siren -go 1.18 +go 1.21 require ( contrib.go.opencensus.io/exporter/ocagent v0.7.0 diff --git a/go.sum b/go.sum index c14d0673..844cd7ab 100644 --- a/go.sum +++ b/go.sum @@ -864,6 +864,7 @@ github.com/GeertJohan/go.rice v1.0.0/go.mod h1:eH6gbSOAUv07dQuZVnBmoDP8mgsM1rtix github.com/HdrHistogram/hdrhistogram-go v0.9.0/go.mod h1:nxrse8/Tzg2tg3DZcZjm6qEclQKK70g0KxO61gFFZD4= github.com/HdrHistogram/hdrhistogram-go v1.0.1/go.mod h1:BWJ+nMSHY3L41Zj7CA3uXnloDp7xxV0YvstAE7nKTaM= github.com/HdrHistogram/hdrhistogram-go v1.1.2 h1:5IcZpTvzydCQeHzK4Ef/D5rrSqwxob0t8PQPMybUNFM= +github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= github.com/JohnCGriffin/overflow v0.0.0-20211019200055-46fa312c352c/go.mod h1:X0CRv0ky0k6m906ixxpzmDRLvX58TFUKS2eePweuyxk= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/MakeNowJust/heredoc v1.0.0 h1:cXCdzVdstXyiTqTvfqk9SDHpKNjxuom+DOlyEeQ4pzQ= @@ -1083,6 +1084,7 @@ github.com/briandowns/spinner v1.21.0 h1:2lVBzf3iZ3cT/ulVXljc4BzlL3yTWZDzsGsamI7 github.com/briandowns/spinner v1.21.0/go.mod h1:TcwZHb7Wb6vn/+bcVv1UXEzaA4pLS7yznHlkY/HzH44= github.com/bshuster-repo/logrus-logstash-hook v0.4.1/go.mod h1:zsTqEiSzDgAa/8GZR7E1qaXrhYNDKBYy5/dWPTIflbk= github.com/bufbuild/protocompile v0.4.0 h1:LbFKd2XowZvQ/kajzguUp2DC9UEIQhIq77fZZlaQsNA= +github.com/bufbuild/protocompile v0.4.0/go.mod h1:3v93+mbWn/v3xzN+31nwkJfrEpAUwp+BagBSZWx+TP8= github.com/buger/jsonparser v0.0.0-20180808090653-f4dd9f5a6b44/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s= github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= github.com/bugsnag/bugsnag-go v0.0.0-20141110184014-b1d153021fcd/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqREvZLWFrtK8= @@ -1478,6 +1480,7 @@ github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2 github.com/frankban/quicktest v1.10.2/go.mod h1:K+q6oSqb0W0Ininfk863uOk1lMy69l/P6txr3mVT54s= github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= +github.com/frankban/quicktest v1.14.3/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= @@ -2148,6 +2151,7 @@ github.com/jessevdk/go-flags v0.0.0-20180331124232-1c38ed7ad0cc/go.mod h1:4FA24M github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4= github.com/jhump/protoreflect v1.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c= +github.com/jhump/protoreflect v1.15.1/go.mod h1:jD/2GMKKE6OqX8qTjhADU1e6DShO+gavG9e0Q693nKo= github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= github.com/jinzhu/now v1.1.1/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= diff --git a/go.work.sum b/go.work.sum index d46eeced..0003f4ae 100644 --- a/go.work.sum +++ b/go.work.sum @@ -1,1164 +1,31 @@ -cloud.google.com/go v0.102.1/go.mod h1:XZ77E9qnTEnrgEOvr4xzfdX5TRo7fB4T2F4O6+34hIU= -cloud.google.com/go v0.104.0/go.mod h1:OO6xxXdJyvuJPcEPBLN9BJPD+jep5G1+2U5B5gkRYtA= -cloud.google.com/go v0.105.0/go.mod h1:PrLgOJNe5nfE9UMxKxgXj4mD3voiP+YQ6gdt6KMFOKM= -cloud.google.com/go v0.107.0/go.mod h1:wpc2eNrD7hXUTy8EKS10jkxpZBjASrORK7goS+3YX2I= -cloud.google.com/go v0.110.0/go.mod h1:SJnCLqQ0FCFGSZMUNUf84MV3Aia54kn7pi8st7tMzaY= -cloud.google.com/go v0.110.2/go.mod h1:k04UEeEtb6ZBRTv3dZz4CeJC3jKGxyhl0sAiVVquxiw= -cloud.google.com/go v0.110.4/go.mod h1:+EYjdK8e5RME/VY/qLCAtuyALQ9q67dvuum8i+H5xsI= -cloud.google.com/go v0.110.6/go.mod h1:+EYjdK8e5RME/VY/qLCAtuyALQ9q67dvuum8i+H5xsI= -cloud.google.com/go/accessapproval v1.4.0/go.mod h1:zybIuC3KpDOvotz59lFe5qxRZx6C75OtwbisN56xYB4= -cloud.google.com/go/accessapproval v1.5.0/go.mod h1:HFy3tuiGvMdcd/u+Cu5b9NkO1pEICJ46IR82PoUdplw= -cloud.google.com/go/accessapproval v1.6.0/go.mod h1:R0EiYnwV5fsRFiKZkPHr6mwyk2wxUJ30nL4j2pcFY2E= -cloud.google.com/go/accessapproval v1.7.1/go.mod h1:JYczztsHRMK7NTXb6Xw+dwbs/WnOJxbo/2mTI+Kgg68= -cloud.google.com/go/accesscontextmanager v1.3.0/go.mod h1:TgCBehyr5gNMz7ZaH9xubp+CE8dkrszb4oK9CWyvD4o= -cloud.google.com/go/accesscontextmanager v1.4.0/go.mod h1:/Kjh7BBu/Gh83sv+K60vN9QE5NJcd80sU33vIe2IFPE= -cloud.google.com/go/accesscontextmanager v1.6.0/go.mod h1:8XCvZWfYw3K/ji0iVnp+6pu7huxoQTLmxAbVjbloTtM= -cloud.google.com/go/accesscontextmanager v1.7.0/go.mod h1:CEGLewx8dwa33aDAZQujl7Dx+uYhS0eay198wB/VumQ= -cloud.google.com/go/accesscontextmanager v1.8.0/go.mod h1:uI+AI/r1oyWK99NN8cQ3UK76AMelMzgZCvJfsi2c+ps= -cloud.google.com/go/accesscontextmanager v1.8.1/go.mod h1:JFJHfvuaTC+++1iL1coPiG1eu5D24db2wXCDWDjIrxo= -cloud.google.com/go/aiplatform v1.22.0/go.mod h1:ig5Nct50bZlzV6NvKaTwmplLLddFx0YReh9WfTO5jKw= -cloud.google.com/go/aiplatform v1.24.0/go.mod h1:67UUvRBKG6GTayHKV8DBv2RtR1t93YRu5B1P3x99mYY= -cloud.google.com/go/aiplatform v1.27.0/go.mod h1:Bvxqtl40l0WImSb04d0hXFU7gDOiq9jQmorivIiWcKg= -cloud.google.com/go/aiplatform v1.35.0/go.mod h1:7MFT/vCaOyZT/4IIFfxH4ErVg/4ku6lKv3w0+tFTgXQ= -cloud.google.com/go/aiplatform v1.36.1/go.mod h1:WTm12vJRPARNvJ+v6P52RDHCNe4AhvjcIZ/9/RRHy/k= -cloud.google.com/go/aiplatform v1.37.0/go.mod h1:IU2Cv29Lv9oCn/9LkFiiuKfwrRTq+QQMbW+hPCxJGZw= -cloud.google.com/go/aiplatform v1.45.0/go.mod h1:Iu2Q7sC7QGhXUeOhAj/oCK9a+ULz1O4AotZiqjQ8MYA= -cloud.google.com/go/aiplatform v1.48.0/go.mod h1:Iu2Q7sC7QGhXUeOhAj/oCK9a+ULz1O4AotZiqjQ8MYA= -cloud.google.com/go/analytics v0.11.0/go.mod h1:DjEWCu41bVbYcKyvlws9Er60YE4a//bK6mnhWvQeFNI= -cloud.google.com/go/analytics v0.12.0/go.mod h1:gkfj9h6XRf9+TS4bmuhPEShsh3hH8PAZzm/41OOhQd4= -cloud.google.com/go/analytics v0.17.0/go.mod h1:WXFa3WSym4IZ+JiKmavYdJwGG/CvpqiqczmL59bTD9M= -cloud.google.com/go/analytics v0.18.0/go.mod h1:ZkeHGQlcIPkw0R/GW+boWHhCOR43xz9RN/jn7WcqfIE= -cloud.google.com/go/analytics v0.19.0/go.mod h1:k8liqf5/HCnOUkbawNtrWWc+UAzyDlW89doe8TtoDsE= -cloud.google.com/go/analytics v0.21.2/go.mod h1:U8dcUtmDmjrmUTnnnRnI4m6zKn/yaA5N9RlEkYFHpQo= -cloud.google.com/go/analytics v0.21.3/go.mod h1:U8dcUtmDmjrmUTnnnRnI4m6zKn/yaA5N9RlEkYFHpQo= -cloud.google.com/go/apigateway v1.3.0/go.mod h1:89Z8Bhpmxu6AmUxuVRg/ECRGReEdiP3vQtk4Z1J9rJk= -cloud.google.com/go/apigateway v1.4.0/go.mod h1:pHVY9MKGaH9PQ3pJ4YLzoj6U5FUDeDFBllIz7WmzJoc= -cloud.google.com/go/apigateway v1.5.0/go.mod h1:GpnZR3Q4rR7LVu5951qfXPJCHquZt02jf7xQx7kpqN8= -cloud.google.com/go/apigateway v1.6.1/go.mod h1:ufAS3wpbRjqfZrzpvLC2oh0MFlpRJm2E/ts25yyqmXA= -cloud.google.com/go/apigeeconnect v1.3.0/go.mod h1:G/AwXFAKo0gIXkPTVfZDd2qA1TxBXJ3MgMRBQkIi9jc= -cloud.google.com/go/apigeeconnect v1.4.0/go.mod h1:kV4NwOKqjvt2JYR0AoIWo2QGfoRtn/pkS3QlHp0Ni04= -cloud.google.com/go/apigeeconnect v1.5.0/go.mod h1:KFaCqvBRU6idyhSNyn3vlHXc8VMDJdRmwDF6JyFRqZ8= -cloud.google.com/go/apigeeconnect v1.6.1/go.mod h1:C4awq7x0JpLtrlQCr8AzVIzAaYgngRqWf9S5Uhg+wWs= -cloud.google.com/go/apigeeregistry v0.4.0/go.mod h1:EUG4PGcsZvxOXAdyEghIdXwAEi/4MEaoqLMLDMIwKXY= -cloud.google.com/go/apigeeregistry v0.5.0/go.mod h1:YR5+s0BVNZfVOUkMa5pAR2xGd0A473vA5M7j247o1wM= -cloud.google.com/go/apigeeregistry v0.6.0/go.mod h1:BFNzW7yQVLZ3yj0TKcwzb8n25CFBri51GVGOEUcgQsc= -cloud.google.com/go/apigeeregistry v0.7.1/go.mod h1:1XgyjZye4Mqtw7T9TsY4NW10U7BojBvG4RMD+vRDrIw= -cloud.google.com/go/apikeys v0.4.0/go.mod h1:XATS/yqZbaBK0HOssf+ALHp8jAlNHUgyfprvNcBIszU= -cloud.google.com/go/apikeys v0.5.0/go.mod h1:5aQfwY4D+ewMMWScd3hm2en3hCj+BROlyrt3ytS7KLI= -cloud.google.com/go/apikeys v0.6.0/go.mod h1:kbpXu5upyiAlGkKrJgQl8A0rKNNJ7dQ377pdroRSSi8= -cloud.google.com/go/appengine v1.4.0/go.mod h1:CS2NhuBuDXM9f+qscZ6V86m1MIIqPj3WC/UoEuR1Sno= -cloud.google.com/go/appengine v1.5.0/go.mod h1:TfasSozdkFI0zeoxW3PTBLiNqRmzraodCWatWI9Dmak= -cloud.google.com/go/appengine v1.6.0/go.mod h1:hg6i0J/BD2cKmDJbaFSYHFyZkgBEfQrDg/X0V5fJn84= -cloud.google.com/go/appengine v1.7.0/go.mod h1:eZqpbHFCqRGa2aCdope7eC0SWLV1j0neb/QnMJVWx6A= -cloud.google.com/go/appengine v1.7.1/go.mod h1:IHLToyb/3fKutRysUlFO0BPt5j7RiQ45nrzEJmKTo6E= -cloud.google.com/go/appengine v1.8.1/go.mod h1:6NJXGLVhZCN9aQ/AEDvmfzKEfoYBlfB80/BHiKVputY= -cloud.google.com/go/area120 v0.5.0/go.mod h1:DE/n4mp+iqVyvxHN41Vf1CR602GiHQjFPusMFW6bGR4= -cloud.google.com/go/area120 v0.6.0/go.mod h1:39yFJqWVgm0UZqWTOdqkLhjoC7uFfgXRC8g/ZegeAh0= -cloud.google.com/go/area120 v0.7.0/go.mod h1:a3+8EUD1SX5RUcCs3MY5YasiO1z6yLiNLRiFrykbynY= -cloud.google.com/go/area120 v0.7.1/go.mod h1:j84i4E1RboTWjKtZVWXPqvK5VHQFJRF2c1Nm69pWm9k= -cloud.google.com/go/area120 v0.8.1/go.mod h1:BVfZpGpB7KFVNxPiQBuHkX6Ed0rS51xIgmGyjrAfzsg= -cloud.google.com/go/artifactregistry v1.6.0/go.mod h1:IYt0oBPSAGYj/kprzsBjZ/4LnG/zOcHyFHjWPCi6SAQ= -cloud.google.com/go/artifactregistry v1.7.0/go.mod h1:mqTOFOnGZx8EtSqK/ZWcsm/4U8B77rbcLP6ruDU2Ixk= -cloud.google.com/go/artifactregistry v1.8.0/go.mod h1:w3GQXkJX8hiKN0v+at4b0qotwijQbYUqF2GWkZzAhC0= -cloud.google.com/go/artifactregistry v1.9.0/go.mod h1:2K2RqvA2CYvAeARHRkLDhMDJ3OXy26h3XW+3/Jh2uYc= -cloud.google.com/go/artifactregistry v1.11.1/go.mod h1:lLYghw+Itq9SONbCa1YWBoWs1nOucMH0pwXN1rOBZFI= -cloud.google.com/go/artifactregistry v1.11.2/go.mod h1:nLZns771ZGAwVLzTX/7Al6R9ehma4WUEhZGWV6CeQNQ= -cloud.google.com/go/artifactregistry v1.12.0/go.mod h1:o6P3MIvtzTOnmvGagO9v/rOjjA0HmhJ+/6KAXrmYDCI= -cloud.google.com/go/artifactregistry v1.13.0/go.mod h1:uy/LNfoOIivepGhooAUpL1i30Hgee3Cu0l4VTWHUC08= -cloud.google.com/go/artifactregistry v1.14.1/go.mod h1:nxVdG19jTaSTu7yA7+VbWL346r3rIdkZ142BSQqhn5E= -cloud.google.com/go/asset v1.5.0/go.mod h1:5mfs8UvcM5wHhqtSv8J1CtxxaQq3AdBxxQi2jGW/K4o= -cloud.google.com/go/asset v1.7.0/go.mod h1:YbENsRK4+xTiL+Ofoj5Ckf+O17kJtgp3Y3nn4uzZz5s= -cloud.google.com/go/asset v1.8.0/go.mod h1:mUNGKhiqIdbr8X7KNayoYvyc4HbbFO9URsjbytpUaW0= -cloud.google.com/go/asset v1.9.0/go.mod h1:83MOE6jEJBMqFKadM9NLRcs80Gdw76qGuHn8m3h8oHQ= -cloud.google.com/go/asset v1.10.0/go.mod h1:pLz7uokL80qKhzKr4xXGvBQXnzHn5evJAEAtZiIb0wY= -cloud.google.com/go/asset v1.11.1/go.mod h1:fSwLhbRvC9p9CXQHJ3BgFeQNM4c9x10lqlrdEUYXlJo= -cloud.google.com/go/asset v1.12.0/go.mod h1:h9/sFOa4eDIyKmH6QMpm4eUK3pDojWnUhTgJlk762Hg= -cloud.google.com/go/asset v1.13.0/go.mod h1:WQAMyYek/b7NBpYq/K4KJWcRqzoalEsxz/t/dTk4THw= -cloud.google.com/go/asset v1.14.1/go.mod h1:4bEJ3dnHCqWCDbWJ/6Vn7GVI9LerSi7Rfdi03hd+WTQ= -cloud.google.com/go/assuredworkloads v1.5.0/go.mod h1:n8HOZ6pff6re5KYfBXcFvSViQjDwxFkAkmUFffJRbbY= -cloud.google.com/go/assuredworkloads v1.6.0/go.mod h1:yo2YOk37Yc89Rsd5QMVECvjaMKymF9OP+QXWlKXUkXw= -cloud.google.com/go/assuredworkloads v1.7.0/go.mod h1:z/736/oNmtGAyU47reJgGN+KVoYoxeLBoj4XkKYscNI= -cloud.google.com/go/assuredworkloads v1.8.0/go.mod h1:AsX2cqyNCOvEQC8RMPnoc0yEarXQk6WEKkxYfL6kGIo= -cloud.google.com/go/assuredworkloads v1.9.0/go.mod h1:kFuI1P78bplYtT77Tb1hi0FMxM0vVpRC7VVoJC3ZoT0= -cloud.google.com/go/assuredworkloads v1.10.0/go.mod h1:kwdUQuXcedVdsIaKgKTp9t0UJkE5+PAVNhdQm4ZVq2E= -cloud.google.com/go/assuredworkloads v1.11.1/go.mod h1:+F04I52Pgn5nmPG36CWFtxmav6+7Q+c5QyJoL18Lry0= -cloud.google.com/go/automl v1.5.0/go.mod h1:34EjfoFGMZ5sgJ9EoLsRtdPSNZLcfflJR39VbVNS2M0= -cloud.google.com/go/automl v1.6.0/go.mod h1:ugf8a6Fx+zP0D59WLhqgTDsQI9w07o64uf/Is3Nh5p8= -cloud.google.com/go/automl v1.7.0/go.mod h1:RL9MYCCsJEOmt0Wf3z9uzG0a7adTT1fe+aObgSpkCt8= -cloud.google.com/go/automl v1.8.0/go.mod h1:xWx7G/aPEe/NP+qzYXktoBSDfjO+vnKMGgsApGJJquM= -cloud.google.com/go/automl v1.12.0/go.mod h1:tWDcHDp86aMIuHmyvjuKeeHEGq76lD7ZqfGLN6B0NuU= -cloud.google.com/go/automl v1.13.1/go.mod h1:1aowgAHWYZU27MybSCFiukPO7xnyawv7pt3zK4bheQE= -cloud.google.com/go/baremetalsolution v0.3.0/go.mod h1:XOrocE+pvK1xFfleEnShBlNAXf+j5blPPxrhjKgnIFc= -cloud.google.com/go/baremetalsolution v0.4.0/go.mod h1:BymplhAadOO/eBa7KewQ0Ppg4A4Wplbn+PsFKRLo0uI= -cloud.google.com/go/baremetalsolution v0.5.0/go.mod h1:dXGxEkmR9BMwxhzBhV0AioD0ULBmuLZI8CdwalUxuss= -cloud.google.com/go/baremetalsolution v1.1.1/go.mod h1:D1AV6xwOksJMV4OSlWHtWuFNZZYujJknMAP4Qa27QIA= -cloud.google.com/go/batch v0.3.0/go.mod h1:TR18ZoAekj1GuirsUsR1ZTKN3FC/4UDnScjT8NXImFE= -cloud.google.com/go/batch v0.4.0/go.mod h1:WZkHnP43R/QCGQsZ+0JyG4i79ranE2u8xvjq/9+STPE= -cloud.google.com/go/batch v0.7.0/go.mod h1:vLZN95s6teRUqRQ4s3RLDsH8PvboqBK+rn1oevL159g= -cloud.google.com/go/batch v1.3.1/go.mod h1:VguXeQKXIYaeeIYbuozUmBR13AfL4SJP7IltNPS+A4A= -cloud.google.com/go/beyondcorp v0.2.0/go.mod h1:TB7Bd+EEtcw9PCPQhCJtJGjk/7TC6ckmnSFS+xwTfm4= -cloud.google.com/go/beyondcorp v0.3.0/go.mod h1:E5U5lcrcXMsCuoDNyGrpyTm/hn7ne941Jz2vmksAxW8= -cloud.google.com/go/beyondcorp v0.4.0/go.mod h1:3ApA0mbhHx6YImmuubf5pyW8srKnCEPON32/5hj+RmM= -cloud.google.com/go/beyondcorp v0.5.0/go.mod h1:uFqj9X+dSfrheVp7ssLTaRHd2EHqSL4QZmH4e8WXGGU= -cloud.google.com/go/beyondcorp v0.6.1/go.mod h1:YhxDWw946SCbmcWo3fAhw3V4XZMSpQ/VYfcKGAEU8/4= -cloud.google.com/go/beyondcorp v1.0.0/go.mod h1:YhxDWw946SCbmcWo3fAhw3V4XZMSpQ/VYfcKGAEU8/4= -cloud.google.com/go/bigquery v1.42.0/go.mod h1:8dRTJxhtG+vwBKzE5OseQn/hiydoQN3EedCaOdYmxRA= -cloud.google.com/go/bigquery v1.43.0/go.mod h1:ZMQcXHsl+xmU1z36G2jNGZmKp9zNY5BUua5wDgmNCfw= -cloud.google.com/go/bigquery v1.44.0/go.mod h1:0Y33VqXTEsbamHJvJHdFmtqHvMIY28aK1+dFsvaChGc= -cloud.google.com/go/bigquery v1.47.0/go.mod h1:sA9XOgy0A8vQK9+MWhEQTY6Tix87M/ZurWFIxmF9I/E= -cloud.google.com/go/bigquery v1.48.0/go.mod h1:QAwSz+ipNgfL5jxiaK7weyOhzdoAy1zFm0Nf1fysJac= -cloud.google.com/go/bigquery v1.49.0/go.mod h1:Sv8hMmTFFYBlt/ftw2uN6dFdQPzBlREY9yBh7Oy7/4Q= -cloud.google.com/go/bigquery v1.50.0/go.mod h1:YrleYEh2pSEbgTBZYMJ5SuSr0ML3ypjRB1zgf7pvQLU= -cloud.google.com/go/bigquery v1.52.0/go.mod h1:3b/iXjRQGU4nKa87cXeg6/gogLjO8C6PmuM8i5Bi/u4= -cloud.google.com/go/bigquery v1.53.0/go.mod h1:3b/iXjRQGU4nKa87cXeg6/gogLjO8C6PmuM8i5Bi/u4= -cloud.google.com/go/billing v1.4.0/go.mod h1:g9IdKBEFlItS8bTtlrZdVLWSSdSyFUZKXNS02zKMOZY= -cloud.google.com/go/billing v1.5.0/go.mod h1:mztb1tBc3QekhjSgmpf/CV4LzWXLzCArwpLmP2Gm88s= -cloud.google.com/go/billing v1.6.0/go.mod h1:WoXzguj+BeHXPbKfNWkqVtDdzORazmCjraY+vrxcyvI= -cloud.google.com/go/billing v1.7.0/go.mod h1:q457N3Hbj9lYwwRbnlD7vUpyjq6u5U1RAOArInEiD5Y= -cloud.google.com/go/billing v1.12.0/go.mod h1:yKrZio/eu+okO/2McZEbch17O5CB5NpZhhXG6Z766ss= -cloud.google.com/go/billing v1.13.0/go.mod h1:7kB2W9Xf98hP9Sr12KfECgfGclsH3CQR0R08tnRlRbc= -cloud.google.com/go/billing v1.16.0/go.mod h1:y8vx09JSSJG02k5QxbycNRrN7FGZB6F3CAcgum7jvGA= -cloud.google.com/go/binaryauthorization v1.1.0/go.mod h1:xwnoWu3Y84jbuHa0zd526MJYmtnVXn0syOjaJgy4+dM= -cloud.google.com/go/binaryauthorization v1.2.0/go.mod h1:86WKkJHtRcv5ViNABtYMhhNWRrD1Vpi//uKEy7aYEfI= -cloud.google.com/go/binaryauthorization v1.3.0/go.mod h1:lRZbKgjDIIQvzYQS1p99A7/U1JqvqeZg0wiI5tp6tg0= -cloud.google.com/go/binaryauthorization v1.4.0/go.mod h1:tsSPQrBd77VLplV70GUhBf/Zm3FsKmgSqgm4UmiDItk= -cloud.google.com/go/binaryauthorization v1.5.0/go.mod h1:OSe4OU1nN/VswXKRBmciKpo9LulY41gch5c68htf3/Q= -cloud.google.com/go/binaryauthorization v1.6.1/go.mod h1:TKt4pa8xhowwffiBmbrbcxijJRZED4zrqnwZ1lKH51U= -cloud.google.com/go/certificatemanager v1.3.0/go.mod h1:n6twGDvcUBFu9uBgt4eYvvf3sQ6My8jADcOVwHmzadg= -cloud.google.com/go/certificatemanager v1.4.0/go.mod h1:vowpercVFyqs8ABSmrdV+GiFf2H/ch3KyudYQEMM590= -cloud.google.com/go/certificatemanager v1.6.0/go.mod h1:3Hh64rCKjRAX8dXgRAyOcY5vQ/fE1sh8o+Mdd6KPgY8= -cloud.google.com/go/certificatemanager v1.7.1/go.mod h1:iW8J3nG6SaRYImIa+wXQ0g8IgoofDFRp5UMzaNk1UqI= -cloud.google.com/go/channel v1.8.0/go.mod h1:W5SwCXDJsq/rg3tn3oG0LOxpAo6IMxNa09ngphpSlnk= -cloud.google.com/go/channel v1.9.0/go.mod h1:jcu05W0my9Vx4mt3/rEHpfxc9eKi9XwsdDL8yBMbKUk= -cloud.google.com/go/channel v1.11.0/go.mod h1:IdtI0uWGqhEeatSB62VOoJ8FSUhJ9/+iGkJVqp74CGE= -cloud.google.com/go/channel v1.12.0/go.mod h1:VkxCGKASi4Cq7TbXxlaBezonAYpp1GCnKMY6tnMQnLU= -cloud.google.com/go/channel v1.16.0/go.mod h1:eN/q1PFSl5gyu0dYdmxNXscY/4Fi7ABmeHCJNf/oHmc= -cloud.google.com/go/cloudbuild v1.3.0/go.mod h1:WequR4ULxlqvMsjDEEEFnOG5ZSRSgWOywXYDb1vPE6U= -cloud.google.com/go/cloudbuild v1.4.0/go.mod h1:5Qwa40LHiOXmz3386FrjrYM93rM/hdRr7b53sySrTqA= -cloud.google.com/go/cloudbuild v1.6.0/go.mod h1:UIbc/w9QCbH12xX+ezUsgblrWv+Cv4Tw83GiSMHOn9M= -cloud.google.com/go/cloudbuild v1.7.0/go.mod h1:zb5tWh2XI6lR9zQmsm1VRA+7OCuve5d8S+zJUul8KTg= -cloud.google.com/go/cloudbuild v1.9.0/go.mod h1:qK1d7s4QlO0VwfYn5YuClDGg2hfmLZEb4wQGAbIgL1s= -cloud.google.com/go/cloudbuild v1.10.1/go.mod h1:lyJg7v97SUIPq4RC2sGsz/9tNczhyv2AjML/ci4ulzU= -cloud.google.com/go/cloudbuild v1.13.0/go.mod h1:lyJg7v97SUIPq4RC2sGsz/9tNczhyv2AjML/ci4ulzU= -cloud.google.com/go/clouddms v1.3.0/go.mod h1:oK6XsCDdW4Ib3jCCBugx+gVjevp2TMXFtgxvPSee3OM= -cloud.google.com/go/clouddms v1.4.0/go.mod h1:Eh7sUGCC+aKry14O1NRljhjyrr0NFC0G2cjwX0cByRk= -cloud.google.com/go/clouddms v1.5.0/go.mod h1:QSxQnhikCLUw13iAbffF2CZxAER3xDGNHjsTAkQJcQA= -cloud.google.com/go/clouddms v1.6.1/go.mod h1:Ygo1vL52Ov4TBZQquhz5fiw2CQ58gvu+PlS6PVXCpZI= -cloud.google.com/go/cloudtasks v1.5.0/go.mod h1:fD92REy1x5woxkKEkLdvavGnPJGEn8Uic9nWuLzqCpY= -cloud.google.com/go/cloudtasks v1.6.0/go.mod h1:C6Io+sxuke9/KNRkbQpihnW93SWDU3uXt92nu85HkYI= -cloud.google.com/go/cloudtasks v1.7.0/go.mod h1:ImsfdYWwlWNJbdgPIIGJWC+gemEGTBK/SunNQQNCAb4= -cloud.google.com/go/cloudtasks v1.8.0/go.mod h1:gQXUIwCSOI4yPVK7DgTVFiiP0ZW/eQkydWzwVMdHxrI= -cloud.google.com/go/cloudtasks v1.9.0/go.mod h1:w+EyLsVkLWHcOaqNEyvcKAsWp9p29dL6uL9Nst1cI7Y= -cloud.google.com/go/cloudtasks v1.10.0/go.mod h1:NDSoTLkZ3+vExFEWu2UJV1arUyzVDAiZtdWcsUyNwBs= -cloud.google.com/go/cloudtasks v1.11.1/go.mod h1:a9udmnou9KO2iulGscKR0qBYjreuX8oHwpmFsKspEvM= -cloud.google.com/go/cloudtasks v1.12.1/go.mod h1:a9udmnou9KO2iulGscKR0qBYjreuX8oHwpmFsKspEvM= -cloud.google.com/go/compute v1.10.0/go.mod h1:ER5CLbMxl90o2jtNbGSbtfOpQKR0t15FOtRsugnLrlU= -cloud.google.com/go/compute v1.12.0/go.mod h1:e8yNOBcBONZU1vJKCvCoDw/4JQsA0dpM4x/6PIIOocU= -cloud.google.com/go/compute v1.12.1/go.mod h1:e8yNOBcBONZU1vJKCvCoDw/4JQsA0dpM4x/6PIIOocU= -cloud.google.com/go/compute v1.13.0/go.mod h1:5aPTS0cUNMIc1CE546K+Th6weJUNQErARyZtRXDJ8GE= -cloud.google.com/go/compute v1.14.0/go.mod h1:YfLtxrj9sU4Yxv+sXzZkyPjEyPBZfXHUvjxega5vAdo= -cloud.google.com/go/compute v1.15.1/go.mod h1:bjjoF/NtFUrkD/urWfdHaKuOPDR5nWIs63rR+SXhcpA= -cloud.google.com/go/compute v1.18.0/go.mod h1:1X7yHxec2Ga+Ss6jPyjxRxpu2uu7PLgsOVXvgU0yacs= -cloud.google.com/go/compute v1.19.0/go.mod h1:rikpw2y+UMidAe9tISo04EHNOIf42RLYF/q8Bs93scU= -cloud.google.com/go/compute v1.19.1/go.mod h1:6ylj3a05WF8leseCdIf77NK0g1ey+nj5IKd5/kvShxE= -cloud.google.com/go/compute v1.19.3/go.mod h1:qxvISKp/gYnXkSAD1ppcSOveRAmzxicEv/JlizULFrI= -cloud.google.com/go/compute v1.20.1/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM= -cloud.google.com/go/compute v1.21.0/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM= -cloud.google.com/go/compute v1.23.0/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM= -cloud.google.com/go/compute/metadata v0.1.0/go.mod h1:Z1VN+bulIf6bt4P/C37K4DyZYZEXYonfTBHHFPO/4UU= -cloud.google.com/go/compute/metadata v0.2.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= -cloud.google.com/go/compute/metadata v0.2.1/go.mod h1:jgHgmJd2RKBGzXqF5LR2EZMGxBkeanZ9wwa75XHJgOM= -cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= -cloud.google.com/go/contactcenterinsights v1.3.0/go.mod h1:Eu2oemoePuEFc/xKFPjbTuPSj0fYJcPls9TFlPNnHHY= -cloud.google.com/go/contactcenterinsights v1.4.0/go.mod h1:L2YzkGbPsv+vMQMCADxJoT9YiTTnSEd6fEvCeHTYVck= -cloud.google.com/go/contactcenterinsights v1.6.0/go.mod h1:IIDlT6CLcDoyv79kDv8iWxMSTZhLxSCofVV5W6YFM/w= -cloud.google.com/go/contactcenterinsights v1.9.1/go.mod h1:bsg/R7zGLYMVxFFzfh9ooLTruLRCG9fnzhH9KznHhbM= -cloud.google.com/go/contactcenterinsights v1.10.0/go.mod h1:bsg/R7zGLYMVxFFzfh9ooLTruLRCG9fnzhH9KznHhbM= -cloud.google.com/go/container v1.6.0/go.mod h1:Xazp7GjJSeUYo688S+6J5V+n/t+G5sKBTFkKNudGRxg= -cloud.google.com/go/container v1.7.0/go.mod h1:Dp5AHtmothHGX3DwwIHPgq45Y8KmNsgN3amoYfxVkLo= -cloud.google.com/go/container v1.13.1/go.mod h1:6wgbMPeQRw9rSnKBCAJXnds3Pzj03C4JHamr8asWKy4= -cloud.google.com/go/container v1.14.0/go.mod h1:3AoJMPhHfLDxLvrlVWaK57IXzaPnLaZq63WX59aQBfM= -cloud.google.com/go/container v1.15.0/go.mod h1:ft+9S0WGjAyjDggg5S06DXj+fHJICWg8L7isCQe9pQA= -cloud.google.com/go/container v1.22.1/go.mod h1:lTNExE2R7f+DLbAN+rJiKTisauFCaoDq6NURZ83eVH4= -cloud.google.com/go/container v1.24.0/go.mod h1:lTNExE2R7f+DLbAN+rJiKTisauFCaoDq6NURZ83eVH4= -cloud.google.com/go/containeranalysis v0.5.1/go.mod h1:1D92jd8gRR/c0fGMlymRgxWD3Qw9C1ff6/T7mLgVL8I= -cloud.google.com/go/containeranalysis v0.6.0/go.mod h1:HEJoiEIu+lEXM+k7+qLCci0h33lX3ZqoYFdmPcoO7s4= -cloud.google.com/go/containeranalysis v0.7.0/go.mod h1:9aUL+/vZ55P2CXfuZjS4UjQ9AgXoSw8Ts6lemfmxBxI= -cloud.google.com/go/containeranalysis v0.9.0/go.mod h1:orbOANbwk5Ejoom+s+DUCTTJ7IBdBQJDcSylAx/on9s= -cloud.google.com/go/containeranalysis v0.10.1/go.mod h1:Ya2jiILITMY68ZLPaogjmOMNkwsDrWBSTyBubGXO7j0= -cloud.google.com/go/datacatalog v1.3.0/go.mod h1:g9svFY6tuR+j+hrTw3J2dNcmI0dzmSiyOzm8kpLq0a0= -cloud.google.com/go/datacatalog v1.5.0/go.mod h1:M7GPLNQeLfWqeIm3iuiruhPzkt65+Bx8dAKvScX8jvs= -cloud.google.com/go/datacatalog v1.6.0/go.mod h1:+aEyF8JKg+uXcIdAmmaMUmZ3q1b/lKLtXCmXdnc0lbc= -cloud.google.com/go/datacatalog v1.7.0/go.mod h1:9mEl4AuDYWw81UGc41HonIHH7/sn52H0/tc8f8ZbZIE= -cloud.google.com/go/datacatalog v1.8.0/go.mod h1:KYuoVOv9BM8EYz/4eMFxrr4DUKhGIOXxZoKYF5wdISM= -cloud.google.com/go/datacatalog v1.8.1/go.mod h1:RJ58z4rMp3gvETA465Vg+ag8BGgBdnRPEMMSTr5Uv+M= -cloud.google.com/go/datacatalog v1.12.0/go.mod h1:CWae8rFkfp6LzLumKOnmVh4+Zle4A3NXLzVJ1d1mRm0= -cloud.google.com/go/datacatalog v1.13.0/go.mod h1:E4Rj9a5ZtAxcQJlEBTLgMTphfP11/lNaAshpoBgemX8= -cloud.google.com/go/datacatalog v1.14.0/go.mod h1:h0PrGtlihoutNMp/uvwhawLQ9+c63Kz65UFqh49Yo+E= -cloud.google.com/go/datacatalog v1.14.1/go.mod h1:d2CevwTG4yedZilwe+v3E3ZBDRMobQfSG/a6cCCN5R4= -cloud.google.com/go/datacatalog v1.16.0/go.mod h1:d2CevwTG4yedZilwe+v3E3ZBDRMobQfSG/a6cCCN5R4= -cloud.google.com/go/dataflow v0.6.0/go.mod h1:9QwV89cGoxjjSR9/r7eFDqqjtvbKxAK2BaYU6PVk9UM= -cloud.google.com/go/dataflow v0.7.0/go.mod h1:PX526vb4ijFMesO1o202EaUmouZKBpjHsTlCtB4parQ= -cloud.google.com/go/dataflow v0.8.0/go.mod h1:Rcf5YgTKPtQyYz8bLYhFoIV/vP39eL7fWNcSOyFfLJE= -cloud.google.com/go/dataflow v0.9.1/go.mod h1:Wp7s32QjYuQDWqJPFFlnBKhkAtiFpMTdg00qGbnIHVw= -cloud.google.com/go/dataform v0.3.0/go.mod h1:cj8uNliRlHpa6L3yVhDOBrUXH+BPAO1+KFMQQNSThKo= -cloud.google.com/go/dataform v0.4.0/go.mod h1:fwV6Y4Ty2yIFL89huYlEkwUPtS7YZinZbzzj5S9FzCE= -cloud.google.com/go/dataform v0.5.0/go.mod h1:GFUYRe8IBa2hcomWplodVmUx/iTL0FrsauObOM3Ipr0= -cloud.google.com/go/dataform v0.6.0/go.mod h1:QPflImQy33e29VuapFdf19oPbE4aYTJxr31OAPV+ulA= -cloud.google.com/go/dataform v0.7.0/go.mod h1:7NulqnVozfHvWUBpMDfKMUESr+85aJsC/2O0o3jWPDE= -cloud.google.com/go/dataform v0.8.1/go.mod h1:3BhPSiw8xmppbgzeBbmDvmSWlwouuJkXsXsb8UBih9M= -cloud.google.com/go/datafusion v1.4.0/go.mod h1:1Zb6VN+W6ALo85cXnM1IKiPw+yQMKMhB9TsTSRDo/38= -cloud.google.com/go/datafusion v1.5.0/go.mod h1:Kz+l1FGHB0J+4XF2fud96WMmRiq/wj8N9u007vyXZ2w= -cloud.google.com/go/datafusion v1.6.0/go.mod h1:WBsMF8F1RhSXvVM8rCV3AeyWVxcC2xY6vith3iw3S+8= -cloud.google.com/go/datafusion v1.7.1/go.mod h1:KpoTBbFmoToDExJUso/fcCiguGDk7MEzOWXUsJo0wsI= -cloud.google.com/go/datalabeling v0.5.0/go.mod h1:TGcJ0G2NzcsXSE/97yWjIZO0bXj0KbVlINXMG9ud42I= -cloud.google.com/go/datalabeling v0.6.0/go.mod h1:WqdISuk/+WIGeMkpw/1q7bK/tFEZxsrFJOJdY2bXvTQ= -cloud.google.com/go/datalabeling v0.7.0/go.mod h1:WPQb1y08RJbmpM3ww0CSUAGweL0SxByuW2E+FU+wXcM= -cloud.google.com/go/datalabeling v0.8.1/go.mod h1:XS62LBSVPbYR54GfYQsPXZjTW8UxCK2fkDciSrpRFdY= -cloud.google.com/go/dataplex v1.3.0/go.mod h1:hQuRtDg+fCiFgC8j0zV222HvzFQdRd+SVX8gdmFcZzA= -cloud.google.com/go/dataplex v1.4.0/go.mod h1:X51GfLXEMVJ6UN47ESVqvlsRplbLhcsAt0kZCCKsU0A= -cloud.google.com/go/dataplex v1.5.2/go.mod h1:cVMgQHsmfRoI5KFYq4JtIBEUbYwc3c7tXmIDhRmNNVQ= -cloud.google.com/go/dataplex v1.6.0/go.mod h1:bMsomC/aEJOSpHXdFKFGQ1b0TDPIeL28nJObeO1ppRs= -cloud.google.com/go/dataplex v1.8.1/go.mod h1:7TyrDT6BCdI8/38Uvp0/ZxBslOslP2X2MPDucliyvSE= -cloud.google.com/go/dataplex v1.9.0/go.mod h1:7TyrDT6BCdI8/38Uvp0/ZxBslOslP2X2MPDucliyvSE= -cloud.google.com/go/dataproc v1.7.0/go.mod h1:CKAlMjII9H90RXaMpSxQ8EU6dQx6iAYNPcYPOkSbi8s= -cloud.google.com/go/dataproc v1.8.0/go.mod h1:5OW+zNAH0pMpw14JVrPONsxMQYMBqJuzORhIBfBn9uI= -cloud.google.com/go/dataproc v1.12.0/go.mod h1:zrF3aX0uV3ikkMz6z4uBbIKyhRITnxvr4i3IjKsKrw4= -cloud.google.com/go/dataproc/v2 v2.0.1/go.mod h1:7Ez3KRHdFGcfY7GcevBbvozX+zyWGcwLJvvAMwCaoZ4= -cloud.google.com/go/dataqna v0.5.0/go.mod h1:90Hyk596ft3zUQ8NkFfvICSIfHFh1Bc7C4cK3vbhkeo= -cloud.google.com/go/dataqna v0.6.0/go.mod h1:1lqNpM7rqNLVgWBJyk5NF6Uen2PHym0jtVJonplVsDA= -cloud.google.com/go/dataqna v0.7.0/go.mod h1:Lx9OcIIeqCrw1a6KdO3/5KMP1wAmTc0slZWwP12Qq3c= -cloud.google.com/go/dataqna v0.8.1/go.mod h1:zxZM0Bl6liMePWsHA8RMGAfmTG34vJMapbHAxQ5+WA8= -cloud.google.com/go/datastore v1.10.0/go.mod h1:PC5UzAmDEkAmkfaknstTYbNpgE49HAgW2J1gcgUfmdM= -cloud.google.com/go/datastore v1.11.0/go.mod h1:TvGxBIHCS50u8jzG+AW/ppf87v1of8nwzFNgEZU1D3c= -cloud.google.com/go/datastore v1.12.0/go.mod h1:KjdB88W897MRITkvWWJrg2OUtrR5XVj1EoLgSp6/N70= -cloud.google.com/go/datastore v1.12.1/go.mod h1:KjdB88W897MRITkvWWJrg2OUtrR5XVj1EoLgSp6/N70= -cloud.google.com/go/datastore v1.13.0/go.mod h1:KjdB88W897MRITkvWWJrg2OUtrR5XVj1EoLgSp6/N70= -cloud.google.com/go/datastream v1.2.0/go.mod h1:i/uTP8/fZwgATHS/XFu0TcNUhuA0twZxxQ3EyCUQMwo= -cloud.google.com/go/datastream v1.3.0/go.mod h1:cqlOX8xlyYF/uxhiKn6Hbv6WjwPPuI9W2M9SAXwaLLQ= -cloud.google.com/go/datastream v1.4.0/go.mod h1:h9dpzScPhDTs5noEMQVWP8Wx8AFBRyS0s8KWPx/9r0g= -cloud.google.com/go/datastream v1.5.0/go.mod h1:6TZMMNPwjUqZHBKPQ1wwXpb0d5VDVPl2/XoS5yi88q4= -cloud.google.com/go/datastream v1.6.0/go.mod h1:6LQSuswqLa7S4rPAOZFVjHIG3wJIjZcZrw8JDEDJuIs= -cloud.google.com/go/datastream v1.7.0/go.mod h1:uxVRMm2elUSPuh65IbZpzJNMbuzkcvu5CjMqVIUHrww= -cloud.google.com/go/datastream v1.9.1/go.mod h1:hqnmr8kdUBmrnk65k5wNRoHSCYksvpdZIcZIEl8h43Q= -cloud.google.com/go/datastream v1.10.0/go.mod h1:hqnmr8kdUBmrnk65k5wNRoHSCYksvpdZIcZIEl8h43Q= -cloud.google.com/go/deploy v1.4.0/go.mod h1:5Xghikd4VrmMLNaF6FiRFDlHb59VM59YoDQnOUdsH/c= -cloud.google.com/go/deploy v1.5.0/go.mod h1:ffgdD0B89tToyW/U/D2eL0jN2+IEV/3EMuXHA0l4r+s= -cloud.google.com/go/deploy v1.6.0/go.mod h1:f9PTHehG/DjCom3QH0cntOVRm93uGBDt2vKzAPwpXQI= -cloud.google.com/go/deploy v1.8.0/go.mod h1:z3myEJnA/2wnB4sgjqdMfgxCA0EqC3RBTNcVPs93mtQ= -cloud.google.com/go/deploy v1.11.0/go.mod h1:tKuSUV5pXbn67KiubiUNUejqLs4f5cxxiCNCeyl0F2g= -cloud.google.com/go/deploy v1.13.0/go.mod h1:tKuSUV5pXbn67KiubiUNUejqLs4f5cxxiCNCeyl0F2g= -cloud.google.com/go/dialogflow v1.15.0/go.mod h1:HbHDWs33WOGJgn6rfzBW1Kv807BE3O1+xGbn59zZWI4= -cloud.google.com/go/dialogflow v1.16.1/go.mod h1:po6LlzGfK+smoSmTBnbkIZY2w8ffjz/RcGSS+sh1el0= -cloud.google.com/go/dialogflow v1.17.0/go.mod h1:YNP09C/kXA1aZdBgC/VtXX74G/TKn7XVCcVumTflA+8= -cloud.google.com/go/dialogflow v1.18.0/go.mod h1:trO7Zu5YdyEuR+BhSNOqJezyFQ3aUzz0njv7sMx/iek= -cloud.google.com/go/dialogflow v1.19.0/go.mod h1:JVmlG1TwykZDtxtTXujec4tQ+D8SBFMoosgy+6Gn0s0= -cloud.google.com/go/dialogflow v1.29.0/go.mod h1:b+2bzMe+k1s9V+F2jbJwpHPzrnIyHihAdRFMtn2WXuM= -cloud.google.com/go/dialogflow v1.31.0/go.mod h1:cuoUccuL1Z+HADhyIA7dci3N5zUssgpBJmCzI6fNRB4= -cloud.google.com/go/dialogflow v1.32.0/go.mod h1:jG9TRJl8CKrDhMEcvfcfFkkpp8ZhgPz3sBGmAUYJ2qE= -cloud.google.com/go/dialogflow v1.38.0/go.mod h1:L7jnH+JL2mtmdChzAIcXQHXMvQkE3U4hTaNltEuxXn4= -cloud.google.com/go/dialogflow v1.40.0/go.mod h1:L7jnH+JL2mtmdChzAIcXQHXMvQkE3U4hTaNltEuxXn4= -cloud.google.com/go/dlp v1.6.0/go.mod h1:9eyB2xIhpU0sVwUixfBubDoRwP+GjeUoxxeueZmqvmM= -cloud.google.com/go/dlp v1.7.0/go.mod h1:68ak9vCiMBjbasxeVD17hVPxDEck+ExiHavX8kiHG+Q= -cloud.google.com/go/dlp v1.9.0/go.mod h1:qdgmqgTyReTz5/YNSSuueR8pl7hO0o9bQ39ZhtgkWp4= -cloud.google.com/go/dlp v1.10.1/go.mod h1:IM8BWz1iJd8njcNcG0+Kyd9OPnqnRNkDV8j42VT5KOI= -cloud.google.com/go/documentai v1.7.0/go.mod h1:lJvftZB5NRiFSX4moiye1SMxHx0Bc3x1+p9e/RfXYiU= -cloud.google.com/go/documentai v1.8.0/go.mod h1:xGHNEB7CtsnySCNrCFdCyyMz44RhFEEX2Q7UD0c5IhU= -cloud.google.com/go/documentai v1.9.0/go.mod h1:FS5485S8R00U10GhgBC0aNGrJxBP8ZVpEeJ7PQDZd6k= -cloud.google.com/go/documentai v1.10.0/go.mod h1:vod47hKQIPeCfN2QS/jULIvQTugbmdc0ZvxxfQY1bg4= -cloud.google.com/go/documentai v1.16.0/go.mod h1:o0o0DLTEZ+YnJZ+J4wNfTxmDVyrkzFvttBXXtYRMHkM= -cloud.google.com/go/documentai v1.18.0/go.mod h1:F6CK6iUH8J81FehpskRmhLq/3VlwQvb7TvwOceQ2tbs= -cloud.google.com/go/documentai v1.20.0/go.mod h1:yJkInoMcK0qNAEdRnqY/D5asy73tnPe88I1YTZT+a8E= -cloud.google.com/go/documentai v1.22.0/go.mod h1:yJkInoMcK0qNAEdRnqY/D5asy73tnPe88I1YTZT+a8E= -cloud.google.com/go/domains v0.6.0/go.mod h1:T9Rz3GasrpYk6mEGHh4rymIhjlnIuB4ofT1wTxDeT4Y= -cloud.google.com/go/domains v0.7.0/go.mod h1:PtZeqS1xjnXuRPKE/88Iru/LdfoRyEHYA9nFQf4UKpg= -cloud.google.com/go/domains v0.8.0/go.mod h1:M9i3MMDzGFXsydri9/vW+EWz9sWb4I6WyHqdlAk0idE= -cloud.google.com/go/domains v0.9.1/go.mod h1:aOp1c0MbejQQ2Pjf1iJvnVyT+z6R6s8pX66KaCSDYfE= -cloud.google.com/go/edgecontainer v0.1.0/go.mod h1:WgkZ9tp10bFxqO8BLPqv2LlfmQF1X8lZqwW4r1BTajk= -cloud.google.com/go/edgecontainer v0.2.0/go.mod h1:RTmLijy+lGpQ7BXuTDa4C4ssxyXT34NIuHIgKuP4s5w= -cloud.google.com/go/edgecontainer v0.3.0/go.mod h1:FLDpP4nykgwwIfcLt6zInhprzw0lEi2P1fjO6Ie0qbc= -cloud.google.com/go/edgecontainer v1.0.0/go.mod h1:cttArqZpBB2q58W/upSG++ooo6EsblxDIolxa3jSjbY= -cloud.google.com/go/edgecontainer v1.1.1/go.mod h1:O5bYcS//7MELQZs3+7mabRqoWQhXCzenBu0R8bz2rwk= -cloud.google.com/go/errorreporting v0.3.0/go.mod h1:xsP2yaAp+OAW4OIm60An2bbLpqIhKXdWR/tawvl7QzU= -cloud.google.com/go/essentialcontacts v1.3.0/go.mod h1:r+OnHa5jfj90qIfZDO/VztSFqbQan7HV75p8sA+mdGI= -cloud.google.com/go/essentialcontacts v1.4.0/go.mod h1:8tRldvHYsmnBCHdFpvU+GL75oWiBKl80BiqlFh9tp+8= -cloud.google.com/go/essentialcontacts v1.5.0/go.mod h1:ay29Z4zODTuwliK7SnX8E86aUF2CTzdNtvv42niCX0M= -cloud.google.com/go/essentialcontacts v1.6.2/go.mod h1:T2tB6tX+TRak7i88Fb2N9Ok3PvY3UNbUsMag9/BARh4= -cloud.google.com/go/eventarc v1.7.0/go.mod h1:6ctpF3zTnaQCxUjHUdcfgcA1A2T309+omHZth7gDfmc= -cloud.google.com/go/eventarc v1.8.0/go.mod h1:imbzxkyAU4ubfsaKYdQg04WS1NvncblHEup4kvF+4gw= -cloud.google.com/go/eventarc v1.10.0/go.mod h1:u3R35tmZ9HvswGRBnF48IlYgYeBcPUCjkr4BTdem2Kw= -cloud.google.com/go/eventarc v1.11.0/go.mod h1:PyUjsUKPWoRBCHeOxZd/lbOOjahV41icXyUY5kSTvVY= -cloud.google.com/go/eventarc v1.12.1/go.mod h1:mAFCW6lukH5+IZjkvrEss+jmt2kOdYlN8aMx3sRJiAI= -cloud.google.com/go/eventarc v1.13.0/go.mod h1:mAFCW6lukH5+IZjkvrEss+jmt2kOdYlN8aMx3sRJiAI= -cloud.google.com/go/filestore v1.3.0/go.mod h1:+qbvHGvXU1HaKX2nD0WEPo92TP/8AQuCVEBXNY9z0+w= -cloud.google.com/go/filestore v1.4.0/go.mod h1:PaG5oDfo9r224f8OYXURtAsY+Fbyq/bLYoINEK8XQAI= -cloud.google.com/go/filestore v1.5.0/go.mod h1:FqBXDWBp4YLHqRnVGveOkHDf8svj9r5+mUDLupOWEDs= -cloud.google.com/go/filestore v1.6.0/go.mod h1:di5unNuss/qfZTw2U9nhFqo8/ZDSc466dre85Kydllg= -cloud.google.com/go/filestore v1.7.1/go.mod h1:y10jsorq40JJnjR/lQ8AfFbbcGlw3g+Dp8oN7i7FjV4= -cloud.google.com/go/firestore v1.9.0/go.mod h1:HMkjKHNTtRyZNiMzu7YAsLr9K3X2udY2AMwDaMEQiiE= -cloud.google.com/go/firestore v1.11.0/go.mod h1:b38dKhgzlmNNGTNZZwe7ZRFEuRab1Hay3/DBsIGKKy4= -cloud.google.com/go/functions v1.6.0/go.mod h1:3H1UA3qiIPRWD7PeZKLvHZ9SaQhR26XIJcC0A5GbvAk= -cloud.google.com/go/functions v1.7.0/go.mod h1:+d+QBcWM+RsrgZfV9xo6KfA1GlzJfxcfZcRPEhDDfzg= -cloud.google.com/go/functions v1.8.0/go.mod h1:RTZ4/HsQjIqIYP9a9YPbU+QFoQsAlYgrwOXJWHn1POY= -cloud.google.com/go/functions v1.9.0/go.mod h1:Y+Dz8yGguzO3PpIjhLTbnqV1CWmgQ5UwtlpzoyquQ08= -cloud.google.com/go/functions v1.10.0/go.mod h1:0D3hEOe3DbEvCXtYOZHQZmD+SzYsi1YbI7dGvHfldXw= -cloud.google.com/go/functions v1.12.0/go.mod h1:AXWGrF3e2C/5ehvwYo/GH6O5s09tOPksiKhz+hH8WkA= -cloud.google.com/go/functions v1.13.0/go.mod h1:EU4O007sQm6Ef/PwRsI8N2umygGqPBS/IZQKBQBcJ3c= -cloud.google.com/go/functions v1.15.1/go.mod h1:P5yNWUTkyU+LvW/S9O6V+V423VZooALQlqoXdoPz5AE= -cloud.google.com/go/gaming v1.5.0/go.mod h1:ol7rGcxP/qHTRQE/RO4bxkXq+Fix0j6D4LFPzYTIrDM= -cloud.google.com/go/gaming v1.6.0/go.mod h1:YMU1GEvA39Qt3zWGyAVA9bpYz/yAhTvaQ1t2sK4KPUA= -cloud.google.com/go/gaming v1.7.0/go.mod h1:LrB8U7MHdGgFG851iHAfqUdLcKBdQ55hzXy9xBJz0+w= -cloud.google.com/go/gaming v1.8.0/go.mod h1:xAqjS8b7jAVW0KFYeRUxngo9My3f33kFmua++Pi+ggM= -cloud.google.com/go/gaming v1.9.0/go.mod h1:Fc7kEmCObylSWLO334NcO+O9QMDyz+TKC4v1D7X+Bc0= -cloud.google.com/go/gaming v1.10.1/go.mod h1:XQQvtfP8Rb9Rxnxm5wFVpAp9zCQkJi2bLIb7iHGwB3s= -cloud.google.com/go/gkebackup v0.2.0/go.mod h1:XKvv/4LfG829/B8B7xRkk8zRrOEbKtEam6yNfuQNH60= -cloud.google.com/go/gkebackup v0.3.0/go.mod h1:n/E671i1aOQvUxT541aTkCwExO/bTer2HDlj4TsBRAo= -cloud.google.com/go/gkebackup v0.4.0/go.mod h1:byAyBGUwYGEEww7xsbnUTBHIYcOPy/PgUWUtOeRm9Vg= -cloud.google.com/go/gkebackup v1.3.0/go.mod h1:vUDOu++N0U5qs4IhG1pcOnD1Mac79xWy6GoBFlWCWBU= -cloud.google.com/go/gkeconnect v0.5.0/go.mod h1:c5lsNAg5EwAy7fkqX/+goqFsU1Da/jQFqArp+wGNr/o= -cloud.google.com/go/gkeconnect v0.6.0/go.mod h1:Mln67KyU/sHJEBY8kFZ0xTeyPtzbq9StAVvEULYK16A= -cloud.google.com/go/gkeconnect v0.7.0/go.mod h1:SNfmVqPkaEi3bF/B3CNZOAYPYdg7sU+obZ+QTky2Myw= -cloud.google.com/go/gkeconnect v0.8.1/go.mod h1:KWiK1g9sDLZqhxB2xEuPV8V9NYzrqTUmQR9shJHpOZw= -cloud.google.com/go/gkehub v0.9.0/go.mod h1:WYHN6WG8w9bXU0hqNxt8rm5uxnk8IH+lPY9J2TV7BK0= -cloud.google.com/go/gkehub v0.10.0/go.mod h1:UIPwxI0DsrpsVoWpLB0stwKCP+WFVG9+y977wO+hBH0= -cloud.google.com/go/gkehub v0.11.0/go.mod h1:JOWHlmN+GHyIbuWQPl47/C2RFhnFKH38jH9Ascu3n0E= -cloud.google.com/go/gkehub v0.12.0/go.mod h1:djiIwwzTTBrF5NaXCGv3mf7klpEMcST17VBTVVDcuaw= -cloud.google.com/go/gkehub v0.14.1/go.mod h1:VEXKIJZ2avzrbd7u+zeMtW00Y8ddk/4V9511C9CQGTY= -cloud.google.com/go/gkemulticloud v0.3.0/go.mod h1:7orzy7O0S+5kq95e4Hpn7RysVA7dPs8W/GgfUtsPbrA= -cloud.google.com/go/gkemulticloud v0.4.0/go.mod h1:E9gxVBnseLWCk24ch+P9+B2CoDFJZTyIgLKSalC7tuI= -cloud.google.com/go/gkemulticloud v0.5.0/go.mod h1:W0JDkiyi3Tqh0TJr//y19wyb1yf8llHVto2Htf2Ja3Y= -cloud.google.com/go/gkemulticloud v0.6.1/go.mod h1:kbZ3HKyTsiwqKX7Yw56+wUGwwNZViRnxWK2DVknXWfw= -cloud.google.com/go/gkemulticloud v1.0.0/go.mod h1:kbZ3HKyTsiwqKX7Yw56+wUGwwNZViRnxWK2DVknXWfw= -cloud.google.com/go/grafeas v0.2.0/go.mod h1:KhxgtF2hb0P191HlY5besjYm6MqTSTj3LSI+M+ByZHc= -cloud.google.com/go/grafeas v0.3.0/go.mod h1:P7hgN24EyONOTMyeJH6DxG4zD7fwiYa5Q6GUgyFSOU8= -cloud.google.com/go/gsuiteaddons v1.3.0/go.mod h1:EUNK/J1lZEZO8yPtykKxLXI6JSVN2rg9bN8SXOa0bgM= -cloud.google.com/go/gsuiteaddons v1.4.0/go.mod h1:rZK5I8hht7u7HxFQcFei0+AtfS9uSushomRlg+3ua1o= -cloud.google.com/go/gsuiteaddons v1.5.0/go.mod h1:TFCClYLd64Eaa12sFVmUyG62tk4mdIsI7pAnSXRkcFo= -cloud.google.com/go/gsuiteaddons v1.6.1/go.mod h1:CodrdOqRZcLp5WOwejHWYBjZvfY0kOphkAKpF/3qdZY= -cloud.google.com/go/iam v0.1.0/go.mod h1:vcUNEa0pEm0qRVpmWepWaFMIAI8/hjB9mO8rNCJtF6c= -cloud.google.com/go/iam v0.5.0/go.mod h1:wPU9Vt0P4UmCux7mqtRu6jcpPAb74cP1fh50J3QpkUc= -cloud.google.com/go/iam v0.6.0/go.mod h1:+1AH33ueBne5MzYccyMHtEKqLE4/kJOibtffMHDMFMc= -cloud.google.com/go/iam v0.7.0/go.mod h1:H5Br8wRaDGNc8XP3keLc4unfUUZeyH3Sfl9XpQEYOeg= -cloud.google.com/go/iam v0.8.0/go.mod h1:lga0/y3iH6CX7sYqypWJ33hf7kkfXJag67naqGESjkE= -cloud.google.com/go/iam v0.11.0/go.mod h1:9PiLDanza5D+oWFZiH1uG+RnRCfEGKoyl6yo4cgWZGY= -cloud.google.com/go/iam v0.12.0/go.mod h1:knyHGviacl11zrtZUoDuYpDgLjvr28sLQaG0YB2GYAY= -cloud.google.com/go/iam v0.13.0/go.mod h1:ljOg+rcNfzZ5d6f1nAUJ8ZIxOaZUVoS14bKCtaLZ/D0= -cloud.google.com/go/iam v1.0.1/go.mod h1:yR3tmSL8BcZB4bxByRv2jkSIahVmCtfKZwLYGBalRE8= -cloud.google.com/go/iam v1.1.0/go.mod h1:nxdHjaKfCr7fNYx/HJMM8LgiMugmveWlkatear5gVyk= -cloud.google.com/go/iam v1.1.1/go.mod h1:A5avdyVL2tCppe4unb0951eI9jreack+RJ0/d+KUZOU= -cloud.google.com/go/iap v1.4.0/go.mod h1:RGFwRJdihTINIe4wZ2iCP0zF/qu18ZwyKxrhMhygBEc= -cloud.google.com/go/iap v1.5.0/go.mod h1:UH/CGgKd4KyohZL5Pt0jSKE4m3FR51qg6FKQ/z/Ix9A= -cloud.google.com/go/iap v1.6.0/go.mod h1:NSuvI9C/j7UdjGjIde7t7HBz+QTwBcapPE07+sSRcLk= -cloud.google.com/go/iap v1.7.0/go.mod h1:beqQx56T9O1G1yNPph+spKpNibDlYIiIixiqsQXxLIo= -cloud.google.com/go/iap v1.7.1/go.mod h1:WapEwPc7ZxGt2jFGB/C/bm+hP0Y6NXzOYGjpPnmMS74= -cloud.google.com/go/iap v1.8.1/go.mod h1:sJCbeqg3mvWLqjZNsI6dfAtbbV1DL2Rl7e1mTyXYREQ= -cloud.google.com/go/ids v1.1.0/go.mod h1:WIuwCaYVOzHIj2OhN9HAwvW+DBdmUAdcWlFxRl+KubM= -cloud.google.com/go/ids v1.2.0/go.mod h1:5WXvp4n25S0rA/mQWAg1YEEBBq6/s+7ml1RDCW1IrcY= -cloud.google.com/go/ids v1.3.0/go.mod h1:JBdTYwANikFKaDP6LtW5JAi4gubs57SVNQjemdt6xV4= -cloud.google.com/go/ids v1.4.1/go.mod h1:np41ed8YMU8zOgv53MMMoCntLTn2lF+SUzlM+O3u/jw= -cloud.google.com/go/iot v1.3.0/go.mod h1:r7RGh2B61+B8oz0AGE+J72AhA0G7tdXItODWsaA2oLs= -cloud.google.com/go/iot v1.4.0/go.mod h1:dIDxPOn0UvNDUMD8Ger7FIaTuvMkj+aGk94RPP0iV+g= -cloud.google.com/go/iot v1.5.0/go.mod h1:mpz5259PDl3XJthEmh9+ap0affn/MqNSP4My77Qql9o= -cloud.google.com/go/iot v1.6.0/go.mod h1:IqdAsmE2cTYYNO1Fvjfzo9po179rAtJeVGUvkLN3rLE= -cloud.google.com/go/iot v1.7.1/go.mod h1:46Mgw7ev1k9KqK1ao0ayW9h0lI+3hxeanz+L1zmbbbk= -cloud.google.com/go/kms v1.4.0/go.mod h1:fajBHndQ+6ubNw6Ss2sSd+SWvjL26RNo/dr7uxsnnOA= -cloud.google.com/go/kms v1.5.0/go.mod h1:QJS2YY0eJGBg3mnDfuaCyLauWwBJiHRboYxJ++1xJNg= -cloud.google.com/go/kms v1.6.0/go.mod h1:Jjy850yySiasBUDi6KFUwUv2n1+o7QZFyuUJg6OgjA0= -cloud.google.com/go/kms v1.8.0/go.mod h1:4xFEhYFqvW+4VMELtZyxomGSYtSQKzM178ylFW4jMAg= -cloud.google.com/go/kms v1.9.0/go.mod h1:qb1tPTgfF9RQP8e1wq4cLFErVuTJv7UsSC915J8dh3w= -cloud.google.com/go/kms v1.10.0/go.mod h1:ng3KTUtQQU9bPX3+QGLsflZIHlkbn8amFAMY63m8d24= -cloud.google.com/go/kms v1.10.1/go.mod h1:rIWk/TryCkR59GMC3YtHtXeLzd634lBbKenvyySAyYI= -cloud.google.com/go/kms v1.11.0/go.mod h1:hwdiYC0xjnWsKQQCQQmIQnS9asjYVSK6jtXm+zFqXLM= -cloud.google.com/go/kms v1.12.1/go.mod h1:c9J991h5DTl+kg7gi3MYomh12YEENGrf48ee/N/2CDM= -cloud.google.com/go/kms v1.15.0/go.mod h1:c9J991h5DTl+kg7gi3MYomh12YEENGrf48ee/N/2CDM= -cloud.google.com/go/language v1.4.0/go.mod h1:F9dRpNFQmJbkaop6g0JhSBXCNlO90e1KWx5iDdxbWic= -cloud.google.com/go/language v1.6.0/go.mod h1:6dJ8t3B+lUYfStgls25GusK04NLh3eDLQnWM3mdEbhI= -cloud.google.com/go/language v1.7.0/go.mod h1:DJ6dYN/W+SQOjF8e1hLQXMF21AkH2w9wiPzPCJa2MIE= -cloud.google.com/go/language v1.8.0/go.mod h1:qYPVHf7SPoNNiCL2Dr0FfEFNil1qi3pQEyygwpgVKB8= -cloud.google.com/go/language v1.9.0/go.mod h1:Ns15WooPM5Ad/5no/0n81yUetis74g3zrbeJBE+ptUY= -cloud.google.com/go/language v1.10.1/go.mod h1:CPp94nsdVNiQEt1CNjF5WkTcisLiHPyIbMhvR8H2AW0= -cloud.google.com/go/lifesciences v0.5.0/go.mod h1:3oIKy8ycWGPUyZDR/8RNnTOYevhaMLqh5vLUXs9zvT8= -cloud.google.com/go/lifesciences v0.6.0/go.mod h1:ddj6tSX/7BOnhxCSd3ZcETvtNr8NZ6t/iPhY2Tyfu08= -cloud.google.com/go/lifesciences v0.8.0/go.mod h1:lFxiEOMqII6XggGbOnKiyZ7IBwoIqA84ClvoezaA/bo= -cloud.google.com/go/lifesciences v0.9.1/go.mod h1:hACAOd1fFbCGLr/+weUKRAJas82Y4vrL3O5326N//Wc= -cloud.google.com/go/logging v1.6.1/go.mod h1:5ZO0mHHbvm8gEmeEUHrmDlTDSu5imF6MUP9OfilNXBw= -cloud.google.com/go/logging v1.7.0/go.mod h1:3xjP2CjkM3ZkO73aj4ASA5wRPGGCRrPIAeNqVNkzY8M= -cloud.google.com/go/longrunning v0.1.1/go.mod h1:UUFxuDWkv22EuY93jjmDMFT5GPQKeFVJBIF6QlTqdsE= -cloud.google.com/go/longrunning v0.3.0/go.mod h1:qth9Y41RRSUE69rDcOn6DdK3HfQfsUI0YSmW3iIlLJc= -cloud.google.com/go/longrunning v0.4.1/go.mod h1:4iWDqhBZ70CvZ6BfETbvam3T8FMvLK+eFj0E6AaRQTo= -cloud.google.com/go/longrunning v0.4.2/go.mod h1:OHrnaYyLUV6oqwh0xiS7e5sLQhP1m0QU9R+WhGDMgIQ= -cloud.google.com/go/longrunning v0.5.0/go.mod h1:0JNuqRShmscVAhIACGtskSAWtqtOoPkwP0YF1oVEchc= -cloud.google.com/go/longrunning v0.5.1/go.mod h1:spvimkwdz6SPWKEt/XBij79E9fiTkHSQl/fRUUQJYJc= -cloud.google.com/go/managedidentities v1.3.0/go.mod h1:UzlW3cBOiPrzucO5qWkNkh0w33KFtBJU281hacNvsdE= -cloud.google.com/go/managedidentities v1.4.0/go.mod h1:NWSBYbEMgqmbZsLIyKvxrYbtqOsxY1ZrGM+9RgDqInM= -cloud.google.com/go/managedidentities v1.5.0/go.mod h1:+dWcZ0JlUmpuxpIDfyP5pP5y0bLdRwOS4Lp7gMni/LA= -cloud.google.com/go/managedidentities v1.6.1/go.mod h1:h/irGhTN2SkZ64F43tfGPMbHnypMbu4RB3yl8YcuEak= -cloud.google.com/go/maps v0.1.0/go.mod h1:BQM97WGyfw9FWEmQMpZ5T6cpovXXSd1cGmFma94eubI= -cloud.google.com/go/maps v0.6.0/go.mod h1:o6DAMMfb+aINHz/p/jbcY+mYeXBoZoxTfdSQ8VAJaCw= -cloud.google.com/go/maps v0.7.0/go.mod h1:3GnvVl3cqeSvgMcpRlQidXsPYuDGQ8naBis7MVzpXsY= -cloud.google.com/go/maps v1.4.0/go.mod h1:6mWTUv+WhnOwAgjVsSW2QPPECmW+s3PcRyOa9vgG/5s= -cloud.google.com/go/mediatranslation v0.5.0/go.mod h1:jGPUhGTybqsPQn91pNXw0xVHfuJ3leR1wj37oU3y1f4= -cloud.google.com/go/mediatranslation v0.6.0/go.mod h1:hHdBCTYNigsBxshbznuIMFNe5QXEowAuNmmC7h8pu5w= -cloud.google.com/go/mediatranslation v0.7.0/go.mod h1:LCnB/gZr90ONOIQLgSXagp8XUW1ODs2UmUMvcgMfI2I= -cloud.google.com/go/mediatranslation v0.8.1/go.mod h1:L/7hBdEYbYHQJhX2sldtTO5SZZ1C1vkapubj0T2aGig= -cloud.google.com/go/memcache v1.4.0/go.mod h1:rTOfiGZtJX1AaFUrOgsMHX5kAzaTQ8azHiuDoTPzNsE= -cloud.google.com/go/memcache v1.5.0/go.mod h1:dk3fCK7dVo0cUU2c36jKb4VqKPS22BTkf81Xq617aWM= -cloud.google.com/go/memcache v1.6.0/go.mod h1:XS5xB0eQZdHtTuTF9Hf8eJkKtR3pVRCcvJwtm68T3rA= -cloud.google.com/go/memcache v1.7.0/go.mod h1:ywMKfjWhNtkQTxrWxCkCFkoPjLHPW6A7WOTVI8xy3LY= -cloud.google.com/go/memcache v1.9.0/go.mod h1:8oEyzXCu+zo9RzlEaEjHl4KkgjlNDaXbCQeQWlzNFJM= -cloud.google.com/go/memcache v1.10.1/go.mod h1:47YRQIarv4I3QS5+hoETgKO40InqzLP6kpNLvyXuyaA= -cloud.google.com/go/metastore v1.5.0/go.mod h1:2ZNrDcQwghfdtCwJ33nM0+GrBGlVuh8rakL3vdPY3XY= -cloud.google.com/go/metastore v1.6.0/go.mod h1:6cyQTls8CWXzk45G55x57DVQ9gWg7RiH65+YgPsNh9s= -cloud.google.com/go/metastore v1.7.0/go.mod h1:s45D0B4IlsINu87/AsWiEVYbLaIMeUSoxlKKDqBGFS8= -cloud.google.com/go/metastore v1.8.0/go.mod h1:zHiMc4ZUpBiM7twCIFQmJ9JMEkDSyZS9U12uf7wHqSI= -cloud.google.com/go/metastore v1.10.0/go.mod h1:fPEnH3g4JJAk+gMRnrAnoqyv2lpUCqJPWOodSaf45Eo= -cloud.google.com/go/metastore v1.11.1/go.mod h1:uZuSo80U3Wd4zi6C22ZZliOUJ3XeM/MlYi/z5OAOWRA= -cloud.google.com/go/metastore v1.12.0/go.mod h1:uZuSo80U3Wd4zi6C22ZZliOUJ3XeM/MlYi/z5OAOWRA= -cloud.google.com/go/monitoring v1.7.0/go.mod h1:HpYse6kkGo//7p6sT0wsIC6IBDET0RhIsnmlA53dvEk= -cloud.google.com/go/monitoring v1.8.0/go.mod h1:E7PtoMJ1kQXWxPjB6mv2fhC5/15jInuulFdYYtlcvT4= -cloud.google.com/go/monitoring v1.12.0/go.mod h1:yx8Jj2fZNEkL/GYZyTLS4ZtZEZN8WtDEiEqG4kLK50w= -cloud.google.com/go/monitoring v1.13.0/go.mod h1:k2yMBAB1H9JT/QETjNkgdCGD9bPF712XiLTVr+cBrpw= -cloud.google.com/go/monitoring v1.15.1/go.mod h1:lADlSAlFdbqQuwwpaImhsJXu1QSdd3ojypXrFSMr2rM= -cloud.google.com/go/networkconnectivity v1.4.0/go.mod h1:nOl7YL8odKyAOtzNX73/M5/mGZgqqMeryi6UPZTk/rA= -cloud.google.com/go/networkconnectivity v1.5.0/go.mod h1:3GzqJx7uhtlM3kln0+x5wyFvuVH1pIBJjhCpjzSt75o= -cloud.google.com/go/networkconnectivity v1.6.0/go.mod h1:OJOoEXW+0LAxHh89nXd64uGG+FbQoeH8DtxCHVOMlaM= -cloud.google.com/go/networkconnectivity v1.7.0/go.mod h1:RMuSbkdbPwNMQjB5HBWD5MpTBnNm39iAVpC3TmsExt8= -cloud.google.com/go/networkconnectivity v1.10.0/go.mod h1:UP4O4sWXJG13AqrTdQCD9TnLGEbtNRqjuaaA7bNjF5E= -cloud.google.com/go/networkconnectivity v1.11.0/go.mod h1:iWmDD4QF16VCDLXUqvyspJjIEtBR/4zq5hwnY2X3scM= -cloud.google.com/go/networkconnectivity v1.12.1/go.mod h1:PelxSWYM7Sh9/guf8CFhi6vIqf19Ir/sbfZRUwXh92E= -cloud.google.com/go/networkmanagement v1.4.0/go.mod h1:Q9mdLLRn60AsOrPc8rs8iNV6OHXaGcDdsIQe1ohekq8= -cloud.google.com/go/networkmanagement v1.5.0/go.mod h1:ZnOeZ/evzUdUsnvRt792H0uYEnHQEMaz+REhhzJRcf4= -cloud.google.com/go/networkmanagement v1.6.0/go.mod h1:5pKPqyXjB/sgtvB5xqOemumoQNB7y95Q7S+4rjSOPYY= -cloud.google.com/go/networkmanagement v1.8.0/go.mod h1:Ho/BUGmtyEqrttTgWEe7m+8vDdK74ibQc+Be0q7Fof0= -cloud.google.com/go/networksecurity v0.5.0/go.mod h1:xS6fOCoqpVC5zx15Z/MqkfDwH4+m/61A3ODiDV1xmiQ= -cloud.google.com/go/networksecurity v0.6.0/go.mod h1:Q5fjhTr9WMI5mbpRYEbiexTzROf7ZbDzvzCrNl14nyU= -cloud.google.com/go/networksecurity v0.7.0/go.mod h1:mAnzoxx/8TBSyXEeESMy9OOYwo1v+gZ5eMRnsT5bC8k= -cloud.google.com/go/networksecurity v0.8.0/go.mod h1:B78DkqsxFG5zRSVuwYFRZ9Xz8IcQ5iECsNrPn74hKHU= -cloud.google.com/go/networksecurity v0.9.1/go.mod h1:MCMdxOKQ30wsBI1eI659f9kEp4wuuAueoC9AJKSPWZQ= -cloud.google.com/go/notebooks v1.2.0/go.mod h1:9+wtppMfVPUeJ8fIWPOq1UnATHISkGXGqTkxeieQ6UY= -cloud.google.com/go/notebooks v1.3.0/go.mod h1:bFR5lj07DtCPC7YAAJ//vHskFBxA5JzYlH68kXVdk34= -cloud.google.com/go/notebooks v1.4.0/go.mod h1:4QPMngcwmgb6uw7Po99B2xv5ufVoIQ7nOGDyL4P8AgA= -cloud.google.com/go/notebooks v1.5.0/go.mod h1:q8mwhnP9aR8Hpfnrc5iN5IBhrXUy8S2vuYs+kBJ/gu0= -cloud.google.com/go/notebooks v1.7.0/go.mod h1:PVlaDGfJgj1fl1S3dUwhFMXFgfYGhYQt2164xOMONmE= -cloud.google.com/go/notebooks v1.8.0/go.mod h1:Lq6dYKOYOWUCTvw5t2q1gp1lAp0zxAxRycayS0iJcqQ= -cloud.google.com/go/notebooks v1.9.1/go.mod h1:zqG9/gk05JrzgBt4ghLzEepPHNwE5jgPcHZRKhlC1A8= -cloud.google.com/go/optimization v1.1.0/go.mod h1:5po+wfvX5AQlPznyVEZjGJTMr4+CAkJf2XSTQOOl9l4= -cloud.google.com/go/optimization v1.2.0/go.mod h1:Lr7SOHdRDENsh+WXVmQhQTrzdu9ybg0NecjHidBq6xs= -cloud.google.com/go/optimization v1.3.1/go.mod h1:IvUSefKiwd1a5p0RgHDbWCIbDFgKuEdB+fPPuP0IDLI= -cloud.google.com/go/optimization v1.4.1/go.mod h1:j64vZQP7h9bO49m2rVaTVoNM0vEBEN5eKPUPbZyXOrk= -cloud.google.com/go/orchestration v1.3.0/go.mod h1:Sj5tq/JpWiB//X/q3Ngwdl5K7B7Y0KZ7bfv0wL6fqVA= -cloud.google.com/go/orchestration v1.4.0/go.mod h1:6W5NLFWs2TlniBphAViZEVhrXRSMgUGDfW7vrWKvsBk= -cloud.google.com/go/orchestration v1.6.0/go.mod h1:M62Bevp7pkxStDfFfTuCOaXgaaqRAga1yKyoMtEoWPQ= -cloud.google.com/go/orchestration v1.8.1/go.mod h1:4sluRF3wgbYVRqz7zJ1/EUNc90TTprliq9477fGobD8= -cloud.google.com/go/orgpolicy v1.4.0/go.mod h1:xrSLIV4RePWmP9P3tBl8S93lTmlAxjm06NSm2UTmKvE= -cloud.google.com/go/orgpolicy v1.5.0/go.mod h1:hZEc5q3wzwXJaKrsx5+Ewg0u1LxJ51nNFlext7Tanwc= -cloud.google.com/go/orgpolicy v1.10.0/go.mod h1:w1fo8b7rRqlXlIJbVhOMPrwVljyuW5mqssvBtU18ONc= -cloud.google.com/go/orgpolicy v1.11.0/go.mod h1:2RK748+FtVvnfuynxBzdnyu7sygtoZa1za/0ZfpOs1M= -cloud.google.com/go/orgpolicy v1.11.1/go.mod h1:8+E3jQcpZJQliP+zaFfayC2Pg5bmhuLK755wKhIIUCE= -cloud.google.com/go/osconfig v1.7.0/go.mod h1:oVHeCeZELfJP7XLxcBGTMBvRO+1nQ5tFG9VQTmYS2Fs= -cloud.google.com/go/osconfig v1.8.0/go.mod h1:EQqZLu5w5XA7eKizepumcvWx+m8mJUhEwiPqWiZeEdg= -cloud.google.com/go/osconfig v1.9.0/go.mod h1:Yx+IeIZJ3bdWmzbQU4fxNl8xsZ4amB+dygAwFPlvnNo= -cloud.google.com/go/osconfig v1.10.0/go.mod h1:uMhCzqC5I8zfD9zDEAfvgVhDS8oIjySWh+l4WK6GnWw= -cloud.google.com/go/osconfig v1.11.0/go.mod h1:aDICxrur2ogRd9zY5ytBLV89KEgT2MKB2L/n6x1ooPw= -cloud.google.com/go/osconfig v1.12.0/go.mod h1:8f/PaYzoS3JMVfdfTubkowZYGmAhUCjjwnjqWI7NVBc= -cloud.google.com/go/osconfig v1.12.1/go.mod h1:4CjBxND0gswz2gfYRCUoUzCm9zCABp91EeTtWXyz0tE= -cloud.google.com/go/oslogin v1.4.0/go.mod h1:YdgMXWRaElXz/lDk1Na6Fh5orF7gvmJ0FGLIs9LId4E= -cloud.google.com/go/oslogin v1.5.0/go.mod h1:D260Qj11W2qx/HVF29zBg+0fd6YCSjSqLUkY/qEenQU= -cloud.google.com/go/oslogin v1.6.0/go.mod h1:zOJ1O3+dTU8WPlGEkFSh7qeHPPSoxrcMbbK1Nm2iX70= -cloud.google.com/go/oslogin v1.7.0/go.mod h1:e04SN0xO1UNJ1M5GP0vzVBFicIe4O53FOfcixIqTyXo= -cloud.google.com/go/oslogin v1.9.0/go.mod h1:HNavntnH8nzrn8JCTT5fj18FuJLFJc4NaZJtBnQtKFs= -cloud.google.com/go/oslogin v1.10.1/go.mod h1:x692z7yAue5nE7CsSnoG0aaMbNoRJRXO4sn73R+ZqAs= -cloud.google.com/go/phishingprotection v0.5.0/go.mod h1:Y3HZknsK9bc9dMi+oE8Bim0lczMU6hrX0UpADuMefr0= -cloud.google.com/go/phishingprotection v0.6.0/go.mod h1:9Y3LBLgy0kDTcYET8ZH3bq/7qni15yVUoAxiFxnlSUA= -cloud.google.com/go/phishingprotection v0.7.0/go.mod h1:8qJI4QKHoda/sb/7/YmMQ2omRLSLYSu9bU0EKCNI+Lk= -cloud.google.com/go/phishingprotection v0.8.1/go.mod h1:AxonW7GovcA8qdEk13NfHq9hNx5KPtfxXNeUxTDxB6I= -cloud.google.com/go/policytroubleshooter v1.3.0/go.mod h1:qy0+VwANja+kKrjlQuOzmlvscn4RNsAc0e15GGqfMxg= -cloud.google.com/go/policytroubleshooter v1.4.0/go.mod h1:DZT4BcRw3QoO8ota9xw/LKtPa8lKeCByYeKTIf/vxdE= -cloud.google.com/go/policytroubleshooter v1.5.0/go.mod h1:Rz1WfV+1oIpPdN2VvvuboLVRsB1Hclg3CKQ53j9l8vw= -cloud.google.com/go/policytroubleshooter v1.6.0/go.mod h1:zYqaPTsmfvpjm5ULxAyD/lINQxJ0DDsnWOP/GZ7xzBc= -cloud.google.com/go/policytroubleshooter v1.7.1/go.mod h1:0NaT5v3Ag1M7U5r0GfDCpUFkWd9YqpubBWsQlhanRv0= -cloud.google.com/go/policytroubleshooter v1.8.0/go.mod h1:tmn5Ir5EToWe384EuboTcVQT7nTag2+DuH3uHmKd1HU= -cloud.google.com/go/privatecatalog v0.5.0/go.mod h1:XgosMUvvPyxDjAVNDYxJ7wBW8//hLDDYmnsNcMGq1K0= -cloud.google.com/go/privatecatalog v0.6.0/go.mod h1:i/fbkZR0hLN29eEWiiwue8Pb+GforiEIBnV9yrRUOKI= -cloud.google.com/go/privatecatalog v0.7.0/go.mod h1:2s5ssIFO69F5csTXcwBP7NPFTZvps26xGzvQ2PQaBYg= -cloud.google.com/go/privatecatalog v0.8.0/go.mod h1:nQ6pfaegeDAq/Q5lrfCQzQLhubPiZhSaNhIgfJlnIXs= -cloud.google.com/go/privatecatalog v0.9.1/go.mod h1:0XlDXW2unJXdf9zFz968Hp35gl/bhF4twwpXZAW50JA= -cloud.google.com/go/pubsub v1.26.0/go.mod h1:QgBH3U/jdJy/ftjPhTkyXNj543Tin1pRYcdcPRnFIRI= -cloud.google.com/go/pubsub v1.27.1/go.mod h1:hQN39ymbV9geqBnfQq6Xf63yNhUAhv9CZhzp5O6qsW0= -cloud.google.com/go/pubsub v1.28.0/go.mod h1:vuXFpwaVoIPQMGXqRyUQigu/AX1S3IWugR9xznmcXX8= -cloud.google.com/go/pubsub v1.30.0/go.mod h1:qWi1OPS0B+b5L+Sg6Gmc9zD1Y+HaM0MdUr7LsupY1P4= -cloud.google.com/go/pubsub v1.32.0/go.mod h1:f+w71I33OMyxf9VpMVcZbnG5KSUkCOUHYpFd5U1GdRc= -cloud.google.com/go/pubsub v1.33.0/go.mod h1:f+w71I33OMyxf9VpMVcZbnG5KSUkCOUHYpFd5U1GdRc= -cloud.google.com/go/pubsublite v1.5.0/go.mod h1:xapqNQ1CuLfGi23Yda/9l4bBCKz/wC3KIJ5gKcxveZg= -cloud.google.com/go/pubsublite v1.6.0/go.mod h1:1eFCS0U11xlOuMFV/0iBqw3zP12kddMeCbj/F3FSj9k= -cloud.google.com/go/pubsublite v1.7.0/go.mod h1:8hVMwRXfDfvGm3fahVbtDbiLePT3gpoiJYJY+vxWxVM= -cloud.google.com/go/pubsublite v1.8.1/go.mod h1:fOLdU4f5xldK4RGJrBMm+J7zMWNj/k4PxwEZXy39QS0= -cloud.google.com/go/recaptchaenterprise v1.3.1/go.mod h1:OdD+q+y4XGeAlxRaMn1Y7/GveP6zmq76byL6tjPE7d4= -cloud.google.com/go/recaptchaenterprise/v2 v2.1.0/go.mod h1:w9yVqajwroDNTfGuhmOjPDN//rZGySaf6PtFVcSCa7o= -cloud.google.com/go/recaptchaenterprise/v2 v2.2.0/go.mod h1:/Zu5jisWGeERrd5HnlS3EUGb/D335f9k51B/FVil0jk= -cloud.google.com/go/recaptchaenterprise/v2 v2.3.0/go.mod h1:O9LwGCjrhGHBQET5CA7dd5NwwNQUErSgEDit1DLNTdo= -cloud.google.com/go/recaptchaenterprise/v2 v2.4.0/go.mod h1:Am3LHfOuBstrLrNCBrlI5sbwx9LBg3te2N6hGvHn2mE= -cloud.google.com/go/recaptchaenterprise/v2 v2.5.0/go.mod h1:O8LzcHXN3rz0j+LBC91jrwI3R+1ZSZEWrfL7XHgNo9U= -cloud.google.com/go/recaptchaenterprise/v2 v2.6.0/go.mod h1:RPauz9jeLtB3JVzg6nCbe12qNoaa8pXc4d/YukAmcnA= -cloud.google.com/go/recaptchaenterprise/v2 v2.7.0/go.mod h1:19wVj/fs5RtYtynAPJdDTb69oW0vNHYDBTbB4NvMD9c= -cloud.google.com/go/recaptchaenterprise/v2 v2.7.2/go.mod h1:kR0KjsJS7Jt1YSyWFkseQ756D45kaYNTlDPPaRAvDBU= -cloud.google.com/go/recommendationengine v0.5.0/go.mod h1:E5756pJcVFeVgaQv3WNpImkFP8a+RptV6dDLGPILjvg= -cloud.google.com/go/recommendationengine v0.6.0/go.mod h1:08mq2umu9oIqc7tDy8sx+MNJdLG0fUi3vaSVbztHgJ4= -cloud.google.com/go/recommendationengine v0.7.0/go.mod h1:1reUcE3GIu6MeBz/h5xZJqNLuuVjNg1lmWMPyjatzac= -cloud.google.com/go/recommendationengine v0.8.1/go.mod h1:MrZihWwtFYWDzE6Hz5nKcNz3gLizXVIDI/o3G1DLcrE= -cloud.google.com/go/recommender v1.5.0/go.mod h1:jdoeiBIVrJe9gQjwd759ecLJbxCDED4A6p+mqoqDvTg= -cloud.google.com/go/recommender v1.6.0/go.mod h1:+yETpm25mcoiECKh9DEScGzIRyDKpZ0cEhWGo+8bo+c= -cloud.google.com/go/recommender v1.7.0/go.mod h1:XLHs/W+T8olwlGOgfQenXBTbIseGclClff6lhFVe9Bs= -cloud.google.com/go/recommender v1.8.0/go.mod h1:PkjXrTT05BFKwxaUxQmtIlrtj0kph108r02ZZQ5FE70= -cloud.google.com/go/recommender v1.9.0/go.mod h1:PnSsnZY7q+VL1uax2JWkt/UegHssxjUVVCrX52CuEmQ= -cloud.google.com/go/recommender v1.10.1/go.mod h1:XFvrE4Suqn5Cq0Lf+mCP6oBHD/yRMA8XxP5sb7Q7gpA= -cloud.google.com/go/redis v1.7.0/go.mod h1:V3x5Jq1jzUcg+UNsRvdmsfuFnit1cfe3Z/PGyq/lm4Y= -cloud.google.com/go/redis v1.8.0/go.mod h1:Fm2szCDavWzBk2cDKxrkmWBqoCiL1+Ctwq7EyqBCA/A= -cloud.google.com/go/redis v1.9.0/go.mod h1:HMYQuajvb2D0LvMgZmLDZW8V5aOC/WxstZHiy4g8OiA= -cloud.google.com/go/redis v1.10.0/go.mod h1:ThJf3mMBQtW18JzGgh41/Wld6vnDDc/F/F35UolRZPM= -cloud.google.com/go/redis v1.11.0/go.mod h1:/X6eicana+BWcUda5PpwZC48o37SiFVTFSs0fWAJ7uQ= -cloud.google.com/go/redis v1.13.1/go.mod h1:VP7DGLpE91M6bcsDdMuyCm2hIpB6Vp2hI090Mfd1tcg= -cloud.google.com/go/resourcemanager v1.3.0/go.mod h1:bAtrTjZQFJkiWTPDb1WBjzvc6/kifjj4QBYuKCCoqKA= -cloud.google.com/go/resourcemanager v1.4.0/go.mod h1:MwxuzkumyTX7/a3n37gmsT3py7LIXwrShilPh3P1tR0= -cloud.google.com/go/resourcemanager v1.5.0/go.mod h1:eQoXNAiAvCf5PXxWxXjhKQoTMaUSNrEfg+6qdf/wots= -cloud.google.com/go/resourcemanager v1.6.0/go.mod h1:YcpXGRs8fDzcUl1Xw8uOVmI8JEadvhRIkoXXUNVYcVo= -cloud.google.com/go/resourcemanager v1.7.0/go.mod h1:HlD3m6+bwhzj9XCouqmeiGuni95NTrExfhoSrkC/3EI= -cloud.google.com/go/resourcemanager v1.9.1/go.mod h1:dVCuosgrh1tINZ/RwBufr8lULmWGOkPS8gL5gqyjdT8= -cloud.google.com/go/resourcesettings v1.3.0/go.mod h1:lzew8VfESA5DQ8gdlHwMrqZs1S9V87v3oCnKCWoOuQU= -cloud.google.com/go/resourcesettings v1.4.0/go.mod h1:ldiH9IJpcrlC3VSuCGvjR5of/ezRrOxFtpJoJo5SmXg= -cloud.google.com/go/resourcesettings v1.5.0/go.mod h1:+xJF7QSG6undsQDfsCJyqWXyBwUoJLhetkRMDRnIoXA= -cloud.google.com/go/resourcesettings v1.6.1/go.mod h1:M7mk9PIZrC5Fgsu1kZJci6mpgN8o0IUzVx3eJU3y4Jw= -cloud.google.com/go/retail v1.8.0/go.mod h1:QblKS8waDmNUhghY2TI9O3JLlFk8jybHeV4BF19FrE4= -cloud.google.com/go/retail v1.9.0/go.mod h1:g6jb6mKuCS1QKnH/dpu7isX253absFl6iE92nHwlBUY= -cloud.google.com/go/retail v1.10.0/go.mod h1:2gDk9HsL4HMS4oZwz6daui2/jmKvqShXKQuB2RZ+cCc= -cloud.google.com/go/retail v1.11.0/go.mod h1:MBLk1NaWPmh6iVFSz9MeKG/Psyd7TAgm6y/9L2B4x9Y= -cloud.google.com/go/retail v1.12.0/go.mod h1:UMkelN/0Z8XvKymXFbD4EhFJlYKRx1FGhQkVPU5kF14= -cloud.google.com/go/retail v1.14.1/go.mod h1:y3Wv3Vr2k54dLNIrCzenyKG8g8dhvhncT2NcNjb/6gE= -cloud.google.com/go/run v0.2.0/go.mod h1:CNtKsTA1sDcnqqIFR3Pb5Tq0usWxJJvsWOCPldRU3Do= -cloud.google.com/go/run v0.3.0/go.mod h1:TuyY1+taHxTjrD0ZFk2iAR+xyOXEA0ztb7U3UNA0zBo= -cloud.google.com/go/run v0.8.0/go.mod h1:VniEnuBwqjigv0A7ONfQUaEItaiCRVujlMqerPPiktM= -cloud.google.com/go/run v0.9.0/go.mod h1:Wwu+/vvg8Y+JUApMwEDfVfhetv30hCG4ZwDR/IXl2Qg= -cloud.google.com/go/run v1.2.0/go.mod h1:36V1IlDzQ0XxbQjUx6IYbw8H3TJnWvhii963WW3B/bo= -cloud.google.com/go/scheduler v1.4.0/go.mod h1:drcJBmxF3aqZJRhmkHQ9b3uSSpQoltBPGPxGAWROx6s= -cloud.google.com/go/scheduler v1.5.0/go.mod h1:ri073ym49NW3AfT6DZi21vLZrG07GXr5p3H1KxN5QlI= -cloud.google.com/go/scheduler v1.6.0/go.mod h1:SgeKVM7MIwPn3BqtcBntpLyrIJftQISRrYB5ZtT+KOk= -cloud.google.com/go/scheduler v1.7.0/go.mod h1:jyCiBqWW956uBjjPMMuX09n3x37mtyPJegEWKxRsn44= -cloud.google.com/go/scheduler v1.8.0/go.mod h1:TCET+Y5Gp1YgHT8py4nlg2Sew8nUHMqcpousDgXJVQc= -cloud.google.com/go/scheduler v1.9.0/go.mod h1:yexg5t+KSmqu+njTIh3b7oYPheFtBWGcbVUYF1GGMIc= -cloud.google.com/go/scheduler v1.10.1/go.mod h1:R63Ldltd47Bs4gnhQkmNDse5w8gBRrhObZ54PxgR2Oo= -cloud.google.com/go/secretmanager v1.6.0/go.mod h1:awVa/OXF6IiyaU1wQ34inzQNc4ISIDIrId8qE5QGgKA= -cloud.google.com/go/secretmanager v1.8.0/go.mod h1:hnVgi/bN5MYHd3Gt0SPuTPPp5ENina1/LxM+2W9U9J4= -cloud.google.com/go/secretmanager v1.9.0/go.mod h1:b71qH2l1yHmWQHt9LC80akm86mX8AL6X1MA01dW8ht4= -cloud.google.com/go/secretmanager v1.10.0/go.mod h1:MfnrdvKMPNra9aZtQFvBcvRU54hbPD8/HayQdlUgJpU= -cloud.google.com/go/secretmanager v1.11.1/go.mod h1:znq9JlXgTNdBeQk9TBW/FnR/W4uChEKGeqQWAJ8SXFw= -cloud.google.com/go/security v1.5.0/go.mod h1:lgxGdyOKKjHL4YG3/YwIL2zLqMFCKs0UbQwgyZmfJl4= -cloud.google.com/go/security v1.7.0/go.mod h1:mZklORHl6Bg7CNnnjLH//0UlAlaXqiG7Lb9PsPXLfD0= -cloud.google.com/go/security v1.8.0/go.mod h1:hAQOwgmaHhztFhiQ41CjDODdWP0+AE1B3sX4OFlq+GU= -cloud.google.com/go/security v1.9.0/go.mod h1:6Ta1bO8LXI89nZnmnsZGp9lVoVWXqsVbIq/t9dzI+2Q= -cloud.google.com/go/security v1.10.0/go.mod h1:QtOMZByJVlibUT2h9afNDWRZ1G96gVywH8T5GUSb9IA= -cloud.google.com/go/security v1.12.0/go.mod h1:rV6EhrpbNHrrxqlvW0BWAIawFWq3X90SduMJdFwtLB8= -cloud.google.com/go/security v1.13.0/go.mod h1:Q1Nvxl1PAgmeW0y3HTt54JYIvUdtcpYKVfIB8AOMZ+0= -cloud.google.com/go/security v1.15.1/go.mod h1:MvTnnbsWnehoizHi09zoiZob0iCHVcL4AUBj76h9fXA= -cloud.google.com/go/securitycenter v1.13.0/go.mod h1:cv5qNAqjY84FCN6Y9z28WlkKXyWsgLO832YiWwkCWcU= -cloud.google.com/go/securitycenter v1.14.0/go.mod h1:gZLAhtyKv85n52XYWt6RmeBdydyxfPeTrpToDPw4Auc= -cloud.google.com/go/securitycenter v1.15.0/go.mod h1:PeKJ0t8MoFmmXLXWm41JidyzI3PJjd8sXWaVqg43WWk= -cloud.google.com/go/securitycenter v1.16.0/go.mod h1:Q9GMaLQFUD+5ZTabrbujNWLtSLZIZF7SAR0wWECrjdk= -cloud.google.com/go/securitycenter v1.18.1/go.mod h1:0/25gAzCM/9OL9vVx4ChPeM/+DlfGQJDwBy/UC8AKK0= -cloud.google.com/go/securitycenter v1.19.0/go.mod h1:LVLmSg8ZkkyaNy4u7HCIshAngSQ8EcIRREP3xBnyfag= -cloud.google.com/go/securitycenter v1.23.0/go.mod h1:8pwQ4n+Y9WCWM278R8W3nF65QtY172h4S8aXyI9/hsQ= -cloud.google.com/go/servicecontrol v1.4.0/go.mod h1:o0hUSJ1TXJAmi/7fLJAedOovnujSEvjKCAFNXPQ1RaU= -cloud.google.com/go/servicecontrol v1.5.0/go.mod h1:qM0CnXHhyqKVuiZnGKrIurvVImCs8gmqWsDoqe9sU1s= -cloud.google.com/go/servicecontrol v1.10.0/go.mod h1:pQvyvSRh7YzUF2efw7H87V92mxU8FnFDawMClGCNuAA= -cloud.google.com/go/servicecontrol v1.11.0/go.mod h1:kFmTzYzTUIuZs0ycVqRHNaNhgR+UMUpw9n02l/pY+mc= -cloud.google.com/go/servicecontrol v1.11.1/go.mod h1:aSnNNlwEFBY+PWGQ2DoM0JJ/QUXqV5/ZD9DOLB7SnUk= -cloud.google.com/go/servicedirectory v1.4.0/go.mod h1:gH1MUaZCgtP7qQiI+F+A+OpeKF/HQWgtAddhTbhL2bs= -cloud.google.com/go/servicedirectory v1.5.0/go.mod h1:QMKFL0NUySbpZJ1UZs3oFAmdvVxhhxB6eJ/Vlp73dfg= -cloud.google.com/go/servicedirectory v1.6.0/go.mod h1:pUlbnWsLH9c13yGkxCmfumWEPjsRs1RlmJ4pqiNjVL4= -cloud.google.com/go/servicedirectory v1.7.0/go.mod h1:5p/U5oyvgYGYejufvxhgwjL8UVXjkuw7q5XcG10wx1U= -cloud.google.com/go/servicedirectory v1.8.0/go.mod h1:srXodfhY1GFIPvltunswqXpVxFPpZjf8nkKQT7XcXaY= -cloud.google.com/go/servicedirectory v1.9.0/go.mod h1:29je5JjiygNYlmsGz8k6o+OZ8vd4f//bQLtvzkPPT/s= -cloud.google.com/go/servicedirectory v1.10.1/go.mod h1:Xv0YVH8s4pVOwfM/1eMTl0XJ6bzIOSLDt8f8eLaGOxQ= -cloud.google.com/go/servicedirectory v1.11.0/go.mod h1:Xv0YVH8s4pVOwfM/1eMTl0XJ6bzIOSLDt8f8eLaGOxQ= -cloud.google.com/go/servicemanagement v1.4.0/go.mod h1:d8t8MDbezI7Z2R1O/wu8oTggo3BI2GKYbdG4y/SJTco= -cloud.google.com/go/servicemanagement v1.5.0/go.mod h1:XGaCRe57kfqu4+lRxaFEAuqmjzF0r+gWHjWqKqBvKFo= -cloud.google.com/go/servicemanagement v1.6.0/go.mod h1:aWns7EeeCOtGEX4OvZUWCCJONRZeFKiptqKf1D0l/Jc= -cloud.google.com/go/servicemanagement v1.8.0/go.mod h1:MSS2TDlIEQD/fzsSGfCdJItQveu9NXnUniTrq/L8LK4= -cloud.google.com/go/serviceusage v1.3.0/go.mod h1:Hya1cozXM4SeSKTAgGXgj97GlqUvF5JaoXacR1JTP/E= -cloud.google.com/go/serviceusage v1.4.0/go.mod h1:SB4yxXSaYVuUBYUml6qklyONXNLt83U0Rb+CXyhjEeU= -cloud.google.com/go/serviceusage v1.5.0/go.mod h1:w8U1JvqUqwJNPEOTQjrMHkw3IaIFLoLsPLvsE3xueec= -cloud.google.com/go/serviceusage v1.6.0/go.mod h1:R5wwQcbOWsyuOfbP9tGdAnCAc6B9DRwPG1xtWMDeuPA= -cloud.google.com/go/shell v1.3.0/go.mod h1:VZ9HmRjZBsjLGXusm7K5Q5lzzByZmJHf1d0IWHEN5X4= -cloud.google.com/go/shell v1.4.0/go.mod h1:HDxPzZf3GkDdhExzD/gs8Grqk+dmYcEjGShZgYa9URw= -cloud.google.com/go/shell v1.6.0/go.mod h1:oHO8QACS90luWgxP3N9iZVuEiSF84zNyLytb+qE2f9A= -cloud.google.com/go/shell v1.7.1/go.mod h1:u1RaM+huXFaTojTbW4g9P5emOrrmLE69KrxqQahKn4g= -cloud.google.com/go/spanner v1.41.0/go.mod h1:MLYDBJR/dY4Wt7ZaMIQ7rXOTLjYrmxLE/5ve9vFfWos= -cloud.google.com/go/spanner v1.44.0/go.mod h1:G8XIgYdOK+Fbcpbs7p2fiprDw4CaZX63whnSMLVBxjk= -cloud.google.com/go/spanner v1.45.0/go.mod h1:FIws5LowYz8YAE1J8fOS7DJup8ff7xJeetWEo5REA2M= -cloud.google.com/go/spanner v1.47.0/go.mod h1:IXsJwVW2j4UKs0eYDqodab6HgGuA1bViSqW4uH9lfUI= -cloud.google.com/go/speech v1.6.0/go.mod h1:79tcr4FHCimOp56lwC01xnt/WPJZc4v3gzyT7FoBkCM= -cloud.google.com/go/speech v1.7.0/go.mod h1:KptqL+BAQIhMsj1kOP2la5DSEEerPDuOP/2mmkhHhZQ= -cloud.google.com/go/speech v1.8.0/go.mod h1:9bYIl1/tjsAnMgKGHKmBZzXKEkGgtU+MpdDPTE9f7y0= -cloud.google.com/go/speech v1.9.0/go.mod h1:xQ0jTcmnRFFM2RfX/U+rk6FQNUF6DQlydUSyoooSpco= -cloud.google.com/go/speech v1.14.1/go.mod h1:gEosVRPJ9waG7zqqnsHpYTOoAS4KouMRLDFMekpJ0J0= -cloud.google.com/go/speech v1.15.0/go.mod h1:y6oH7GhqCaZANH7+Oe0BhgIogsNInLlz542tg3VqeYI= -cloud.google.com/go/speech v1.17.1/go.mod h1:8rVNzU43tQvxDaGvqOhpDqgkJTFowBpDvCJ14kGlJYo= -cloud.google.com/go/speech v1.19.0/go.mod h1:8rVNzU43tQvxDaGvqOhpDqgkJTFowBpDvCJ14kGlJYo= -cloud.google.com/go/storage v1.23.0/go.mod h1:vOEEDNFnciUMhBeT6hsJIn3ieU5cFRmzeLgDvXzfIXc= -cloud.google.com/go/storage v1.27.0/go.mod h1:x9DOL8TK/ygDUMieqwfhdpQryTeEkhGKMi80i/iqR2s= -cloud.google.com/go/storage v1.28.1/go.mod h1:Qnisd4CqDdo6BGs2AD5LLnEsmSQ80wQ5ogcBBKhU86Y= -cloud.google.com/go/storage v1.29.0/go.mod h1:4puEjyTKnku6gfKoTfNOU/W+a9JyuVNxjpS5GBrB8h4= -cloud.google.com/go/storage v1.30.1/go.mod h1:NfxhC0UJE1aXSx7CIIbCf7y9HKT7BiccwkR7+P7gN8E= -cloud.google.com/go/storagetransfer v1.5.0/go.mod h1:dxNzUopWy7RQevYFHewchb29POFv3/AaBgnhqzqiK0w= -cloud.google.com/go/storagetransfer v1.6.0/go.mod h1:y77xm4CQV/ZhFZH75PLEXY0ROiS7Gh6pSKrM8dJyg6I= -cloud.google.com/go/storagetransfer v1.7.0/go.mod h1:8Giuj1QNb1kfLAiWM1bN6dHzfdlDAVC9rv9abHot2W4= -cloud.google.com/go/storagetransfer v1.8.0/go.mod h1:JpegsHHU1eXg7lMHkvf+KE5XDJ7EQu0GwNJbbVGanEw= -cloud.google.com/go/storagetransfer v1.10.0/go.mod h1:DM4sTlSmGiNczmV6iZyceIh2dbs+7z2Ayg6YAiQlYfA= -cloud.google.com/go/talent v1.1.0/go.mod h1:Vl4pt9jiHKvOgF9KoZo6Kob9oV4lwd/ZD5Cto54zDRw= -cloud.google.com/go/talent v1.2.0/go.mod h1:MoNF9bhFQbiJ6eFD3uSsg0uBALw4n4gaCaEjBw9zo8g= -cloud.google.com/go/talent v1.3.0/go.mod h1:CmcxwJ/PKfRgd1pBjQgU6W3YBwiewmUzQYH5HHmSCmM= -cloud.google.com/go/talent v1.4.0/go.mod h1:ezFtAgVuRf8jRsvyE6EwmbTK5LKciD4KVnHuDEFmOOA= -cloud.google.com/go/talent v1.5.0/go.mod h1:G+ODMj9bsasAEJkQSzO2uHQWXHHXUomArjWQQYkqK6c= -cloud.google.com/go/talent v1.6.2/go.mod h1:CbGvmKCG61mkdjcqTcLOkb2ZN1SrQI8MDyma2l7VD24= -cloud.google.com/go/texttospeech v1.4.0/go.mod h1:FX8HQHA6sEpJ7rCMSfXuzBcysDAuWusNNNvN9FELDd8= -cloud.google.com/go/texttospeech v1.5.0/go.mod h1:oKPLhR4n4ZdQqWKURdwxMy0uiTS1xU161C8W57Wkea4= -cloud.google.com/go/texttospeech v1.6.0/go.mod h1:YmwmFT8pj1aBblQOI3TfKmwibnsfvhIBzPXcW4EBovc= -cloud.google.com/go/texttospeech v1.7.1/go.mod h1:m7QfG5IXxeneGqTapXNxv2ItxP/FS0hCZBwXYqucgSk= -cloud.google.com/go/tpu v1.3.0/go.mod h1:aJIManG0o20tfDQlRIej44FcwGGl/cD0oiRyMKG19IQ= -cloud.google.com/go/tpu v1.4.0/go.mod h1:mjZaX8p0VBgllCzF6wcU2ovUXN9TONFLd7iz227X2Xg= -cloud.google.com/go/tpu v1.5.0/go.mod h1:8zVo1rYDFuW2l4yZVY0R0fb/v44xLh3llq7RuV61fPM= -cloud.google.com/go/tpu v1.6.1/go.mod h1:sOdcHVIgDEEOKuqUoi6Fq53MKHJAtOwtz0GuKsWSH3E= -cloud.google.com/go/trace v1.3.0/go.mod h1:FFUE83d9Ca57C+K8rDl/Ih8LwOzWIV1krKgxg6N0G28= -cloud.google.com/go/trace v1.4.0/go.mod h1:UG0v8UBqzusp+z63o7FK74SdFE+AXpCLdFb1rshXG+Y= -cloud.google.com/go/trace v1.8.0/go.mod h1:zH7vcsbAhklH8hWFig58HvxcxyQbaIqMarMg9hn5ECA= -cloud.google.com/go/trace v1.9.0/go.mod h1:lOQqpE5IaWY0Ixg7/r2SjixMuc6lfTFeO4QGM4dQWOk= -cloud.google.com/go/trace v1.10.1/go.mod h1:gbtL94KE5AJLH3y+WVpfWILmqgc6dXcqgNXdOPAQTYk= -cloud.google.com/go/translate v1.3.0/go.mod h1:gzMUwRjvOqj5i69y/LYLd8RrNQk+hOmIXTi9+nb3Djs= -cloud.google.com/go/translate v1.4.0/go.mod h1:06Dn/ppvLD6WvA5Rhdp029IX2Mi3Mn7fpMRLPvXT5Wg= -cloud.google.com/go/translate v1.5.0/go.mod h1:29YDSYveqqpA1CQFD7NQuP49xymq17RXNaUDdc0mNu0= -cloud.google.com/go/translate v1.6.0/go.mod h1:lMGRudH1pu7I3n3PETiOB2507gf3HnfLV8qlkHZEyos= -cloud.google.com/go/translate v1.7.0/go.mod h1:lMGRudH1pu7I3n3PETiOB2507gf3HnfLV8qlkHZEyos= -cloud.google.com/go/translate v1.8.1/go.mod h1:d1ZH5aaOA0CNhWeXeC8ujd4tdCFw8XoNWRljklu5RHs= -cloud.google.com/go/translate v1.8.2/go.mod h1:d1ZH5aaOA0CNhWeXeC8ujd4tdCFw8XoNWRljklu5RHs= -cloud.google.com/go/video v1.8.0/go.mod h1:sTzKFc0bUSByE8Yoh8X0mn8bMymItVGPfTuUBUyRgxk= -cloud.google.com/go/video v1.9.0/go.mod h1:0RhNKFRF5v92f8dQt0yhaHrEuH95m068JYOvLZYnJSw= -cloud.google.com/go/video v1.12.0/go.mod h1:MLQew95eTuaNDEGriQdcYn0dTwf9oWiA4uYebxM5kdg= -cloud.google.com/go/video v1.13.0/go.mod h1:ulzkYlYgCp15N2AokzKjy7MQ9ejuynOJdf1tR5lGthk= -cloud.google.com/go/video v1.14.0/go.mod h1:SkgaXwT+lIIAKqWAJfktHT/RbgjSuY6DobxEp0C5yTQ= -cloud.google.com/go/video v1.15.0/go.mod h1:SkgaXwT+lIIAKqWAJfktHT/RbgjSuY6DobxEp0C5yTQ= -cloud.google.com/go/video v1.17.1/go.mod h1:9qmqPqw/Ib2tLqaeHgtakU+l5TcJxCJbhFXM7UJjVzU= -cloud.google.com/go/video v1.19.0/go.mod h1:9qmqPqw/Ib2tLqaeHgtakU+l5TcJxCJbhFXM7UJjVzU= -cloud.google.com/go/videointelligence v1.6.0/go.mod h1:w0DIDlVRKtwPCn/C4iwZIJdvC69yInhW0cfi+p546uU= -cloud.google.com/go/videointelligence v1.7.0/go.mod h1:k8pI/1wAhjznARtVT9U1llUaFNPh7muw8QyOUpavru4= -cloud.google.com/go/videointelligence v1.8.0/go.mod h1:dIcCn4gVDdS7yte/w+koiXn5dWVplOZkE+xwG9FgK+M= -cloud.google.com/go/videointelligence v1.9.0/go.mod h1:29lVRMPDYHikk3v8EdPSaL8Ku+eMzDljjuvRs105XoU= -cloud.google.com/go/videointelligence v1.10.0/go.mod h1:LHZngX1liVtUhZvi2uNS0VQuOzNi2TkY1OakiuoUOjU= -cloud.google.com/go/videointelligence v1.11.1/go.mod h1:76xn/8InyQHarjTWsBR058SmlPCwQjgcvoW0aZykOvo= -cloud.google.com/go/vision v1.2.0/go.mod h1:SmNwgObm5DpFBme2xpyOyasvBc1aPdjvMk2bBk0tKD0= -cloud.google.com/go/vision/v2 v2.2.0/go.mod h1:uCdV4PpN1S0jyCyq8sIM42v2Y6zOLkZs+4R9LrGYwFo= -cloud.google.com/go/vision/v2 v2.3.0/go.mod h1:UO61abBx9QRMFkNBbf1D8B1LXdS2cGiiCRx0vSpZoUo= -cloud.google.com/go/vision/v2 v2.4.0/go.mod h1:VtI579ll9RpVTrdKdkMzckdnwMyX2JILb+MhPqRbPsY= -cloud.google.com/go/vision/v2 v2.5.0/go.mod h1:MmaezXOOE+IWa+cS7OhRRLK2cNv1ZL98zhqFFZaaH2E= -cloud.google.com/go/vision/v2 v2.6.0/go.mod h1:158Hes0MvOS9Z/bDMSFpjwsUrZ5fPrdwuyyvKSGAGMY= -cloud.google.com/go/vision/v2 v2.7.0/go.mod h1:H89VysHy21avemp6xcf9b9JvZHVehWbET0uT/bcuY/0= -cloud.google.com/go/vision/v2 v2.7.2/go.mod h1:jKa8oSYBWhYiXarHPvP4USxYANYUEdEsQrloLjrSwJU= -cloud.google.com/go/vmmigration v1.2.0/go.mod h1:IRf0o7myyWFSmVR1ItrBSFLFD/rJkfDCUTO4vLlJvsE= -cloud.google.com/go/vmmigration v1.3.0/go.mod h1:oGJ6ZgGPQOFdjHuocGcLqX4lc98YQ7Ygq8YQwHh9A7g= -cloud.google.com/go/vmmigration v1.5.0/go.mod h1:E4YQ8q7/4W9gobHjQg4JJSgXXSgY21nA5r8swQV+Xxc= -cloud.google.com/go/vmmigration v1.6.0/go.mod h1:bopQ/g4z+8qXzichC7GW1w2MjbErL54rk3/C843CjfY= -cloud.google.com/go/vmmigration v1.7.1/go.mod h1:WD+5z7a/IpZ5bKK//YmT9E047AD+rjycCAvyMxGJbro= -cloud.google.com/go/vmwareengine v0.1.0/go.mod h1:RsdNEf/8UDvKllXhMz5J40XxDrNJNN4sagiox+OI208= -cloud.google.com/go/vmwareengine v0.2.2/go.mod h1:sKdctNJxb3KLZkE/6Oui94iw/xs9PRNC2wnNLXsHvH8= -cloud.google.com/go/vmwareengine v0.3.0/go.mod h1:wvoyMvNWdIzxMYSpH/R7y2h5h3WFkx6d+1TIsP39WGY= -cloud.google.com/go/vmwareengine v0.4.1/go.mod h1:Px64x+BvjPZwWuc4HdmVhoygcXqEkGHXoa7uyfTgSI0= -cloud.google.com/go/vmwareengine v1.0.0/go.mod h1:Px64x+BvjPZwWuc4HdmVhoygcXqEkGHXoa7uyfTgSI0= -cloud.google.com/go/vpcaccess v1.4.0/go.mod h1:aQHVbTWDYUR1EbTApSVvMq1EnT57ppDmQzZ3imqIk4w= -cloud.google.com/go/vpcaccess v1.5.0/go.mod h1:drmg4HLk9NkZpGfCmZ3Tz0Bwnm2+DKqViEpeEpOq0m8= -cloud.google.com/go/vpcaccess v1.6.0/go.mod h1:wX2ILaNhe7TlVa4vC5xce1bCnqE3AeH27RV31lnmZes= -cloud.google.com/go/vpcaccess v1.7.1/go.mod h1:FogoD46/ZU+JUBX9D606X21EnxiszYi2tArQwLY4SXs= -cloud.google.com/go/webrisk v1.4.0/go.mod h1:Hn8X6Zr+ziE2aNd8SliSDWpEnSS1u4R9+xXZmFiHmGE= -cloud.google.com/go/webrisk v1.5.0/go.mod h1:iPG6fr52Tv7sGk0H6qUFzmL3HHZev1htXuWDEEsqMTg= -cloud.google.com/go/webrisk v1.6.0/go.mod h1:65sW9V9rOosnc9ZY7A7jsy1zoHS5W9IAXv6dGqhMQMc= -cloud.google.com/go/webrisk v1.7.0/go.mod h1:mVMHgEYH0r337nmt1JyLthzMr6YxwN1aAIEc2fTcq7A= -cloud.google.com/go/webrisk v1.8.0/go.mod h1:oJPDuamzHXgUc+b8SiHRcVInZQuybnvEW72PqTc7sSg= -cloud.google.com/go/webrisk v1.9.1/go.mod h1:4GCmXKcOa2BZcZPn6DCEvE7HypmEJcJkr4mtM+sqYPc= -cloud.google.com/go/websecurityscanner v1.3.0/go.mod h1:uImdKm2wyeXQevQJXeh8Uun/Ym1VqworNDlBXQevGMo= -cloud.google.com/go/websecurityscanner v1.4.0/go.mod h1:ebit/Fp0a+FWu5j4JOmJEV8S8CzdTkAS77oDsiSqYWQ= -cloud.google.com/go/websecurityscanner v1.5.0/go.mod h1:Y6xdCPy81yi0SQnDY1xdNTNpfY1oAgXUlcfN3B3eSng= -cloud.google.com/go/websecurityscanner v1.6.1/go.mod h1:Njgaw3rttgRHXzwCB8kgCYqv5/rGpFCsBOvPbYgszpg= -cloud.google.com/go/workflows v1.6.0/go.mod h1:6t9F5h/unJz41YqfBmqSASJSXccBLtD1Vwf+KmJENM0= -cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoISEXH2bcHC3M= -cloud.google.com/go/workflows v1.8.0/go.mod h1:ysGhmEajwZxGn1OhGOGKsTXc5PyxOc0vfKf5Af+to4M= -cloud.google.com/go/workflows v1.9.0/go.mod h1:ZGkj1aFIOd9c8Gerkjjq7OW7I5+l6cSvT3ujaO/WwSA= -cloud.google.com/go/workflows v1.10.0/go.mod h1:fZ8LmRmZQWacon9UCX1r/g/DfAXx5VcPALq2CxzdePw= -cloud.google.com/go/workflows v1.11.1/go.mod h1:Z+t10G1wF7h8LgdY/EmRcQY8ptBD/nvofaL6FqlET6g= -git.sr.ht/~sbinet/gg v0.3.1/go.mod h1:KGYtlADtqsqANL9ueOFkWymvzUvLMQllU5Ixo+8v3pc= -github.com/JohnCGriffin/overflow v0.0.0-20211019200055-46fa312c352c/go.mod h1:X0CRv0ky0k6m906ixxpzmDRLvX58TFUKS2eePweuyxk= -github.com/Masterminds/squirrel v1.5.3 h1:YPpoceAcxuzIljlr5iWpNKaql7hLeG1KLSrhvdHpkZc= -github.com/Masterminds/squirrel v1.5.3/go.mod h1:NNaOrjSoIDfDA40n7sr2tPNZRfjzjA400rg+riTZj10= -github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= -github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI= -github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= -github.com/ajstarks/deck v0.0.0-20200831202436-30c9fc6549a9/go.mod h1:JynElWSGnm/4RlzPXRlREEwqTHAN3T56Bv2ITsFT3gY= -github.com/ajstarks/deck/generate v0.0.0-20210309230005-c3f852c02e19/go.mod h1:T13YZdzov6OU0A1+RfKZiZN9ca6VeKdBdyDV+BY97Tk= -github.com/ajstarks/svgo v0.0.0-20211024235047-1546f124cd8b/go.mod h1:1KcenG0jGWcpt8ov532z81sp/kMMUG485J2InIOyADM= -github.com/alecthomas/chroma v0.10.0 h1:7XDcGkCQopCNKjZHfYrNLraA+M7e0fMiJ/Mfikbfjek= -github.com/alecthomas/chroma v0.10.0/go.mod h1:jtJATyUxlIORhUOFNA9NZDWGAQ8wpxQQqNSB4rjA/1s= -github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= -github.com/apache/arrow/go/v10 v10.0.1/go.mod h1:YvhnlEePVnBS4+0z3fhPfUy7W1Ikj0Ih0vcRo/gZ1M0= -github.com/apache/arrow/go/v11 v11.0.0/go.mod h1:Eg5OsL5H+e299f7u5ssuXsuHQVEGC4xei5aX110hRiI= -github.com/apache/arrow/go/v12 v12.0.0/go.mod h1:d+tV/eHZZ7Dz7RPrFKtPK02tpr+c9/PEd/zm8mDS9Vg= -github.com/apache/thrift v0.16.0/go.mod h1:PHK3hniurgQaNMZYaCLEqXKsYK8upmhPbmdP2FXSqgU= github.com/armon/go-metrics v0.4.0/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= -github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef h1:46PFijGLmAjMPwCCCo7Jf0W6f9slllCkkv7vyc1yOSg= -github.com/authzed/authzed-go v0.7.0 h1:etnzHUAIyxGiEaFYJPYkHTHzxCYWEGzZQMgVLe4xRME= -github.com/authzed/grpcutil v0.0.0-20230908193239-4286bb1d6403 h1:bQeIwWWRI9bl93poTqpix4sYHi+gnXUPK7N6bMtXzBE= -github.com/authzed/grpcutil v0.0.0-20230908193239-4286bb1d6403/go.mod h1:s3qC7V7XIbiNWERv7Lfljy/Lx25/V1Qlexb0WJuA8uQ= -github.com/aymanbagabas/go-osc52 v1.0.3/go.mod h1:zT8H+Rk4VSabYN90pWyugflM3ZhpTZNC7cASDfUCdT4= -github.com/aymanbagabas/go-osc52 v1.2.1 h1:q2sWUyDcozPLcLabEMd+a+7Ea2DitxZVN9hTxab9L4E= -github.com/aymanbagabas/go-osc52 v1.2.1/go.mod h1:zT8H+Rk4VSabYN90pWyugflM3ZhpTZNC7cASDfUCdT4= -github.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuPk= -github.com/boombuler/barcode v1.0.1/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= -github.com/briandowns/spinner v1.21.0 h1:2lVBzf3iZ3cT/ulVXljc4BzlL3yTWZDzsGsamI7si+A= -github.com/briandowns/spinner v1.21.0/go.mod h1:TcwZHb7Wb6vn/+bcVv1UXEzaA4pLS7yznHlkY/HzH44= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= -github.com/cenkalti/backoff/v4 v4.1.3 h1:cFAlzYUlVYDysBEH2T5hyJZMh3+5+WCBvSnK6Q8UtC4= -github.com/certifi/gocertifi v0.0.0-20210507211836-431795d63e8d h1:S2NE3iHSwP0XV47EEXL8mWmRdEfGscSJ+7EgePNgt0s= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= -github.com/charmbracelet/glamour v0.6.0 h1:wi8fse3Y7nfcabbbDuwolqTqMQPMnVPeZhDM273bISc= -github.com/charmbracelet/glamour v0.6.0/go.mod h1:taqWV4swIMMbWALc0m7AfE9JkPSU8om2538k9ITBxOc= -github.com/cli/safeexec v1.0.1 h1:e/C79PbXF4yYTN/wauC4tviMxEV13BwljGj0N9j+N00= -github.com/cli/safeexec v1.0.1/go.mod h1:Z/D4tTN8Vs5gXYHDCbaM1S/anmEDnJb1iW0+EJ5zx3Q= -github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= -github.com/cncf/xds/go v0.0.0-20220314180256-7f1daf1720fc/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20230105202645-06c439db220b/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20230310173818-32f1caf87195/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20230428030218-4003588d1b74/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= -github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w= -github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= -github.com/dlclark/regexp2 v1.4.0 h1:F1rxgk7p4uKjwIQxBs9oAXe5CqrXlCduYEJvrF4u93E= -github.com/dlclark/regexp2 v1.4.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= -github.com/docker/cli v20.10.14+incompatible h1:dSBKJOVesDgHo7rbxlYjYsXe7gPzrTT+/cKQgpDAazg= -github.com/docker/docker v20.10.13+incompatible h1:5s7uxnKZG+b8hYWlPYUi6x1Sjpq2MSt96d15eLZeHyw= -github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= -github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= -github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= -github.com/envoyproxy/go-control-plane v0.10.3/go.mod h1:fJJn/j26vwOu972OllsvAgJJM//w9BV6Fxbg2LuVd34= -github.com/envoyproxy/go-control-plane v0.11.0/go.mod h1:VnHyVMpzcLvCFt9yUz1UnCwHLhwx1WguiVDV7pTG/tI= -github.com/envoyproxy/go-control-plane v0.11.1-0.20230524094728-9239064ad72f/go.mod h1:sfYdkwUW4BA3PbKjySwjJy+O4Pu0h62rlqCMHNk+K+Q= -github.com/envoyproxy/go-control-plane v0.11.1/go.mod h1:uhMcXKCQMEJHiAb0w+YGefQLaTEw+YhGluxZkrTmD0g= -github.com/envoyproxy/protoc-gen-validate v0.9.1/go.mod h1:OKNgG7TCp5pF4d6XftA0++PMirau2/yoOwVac3AbF2w= -github.com/envoyproxy/protoc-gen-validate v0.10.0/go.mod h1:DRjgyB0I43LtJapqN6NiRwroiAU2PaFuvk/vjgh61ss= -github.com/envoyproxy/protoc-gen-validate v0.10.1/go.mod h1:DRjgyB0I43LtJapqN6NiRwroiAU2PaFuvk/vjgh61ss= -github.com/envoyproxy/protoc-gen-validate v1.0.1/go.mod h1:0vj8bNkYbSTNS2PIyH87KZaeN4x9zpL9Qt8fQC7d+vs= -github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= -github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= -github.com/go-fonts/liberation v0.2.0/go.mod h1:K6qoJYypsmfVjWg8KOVDQhLc8UDgIK2HYqyqAO9z7GY= -github.com/go-latex/latex v0.0.0-20210823091927-c0d11ff05a81/go.mod h1:SX0U8uGpxhq9o2S/CELCSUxEWWAuoCUcVCQWv7G2OCk= -github.com/go-openapi/analysis v0.20.0 h1:UN09o0kNhleunxW7LR+KnltD0YrJ8FF03pSqvAN3Vro= -github.com/go-openapi/errors v0.20.0 h1:Sxpo9PjEHDzhs3FbnGNonvDgWcMW2U7wGTcDDSFSceM= -github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= -github.com/go-openapi/jsonreference v0.19.5 h1:1WJP/wi4OjB4iV8KVbH73rQaoialJrqv8gitZLxGLtM= -github.com/go-openapi/loads v0.20.2 h1:z5p5Xf5wujMxS1y8aP+vxwW5qYT2zdJBbXKmQUG3lcc= -github.com/go-openapi/runtime v0.19.29 h1:5IIvCaIDbxetN674vX9eOxvoZ9mYGQ16fV1Q0VSG+NA= -github.com/go-openapi/spec v0.20.3 h1:uH9RQ6vdyPSs2pSy9fL8QPspDF2AMIMPtmK5coSSjtQ= -github.com/go-openapi/strfmt v0.20.1 h1:1VgxvehFne1mbChGeCmZ5pc0LxUf6yaACVSIYAR91Xc= -github.com/go-openapi/swag v0.19.15 h1:D2NRCBzS9/pEY3gP9Nl8aDqGUcPFrwG2p+CNFrLyrCM= -github.com/go-openapi/validate v0.20.2 h1:AhqDegYV3J3iQkMPJSXkvzymHKMTw0BST3RK3hTT4ts= -github.com/go-pdf/fpdf v0.5.0/go.mod h1:HzcnA+A23uwogo0tp9yU+l3V+KXhiESpt1PMayhOh5M= -github.com/go-pdf/fpdf v0.6.0/go.mod h1:HzcnA+A23uwogo0tp9yU+l3V+KXhiESpt1PMayhOh5M= -github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= -github.com/go-test/deep v1.0.4/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= -github.com/goccy/go-json v0.9.11/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= -github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= -github.com/google/flatbuffers v2.0.8+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= -github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/martian/v3 v3.3.2/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= -github.com/google/s2a-go v0.1.0/go.mod h1:OJpEgntRZo8ugHpF9hkoLJbS5dSI20XZeXJ9JVywLlM= -github.com/google/s2a-go v0.1.3/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= -github.com/google/s2a-go v0.1.4/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= -github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= -github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= -github.com/googleapis/enterprise-certificate-proxy v0.2.0/go.mod h1:8C0jb7/mgJe/9KK8Lm7X9ctZC2t60YyIpYEI16jx0Qg= -github.com/googleapis/enterprise-certificate-proxy v0.2.1/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= -github.com/googleapis/enterprise-certificate-proxy v0.2.3/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= -github.com/googleapis/gax-go/v2 v2.5.1/go.mod h1:h6B0KMMFNtI2ddbGJn3T3ZbwkeT6yqEF02fYlzkUCyo= -github.com/googleapis/gax-go/v2 v2.6.0/go.mod h1:1mjbznJAPHFpesgE5ucqfYEscaz5kMdcIDwU/6+DDoY= -github.com/googleapis/gax-go/v2 v2.7.0/go.mod h1:TEop28CZZQ2y+c0VxMUmu1lV+fQx57QpBWsYpwqHJx8= -github.com/googleapis/gax-go/v2 v2.7.1/go.mod h1:4orTrqY6hXxxaUL4LHIPl6lGo8vAE38/qKbhSAKP6QI= -github.com/googleapis/gax-go/v2 v2.8.0/go.mod h1:4orTrqY6hXxxaUL4LHIPl6lGo8vAE38/qKbhSAKP6QI= -github.com/googleapis/gax-go/v2 v2.10.0/go.mod h1:4UOEnMCrxsSqQ940WnTiD6qJ63le2ev3xfyagutxiPw= -github.com/googleapis/gax-go/v2 v2.11.0/go.mod h1:DxmR61SGKkGLa2xigwuZIQpkCI2S5iydzRfb3peWZJI= -github.com/gorilla/css v1.0.0 h1:BQqNyPTi50JCFMTw/b67hByjMVXZRwGha6wxVGkeihY= -github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= +github.com/go-zookeeper/zk v1.0.2/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw= github.com/goto/salt v0.3.4-0.20230911135847-d2678dd23ab8 h1:XgsIQBxTWfMaXA6+CiRunvLSZP1cd+Phv1C04NHDmEw= github.com/goto/salt v0.3.4-0.20230911135847-d2678dd23ab8/go.mod h1:N4iZAE0TDOoo/If2EkcEwEG+LqpAQtnZ665R8+WKQjw= -github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= -github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8= github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0/go.mod h1:hgWBS7lorOAVIJEQMi4ZsPv9hVvWI6+ch50m39Pf2Ks= github.com/hashicorp/consul/api v1.18.0/go.mod h1:owRRGJ9M5xReDC5nfT8FTJrNAPbT4NM6p/k+d03q2v4= github.com/hashicorp/consul/sdk v0.13.0/go.mod h1:0hs/l5fOVhJy/VdcoaNqUSi2AUs95eF5WKtv+EYIQqE= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= github.com/hashicorp/go-hclog v1.2.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-version v1.2.1/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= github.com/hashicorp/memberlist v0.5.0/go.mod h1:yvyXLpo0QaGE59Y7hDTsTzDD25JYBZ4mHgHUZ8lrOI0= github.com/hashicorp/serf v0.10.1/go.mod h1:yL2t6BqATOLGc5HF7qbFkTfXoPIY0WZdWHfEvMqbG+4= -github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= -github.com/jeremywohl/flatten v1.0.1 h1:LrsxmB3hfwJuE+ptGOijix1PIfOoKLJ3Uee/mzbgtrs= -github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= -github.com/jzelinskie/stringz v0.0.0-20210414224931-d6a8ce844a70 h1:thTca5Eyouk5CEcJ75Cbw9CSAGE7TAc6rIi+WgHWpOE= -github.com/klauspost/asmfmt v1.3.2/go.mod h1:AG8TuvYojzulgDAMCnYn50l/5QV3Bs/tp6j0HLHbNSE= -github.com/klauspost/compress v1.15.9/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU= -github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= -github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= -github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 h1:SOEGU9fKiNWd/HOJuq6+3iTQz8KNCLtVX6idSoTLdUw= -github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 h1:P6pPBnrTSX3DEVR4fDembhRWSsG5rVo6hYhAB/ADZrk= -github.com/lib/pq v1.10.7/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= -github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY= -github.com/lyft/protoc-gen-star/v2 v2.0.1/go.mod h1:RcCdONR2ScXaYnQC5tUzxzlpA3WVYF7/opLeUgcQs/o= -github.com/lyft/protoc-gen-star/v2 v2.0.3/go.mod h1:amey7yeodaJhXSbf/TlLvWiqQfLOSpEk//mLlc+axEk= -github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= -github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= -github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= -github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-runewidth v0.0.12/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk= -github.com/mattn/go-runewidth v0.0.14 h1:+xnbZSEeDbOIg5/mE6JF0w6n9duR1l3/WmbinWVwUuU= -github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= -github.com/mattn/go-sqlite3 v1.14.14/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= -github.com/mattn/go-sqlite3 v1.14.15/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg= -github.com/microcosm-cc/bluemonday v1.0.21 h1:dNH3e4PSyE4vNX+KlRGHT5KrSvjeUkoNPwEORjffHJg= -github.com/microcosm-cc/bluemonday v1.0.21/go.mod h1:ytNkv4RrDrLJ2pqlsSI46O6IVXmZOBBD4SaJyDwwTkM= github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= -github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8/go.mod h1:mC1jAcsrzbxHt8iiaC+zU4b1ylILSosueou12R++wfY= -github.com/minio/c2goasm v0.0.0-20190812172519-36a3d3bbc4f3/go.mod h1:RagcQ7I8IeTMnF8JTXieKnO4Z6JCsikNEzj0DwauVzE= -github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db h1:62I3jR2EmQ4l5rM/4FEfDWcRD+abF5XlKShorW5LRoQ= -github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 h1:dcztxKSvZ4Id8iPpHERQBbIJfabdt4wUm5qy3wOL2Zc= -github.com/muesli/reflow v0.3.0 h1:IFsN6K9NfGtjeggFP+68I4chLZV2yIKsXJFNZ+eWh6s= -github.com/muesli/reflow v0.3.0/go.mod h1:pbwTDkVPibjO2kyvBQRBxTWEEGDGq0FlB1BIKtnHY/8= -github.com/muesli/termenv v0.13.0/go.mod h1:sP1+uffeLaEYpyOTb8pLCUctGcGLnoFjSn4YJK5e2bc= -github.com/muesli/termenv v0.14.0 h1:8x9NFfOe8lmIWK4pgy3IfVEy47f+ppe3tUqdPZG2Uy0= -github.com/muesli/termenv v0.14.0/go.mod h1:kG/pF1E7fh949Xhe156crRUrHNyK221IuGO7Ez60Uc8= -github.com/newrelic/go-agent/v3/integrations/nrgrpc v1.3.2 h1:SBtZAkWapxfAxYVZHagHxsrbRt+ULkgxi0mbn6TMRM8= -github.com/newrelic/go-agent/v3/integrations/nrgrpc v1.3.2/go.mod h1:h5GGcju9OuzmRdKa5glKh/SrMs1HhZyvXrf0mEPv70k= -github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= -github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= -github.com/opencontainers/image-spec v1.0.2 h1:9yCKha/T5XdGtO0q9Q9a6T5NUCsTn/DrBg0D7ufOcFM= -github.com/opencontainers/runc v1.1.2 h1:2VSZwLx5k/BfsBxMMipG/LYUnmqOD/BPkIVgQUcTlLw= -github.com/ory/dockertest/v3 v3.9.1 h1:v4dkG+dlu76goxMiTT2j8zV7s4oPPEppKT8K8p2f1kY= github.com/pelletier/go-toml v1.9.3 h1:zeC5b1GviRUyKYd6OJPvBU/mcVDVoL1OhT17FCt5dSQ= -github.com/pelletier/go-toml/v2 v2.0.6 h1:nrzqCb7j9cDFj2coyLNLaZuJTLjWjlaz6nvTvIwycIU= -github.com/pelletier/go-toml/v2 v2.0.6/go.mod h1:eumQOmlWiOPt5WriQQqoM5y18pDHwha2N+QD+EUNTek= -github.com/phpdave11/gofpdi v1.0.13/go.mod h1:vBmVV0Do6hSBHC8uKUQ71JGW+ZGQq74llk/7bXwjDoI= -github.com/pierrec/lz4/v4 v4.1.15/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= -github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= -github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= -github.com/rivo/uniseg v0.4.3 h1:utMvzDsuh3suAEnhH0RdHmoPbU648o6CvXxTx4SBMOw= -github.com/rivo/uniseg v0.4.3/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= -github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= -github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= -github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= -github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/ruudk/golang-pdf417 v0.0.0-20201230142125-a7e3863a1245/go.mod h1:pQAZKsJ8yyVxGRWYNEm9oFB8ieLgKFnamEyDmSA0BRk= github.com/sagikazarmark/crypt v0.9.0/go.mod h1:RnH7sEhxfdnPm1z+XMgSLjWTEIjyK4z2dw6+4vHTMuo= -github.com/schollz/progressbar/v3 v3.13.0 h1:9TeeWRcjW2qd05I8Kf9knPkW4vLM/hYoa6z9ABvxje8= -github.com/schollz/progressbar/v3 v3.13.0/go.mod h1:ZBYnSuLAX2LU8P8UiKN/KgF2DY58AJC8yfVYLPC8Ly4= -github.com/slack-go/slack v0.11.0 h1:sBBjQz8LY++6eeWhGJNZpRm5jvLRNnWBFZ/cAq58a6k= -github.com/slack-go/slack v0.11.0/go.mod h1:hlGi5oXA+Gt+yWTPP0plCdRKmjsDxecdHxYQdlMQKOw= -github.com/spf13/afero v1.9.3 h1:41FoI0fD7OR7mGcKE/aOiLkGreyf8ifIOQmJANWogMk= -github.com/spf13/afero v1.9.3/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= -github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA= -github.com/spf13/cobra v1.6.1/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY= -github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= -github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= -github.com/spf13/viper v1.15.0 h1:js3yy885G8xwJa6iOISGFwd+qlUo5AvyXb7CiihdtiU= -github.com/spf13/viper v1.15.0/go.mod h1:fFcTBJxvhhzSJiZy8n+PeW6t8l+KeT/uTARa0jHOQLA= -github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= -github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= -github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= -github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb h1:zGWFAtiMcyryUHoUjUJX0/lt1H2+i2Ka2n+D3DImSNo= -github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= -github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0= -github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74= -github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yuin/goldmark v1.5.2 h1:ALmeCk/px5FSm1MAcFBAsVKZjDuMVj8Tm7FFIlMJnqU= -github.com/yuin/goldmark v1.5.2/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -github.com/yuin/goldmark-emoji v1.0.1 h1:ctuWEyzGBwiucEqxzwe0SOYDXPAucOrE9NQC18Wa1os= -github.com/zeebo/assert v1.3.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN/wJ0= -github.com/zeebo/xxh3 v1.0.2/go.mod h1:5NWz9Sef7zIDm2JHfFlcQvNekmcEl9ekUZQQKCYaDcA= go.etcd.io/etcd/api/v3 v3.5.6/go.mod h1:KFtNaxGDw4Yx/BA4iPPwevUTAuqcsPxzyX8PHydchN8= go.etcd.io/etcd/client/pkg/v3 v3.5.6/go.mod h1:ggrwbk069qxpKPq8/FKkQ3Xq9y39kbFR4LnKszpRXeQ= go.etcd.io/etcd/client/v2 v2.305.6/go.mod h1:BHha8XJGe8vCIBfWBpbBLVZ4QjOIlfoouvOwydu63E0= go.etcd.io/etcd/client/v3 v3.5.6/go.mod h1:f6GRinRMCsFVv9Ht42EyY7nfsVGwrNO0WEoS2pRKzQk= -go.mongodb.org/mongo-driver v1.7.0 h1:hHrvOBWlWB2c7+8Gh/Xi5jj82AgidK/t7KVXBZ+IyUA= -go.opentelemetry.io/proto/otlp v0.15.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= -go.opentelemetry.io/proto/otlp v0.19.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= -go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= -golang.org/x/crypto v0.0.0-20220314234659-1baeb1ce4c0b/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= -golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= -golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= -golang.org/x/crypto v0.10.0/go.mod h1:o4eNf7Ede1fv+hwOwZsTHl9EsPFO6q6ZvYR8vYfY45I= -golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= -golang.org/x/exp v0.0.0-20220827204233-334a2380cb91/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= -golang.org/x/image v0.0.0-20210607152325-775e3b0c77b9/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= -golang.org/x/image v0.0.0-20210628002857-a66eb6448b8d/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= -golang.org/x/image v0.0.0-20211028202545-6944b10bf410/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= -golang.org/x/image v0.0.0-20220302094943-723b81ca9867/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= -golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= -golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.11.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= -golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= -golang.org/x/net v0.0.0-20221002022538-bcab6841153b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= -golang.org/x/net v0.0.0-20221012135044-0b7e1fb9d458/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= -golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= -golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= -golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= -golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= -golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= -golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns= -golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= -golang.org/x/net v0.11.0/go.mod h1:2L/ixqYpgIVXmeoSA/4Lu7BzTG4KIyPIryS4IsOd1oQ= -golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= -golang.org/x/oauth2 v0.0.0-20220622183110-fd043fe589d2/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= -golang.org/x/oauth2 v0.0.0-20221006150949-b44042a4b9c1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= -golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= -golang.org/x/oauth2 v0.4.0/go.mod h1:RznEsdpjGAINPTOF0UH/t+xJ75L18YO3Ho6Pyn+uRec= -golang.org/x/oauth2 v0.5.0/go.mod h1:9/XBHVqLaWO3/BRHs5jbpYCnOZVjj5V0ndyaAM7KB4I= -golang.org/x/oauth2 v0.6.0/go.mod h1:ycmewcwgD4Rpr3eZJLSB4Kyyljb3qDh40vJ8STE5HKw= -golang.org/x/oauth2 v0.7.0/go.mod h1:hPLQkd9LyjfXTiRohC/41GhcFqxisoUQ99sCUOHO9x4= -golang.org/x/oauth2 v0.8.0/go.mod h1:yr7u4HXZRm1R1kBWqr/xKNqewf0plRYoB7sla+BCIXE= -golang.org/x/sync v0.0.0-20220819030929-7fc1605a5dde/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220829200755-d48e67d00261/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA= -golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= -golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= -golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= -golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY= -golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= -golang.org/x/term v0.9.0/go.mod h1:M6DEAAIenWoTxdKrOltXcmDY3rSplQUkrvaDU5FcQyo= -golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= -golang.org/x/term v0.12.0 h1:/ZfYdc3zq+q02Rv9vGqTeSItdzZTSNDmfTi0mBAuidU= -golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= -golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= -golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/text v0.10.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -golang.org/x/time v0.0.0-20220922220347-f3bd1da661af/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.1.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= -golang.org/x/tools v0.3.0/go.mod h1:/rWhSS2+zyEVwoJf8YAX6L2f0ntZ7Kn/mGgAWcipA5k= -golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s= -golang.org/x/tools v0.8.0/go.mod h1:JxBZ99ISMI5ViVkT1tr6tdNmXeTrcpVSD3vZ1RsRdN4= -golang.org/x/tools v0.9.1/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= -golang.org/x/tools v0.10.0/go.mod h1:UJwyiVBsOA2uwvK/e5OY3GTpDUJriEd+/YlqAwLPmyM= -golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -gonum.org/v1/gonum v0.11.0/go.mod h1:fSG4YDCxxUZQJ7rKsQrj0gMOg00Il0Z96/qMA4bVQhA= -gonum.org/v1/plot v0.10.1/go.mod h1:VZW5OlhkL1mysU9vaqNHnsy86inf6Ot+jB3r+BczCEo= -google.golang.org/api v0.77.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= -google.golang.org/api v0.85.0/go.mod h1:AqZf8Ep9uZ2pyTvgL+x0D3Zt0eoT9b5E8fmzfu6FO2g= -google.golang.org/api v0.90.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= -google.golang.org/api v0.93.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= -google.golang.org/api v0.95.0/go.mod h1:eADj+UBuxkh5zlrSntJghuNeg8HwQ1w5lTKkuqaETEI= -google.golang.org/api v0.96.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= -google.golang.org/api v0.97.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= -google.golang.org/api v0.98.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= -google.golang.org/api v0.99.0/go.mod h1:1YOf74vkVndF7pG6hIHuINsM7eWwpVTAfNMNiL91A08= -google.golang.org/api v0.100.0/go.mod h1:ZE3Z2+ZOr87Rx7dqFsdRQkRBk36kDtp/h+QpHbB7a70= -google.golang.org/api v0.102.0/go.mod h1:3VFl6/fzoA+qNuS1N1/VfXY4LjoXN/wzeIp7TweWwGo= -google.golang.org/api v0.103.0/go.mod h1:hGtW6nK1AC+d9si/UBhw8Xli+QMOf6xyNAyJw4qU9w0= -google.golang.org/api v0.106.0/go.mod h1:2Ts0XTHNVWxypznxWOYUeI4g3WdP9Pk2Qk58+a/O9MY= -google.golang.org/api v0.107.0/go.mod h1:2Ts0XTHNVWxypznxWOYUeI4g3WdP9Pk2Qk58+a/O9MY= -google.golang.org/api v0.108.0/go.mod h1:2Ts0XTHNVWxypznxWOYUeI4g3WdP9Pk2Qk58+a/O9MY= -google.golang.org/api v0.111.0/go.mod h1:qtFHvU9mhgTJegR31csQ+rwxyUTHOKFqCKWp1J0fdw0= -google.golang.org/api v0.114.0/go.mod h1:ifYI2ZsFK6/uGddGfAD5BMxlnkBqCmqHSDUVi45N5Yg= -google.golang.org/api v0.118.0/go.mod h1:76TtD3vkgmZ66zZzp72bUUklpmQmKlhh6sYtIjYK+5E= -google.golang.org/api v0.122.0/go.mod h1:gcitW0lvnyWjSp9nKxAbdHKIZ6vF4aajGueeslZOyms= -google.golang.org/api v0.124.0/go.mod h1:xu2HQurE5gi/3t1aFCvhPD781p0a3p11sdunTJ2BlP4= -google.golang.org/api v0.125.0/go.mod h1:mBwVAtz+87bEN6CbA1GtZPDOqY2R5ONPqJeIlvyo4Aw= -google.golang.org/api v0.126.0 h1:q4GJq+cAdMAC7XP7njvQ4tvohGLiSlytuL4BQxbIZ+o= -google.golang.org/api v0.126.0/go.mod h1:mBwVAtz+87bEN6CbA1GtZPDOqY2R5ONPqJeIlvyo4Aw= -google.golang.org/genproto v0.0.0-20220329172620-7be39ac1afc7/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220628213854-d9e0b6570c03/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220722212130-b98a9ff5e252/go.mod h1:GkXuJDJ6aQ7lnJcRF+SJVgFdQhypqgl3LB1C9vabdRE= -google.golang.org/genproto v0.0.0-20220801145646-83ce21fca29f/go.mod h1:iHe1svFLAZg9VWz891+QbRMwUv9O/1Ww+/mngYeThbc= -google.golang.org/genproto v0.0.0-20220815135757-37a418bb8959/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= -google.golang.org/genproto v0.0.0-20220817144833-d7fd3f11b9b1/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= -google.golang.org/genproto v0.0.0-20220829144015-23454907ede3/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= -google.golang.org/genproto v0.0.0-20220829175752-36a9c930ecbf/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= -google.golang.org/genproto v0.0.0-20220913154956-18f8339a66a5/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= -google.golang.org/genproto v0.0.0-20220914142337-ca0e39ece12f/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= -google.golang.org/genproto v0.0.0-20220915135415-7fd63a7952de/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= -google.golang.org/genproto v0.0.0-20220916172020-2692e8806bfa/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= -google.golang.org/genproto v0.0.0-20220919141832-68c03719ef51/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= -google.golang.org/genproto v0.0.0-20220920201722-2b89144ce006/go.mod h1:ht8XFiar2npT/g4vkk7O0WYS1sHOHbdujxbEp7CJWbw= -google.golang.org/genproto v0.0.0-20220926165614-551eb538f295/go.mod h1:woMGP53BroOrRY3xTxlbr8Y3eB/nzAvvFM83q7kG2OI= -google.golang.org/genproto v0.0.0-20220926220553-6981cbe3cfce/go.mod h1:woMGP53BroOrRY3xTxlbr8Y3eB/nzAvvFM83q7kG2OI= -google.golang.org/genproto v0.0.0-20221010155953-15ba04fc1c0e/go.mod h1:3526vdqwhZAwq4wsRUaVG555sVgsNmIjRtO7t/JH29U= -google.golang.org/genproto v0.0.0-20221014173430-6e2ab493f96b/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= -google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= -google.golang.org/genproto v0.0.0-20221024153911-1573dae28c9c/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= -google.golang.org/genproto v0.0.0-20221024183307-1bc688fe9f3e/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= -google.golang.org/genproto v0.0.0-20221027153422-115e99e71e1c/go.mod h1:CGI5F/G+E5bKwmfYo09AXuVN4dD894kIKUFmVbP2/Fo= -google.golang.org/genproto v0.0.0-20221109142239-94d6d90a7d66/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= -google.golang.org/genproto v0.0.0-20221114212237-e4508ebdbee1/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= -google.golang.org/genproto v0.0.0-20221117204609-8f9c96812029/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= -google.golang.org/genproto v0.0.0-20221118155620-16455021b5e6/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= -google.golang.org/genproto v0.0.0-20221201164419-0e50fba7f41c/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= -google.golang.org/genproto v0.0.0-20221201204527-e3fa12d562f3/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= -google.golang.org/genproto v0.0.0-20221202195650-67e5cbc046fd/go.mod h1:cTsE614GARnxrLsqKREzmNYJACSWWpAWdNMwnD7c2BE= -google.golang.org/genproto v0.0.0-20221227171554-f9683d7f8bef/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= -google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= -google.golang.org/genproto v0.0.0-20230112194545-e10362b5ecf9/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= -google.golang.org/genproto v0.0.0-20230113154510-dbe35b8444a5/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= -google.golang.org/genproto v0.0.0-20230123190316-2c411cf9d197/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= -google.golang.org/genproto v0.0.0-20230124163310-31e0e69b6fc2/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= -google.golang.org/genproto v0.0.0-20230125152338-dcaf20b6aeaa/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= -google.golang.org/genproto v0.0.0-20230127162408-596548ed4efa/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= -google.golang.org/genproto v0.0.0-20230209215440-0dfe4f8abfcc/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= -google.golang.org/genproto v0.0.0-20230216225411-c8e22ba71e44/go.mod h1:8B0gmkoRebU8ukX6HP+4wrVQUY1+6PkQ44BSyIlflHA= google.golang.org/genproto v0.0.0-20230221151758-ace64dc21148/go.mod h1:3Dl5ZL0q0isWJt+FVcfpQyirqemEuLAK/iFvg1UP1Hw= -google.golang.org/genproto v0.0.0-20230222225845-10f96fb3dbec/go.mod h1:3Dl5ZL0q0isWJt+FVcfpQyirqemEuLAK/iFvg1UP1Hw= -google.golang.org/genproto v0.0.0-20230223222841-637eb2293923/go.mod h1:3Dl5ZL0q0isWJt+FVcfpQyirqemEuLAK/iFvg1UP1Hw= -google.golang.org/genproto v0.0.0-20230303212802-e74f57abe488/go.mod h1:TvhZT5f700eVlTNwND1xoEZQeWTB2RY/65kplwl/bFA= -google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4/go.mod h1:NWraEVixdDnqcqQ30jipen1STv2r/n24Wb7twVTGR4s= -google.golang.org/genproto v0.0.0-20230320184635-7606e756e683/go.mod h1:NWraEVixdDnqcqQ30jipen1STv2r/n24Wb7twVTGR4s= -google.golang.org/genproto v0.0.0-20230323212658-478b75c54725/go.mod h1:UUQDJDOlWu4KYeJZffbWgBkS1YFobzKbLVfK69pe0Ak= -google.golang.org/genproto v0.0.0-20230330154414-c0448cd141ea/go.mod h1:UUQDJDOlWu4KYeJZffbWgBkS1YFobzKbLVfK69pe0Ak= -google.golang.org/genproto v0.0.0-20230331144136-dcfb400f0633/go.mod h1:UUQDJDOlWu4KYeJZffbWgBkS1YFobzKbLVfK69pe0Ak= -google.golang.org/genproto v0.0.0-20230403163135-c38d8f061ccd/go.mod h1:UUQDJDOlWu4KYeJZffbWgBkS1YFobzKbLVfK69pe0Ak= -google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1/go.mod h1:nKE/iIaLqn2bQwXBg8f1g2Ylh6r5MN5CmZvuzZCgsCU= -google.golang.org/genproto v0.0.0-20230525234025-438c736192d0/go.mod h1:9ExIQyXL5hZrHzQceCwuSYwZZ5QZBazOcprJ5rgs3lY= -google.golang.org/genproto v0.0.0-20230526161137-0005af68ea54/go.mod h1:zqTuNwFlFRsw5zIts5VnzLQxSRqh+CGOTVMlYbY0Eyk= -google.golang.org/genproto v0.0.0-20230526203410-71b5a4ffd15e/go.mod h1:zqTuNwFlFRsw5zIts5VnzLQxSRqh+CGOTVMlYbY0Eyk= -google.golang.org/genproto v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:xZnkP7mREFX5MORlOPEzLMr+90PPZQ2QWzrVTWfAq64= -google.golang.org/genproto v0.0.0-20230629202037-9506855d4529/go.mod h1:xZnkP7mREFX5MORlOPEzLMr+90PPZQ2QWzrVTWfAq64= -google.golang.org/genproto v0.0.0-20230706204954-ccb25ca9f130/go.mod h1:O9kGHb51iE/nOGvQaDUuadVYqovW56s5emA88lQnj6Y= -google.golang.org/genproto v0.0.0-20230711160842-782d3b101e98/go.mod h1:S7mY02OqCJTD0E1OiQy1F72PWFB4bZJ87cAtLPYgDR0= -google.golang.org/genproto/googleapis/api v0.0.0-20230525234020-1aefcd67740a/go.mod h1:ts19tUU+Z0ZShN1y3aPyq2+O3d5FUNNgT6FtOzmrNn8= -google.golang.org/genproto/googleapis/api v0.0.0-20230525234035-dd9d682886f9/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= -google.golang.org/genproto/googleapis/api v0.0.0-20230526203410-71b5a4ffd15e/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= -google.golang.org/genproto/googleapis/api v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= -google.golang.org/genproto/googleapis/api v0.0.0-20230629202037-9506855d4529/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= -google.golang.org/genproto/googleapis/api v0.0.0-20230706204954-ccb25ca9f130/go.mod h1:mPBs5jNgx2GuQGvFwUvVKqtn6HsUw9nP64BedgvqEsQ= -google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98/go.mod h1:rsr7RhLuwsDKL7RmgDDCUc6yaGr1iqceVb5Wv6f6YvQ= -google.golang.org/genproto/googleapis/bytestream v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:ylj+BE99M198VPbBh6A8d9n3w8fChvyLK3wwBOjXBFA= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234015-3fc162c6f38a/go.mod h1:xURIpW9ES5+/GZhnV6beoEtxQrnkRGIfP5VQG2tCBLc= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230526203410-71b5a4ffd15e/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230629202037-9506855d4529/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230706204954-ccb25ca9f130/go.mod h1:8mL13HKkDa+IuJ8yruA3ci0q+0vsUz4m//+ottjwS5o= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230731190214-cbb8c96f2d6d/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= google.golang.org/grpc v1.41.0/go.mod h1:U3l9uK9J0sini8mHphKoXyaqDA/8VyGnDee1zzIUK6k= -google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.51.0/go.mod h1:wgNDFcnuBGmxLKI/qn4T+m5BtEBYXJPvibbUPsAIPww= -google.golang.org/grpc v1.52.0/go.mod h1:pu6fVzoFb+NBYNAvQL08ic+lvB2IojljRYuun5vorUY= -google.golang.org/grpc v1.52.3/go.mod h1:pu6fVzoFb+NBYNAvQL08ic+lvB2IojljRYuun5vorUY= -google.golang.org/grpc v1.53.0/go.mod h1:OnIrk0ipVdj4N5d9IUoFUx72/VlD7+jUsHwZgwSMQpw= -google.golang.org/grpc v1.54.0/go.mod h1:PUSEXI6iWghWaB6lXM4knEgpJNu2qUcKfDtNci3EC2g= -google.golang.org/grpc v1.55.0/go.mod h1:iYEXKGkEBhg1PjZQvoYEVPTDkHo1/bjTnfwTeGONTY8= -google.golang.org/grpc v1.56.2/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= -google.golang.org/grpc v1.57.0/go.mod h1:Sd+9RMTACXwmub0zcNY2c4arhtrbBYD1AUHI/dt16Mo= -google.golang.org/protobuf v1.29.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= -gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -honnef.co/go/tools v0.1.3/go.mod h1:NgwopIslSNH47DimFoV78dnkksY2EFtX0ajyb3K/las= -lukechampine.com/uint128 v1.1.1/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk= -lukechampine.com/uint128 v1.2.0/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk= -modernc.org/cc/v3 v3.36.0/go.mod h1:NFUHyPn4ekoC/JHeZFfZurN6ixxawE1BnVonP/oahEI= -modernc.org/cc/v3 v3.36.2/go.mod h1:NFUHyPn4ekoC/JHeZFfZurN6ixxawE1BnVonP/oahEI= -modernc.org/cc/v3 v3.36.3/go.mod h1:NFUHyPn4ekoC/JHeZFfZurN6ixxawE1BnVonP/oahEI= -modernc.org/cc/v3 v3.37.0/go.mod h1:vtL+3mdHx/wcj3iEGz84rQa8vEqR6XM84v5Lcvfph20= -modernc.org/cc/v3 v3.40.0/go.mod h1:/bTg4dnWkSXowUO6ssQKnOV0yMVxDYNIsIrzqTFDGH0= -modernc.org/ccgo/v3 v3.0.0-20220428102840-41399a37e894/go.mod h1:eI31LL8EwEBKPpNpA4bU1/i+sKOwOrQy8D87zWUcRZc= -modernc.org/ccgo/v3 v3.0.0-20220430103911-bc99d88307be/go.mod h1:bwdAnOoaIt8Ax9YdWGjxWsdkPcZyRPHqrOvJxaKAKGw= -modernc.org/ccgo/v3 v3.0.0-20220904174949-82d86e1b6d56/go.mod h1:YSXjPL62P2AMSxBphRHPn7IkzhVHqkvOnRKAKh+W6ZI= -modernc.org/ccgo/v3 v3.16.4/go.mod h1:tGtX0gE9Jn7hdZFeU88slbTh1UtCYKusWOoCJuvkWsQ= -modernc.org/ccgo/v3 v3.16.6/go.mod h1:tGtX0gE9Jn7hdZFeU88slbTh1UtCYKusWOoCJuvkWsQ= -modernc.org/ccgo/v3 v3.16.8/go.mod h1:zNjwkizS+fIFDrDjIAgBSCLkWbJuHF+ar3QRn+Z9aws= -modernc.org/ccgo/v3 v3.16.9/go.mod h1:zNMzC9A9xeNUepy6KuZBbugn3c0Mc9TeiJO4lgvkJDo= -modernc.org/ccgo/v3 v3.16.13-0.20221017192402-261537637ce8/go.mod h1:fUB3Vn0nVPReA+7IG7yZDfjv1TMWjhQP8gCxrFAtL5g= -modernc.org/ccgo/v3 v3.16.13/go.mod h1:2Quk+5YgpImhPjv2Qsob1DnZ/4som1lJTodubIcoUkY= -modernc.org/ccorpus v1.11.6/go.mod h1:2gEUTrWqdpH2pXsmTM1ZkjeSrUWDpjMu2T6m29L/ErQ= -modernc.org/libc v0.0.0-20220428101251-2d5f3daf273b/go.mod h1:p7Mg4+koNjc8jkqwcoFBJx7tXkpj00G77X7A72jXPXA= -modernc.org/libc v1.16.0/go.mod h1:N4LD6DBE9cf+Dzf9buBlzVJndKr/iJHG97vGLHYnb5A= -modernc.org/libc v1.16.1/go.mod h1:JjJE0eu4yeK7tab2n4S1w8tlWd9MxXLRzheaRnAKymU= -modernc.org/libc v1.16.17/go.mod h1:hYIV5VZczAmGZAnG15Vdngn5HSF5cSkbvfz2B7GRuVU= -modernc.org/libc v1.16.19/go.mod h1:p7Mg4+koNjc8jkqwcoFBJx7tXkpj00G77X7A72jXPXA= -modernc.org/libc v1.17.0/go.mod h1:XsgLldpP4aWlPlsjqKRdHPqCxCjISdHfM/yeWC5GyW0= -modernc.org/libc v1.17.1/go.mod h1:FZ23b+8LjxZs7XtFMbSzL/EhPxNbfZbErxEHc7cbD9s= -modernc.org/libc v1.17.4/go.mod h1:WNg2ZH56rDEwdropAJeZPQkXmDwh+JCA1s/htl6r2fA= -modernc.org/libc v1.18.0/go.mod h1:vj6zehR5bfc98ipowQOM2nIDUZnVew/wNC/2tOGS+q0= -modernc.org/libc v1.20.3/go.mod h1:ZRfIaEkgrYgZDl6pa4W39HgN5G/yDW+NRmNKZBDFrk0= -modernc.org/libc v1.21.4/go.mod h1:przBsL5RDOZajTVslkugzLBj1evTue36jEomFQOoYuI= -modernc.org/libc v1.22.2/go.mod h1:uvQavJ1pZ0hIoC/jfqNoMLURIMhKzINIWypNM17puug= -modernc.org/mathutil v1.4.1/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= -modernc.org/mathutil v1.5.0/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= -modernc.org/memory v1.1.1/go.mod h1:/0wo5ibyrQiaoUoH7f9D8dnglAmILJ5/cxZlRECf+Nw= -modernc.org/memory v1.2.0/go.mod h1:/0wo5ibyrQiaoUoH7f9D8dnglAmILJ5/cxZlRECf+Nw= -modernc.org/memory v1.2.1/go.mod h1:PkUhL0Mugw21sHPeskwZW4D6VscE/GQJOnIpCnW6pSU= -modernc.org/memory v1.3.0/go.mod h1:PkUhL0Mugw21sHPeskwZW4D6VscE/GQJOnIpCnW6pSU= -modernc.org/memory v1.4.0/go.mod h1:PkUhL0Mugw21sHPeskwZW4D6VscE/GQJOnIpCnW6pSU= -modernc.org/memory v1.5.0/go.mod h1:PkUhL0Mugw21sHPeskwZW4D6VscE/GQJOnIpCnW6pSU= -modernc.org/opt v0.1.3/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0= -modernc.org/sqlite v1.18.1/go.mod h1:6ho+Gow7oX5V+OiOQ6Tr4xeqbx13UZ6t+Fw9IRUG4d4= -modernc.org/sqlite v1.18.2/go.mod h1:kvrTLEWgxUcHa2GfHBQtanR1H9ht3hTJNtKpzH9k1u0= -modernc.org/strutil v1.1.1/go.mod h1:DE+MQQ/hjKBZS2zNInV5hhcipt5rLPWkmpbGeW5mmdw= -modernc.org/strutil v1.1.3/go.mod h1:MEHNA7PdEnEwLvspRMtWTNnp2nnyvMfkimT1NKNAGbw= -modernc.org/tcl v1.13.1/go.mod h1:XOLfOwzhkljL4itZkK6T72ckMgvj0BDsnKNdZVUOecw= -modernc.org/tcl v1.13.2/go.mod h1:7CLiGIPo1M8Rv1Mitpv5akc2+8fxUd2y2UzC/MfMzy0= -modernc.org/token v1.0.1/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= -modernc.org/token v1.1.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= -modernc.org/z v1.5.1/go.mod h1:eWFB510QWW5Th9YGZT81s+LwvaAs3Q2yr4sP0rmLkv8= diff --git a/internal/api/v1beta1/alert_test.go b/internal/api/v1beta1/alert_test.go index 8f603d10..738e64f1 100644 --- a/internal/api/v1beta1/alert_test.go +++ b/internal/api/v1beta1/alert_test.go @@ -8,7 +8,6 @@ import ( "github.com/goto/salt/log" "github.com/goto/siren/core/alert" "github.com/goto/siren/core/notification" - "github.com/goto/siren/core/provider" "github.com/goto/siren/internal/api" "github.com/goto/siren/internal/api/mocks" "github.com/goto/siren/internal/api/v1beta1" @@ -27,7 +26,7 @@ func TestGRPCServer_ListAlerts(t *testing.T) { ID: 1, ProviderID: 1, ResourceName: "foo", Severity: "CRITICAL", MetricName: "bar", MetricValue: "30", Rule: "bar", TriggeredAt: timenow, }} - mockedAlertService.EXPECT().List(mock.AnythingOfType("*context.emptyCtx"), alert.Filter{ + mockedAlertService.EXPECT().List(mock.AnythingOfType("context.todoCtx"), alert.Filter{ ProviderID: 1, ResourceName: "foo", StartTime: 100, @@ -41,7 +40,7 @@ func TestGRPCServer_ListAlerts(t *testing.T) { StartTime: 100, EndTime: 200, } - res, err := dummyGRPCServer.ListAlerts(context.Background(), dummyReq) + res, err := dummyGRPCServer.ListAlerts(context.TODO(), dummyReq) assert.Equal(t, 1, len(res.GetAlerts())) assert.Equal(t, uint64(1), res.GetAlerts()[0].GetId()) assert.Equal(t, "foo", res.GetAlerts()[0].GetResourceName()) @@ -57,7 +56,7 @@ func TestGRPCServer_ListAlerts(t *testing.T) { mockedAlertService := &mocks.AlertService{} dummyGRPCServer := v1beta1.NewGRPCServer(nil, log.NewNoop(), api.HeadersConfig{}, &api.Deps{AlertService: mockedAlertService}) - mockedAlertService.EXPECT().List(mock.AnythingOfType("*context.emptyCtx"), alert.Filter{ + mockedAlertService.EXPECT().List(mock.AnythingOfType("context.todoCtx"), alert.Filter{ ProviderID: 1, ResourceName: "foo", StartTime: 100, @@ -70,7 +69,7 @@ func TestGRPCServer_ListAlerts(t *testing.T) { StartTime: 100, EndTime: 200, } - res, err := dummyGRPCServer.ListAlerts(context.Background(), dummyReq) + res, err := dummyGRPCServer.ListAlerts(context.TODO(), dummyReq) assert.EqualError(t, err, "rpc error: code = Internal desc = some unexpected error occurred") assert.Nil(t, res) mockedAlertService.AssertExpectations(t) @@ -142,7 +141,7 @@ func TestGRPCServer_CreateAlertHistory(t *testing.T) { dummyReq := &sirenv1beta1.CreateAlertsRequest{ ProviderId: 1, - ProviderType: provider.TypeCortex, + ProviderType: "cortex", Body: &structpb.Struct{ Fields: map[string]*structpb.Value{ "alerts": { @@ -171,14 +170,14 @@ func TestGRPCServer_CreateAlertHistory(t *testing.T) { Rule: "random", TriggeredAt: timenow, }} - mockedAlertService.EXPECT().CreateAlerts(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("string"), mock.AnythingOfType("uint64"), mock.AnythingOfType("uint64"), payload). + mockedAlertService.EXPECT().CreateAlerts(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("string"), mock.AnythingOfType("uint64"), mock.AnythingOfType("uint64"), payload). Return(dummyAlerts, 1, nil).Once() mockNotificationService.EXPECT().BuildFromAlerts(mock.AnythingOfType("[]alert.Alert"), mock.AnythingOfType("int"), mock.AnythingOfType("time.Time")).Return([]notification.Notification{}, nil) - mockNotificationService.EXPECT().Dispatch(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("notification.Notification")).Return(nil) + mockNotificationService.EXPECT().Dispatch(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("notification.Notification")).Return(nil) dummyGRPCServer := v1beta1.NewGRPCServer(nil, log.NewNoop(), api.HeadersConfig{}, &api.Deps{AlertService: mockedAlertService, NotificationService: mockNotificationService}) - res, err := dummyGRPCServer.CreateAlerts(context.Background(), dummyReq) + res, err := dummyGRPCServer.CreateAlerts(context.TODO(), dummyReq) assert.Equal(t, 1, len(res.GetAlerts())) assert.Equal(t, uint64(1), res.GetAlerts()[0].GetId()) assert.Equal(t, "foo", res.GetAlerts()[0].GetResourceName()) @@ -238,7 +237,7 @@ func TestGRPCServer_CreateAlertHistory(t *testing.T) { dummyReq := &sirenv1beta1.CreateAlertsRequest{ ProviderId: 1, - ProviderType: provider.TypeCortex, + ProviderType: "cortex", Body: &structpb.Struct{ Fields: map[string]*structpb.Value{ "alerts": { @@ -280,14 +279,14 @@ func TestGRPCServer_CreateAlertHistory(t *testing.T) { Rule: "random", TriggeredAt: timenow, }} - mockedAlertService.EXPECT().CreateAlerts(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("string"), mock.AnythingOfType("uint64"), mock.AnythingOfType("uint64"), payload). + mockedAlertService.EXPECT().CreateAlerts(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("string"), mock.AnythingOfType("uint64"), mock.AnythingOfType("uint64"), payload). Return(dummyAlerts, 1, nil).Once() mockNotificationService.EXPECT().BuildFromAlerts(mock.AnythingOfType("[]alert.Alert"), mock.AnythingOfType("int"), mock.AnythingOfType("time.Time")).Return([]notification.Notification{}, nil) - mockNotificationService.EXPECT().Dispatch(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("notification.Notification")).Return(nil) + mockNotificationService.EXPECT().Dispatch(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("notification.Notification")).Return(nil) dummyGRPCServer := v1beta1.NewGRPCServer(nil, log.NewNoop(), api.HeadersConfig{}, &api.Deps{AlertService: mockedAlertService, NotificationService: mockNotificationService}) - res, err := dummyGRPCServer.CreateAlerts(context.Background(), dummyReq) + res, err := dummyGRPCServer.CreateAlerts(context.TODO(), dummyReq) assert.Equal(t, 1, len(res.GetAlerts())) assert.Equal(t, uint64(1), res.GetAlerts()[0].GetId()) assert.Equal(t, "foo", res.GetAlerts()[0].GetResourceName()) @@ -303,10 +302,10 @@ func TestGRPCServer_CreateAlertHistory(t *testing.T) { mockedAlertService := &mocks.AlertService{} dummyGRPCServer := v1beta1.NewGRPCServer(nil, log.NewNoop(), api.HeadersConfig{}, &api.Deps{AlertService: mockedAlertService}) - mockedAlertService.EXPECT().CreateAlerts(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("string"), mock.AnythingOfType("uint64"), mock.AnythingOfType("uint64"), payload). + mockedAlertService.EXPECT().CreateAlerts(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("string"), mock.AnythingOfType("uint64"), mock.AnythingOfType("uint64"), payload). Return(nil, 0, errors.New("random error")).Once() - res, err := dummyGRPCServer.CreateAlerts(context.Background(), dummyReq) + res, err := dummyGRPCServer.CreateAlerts(context.TODO(), dummyReq) assert.EqualError(t, err, "rpc error: code = Internal desc = some unexpected error occurred") assert.Nil(t, res) mockedAlertService.AssertExpectations(t) @@ -432,7 +431,7 @@ func TestGRPCServer_CreateAlertHistory(t *testing.T) { dummyReq := &sirenv1beta1.CreateAlertsRequest{ ProviderId: 1, - ProviderType: provider.TypeCortex, + ProviderType: "cortex", Body: &structpb.Struct{ Fields: map[string]*structpb.Value{ "alerts": { @@ -462,12 +461,12 @@ func TestGRPCServer_CreateAlertHistory(t *testing.T) { dummyGRPCServer := v1beta1.NewGRPCServer(nil, log.NewNoop(), api.HeadersConfig{}, &api.Deps{AlertService: mockedAlertService, NotificationService: mockNotificationService}) - mockedAlertService.EXPECT().CreateAlerts(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("string"), mock.AnythingOfType("uint64"), mock.AnythingOfType("uint64"), payload). + mockedAlertService.EXPECT().CreateAlerts(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("string"), mock.AnythingOfType("uint64"), mock.AnythingOfType("uint64"), payload). Return(dummyAlerts, 2, nil).Once() mockNotificationService.EXPECT().BuildFromAlerts(mock.AnythingOfType("[]alert.Alert"), mock.AnythingOfType("int"), mock.AnythingOfType("time.Time")).Return([]notification.Notification{}, nil) - mockNotificationService.EXPECT().Dispatch(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("notification.Notification")).Return(nil) + mockNotificationService.EXPECT().Dispatch(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("notification.Notification")).Return(nil) - res, err := dummyGRPCServer.CreateAlerts(context.Background(), dummyReq) + res, err := dummyGRPCServer.CreateAlerts(context.TODO(), dummyReq) assert.Equal(t, 1, len(res.GetAlerts())) assert.Equal(t, uint64(1), res.GetAlerts()[0].GetProviderId()) assert.Equal(t, "foo", res.GetAlerts()[0].GetResourceName()) diff --git a/internal/api/v1beta1/health_test.go b/internal/api/v1beta1/health_test.go index e4155e71..b92c7630 100644 --- a/internal/api/v1beta1/health_test.go +++ b/internal/api/v1beta1/health_test.go @@ -26,7 +26,7 @@ func TestHealthCheck(t *testing.T) { } for _, tc := range testCases { t.Run(tc.Description, func(t *testing.T) { - ctx := context.Background() + ctx := context.TODO() healthHandler := &GRPCServer{} diff --git a/internal/api/v1beta1/namespace_test.go b/internal/api/v1beta1/namespace_test.go index f301f63d..f69a787c 100644 --- a/internal/api/v1beta1/namespace_test.go +++ b/internal/api/v1beta1/namespace_test.go @@ -41,8 +41,8 @@ func TestGRPCServer_ListNamespaces(t *testing.T) { }, } - mockedNamespaceService.EXPECT().List(mock.AnythingOfType("*context.emptyCtx")).Return(dummyResult, nil).Once() - res, err := dummyGRPCServer.ListNamespaces(context.Background(), &sirenv1beta1.ListNamespacesRequest{}) + mockedNamespaceService.EXPECT().List(mock.AnythingOfType("context.todoCtx")).Return(dummyResult, nil).Once() + res, err := dummyGRPCServer.ListNamespaces(context.TODO(), &sirenv1beta1.ListNamespacesRequest{}) assert.Nil(t, err) assert.Equal(t, 1, len(res.GetNamespaces())) assert.Equal(t, "foo", res.GetNamespaces()[0].GetName()) @@ -54,9 +54,9 @@ func TestGRPCServer_ListNamespaces(t *testing.T) { t.Run("should return Internal if getting namespaces failed", func(t *testing.T) { mockedNamespaceService := &mocks.NamespaceService{} dummyGRPCServer := v1beta1.NewGRPCServer(nil, log.NewNoop(), api.HeadersConfig{}, &api.Deps{NamespaceService: mockedNamespaceService}) - mockedNamespaceService.EXPECT().List(mock.AnythingOfType("*context.emptyCtx")). + mockedNamespaceService.EXPECT().List(mock.AnythingOfType("context.todoCtx")). Return(nil, errors.New("random error")).Once() - res, err := dummyGRPCServer.ListNamespaces(context.Background(), &sirenv1beta1.ListNamespacesRequest{}) + res, err := dummyGRPCServer.ListNamespaces(context.TODO(), &sirenv1beta1.ListNamespacesRequest{}) assert.Nil(t, res) assert.EqualError(t, err, "rpc error: code = Internal desc = some unexpected error occurred") }) @@ -78,8 +78,8 @@ func TestGRPCServer_ListNamespaces(t *testing.T) { UpdatedAt: time.Now(), }, } - mockedNamespaceService.EXPECT().List(mock.AnythingOfType("*context.emptyCtx")).Return(dummyResult, nil).Once() - res, err := dummyGRPCServer.ListNamespaces(context.Background(), &sirenv1beta1.ListNamespacesRequest{}) + mockedNamespaceService.EXPECT().List(mock.AnythingOfType("context.todoCtx")).Return(dummyResult, nil).Once() + res, err := dummyGRPCServer.ListNamespaces(context.TODO(), &sirenv1beta1.ListNamespacesRequest{}) assert.Nil(t, res) assert.EqualError(t, err, "rpc error: code = Internal desc = some unexpected error occurred") }) @@ -111,10 +111,10 @@ func TestGRPCServer_CreateNamespaces(t *testing.T) { t.Run("should create a namespace", func(t *testing.T) { mockedNamespaceService := &mocks.NamespaceService{} dummyGRPCServer := v1beta1.NewGRPCServer(nil, log.NewNoop(), api.HeadersConfig{}, &api.Deps{NamespaceService: mockedNamespaceService}) - mockedNamespaceService.EXPECT().Create(mock.AnythingOfType("*context.emptyCtx"), payload).Run(func(_a0 context.Context, _a1 *namespace.Namespace) { + mockedNamespaceService.EXPECT().Create(mock.AnythingOfType("context.todoCtx"), payload).Run(func(_a0 context.Context, _a1 *namespace.Namespace) { _a1.ID = generatedID }).Return(nil).Once() - res, err := dummyGRPCServer.CreateNamespace(context.Background(), request) + res, err := dummyGRPCServer.CreateNamespace(context.TODO(), request) assert.Nil(t, err) assert.Equal(t, generatedID, res.GetId()) }) @@ -122,8 +122,8 @@ func TestGRPCServer_CreateNamespaces(t *testing.T) { t.Run("should return error Internal if creating namespaces failed", func(t *testing.T) { mockedNamespaceService := &mocks.NamespaceService{} dummyGRPCServer := v1beta1.NewGRPCServer(nil, log.NewNoop(), api.HeadersConfig{}, &api.Deps{NamespaceService: mockedNamespaceService}) - mockedNamespaceService.EXPECT().Create(mock.AnythingOfType("*context.emptyCtx"), payload).Return(errors.New("random error")).Once() - res, err := dummyGRPCServer.CreateNamespace(context.Background(), request) + mockedNamespaceService.EXPECT().Create(mock.AnythingOfType("context.todoCtx"), payload).Return(errors.New("random error")).Once() + res, err := dummyGRPCServer.CreateNamespace(context.TODO(), request) assert.Nil(t, res) assert.EqualError(t, err, "rpc error: code = Internal desc = some unexpected error occurred") }) @@ -132,8 +132,8 @@ func TestGRPCServer_CreateNamespaces(t *testing.T) { mockedNamespaceService := &mocks.NamespaceService{} dummyGRPCServer := v1beta1.NewGRPCServer(nil, log.NewNoop(), api.HeadersConfig{}, &api.Deps{NamespaceService: mockedNamespaceService}) - mockedNamespaceService.EXPECT().Create(mock.AnythingOfType("*context.emptyCtx"), payload).Return(errors.ErrInvalid).Once() - res, err := dummyGRPCServer.CreateNamespace(context.Background(), request) + mockedNamespaceService.EXPECT().Create(mock.AnythingOfType("context.todoCtx"), payload).Return(errors.ErrInvalid).Once() + res, err := dummyGRPCServer.CreateNamespace(context.TODO(), request) assert.Nil(t, res) assert.EqualError(t, err, "rpc error: code = InvalidArgument desc = request is not valid") @@ -143,8 +143,8 @@ func TestGRPCServer_CreateNamespaces(t *testing.T) { mockedNamespaceService := &mocks.NamespaceService{} dummyGRPCServer := v1beta1.NewGRPCServer(nil, log.NewNoop(), api.HeadersConfig{}, &api.Deps{NamespaceService: mockedNamespaceService}) - mockedNamespaceService.EXPECT().Create(mock.AnythingOfType("*context.emptyCtx"), payload).Return(errors.ErrConflict).Once() - res, err := dummyGRPCServer.CreateNamespace(context.Background(), request) + mockedNamespaceService.EXPECT().Create(mock.AnythingOfType("context.todoCtx"), payload).Return(errors.ErrConflict).Once() + res, err := dummyGRPCServer.CreateNamespace(context.TODO(), request) assert.Nil(t, res) assert.EqualError(t, err, "rpc error: code = AlreadyExists desc = an entity with conflicting identifier exists") @@ -172,8 +172,8 @@ func TestGRPCServer_GetNamespace(t *testing.T) { UpdatedAt: time.Now(), } - mockedNamespaceService.EXPECT().Get(mock.AnythingOfType("*context.emptyCtx"), uint64(1)).Return(dummyResult, nil).Once() - res, err := dummyGRPCServer.GetNamespace(context.Background(), + mockedNamespaceService.EXPECT().Get(mock.AnythingOfType("context.todoCtx"), uint64(1)).Return(dummyResult, nil).Once() + res, err := dummyGRPCServer.GetNamespace(context.TODO(), &sirenv1beta1.GetNamespaceRequest{Id: uint64(1)}) assert.Nil(t, err) assert.Equal(t, "foo", res.GetNamespace().GetName()) @@ -185,8 +185,8 @@ func TestGRPCServer_GetNamespace(t *testing.T) { t.Run("should return error Invalid Argument if no namespace found", func(t *testing.T) { mockedNamespaceService := &mocks.NamespaceService{} dummyGRPCServer := v1beta1.NewGRPCServer(nil, log.NewNoop(), api.HeadersConfig{}, &api.Deps{NamespaceService: mockedNamespaceService}) - mockedNamespaceService.EXPECT().Get(mock.AnythingOfType("*context.emptyCtx"), uint64(1)).Return(nil, errors.ErrNotFound.WithCausef("some error")).Once() - res, err := dummyGRPCServer.GetNamespace(context.Background(), + mockedNamespaceService.EXPECT().Get(mock.AnythingOfType("context.todoCtx"), uint64(1)).Return(nil, errors.ErrNotFound.WithCausef("some error")).Once() + res, err := dummyGRPCServer.GetNamespace(context.TODO(), &sirenv1beta1.GetNamespaceRequest{Id: uint64(1)}) assert.Nil(t, res) assert.EqualError(t, err, "rpc error: code = NotFound desc = requested entity not found") @@ -195,9 +195,9 @@ func TestGRPCServer_GetNamespace(t *testing.T) { t.Run("should return error Internal if getting namespace fails", func(t *testing.T) { mockedNamespaceService := &mocks.NamespaceService{} dummyGRPCServer := v1beta1.NewGRPCServer(nil, log.NewNoop(), api.HeadersConfig{}, &api.Deps{NamespaceService: mockedNamespaceService}) - mockedNamespaceService.EXPECT().Get(mock.AnythingOfType("*context.emptyCtx"), uint64(1)). + mockedNamespaceService.EXPECT().Get(mock.AnythingOfType("context.todoCtx"), uint64(1)). Return(nil, errors.New("random error")).Once() - res, err := dummyGRPCServer.GetNamespace(context.Background(), + res, err := dummyGRPCServer.GetNamespace(context.TODO(), &sirenv1beta1.GetNamespaceRequest{Id: uint64(1)}) assert.Nil(t, res) assert.EqualError(t, err, "rpc error: code = Internal desc = some unexpected error occurred") @@ -218,8 +218,8 @@ func TestGRPCServer_GetNamespace(t *testing.T) { CreatedAt: time.Now(), UpdatedAt: time.Now(), } - mockedNamespaceService.EXPECT().Get(mock.AnythingOfType("*context.emptyCtx"), uint64(1)).Return(dummyResult, nil).Once() - res, err := dummyGRPCServer.GetNamespace(context.Background(), + mockedNamespaceService.EXPECT().Get(mock.AnythingOfType("context.todoCtx"), uint64(1)).Return(dummyResult, nil).Once() + res, err := dummyGRPCServer.GetNamespace(context.TODO(), &sirenv1beta1.GetNamespaceRequest{Id: uint64(1)}) assert.Nil(t, res) assert.EqualError(t, err, "rpc error: code = Internal desc = some unexpected error occurred") @@ -253,10 +253,10 @@ func TestGRPCServer_UpdateNamespace(t *testing.T) { t.Run("should update a namespace", func(t *testing.T) { mockedNamespaceService := &mocks.NamespaceService{} dummyGRPCServer := v1beta1.NewGRPCServer(nil, log.NewNoop(), api.HeadersConfig{}, &api.Deps{NamespaceService: mockedNamespaceService}) - mockedNamespaceService.EXPECT().Update(mock.AnythingOfType("*context.emptyCtx"), payload).Run(func(_a0 context.Context, _a1 *namespace.Namespace) { + mockedNamespaceService.EXPECT().Update(mock.AnythingOfType("context.todoCtx"), payload).Run(func(_a0 context.Context, _a1 *namespace.Namespace) { _a1.ID = payload.ID }).Return(nil).Once() - res, err := dummyGRPCServer.UpdateNamespace(context.Background(), request) + res, err := dummyGRPCServer.UpdateNamespace(context.TODO(), request) assert.Nil(t, err) assert.Equal(t, payload.ID, res.GetId()) mockedNamespaceService.AssertExpectations(t) @@ -265,9 +265,9 @@ func TestGRPCServer_UpdateNamespace(t *testing.T) { t.Run("should return error Invalid Argument if namespace service return err invalid", func(t *testing.T) { mockedNamespaceService := &mocks.NamespaceService{} dummyGRPCServer := v1beta1.NewGRPCServer(nil, log.NewNoop(), api.HeadersConfig{}, &api.Deps{NamespaceService: mockedNamespaceService}) - mockedNamespaceService.EXPECT().Update(mock.AnythingOfType("*context.emptyCtx"), payload).Return(errors.ErrInvalid).Once() + mockedNamespaceService.EXPECT().Update(mock.AnythingOfType("context.todoCtx"), payload).Return(errors.ErrInvalid).Once() - res, err := dummyGRPCServer.UpdateNamespace(context.Background(), request) + res, err := dummyGRPCServer.UpdateNamespace(context.TODO(), request) assert.Nil(t, res) assert.EqualError(t, err, "rpc error: code = InvalidArgument desc = request is not valid") }) @@ -275,9 +275,9 @@ func TestGRPCServer_UpdateNamespace(t *testing.T) { t.Run("should return error AlreadyExists if namespace service return err conflict", func(t *testing.T) { mockedNamespaceService := &mocks.NamespaceService{} dummyGRPCServer := v1beta1.NewGRPCServer(nil, log.NewNoop(), api.HeadersConfig{}, &api.Deps{NamespaceService: mockedNamespaceService}) - mockedNamespaceService.EXPECT().Update(mock.AnythingOfType("*context.emptyCtx"), payload).Return(errors.ErrConflict).Once() + mockedNamespaceService.EXPECT().Update(mock.AnythingOfType("context.todoCtx"), payload).Return(errors.ErrConflict).Once() - res, err := dummyGRPCServer.UpdateNamespace(context.Background(), request) + res, err := dummyGRPCServer.UpdateNamespace(context.TODO(), request) assert.Nil(t, res) assert.EqualError(t, err, "rpc error: code = AlreadyExists desc = an entity with conflicting identifier exists") }) @@ -286,9 +286,9 @@ func TestGRPCServer_UpdateNamespace(t *testing.T) { mockedNamespaceService := &mocks.NamespaceService{} dummyGRPCServer := v1beta1.NewGRPCServer(nil, log.NewNoop(), api.HeadersConfig{}, &api.Deps{NamespaceService: mockedNamespaceService}) - mockedNamespaceService.EXPECT().Update(mock.AnythingOfType("*context.emptyCtx"), payload).Return(errors.New("random error")).Once() + mockedNamespaceService.EXPECT().Update(mock.AnythingOfType("context.todoCtx"), payload).Return(errors.New("random error")).Once() - res, err := dummyGRPCServer.UpdateNamespace(context.Background(), request) + res, err := dummyGRPCServer.UpdateNamespace(context.TODO(), request) assert.Nil(t, res) assert.EqualError(t, err, "rpc error: code = Internal desc = some unexpected error occurred") mockedNamespaceService.AssertExpectations(t) @@ -304,8 +304,8 @@ func TestGRPCServer_DeleteNamespace(t *testing.T) { t.Run("should delete namespace object", func(t *testing.T) { mockedNamespaceService := &mocks.NamespaceService{} dummyGRPCServer := v1beta1.NewGRPCServer(nil, log.NewNoop(), api.HeadersConfig{}, &api.Deps{NamespaceService: mockedNamespaceService}) - mockedNamespaceService.EXPECT().Delete(mock.AnythingOfType("*context.emptyCtx"), namespaceId).Return(nil).Once() - res, err := dummyGRPCServer.DeleteNamespace(context.Background(), dummyReq) + mockedNamespaceService.EXPECT().Delete(mock.AnythingOfType("context.todoCtx"), namespaceId).Return(nil).Once() + res, err := dummyGRPCServer.DeleteNamespace(context.TODO(), dummyReq) assert.Nil(t, err) assert.Equal(t, "", res.String()) mockedNamespaceService.AssertExpectations(t) @@ -314,8 +314,8 @@ func TestGRPCServer_DeleteNamespace(t *testing.T) { t.Run("should return error Internal if deleting namespace failed", func(t *testing.T) { mockedNamespaceService := &mocks.NamespaceService{} dummyGRPCServer := v1beta1.NewGRPCServer(nil, log.NewNoop(), api.HeadersConfig{}, &api.Deps{NamespaceService: mockedNamespaceService}) - mockedNamespaceService.EXPECT().Delete(mock.AnythingOfType("*context.emptyCtx"), namespaceId).Return(errors.New("random error")).Once() - res, err := dummyGRPCServer.DeleteNamespace(context.Background(), dummyReq) + mockedNamespaceService.EXPECT().Delete(mock.AnythingOfType("context.todoCtx"), namespaceId).Return(errors.New("random error")).Once() + res, err := dummyGRPCServer.DeleteNamespace(context.TODO(), dummyReq) assert.Nil(t, res) assert.EqualError(t, err, "rpc error: code = Internal desc = some unexpected error occurred") }) diff --git a/internal/api/v1beta1/notification_test.go b/internal/api/v1beta1/notification_test.go index 3e09bb8f..d14169bd 100644 --- a/internal/api/v1beta1/notification_test.go +++ b/internal/api/v1beta1/notification_test.go @@ -95,7 +95,7 @@ func TestGRPCServer_NotifyReceiver(t *testing.T) { dummyGRPCServer := v1beta1.NewGRPCServer(nil, log.NewNoop(), api.HeadersConfig{ IdempotencyKey: idempotencyHeaderKey, }, &api.Deps{NotificationService: mockNotificationService}) - ctx := metadata.NewIncomingContext(context.Background(), metadata.New(map[string]string{ + ctx := metadata.NewIncomingContext(context.TODO(), metadata.New(map[string]string{ idempotencyHeaderKey: tc.idempotencyKey, })) _, err := dummyGRPCServer.NotifyReceiver(ctx, &sirenv1beta1.NotifyReceiverRequest{}) diff --git a/internal/api/v1beta1/provider_test.go b/internal/api/v1beta1/provider_test.go index e61084e8..215d66d6 100644 --- a/internal/api/v1beta1/provider_test.go +++ b/internal/api/v1beta1/provider_test.go @@ -42,7 +42,7 @@ func TestGRPCServer_ListProvider(t *testing.T) { }, } - mockedProviderService.EXPECT().List(mock.AnythingOfType("*context.emptyCtx"), provider.Filter{}).Return(dummyResult, nil).Once() + mockedProviderService.EXPECT().List(mock.AnythingOfType("context.todoCtx"), provider.Filter{}).Return(dummyResult, nil).Once() res, err := dummyGRPCServer.ListProviders(ctx, &sirenv1beta1.ListProvidersRequest{}) assert.Nil(t, err) assert.Equal(t, 1, len(res.GetProviders())) @@ -55,7 +55,7 @@ func TestGRPCServer_ListProvider(t *testing.T) { mockedProviderService := &mocks.ProviderService{} dummyGRPCServer := v1beta1.NewGRPCServer(nil, log.NewNoop(), api.HeadersConfig{}, &api.Deps{ProviderService: mockedProviderService}) - mockedProviderService.EXPECT().List(mock.AnythingOfType("*context.emptyCtx"), provider.Filter{}).Return(nil, errors.New("random error")).Once() + mockedProviderService.EXPECT().List(mock.AnythingOfType("context.todoCtx"), provider.Filter{}).Return(nil, errors.New("random error")).Once() res, err := dummyGRPCServer.ListProviders(ctx, &sirenv1beta1.ListProvidersRequest{}) assert.Nil(t, res) assert.EqualError(t, err, "rpc error: code = Internal desc = some unexpected error occurred") @@ -79,7 +79,7 @@ func TestGRPCServer_ListProvider(t *testing.T) { }, } - mockedProviderService.EXPECT().List(mock.AnythingOfType("*context.emptyCtx"), provider.Filter{}).Return(dummyResult, nil).Once() + mockedProviderService.EXPECT().List(mock.AnythingOfType("context.todoCtx"), provider.Filter{}).Return(dummyResult, nil).Once() res, err := dummyGRPCServer.ListProviders(ctx, &sirenv1beta1.ListProvidersRequest{}) assert.Nil(t, res) assert.EqualError(t, err, "rpc error: code = Internal desc = some unexpected error occurred") @@ -116,7 +116,7 @@ func TestGRPCServer_CreateProvider(t *testing.T) { mockedProviderService := &mocks.ProviderService{} dummyGRPCServer := v1beta1.NewGRPCServer(nil, log.NewNoop(), api.HeadersConfig{}, &api.Deps{ProviderService: mockedProviderService}) - mockedProviderService.EXPECT().Create(mock.AnythingOfType("*context.emptyCtx"), payload).Run(func(_a0 context.Context, _a1 *provider.Provider) { + mockedProviderService.EXPECT().Create(mock.AnythingOfType("context.todoCtx"), payload).Run(func(_a0 context.Context, _a1 *provider.Provider) { _a1.ID = testID }).Return(nil).Once() res, err := dummyGRPCServer.CreateProvider(ctx, dummyReq) @@ -128,7 +128,7 @@ func TestGRPCServer_CreateProvider(t *testing.T) { mockedProviderService := &mocks.ProviderService{} dummyGRPCServer := v1beta1.NewGRPCServer(nil, log.NewNoop(), api.HeadersConfig{}, &api.Deps{ProviderService: mockedProviderService}) - mockedProviderService.EXPECT().Create(mock.AnythingOfType("*context.emptyCtx"), payload).Return(errors.ErrInvalid).Once() + mockedProviderService.EXPECT().Create(mock.AnythingOfType("context.todoCtx"), payload).Return(errors.ErrInvalid).Once() res, err := dummyGRPCServer.CreateProvider(ctx, dummyReq) assert.Nil(t, res) assert.EqualError(t, err, "rpc error: code = InvalidArgument desc = request is not valid") @@ -138,7 +138,7 @@ func TestGRPCServer_CreateProvider(t *testing.T) { mockedProviderService := &mocks.ProviderService{} dummyGRPCServer := v1beta1.NewGRPCServer(nil, log.NewNoop(), api.HeadersConfig{}, &api.Deps{ProviderService: mockedProviderService}) - mockedProviderService.EXPECT().Create(mock.AnythingOfType("*context.emptyCtx"), payload).Return(errors.ErrConflict).Once() + mockedProviderService.EXPECT().Create(mock.AnythingOfType("context.todoCtx"), payload).Return(errors.ErrConflict).Once() res, err := dummyGRPCServer.CreateProvider(ctx, dummyReq) assert.Nil(t, res) assert.EqualError(t, err, "rpc error: code = AlreadyExists desc = an entity with conflicting identifier exists") @@ -148,7 +148,7 @@ func TestGRPCServer_CreateProvider(t *testing.T) { mockedProviderService := &mocks.ProviderService{} dummyGRPCServer := v1beta1.NewGRPCServer(nil, log.NewNoop(), api.HeadersConfig{}, &api.Deps{ProviderService: mockedProviderService}) - mockedProviderService.EXPECT().Create(mock.AnythingOfType("*context.emptyCtx"), payload).Return(errors.New("random error")).Once() + mockedProviderService.EXPECT().Create(mock.AnythingOfType("context.todoCtx"), payload).Return(errors.New("random error")).Once() res, err := dummyGRPCServer.CreateProvider(ctx, dummyReq) assert.Nil(t, res) assert.EqualError(t, err, "rpc error: code = Internal desc = some unexpected error occurred") @@ -181,7 +181,7 @@ func TestGRPCServer_GetProvider(t *testing.T) { UpdatedAt: time.Now(), } - mockedProviderService.EXPECT().Get(mock.AnythingOfType("*context.emptyCtx"), providerId).Return(dummyResult, nil).Once() + mockedProviderService.EXPECT().Get(mock.AnythingOfType("context.todoCtx"), providerId).Return(dummyResult, nil).Once() res, err := dummyGRPCServer.GetProvider(ctx, dummyReq) assert.Nil(t, err) @@ -195,7 +195,7 @@ func TestGRPCServer_GetProvider(t *testing.T) { mockedProviderService := &mocks.ProviderService{} dummyGRPCServer := v1beta1.NewGRPCServer(nil, log.NewNoop(), api.HeadersConfig{}, &api.Deps{ProviderService: mockedProviderService}) - mockedProviderService.EXPECT().Get(mock.AnythingOfType("*context.emptyCtx"), providerId). + mockedProviderService.EXPECT().Get(mock.AnythingOfType("context.todoCtx"), providerId). Return(nil, errors.ErrNotFound).Once() res, err := dummyGRPCServer.GetProvider(ctx, dummyReq) @@ -217,7 +217,7 @@ func TestGRPCServer_GetProvider(t *testing.T) { UpdatedAt: time.Now(), } - mockedProviderService.EXPECT().Get(mock.AnythingOfType("*context.emptyCtx"), providerId). + mockedProviderService.EXPECT().Get(mock.AnythingOfType("context.todoCtx"), providerId). Return(dummyResult, errors.New("random error")).Once() res, err := dummyGRPCServer.GetProvider(ctx, dummyReq) @@ -241,7 +241,7 @@ func TestGRPCServer_GetProvider(t *testing.T) { UpdatedAt: time.Now(), } - mockedProviderService.EXPECT().Get(mock.AnythingOfType("*context.emptyCtx"), providerId). + mockedProviderService.EXPECT().Get(mock.AnythingOfType("context.todoCtx"), providerId). Return(dummyResult, nil).Once() res, err := dummyGRPCServer.GetProvider(ctx, dummyReq) assert.Nil(t, res) @@ -279,7 +279,7 @@ func TestGRPCServer_UpdateProvider(t *testing.T) { mockedProviderService := &mocks.ProviderService{} dummyGRPCServer := v1beta1.NewGRPCServer(nil, log.NewNoop(), api.HeadersConfig{}, &api.Deps{ProviderService: mockedProviderService}) - mockedProviderService.EXPECT().Update(mock.AnythingOfType("*context.emptyCtx"), payload).Run(func(_a0 context.Context, _a1 *provider.Provider) { + mockedProviderService.EXPECT().Update(mock.AnythingOfType("context.todoCtx"), payload).Run(func(_a0 context.Context, _a1 *provider.Provider) { _a1.ID = testID }).Return(nil).Once() res, err := dummyGRPCServer.UpdateProvider(ctx, dummyReq) @@ -291,7 +291,7 @@ func TestGRPCServer_UpdateProvider(t *testing.T) { mockedProviderService := &mocks.ProviderService{} dummyGRPCServer := v1beta1.NewGRPCServer(nil, log.NewNoop(), api.HeadersConfig{}, &api.Deps{ProviderService: mockedProviderService}) - mockedProviderService.EXPECT().Update(mock.AnythingOfType("*context.emptyCtx"), payload).Return(errors.ErrInvalid).Once() + mockedProviderService.EXPECT().Update(mock.AnythingOfType("context.todoCtx"), payload).Return(errors.ErrInvalid).Once() res, err := dummyGRPCServer.UpdateProvider(ctx, dummyReq) assert.Nil(t, res) assert.EqualError(t, err, "rpc error: code = InvalidArgument desc = request is not valid") @@ -301,7 +301,7 @@ func TestGRPCServer_UpdateProvider(t *testing.T) { mockedProviderService := &mocks.ProviderService{} dummyGRPCServer := v1beta1.NewGRPCServer(nil, log.NewNoop(), api.HeadersConfig{}, &api.Deps{ProviderService: mockedProviderService}) - mockedProviderService.EXPECT().Update(mock.AnythingOfType("*context.emptyCtx"), payload).Return(errors.ErrConflict).Once() + mockedProviderService.EXPECT().Update(mock.AnythingOfType("context.todoCtx"), payload).Return(errors.ErrConflict).Once() res, err := dummyGRPCServer.UpdateProvider(ctx, dummyReq) assert.Nil(t, res) assert.EqualError(t, err, "rpc error: code = AlreadyExists desc = an entity with conflicting identifier exists") @@ -311,7 +311,7 @@ func TestGRPCServer_UpdateProvider(t *testing.T) { mockedProviderService := &mocks.ProviderService{} dummyGRPCServer := v1beta1.NewGRPCServer(nil, log.NewNoop(), api.HeadersConfig{}, &api.Deps{ProviderService: mockedProviderService}) - mockedProviderService.EXPECT().Update(mock.AnythingOfType("*context.emptyCtx"), payload).Return(errors.New("random error")).Once() + mockedProviderService.EXPECT().Update(mock.AnythingOfType("context.todoCtx"), payload).Return(errors.New("random error")).Once() res, err := dummyGRPCServer.UpdateProvider(ctx, dummyReq) assert.Nil(t, res) assert.EqualError(t, err, "rpc error: code = Internal desc = some unexpected error occurred") @@ -328,8 +328,8 @@ func TestGRPCServer_DeleteProvider(t *testing.T) { mockedProviderService := &mocks.ProviderService{} dummyGRPCServer := v1beta1.NewGRPCServer(nil, log.NewNoop(), api.HeadersConfig{}, &api.Deps{ProviderService: mockedProviderService}) - mockedProviderService.EXPECT().Delete(mock.AnythingOfType("*context.emptyCtx"), providerId).Return(nil).Once() - res, err := dummyGRPCServer.DeleteProvider(context.Background(), dummyReq) + mockedProviderService.EXPECT().Delete(mock.AnythingOfType("context.todoCtx"), providerId).Return(nil).Once() + res, err := dummyGRPCServer.DeleteProvider(context.TODO(), dummyReq) assert.Nil(t, err) assert.Equal(t, "", res.String()) }) @@ -338,8 +338,8 @@ func TestGRPCServer_DeleteProvider(t *testing.T) { mockedProviderService := &mocks.ProviderService{} dummyGRPCServer := v1beta1.NewGRPCServer(nil, log.NewNoop(), api.HeadersConfig{}, &api.Deps{ProviderService: mockedProviderService}) - mockedProviderService.EXPECT().Delete(mock.AnythingOfType("*context.emptyCtx"), providerId).Return(errors.New("random error")).Once() - res, err := dummyGRPCServer.DeleteProvider(context.Background(), dummyReq) + mockedProviderService.EXPECT().Delete(mock.AnythingOfType("context.todoCtx"), providerId).Return(errors.New("random error")).Once() + res, err := dummyGRPCServer.DeleteProvider(context.TODO(), dummyReq) assert.Nil(t, res) assert.EqualError(t, err, "rpc error: code = Internal desc = some unexpected error occurred") }) diff --git a/internal/api/v1beta1/receiver_test.go b/internal/api/v1beta1/receiver_test.go index b5cf7e53..c69babb7 100644 --- a/internal/api/v1beta1/receiver_test.go +++ b/internal/api/v1beta1/receiver_test.go @@ -37,10 +37,10 @@ func TestGRPCServer_ListReceiver(t *testing.T) { t.Run("should return list of all receiver", func(t *testing.T) { mockedReceiverService := &mocks.ReceiverService{} dummyGRPCServer := v1beta1.NewGRPCServer(nil, log.NewNoop(), api.HeadersConfig{}, &api.Deps{ReceiverService: mockedReceiverService}) - mockedReceiverService.EXPECT().List(mock.AnythingOfType("*context.emptyCtx"), receiver.Filter{}). + mockedReceiverService.EXPECT().List(mock.AnythingOfType("context.todoCtx"), receiver.Filter{}). Return(dummyResult, nil).Once() - res, err := dummyGRPCServer.ListReceivers(context.Background(), &sirenv1beta1.ListReceiversRequest{}) + res, err := dummyGRPCServer.ListReceivers(context.TODO(), &sirenv1beta1.ListReceiversRequest{}) assert.Nil(t, err) assert.Equal(t, 1, len(res.GetReceivers())) assert.Equal(t, uint64(1), res.GetReceivers()[0].GetId()) @@ -53,10 +53,10 @@ func TestGRPCServer_ListReceiver(t *testing.T) { t.Run("should return error Internal if getting providers failed", func(t *testing.T) { mockedReceiverService := &mocks.ReceiverService{} dummyGRPCServer := v1beta1.NewGRPCServer(nil, log.NewNoop(), api.HeadersConfig{}, &api.Deps{ReceiverService: mockedReceiverService}) - mockedReceiverService.EXPECT().List(mock.AnythingOfType("*context.emptyCtx"), receiver.Filter{}). + mockedReceiverService.EXPECT().List(mock.AnythingOfType("context.todoCtx"), receiver.Filter{}). Return(nil, errors.New("random error")) - res, err := dummyGRPCServer.ListReceivers(context.Background(), &sirenv1beta1.ListReceiversRequest{}) + res, err := dummyGRPCServer.ListReceivers(context.TODO(), &sirenv1beta1.ListReceiversRequest{}) assert.Nil(t, res) assert.EqualError(t, err, "rpc error: code = Internal desc = some unexpected error occurred") }) @@ -77,9 +77,9 @@ func TestGRPCServer_ListReceiver(t *testing.T) { }, } - mockedReceiverService.EXPECT().List(mock.AnythingOfType("*context.emptyCtx"), receiver.Filter{}). + mockedReceiverService.EXPECT().List(mock.AnythingOfType("context.todoCtx"), receiver.Filter{}). Return(dummyResult, nil) - res, err := dummyGRPCServer.ListReceivers(context.Background(), &sirenv1beta1.ListReceiversRequest{}) + res, err := dummyGRPCServer.ListReceivers(context.TODO(), &sirenv1beta1.ListReceiversRequest{}) assert.Nil(t, res) assert.EqualError(t, err, "rpc error: code = Internal desc = some unexpected error occurred") }) @@ -112,10 +112,10 @@ func TestGRPCServer_CreateReceiver(t *testing.T) { mockedReceiverService := &mocks.ReceiverService{} dummyGRPCServer := v1beta1.NewGRPCServer(nil, log.NewNoop(), api.HeadersConfig{}, &api.Deps{ReceiverService: mockedReceiverService}) - mockedReceiverService.EXPECT().Create(mock.AnythingOfType("*context.emptyCtx"), payload).Run(func(ctx context.Context, rcv *receiver.Receiver) { + mockedReceiverService.EXPECT().Create(mock.AnythingOfType("context.todoCtx"), payload).Run(func(ctx context.Context, rcv *receiver.Receiver) { rcv.ID = generatedID }).Return(nil).Once() - res, err := dummyGRPCServer.CreateReceiver(context.Background(), dummyReq) + res, err := dummyGRPCServer.CreateReceiver(context.TODO(), dummyReq) assert.Nil(t, err) assert.Equal(t, generatedID, res.GetId()) }) @@ -124,9 +124,9 @@ func TestGRPCServer_CreateReceiver(t *testing.T) { mockedReceiverService := &mocks.ReceiverService{} dummyGRPCServer := v1beta1.NewGRPCServer(nil, log.NewNoop(), api.HeadersConfig{}, &api.Deps{ReceiverService: mockedReceiverService}) - mockedReceiverService.EXPECT().Create(mock.AnythingOfType("*context.emptyCtx"), payload).Return(errors.ErrInvalid).Once() + mockedReceiverService.EXPECT().Create(mock.AnythingOfType("context.todoCtx"), payload).Return(errors.ErrInvalid).Once() - res, err := dummyGRPCServer.CreateReceiver(context.Background(), dummyReq) + res, err := dummyGRPCServer.CreateReceiver(context.TODO(), dummyReq) assert.EqualError(t, err, "rpc error: code = InvalidArgument desc = request is not valid") assert.Nil(t, res) @@ -136,9 +136,9 @@ func TestGRPCServer_CreateReceiver(t *testing.T) { mockedReceiverService := &mocks.ReceiverService{} dummyGRPCServer := v1beta1.NewGRPCServer(nil, log.NewNoop(), api.HeadersConfig{}, &api.Deps{ReceiverService: mockedReceiverService}) - mockedReceiverService.EXPECT().Create(mock.AnythingOfType("*context.emptyCtx"), payload).Return(errors.New("random error")).Once() + mockedReceiverService.EXPECT().Create(mock.AnythingOfType("context.todoCtx"), payload).Return(errors.New("random error")).Once() - res, err := dummyGRPCServer.CreateReceiver(context.Background(), dummyReq) + res, err := dummyGRPCServer.CreateReceiver(context.TODO(), dummyReq) assert.Nil(t, res) assert.EqualError(t, err, "rpc error: code = Internal desc = some unexpected error occurred") }) @@ -165,10 +165,10 @@ func TestGRPCServer_GetReceiver(t *testing.T) { t.Run("should return a receiver", func(t *testing.T) { mockedReceiverService := &mocks.ReceiverService{} dummyGRPCServer := v1beta1.NewGRPCServer(nil, log.NewNoop(), api.HeadersConfig{}, &api.Deps{ReceiverService: mockedReceiverService}) - mockedReceiverService.EXPECT().Get(mock.AnythingOfType("*context.emptyCtx"), receiverId, mock.AnythingOfType("receiver.GetOption")). + mockedReceiverService.EXPECT().Get(mock.AnythingOfType("context.todoCtx"), receiverId, mock.AnythingOfType("receiver.GetOption")). Return(payload, nil).Once() - res, err := dummyGRPCServer.GetReceiver(context.Background(), dummyReq) + res, err := dummyGRPCServer.GetReceiver(context.TODO(), dummyReq) assert.Nil(t, err) assert.Equal(t, "foo", res.GetReceiver().GetName()) assert.Equal(t, "bar", res.GetReceiver().GetType()) @@ -179,10 +179,10 @@ func TestGRPCServer_GetReceiver(t *testing.T) { t.Run("should return error Not Found if no receiver found", func(t *testing.T) { mockedReceiverService := &mocks.ReceiverService{} dummyGRPCServer := v1beta1.NewGRPCServer(nil, log.NewNoop(), api.HeadersConfig{}, &api.Deps{ReceiverService: mockedReceiverService}) - mockedReceiverService.EXPECT().Get(mock.AnythingOfType("*context.emptyCtx"), receiverId, mock.AnythingOfType("receiver.GetOption")). + mockedReceiverService.EXPECT().Get(mock.AnythingOfType("context.todoCtx"), receiverId, mock.AnythingOfType("receiver.GetOption")). Return(nil, errors.ErrNotFound).Once() - res, err := dummyGRPCServer.GetReceiver(context.Background(), dummyReq) + res, err := dummyGRPCServer.GetReceiver(context.TODO(), dummyReq) assert.Nil(t, res) assert.EqualError(t, err, "rpc error: code = NotFound desc = requested entity not found") }) @@ -190,10 +190,10 @@ func TestGRPCServer_GetReceiver(t *testing.T) { t.Run("should return error Internal if getting receiver failed", func(t *testing.T) { mockedReceiverService := &mocks.ReceiverService{} dummyGRPCServer := v1beta1.NewGRPCServer(nil, log.NewNoop(), api.HeadersConfig{}, &api.Deps{ReceiverService: mockedReceiverService}) - mockedReceiverService.EXPECT().Get(mock.AnythingOfType("*context.emptyCtx"), receiverId, mock.AnythingOfType("receiver.GetOption")). + mockedReceiverService.EXPECT().Get(mock.AnythingOfType("context.todoCtx"), receiverId, mock.AnythingOfType("receiver.GetOption")). Return(payload, errors.New("random error")).Once() - res, err := dummyGRPCServer.GetReceiver(context.Background(), dummyReq) + res, err := dummyGRPCServer.GetReceiver(context.TODO(), dummyReq) assert.Nil(t, res) assert.EqualError(t, err, "rpc error: code = Internal desc = some unexpected error occurred") }) @@ -210,9 +210,9 @@ func TestGRPCServer_GetReceiver(t *testing.T) { Configurations: configurations, } - mockedReceiverService.EXPECT().Get(mock.AnythingOfType("*context.emptyCtx"), receiverId, mock.AnythingOfType("receiver.GetOption")). + mockedReceiverService.EXPECT().Get(mock.AnythingOfType("context.todoCtx"), receiverId, mock.AnythingOfType("receiver.GetOption")). Return(payload, nil) - res, err := dummyGRPCServer.GetReceiver(context.Background(), dummyReq) + res, err := dummyGRPCServer.GetReceiver(context.TODO(), dummyReq) assert.Nil(t, res) assert.EqualError(t, err, "rpc error: code = Internal desc = some unexpected error occurred") }) @@ -230,9 +230,9 @@ func TestGRPCServer_GetReceiver(t *testing.T) { Data: data, } - mockedReceiverService.EXPECT().Get(mock.AnythingOfType("*context.emptyCtx"), receiverId, mock.AnythingOfType("receiver.GetOption")). + mockedReceiverService.EXPECT().Get(mock.AnythingOfType("context.todoCtx"), receiverId, mock.AnythingOfType("receiver.GetOption")). Return(payload, nil) - res, err := dummyGRPCServer.GetReceiver(context.Background(), dummyReq) + res, err := dummyGRPCServer.GetReceiver(context.TODO(), dummyReq) assert.Nil(t, res) assert.EqualError(t, err, "rpc error: code = Internal desc = some unexpected error occurred") }) @@ -265,11 +265,11 @@ func TestGRPCServer_UpdateReceiver(t *testing.T) { mockedReceiverService := &mocks.ReceiverService{} dummyGRPCServer := v1beta1.NewGRPCServer(nil, log.NewNoop(), api.HeadersConfig{}, &api.Deps{ReceiverService: mockedReceiverService}) - mockedReceiverService.EXPECT().Update(mock.AnythingOfType("*context.emptyCtx"), payload).Run(func(ctx context.Context, rcv *receiver.Receiver) { + mockedReceiverService.EXPECT().Update(mock.AnythingOfType("context.todoCtx"), payload).Run(func(ctx context.Context, rcv *receiver.Receiver) { rcv.ID = payload.ID }).Return(nil).Once() - res, err := dummyGRPCServer.UpdateReceiver(context.Background(), dummyReq) + res, err := dummyGRPCServer.UpdateReceiver(context.TODO(), dummyReq) assert.Nil(t, err) assert.Equal(t, payload.ID, res.GetId()) }) @@ -278,9 +278,9 @@ func TestGRPCServer_UpdateReceiver(t *testing.T) { mockedReceiverService := &mocks.ReceiverService{} dummyGRPCServer := v1beta1.NewGRPCServer(nil, log.NewNoop(), api.HeadersConfig{}, &api.Deps{ReceiverService: mockedReceiverService}) - mockedReceiverService.EXPECT().Update(mock.AnythingOfType("*context.emptyCtx"), payload).Return(errors.ErrInvalid).Once() + mockedReceiverService.EXPECT().Update(mock.AnythingOfType("context.todoCtx"), payload).Return(errors.ErrInvalid).Once() - res, err := dummyGRPCServer.UpdateReceiver(context.Background(), dummyReq) + res, err := dummyGRPCServer.UpdateReceiver(context.TODO(), dummyReq) assert.EqualError(t, err, "rpc error: code = InvalidArgument desc = request is not valid") assert.Nil(t, res) }) @@ -289,9 +289,9 @@ func TestGRPCServer_UpdateReceiver(t *testing.T) { mockedReceiverService := &mocks.ReceiverService{} dummyGRPCServer := v1beta1.NewGRPCServer(nil, log.NewNoop(), api.HeadersConfig{}, &api.Deps{ReceiverService: mockedReceiverService}) - mockedReceiverService.EXPECT().Update(mock.AnythingOfType("*context.emptyCtx"), payload).Return(errors.New("random error")) + mockedReceiverService.EXPECT().Update(mock.AnythingOfType("context.todoCtx"), payload).Return(errors.New("random error")) - res, err := dummyGRPCServer.UpdateReceiver(context.Background(), dummyReq) + res, err := dummyGRPCServer.UpdateReceiver(context.TODO(), dummyReq) assert.Nil(t, res) assert.EqualError(t, err, "rpc error: code = Internal desc = some unexpected error occurred") }) @@ -306,10 +306,10 @@ func TestGRPCServer_DeleteReceiver(t *testing.T) { t.Run("should delete receiver object", func(t *testing.T) { mockedReceiverService := &mocks.ReceiverService{} dummyGRPCServer := v1beta1.NewGRPCServer(nil, log.NewNoop(), api.HeadersConfig{}, &api.Deps{ReceiverService: mockedReceiverService}) - mockedReceiverService.EXPECT().Delete(mock.AnythingOfType("*context.emptyCtx"), providerId). + mockedReceiverService.EXPECT().Delete(mock.AnythingOfType("context.todoCtx"), providerId). Return(nil).Once() - res, err := dummyGRPCServer.DeleteReceiver(context.Background(), dummyReq) + res, err := dummyGRPCServer.DeleteReceiver(context.TODO(), dummyReq) assert.Nil(t, err) assert.Equal(t, "", res.String()) }) @@ -317,10 +317,10 @@ func TestGRPCServer_DeleteReceiver(t *testing.T) { t.Run("should return error Internal if deleting receiver failed", func(t *testing.T) { mockedReceiverService := &mocks.ReceiverService{} dummyGRPCServer := v1beta1.NewGRPCServer(nil, log.NewNoop(), api.HeadersConfig{}, &api.Deps{ReceiverService: mockedReceiverService}) - mockedReceiverService.EXPECT().Delete(mock.AnythingOfType("*context.emptyCtx"), providerId). + mockedReceiverService.EXPECT().Delete(mock.AnythingOfType("context.todoCtx"), providerId). Return(errors.New("random error")).Once() - res, err := dummyGRPCServer.DeleteReceiver(context.Background(), dummyReq) + res, err := dummyGRPCServer.DeleteReceiver(context.TODO(), dummyReq) assert.Nil(t, res) assert.EqualError(t, err, "rpc error: code = Internal desc = some unexpected error occurred") }) diff --git a/internal/api/v1beta1/rule_test.go b/internal/api/v1beta1/rule_test.go index 4243e724..c32035b0 100644 --- a/internal/api/v1beta1/rule_test.go +++ b/internal/api/v1beta1/rule_test.go @@ -26,7 +26,7 @@ func TestGRPCServer_ListRules(t *testing.T) { } t.Run("should return stored rules", func(t *testing.T) { - ctx := context.Background() + ctx := context.TODO() mockedRuleService := &mocks.RuleService{} dummyResult := []rule.Rule{ { @@ -70,7 +70,7 @@ func TestGRPCServer_ListRules(t *testing.T) { }) t.Run("should return error Internal if getting rules failed", func(t *testing.T) { - ctx := context.Background() + ctx := context.TODO() mockedRuleService := &mocks.RuleService{} dummyGRPCServer := v1beta1.NewGRPCServer(nil, log.NewNoop(), api.HeadersConfig{}, &api.Deps{RuleService: mockedRuleService}) @@ -122,7 +122,7 @@ func TestGRPCServer_UpdateRules(t *testing.T) { } t.Run("should update rule", func(t *testing.T) { - ctx := context.Background() + ctx := context.TODO() mockedRuleService := &mocks.RuleService{} dummyGRPCServer := v1beta1.NewGRPCServer(nil, log.NewNoop(), api.HeadersConfig{}, &api.Deps{RuleService: mockedRuleService}) dummyResult := &rule.Rule{} @@ -142,7 +142,7 @@ func TestGRPCServer_UpdateRules(t *testing.T) { }) t.Run("should return error AlreadyExist if update rules return err conflict", func(t *testing.T) { - ctx := context.Background() + ctx := context.TODO() mockedRuleService := &mocks.RuleService{} dummyGRPCServer := v1beta1.NewGRPCServer(nil, log.NewNoop(), api.HeadersConfig{}, &api.Deps{RuleService: mockedRuleService}) @@ -154,7 +154,7 @@ func TestGRPCServer_UpdateRules(t *testing.T) { }) t.Run("should return error Internal if getting rules failed", func(t *testing.T) { - ctx := context.Background() + ctx := context.TODO() mockedRuleService := &mocks.RuleService{} dummyGRPCServer := v1beta1.NewGRPCServer(nil, log.NewNoop(), api.HeadersConfig{}, &api.Deps{RuleService: mockedRuleService}) diff --git a/internal/api/v1beta1/silence_test.go b/internal/api/v1beta1/silence_test.go index 58502536..1ec8880c 100644 --- a/internal/api/v1beta1/silence_test.go +++ b/internal/api/v1beta1/silence_test.go @@ -39,7 +39,7 @@ func TestGRPCServer_CreateSilence(t *testing.T) { { name: "return silence id when successfully created silence", setup: func(ss *mocks.SilenceService) { - ss.EXPECT().Create(mock.AnythingOfType("*context.emptyCtx"), mockSilenceData).Return("123", nil) + ss.EXPECT().Create(mock.AnythingOfType("context.todoCtx"), mockSilenceData).Return("123", nil) }, req: &sirenv1beta1.CreateSilenceRequest{ NamespaceId: mockSilenceData.NamespaceID, @@ -57,7 +57,7 @@ func TestGRPCServer_CreateSilence(t *testing.T) { { name: "return error if service create return error", setup: func(ss *mocks.SilenceService) { - ss.EXPECT().Create(mock.AnythingOfType("*context.emptyCtx"), mockSilenceData).Return("", errors.New("some error")) + ss.EXPECT().Create(mock.AnythingOfType("context.todoCtx"), mockSilenceData).Return("", errors.New("some error")) }, req: &sirenv1beta1.CreateSilenceRequest{ NamespaceId: mockSilenceData.NamespaceID, @@ -111,7 +111,7 @@ func TestGRPCServer_ListSilences(t *testing.T) { { name: "return silences when successfully list silences", setup: func(ss *mocks.SilenceService) { - ss.EXPECT().List(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("silence.Filter")).Return([]silence.Silence{ + ss.EXPECT().List(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("silence.Filter")).Return([]silence.Silence{ mockSilenceData, }, nil) }, @@ -131,7 +131,7 @@ func TestGRPCServer_ListSilences(t *testing.T) { { name: "return error if service list return error", setup: func(ss *mocks.SilenceService) { - ss.EXPECT().List(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("silence.Filter")).Return(nil, errors.New("some error")) + ss.EXPECT().List(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("silence.Filter")).Return(nil, errors.New("some error")) }, wantErr: true, }, @@ -179,7 +179,7 @@ func TestGRPCServer_GetSilence(t *testing.T) { { name: "return silence when successfully get silence", setup: func(ss *mocks.SilenceService) { - ss.EXPECT().Get(mock.AnythingOfType("*context.emptyCtx"), mockSilenceData.ID).Return(mockSilenceData, nil) + ss.EXPECT().Get(mock.AnythingOfType("context.todoCtx"), mockSilenceData.ID).Return(mockSilenceData, nil) }, req: &sirenv1beta1.GetSilenceRequest{ Id: mockSilenceData.ID, @@ -198,7 +198,7 @@ func TestGRPCServer_GetSilence(t *testing.T) { { name: "return error if service get return error", setup: func(ss *mocks.SilenceService) { - ss.EXPECT().Get(mock.AnythingOfType("*context.emptyCtx"), mockSilenceData.ID).Return(silence.Silence{}, errors.New("some error")) + ss.EXPECT().Get(mock.AnythingOfType("context.todoCtx"), mockSilenceData.ID).Return(silence.Silence{}, errors.New("some error")) }, req: &sirenv1beta1.GetSilenceRequest{ Id: mockSilenceData.ID, @@ -248,7 +248,7 @@ func TestGRPCServer_ExpireSilence(t *testing.T) { { name: "return success when successfully deleted silence", setup: func(ss *mocks.SilenceService) { - ss.EXPECT().Delete(mock.AnythingOfType("*context.emptyCtx"), mockSilenceData.ID).Return(nil) + ss.EXPECT().Delete(mock.AnythingOfType("context.todoCtx"), mockSilenceData.ID).Return(nil) }, req: &sirenv1beta1.ExpireSilenceRequest{ Id: mockSilenceData.ID, @@ -258,7 +258,7 @@ func TestGRPCServer_ExpireSilence(t *testing.T) { { name: "return error if service delete return error", setup: func(ss *mocks.SilenceService) { - ss.EXPECT().Delete(mock.AnythingOfType("*context.emptyCtx"), mockSilenceData.ID).Return(errors.New("some error")) + ss.EXPECT().Delete(mock.AnythingOfType("context.todoCtx"), mockSilenceData.ID).Return(errors.New("some error")) }, req: &sirenv1beta1.ExpireSilenceRequest{ Id: mockSilenceData.ID, diff --git a/internal/api/v1beta1/subscription_test.go b/internal/api/v1beta1/subscription_test.go index 128da260..a9d2d543 100644 --- a/internal/api/v1beta1/subscription_test.go +++ b/internal/api/v1beta1/subscription_test.go @@ -57,8 +57,8 @@ func TestGRPCServer_ListSubscriptions(t *testing.T) { }, } - mockedSubscriptionService.EXPECT().List(context.Background(), subscription.Filter{}).Return(dummyResult, nil).Once() - res, err := dummyGRPCServer.ListSubscriptions(context.Background(), &sirenv1beta1.ListSubscriptionsRequest{}) + mockedSubscriptionService.EXPECT().List(context.TODO(), subscription.Filter{}).Return(dummyResult, nil).Once() + res, err := dummyGRPCServer.ListSubscriptions(context.TODO(), &sirenv1beta1.ListSubscriptionsRequest{}) assert.Nil(t, err) assert.Equal(t, 1, len(res.GetSubscriptions())) assert.Equal(t, uint64(1), res.GetSubscriptions()[0].GetId()) @@ -72,8 +72,8 @@ func TestGRPCServer_ListSubscriptions(t *testing.T) { dummyGRPCServer := v1beta1.NewGRPCServer(nil, log.NewNoop(), api.HeadersConfig{}, &api.Deps{SubscriptionService: mockedSubscriptionService}) - mockedSubscriptionService.EXPECT().List(context.Background(), subscription.Filter{}).Return(nil, errors.New("random error")).Once() - res, err := dummyGRPCServer.ListSubscriptions(context.Background(), &sirenv1beta1.ListSubscriptionsRequest{}) + mockedSubscriptionService.EXPECT().List(context.TODO(), subscription.Filter{}).Return(nil, errors.New("random error")).Once() + res, err := dummyGRPCServer.ListSubscriptions(context.TODO(), &sirenv1beta1.ListSubscriptionsRequest{}) assert.Nil(t, res) assert.EqualError(t, err, "rpc error: code = Internal desc = some unexpected error occurred") }) @@ -96,8 +96,8 @@ func TestGRPCServer_GetSubscription(t *testing.T) { UpdatedAt: time.Now(), } - mockedSubscriptionService.EXPECT().Get(context.Background(), uint64(1)).Return(dummyResult, nil).Once() - res, err := dummyGRPCServer.GetSubscription(context.Background(), &sirenv1beta1.GetSubscriptionRequest{Id: 1}) + mockedSubscriptionService.EXPECT().Get(context.TODO(), uint64(1)).Return(dummyResult, nil).Once() + res, err := dummyGRPCServer.GetSubscription(context.TODO(), &sirenv1beta1.GetSubscriptionRequest{Id: 1}) assert.Nil(t, err) assert.Equal(t, uint64(1), res.GetSubscription().GetId()) assert.Equal(t, "bar", res.GetSubscription().GetMatch()["foo"]) @@ -108,8 +108,8 @@ func TestGRPCServer_GetSubscription(t *testing.T) { t.Run("should return error Not Found if subscriptions not found", func(t *testing.T) { mockedSubscriptionService := &mocks.SubscriptionService{} dummyGRPCServer := v1beta1.NewGRPCServer(nil, log.NewNoop(), api.HeadersConfig{}, &api.Deps{SubscriptionService: mockedSubscriptionService}) - mockedSubscriptionService.EXPECT().Get(context.Background(), uint64(1)).Return(nil, errors.ErrNotFound).Once() - res, err := dummyGRPCServer.GetSubscription(context.Background(), &sirenv1beta1.GetSubscriptionRequest{Id: 1}) + mockedSubscriptionService.EXPECT().Get(context.TODO(), uint64(1)).Return(nil, errors.ErrNotFound).Once() + res, err := dummyGRPCServer.GetSubscription(context.TODO(), &sirenv1beta1.GetSubscriptionRequest{Id: 1}) assert.Nil(t, res) assert.EqualError(t, err, "rpc error: code = NotFound desc = requested entity not found") }) @@ -117,9 +117,9 @@ func TestGRPCServer_GetSubscription(t *testing.T) { t.Run("should return error Internal if getting subscription fails", func(t *testing.T) { mockedSubscriptionService := &mocks.SubscriptionService{} dummyGRPCServer := v1beta1.NewGRPCServer(nil, log.NewNoop(), api.HeadersConfig{}, &api.Deps{SubscriptionService: mockedSubscriptionService}) - mockedSubscriptionService.EXPECT().Get(context.Background(), uint64(1)). + mockedSubscriptionService.EXPECT().Get(context.TODO(), uint64(1)). Return(nil, errors.New("random error")).Once() - res, err := dummyGRPCServer.GetSubscription(context.Background(), &sirenv1beta1.GetSubscriptionRequest{Id: 1}) + res, err := dummyGRPCServer.GetSubscription(context.TODO(), &sirenv1beta1.GetSubscriptionRequest{Id: 1}) assert.Nil(t, res) assert.EqualError(t, err, "rpc error: code = Internal desc = some unexpected error occurred") }) @@ -156,11 +156,11 @@ func TestGRPCServer_CreateSubscription(t *testing.T) { mockedSubscriptionService := &mocks.SubscriptionService{} dummyGRPCServer := v1beta1.NewGRPCServer(nil, log.NewNoop(), api.HeadersConfig{}, &api.Deps{SubscriptionService: mockedSubscriptionService}) - mockedSubscriptionService.EXPECT().Create(context.Background(), payload).Run(func(_a0 context.Context, _a1 *subscription.Subscription) { + mockedSubscriptionService.EXPECT().Create(context.TODO(), payload).Run(func(_a0 context.Context, _a1 *subscription.Subscription) { _a1.ID = dummyResult.ID }).Return(nil).Once() - res, err := dummyGRPCServer.CreateSubscription(context.Background(), &sirenv1beta1.CreateSubscriptionRequest{ + res, err := dummyGRPCServer.CreateSubscription(context.TODO(), &sirenv1beta1.CreateSubscriptionRequest{ Namespace: 1, Urn: "foo", Receivers: []*sirenv1beta1.ReceiverMetadata{{Id: 1, Configuration: configMapPB}}, @@ -174,11 +174,11 @@ func TestGRPCServer_CreateSubscription(t *testing.T) { mockedSubscriptionService := &mocks.SubscriptionService{} dummyGRPCServer := v1beta1.NewGRPCServer(nil, log.NewNoop(), api.HeadersConfig{}, &api.Deps{SubscriptionService: mockedSubscriptionService}) - mockedSubscriptionService.EXPECT().Create(context.Background(), payload).Run(func(_a0 context.Context, _a1 *subscription.Subscription) { + mockedSubscriptionService.EXPECT().Create(context.TODO(), payload).Run(func(_a0 context.Context, _a1 *subscription.Subscription) { _a1.ID = dummyResult.ID }).Return(errors.ErrInvalid).Once() - res, err := dummyGRPCServer.CreateSubscription(context.Background(), &sirenv1beta1.CreateSubscriptionRequest{ + res, err := dummyGRPCServer.CreateSubscription(context.TODO(), &sirenv1beta1.CreateSubscriptionRequest{ Namespace: 1, Urn: "foo", Receivers: []*sirenv1beta1.ReceiverMetadata{{Id: 1, Configuration: configMapPB}}, @@ -192,11 +192,11 @@ func TestGRPCServer_CreateSubscription(t *testing.T) { mockedSubscriptionService := &mocks.SubscriptionService{} dummyGRPCServer := v1beta1.NewGRPCServer(nil, log.NewNoop(), api.HeadersConfig{}, &api.Deps{SubscriptionService: mockedSubscriptionService}) - mockedSubscriptionService.EXPECT().Create(context.Background(), payload).Run(func(_a0 context.Context, _a1 *subscription.Subscription) { + mockedSubscriptionService.EXPECT().Create(context.TODO(), payload).Run(func(_a0 context.Context, _a1 *subscription.Subscription) { _a1.ID = dummyResult.ID }).Return(errors.ErrConflict).Once() - res, err := dummyGRPCServer.CreateSubscription(context.Background(), &sirenv1beta1.CreateSubscriptionRequest{ + res, err := dummyGRPCServer.CreateSubscription(context.TODO(), &sirenv1beta1.CreateSubscriptionRequest{ Namespace: 1, Urn: "foo", Receivers: []*sirenv1beta1.ReceiverMetadata{{Id: 1, Configuration: configMapPB}}, @@ -210,11 +210,11 @@ func TestGRPCServer_CreateSubscription(t *testing.T) { mockedSubscriptionService := &mocks.SubscriptionService{} dummyGRPCServer := v1beta1.NewGRPCServer(nil, log.NewNoop(), api.HeadersConfig{}, &api.Deps{SubscriptionService: mockedSubscriptionService}) - mockedSubscriptionService.EXPECT().Create(context.Background(), payload).Run(func(_a0 context.Context, _a1 *subscription.Subscription) { + mockedSubscriptionService.EXPECT().Create(context.TODO(), payload).Run(func(_a0 context.Context, _a1 *subscription.Subscription) { _a1.ID = dummyResult.ID }).Return(errors.New("random error")).Once() - res, err := dummyGRPCServer.CreateSubscription(context.Background(), &sirenv1beta1.CreateSubscriptionRequest{ + res, err := dummyGRPCServer.CreateSubscription(context.TODO(), &sirenv1beta1.CreateSubscriptionRequest{ Namespace: 1, Urn: "foo", Receivers: []*sirenv1beta1.ReceiverMetadata{{Id: 1, Configuration: configMapPB}}, @@ -251,11 +251,11 @@ func TestGRPCServer_UpdateSubscription(t *testing.T) { mockedSubscriptionService := &mocks.SubscriptionService{} dummyGRPCServer := v1beta1.NewGRPCServer(nil, log.NewNoop(), api.HeadersConfig{}, &api.Deps{SubscriptionService: mockedSubscriptionService}) - mockedSubscriptionService.EXPECT().Update(context.Background(), payload).Run(func(_a0 context.Context, _a1 *subscription.Subscription) { + mockedSubscriptionService.EXPECT().Update(context.TODO(), payload).Run(func(_a0 context.Context, _a1 *subscription.Subscription) { _a1.ID = uint64(1) }).Return(nil).Once() - res, err := dummyGRPCServer.UpdateSubscription(context.Background(), &sirenv1beta1.UpdateSubscriptionRequest{ + res, err := dummyGRPCServer.UpdateSubscription(context.TODO(), &sirenv1beta1.UpdateSubscriptionRequest{ Id: 1, Namespace: 10, Urn: "foo", @@ -271,9 +271,9 @@ func TestGRPCServer_UpdateSubscription(t *testing.T) { t.Run("should return error Invalid Argument if updating subscriptions return err invalid", func(t *testing.T) { mockedSubscriptionService := &mocks.SubscriptionService{} dummyGRPCServer := v1beta1.NewGRPCServer(nil, log.NewNoop(), api.HeadersConfig{}, &api.Deps{SubscriptionService: mockedSubscriptionService}) - mockedSubscriptionService.EXPECT().Update(context.Background(), payload).Return(errors.ErrInvalid).Once() + mockedSubscriptionService.EXPECT().Update(context.TODO(), payload).Return(errors.ErrInvalid).Once() - res, err := dummyGRPCServer.UpdateSubscription(context.Background(), &sirenv1beta1.UpdateSubscriptionRequest{ + res, err := dummyGRPCServer.UpdateSubscription(context.TODO(), &sirenv1beta1.UpdateSubscriptionRequest{ Id: 1, Namespace: 10, Urn: "foo", @@ -289,9 +289,9 @@ func TestGRPCServer_UpdateSubscription(t *testing.T) { t.Run("should return error AlreadyExist if updating subscriptions return err conflict", func(t *testing.T) { mockedSubscriptionService := &mocks.SubscriptionService{} dummyGRPCServer := v1beta1.NewGRPCServer(nil, log.NewNoop(), api.HeadersConfig{}, &api.Deps{SubscriptionService: mockedSubscriptionService}) - mockedSubscriptionService.EXPECT().Update(context.Background(), payload).Return(errors.ErrConflict).Once() + mockedSubscriptionService.EXPECT().Update(context.TODO(), payload).Return(errors.ErrConflict).Once() - res, err := dummyGRPCServer.UpdateSubscription(context.Background(), &sirenv1beta1.UpdateSubscriptionRequest{ + res, err := dummyGRPCServer.UpdateSubscription(context.TODO(), &sirenv1beta1.UpdateSubscriptionRequest{ Id: 1, Namespace: 10, Urn: "foo", @@ -307,9 +307,9 @@ func TestGRPCServer_UpdateSubscription(t *testing.T) { t.Run("should return error Internal if updating subscriptions fails", func(t *testing.T) { mockedSubscriptionService := &mocks.SubscriptionService{} dummyGRPCServer := v1beta1.NewGRPCServer(nil, log.NewNoop(), api.HeadersConfig{}, &api.Deps{SubscriptionService: mockedSubscriptionService}) - mockedSubscriptionService.EXPECT().Update(context.Background(), payload).Return(errors.New("random error")).Once() + mockedSubscriptionService.EXPECT().Update(context.TODO(), payload).Return(errors.New("random error")).Once() - res, err := dummyGRPCServer.UpdateSubscription(context.Background(), &sirenv1beta1.UpdateSubscriptionRequest{ + res, err := dummyGRPCServer.UpdateSubscription(context.TODO(), &sirenv1beta1.UpdateSubscriptionRequest{ Id: 1, Namespace: 10, Urn: "foo", @@ -325,9 +325,9 @@ func TestGRPCServer_UpdateSubscription(t *testing.T) { t.Run("should return error Invalid for bad requests", func(t *testing.T) { mockedSubscriptionService := &mocks.SubscriptionService{} dummyGRPCServer := v1beta1.NewGRPCServer(nil, log.NewNoop(), api.HeadersConfig{}, &api.Deps{SubscriptionService: mockedSubscriptionService}) - mockedSubscriptionService.EXPECT().Update(context.Background(), payload).Return(errors.ErrInvalid).Once() + mockedSubscriptionService.EXPECT().Update(context.TODO(), payload).Return(errors.ErrInvalid).Once() - res, err := dummyGRPCServer.UpdateSubscription(context.Background(), &sirenv1beta1.UpdateSubscriptionRequest{ + res, err := dummyGRPCServer.UpdateSubscription(context.TODO(), &sirenv1beta1.UpdateSubscriptionRequest{ Id: 1, Namespace: 10, Urn: "foo", @@ -346,8 +346,8 @@ func TestGRPCServer_DeleteSubscription(t *testing.T) { mockedSubscriptionService := &mocks.SubscriptionService{} dummyGRPCServer := v1beta1.NewGRPCServer(nil, log.NewNoop(), api.HeadersConfig{}, &api.Deps{SubscriptionService: mockedSubscriptionService}) - mockedSubscriptionService.EXPECT().Delete(context.Background(), uint64(1)).Return(nil).Once() - res, err := dummyGRPCServer.DeleteSubscription(context.Background(), &sirenv1beta1.DeleteSubscriptionRequest{Id: 1}) + mockedSubscriptionService.EXPECT().Delete(context.TODO(), uint64(1)).Return(nil).Once() + res, err := dummyGRPCServer.DeleteSubscription(context.TODO(), &sirenv1beta1.DeleteSubscriptionRequest{Id: 1}) assert.Nil(t, err) assert.Equal(t, &sirenv1beta1.DeleteSubscriptionResponse{}, res) }) @@ -356,8 +356,8 @@ func TestGRPCServer_DeleteSubscription(t *testing.T) { mockedSubscriptionService := &mocks.SubscriptionService{} dummyGRPCServer := v1beta1.NewGRPCServer(nil, log.NewNoop(), api.HeadersConfig{}, &api.Deps{SubscriptionService: mockedSubscriptionService}) - mockedSubscriptionService.EXPECT().Delete(context.Background(), uint64(1)).Return(errors.New("random error")).Once() - res, err := dummyGRPCServer.DeleteSubscription(context.Background(), &sirenv1beta1.DeleteSubscriptionRequest{Id: 1}) + mockedSubscriptionService.EXPECT().Delete(context.TODO(), uint64(1)).Return(errors.New("random error")).Once() + res, err := dummyGRPCServer.DeleteSubscription(context.TODO(), &sirenv1beta1.DeleteSubscriptionRequest{Id: 1}) assert.EqualError(t, err, "rpc error: code = Internal desc = some unexpected error occurred") assert.Nil(t, res) }) diff --git a/internal/api/v1beta1/template_test.go b/internal/api/v1beta1/template_test.go index 05c71968..728668fb 100644 --- a/internal/api/v1beta1/template_test.go +++ b/internal/api/v1beta1/template_test.go @@ -39,9 +39,9 @@ func TestGRPCServer_ListTemplates(t *testing.T) { }, } - mockedTemplateService.EXPECT().List(mock.AnythingOfType("*context.emptyCtx"), template.Filter{}). + mockedTemplateService.EXPECT().List(mock.AnythingOfType("context.todoCtx"), template.Filter{}). Return(dummyResult, nil).Once() - res, err := dummyGRPCServer.ListTemplates(context.Background(), dummyReq) + res, err := dummyGRPCServer.ListTemplates(context.TODO(), dummyReq) assert.Nil(t, err) assert.Equal(t, 1, len(res.GetTemplates())) assert.Equal(t, "foo", res.GetTemplates()[0].GetName()) @@ -75,9 +75,9 @@ func TestGRPCServer_ListTemplates(t *testing.T) { }, } - mockedTemplateService.EXPECT().List(mock.AnythingOfType("*context.emptyCtx"), template.Filter{Tag: "foo"}). + mockedTemplateService.EXPECT().List(mock.AnythingOfType("context.todoCtx"), template.Filter{Tag: "foo"}). Return(dummyResult, nil).Once() - res, err := dummyGRPCServer.ListTemplates(context.Background(), dummyReq) + res, err := dummyGRPCServer.ListTemplates(context.TODO(), dummyReq) assert.Nil(t, err) assert.Equal(t, 1, len(res.GetTemplates())) assert.Equal(t, "foo", res.GetTemplates()[0].GetName()) @@ -93,9 +93,9 @@ func TestGRPCServer_ListTemplates(t *testing.T) { dummyReq := &sirenv1beta1.ListTemplatesRequest{ Tag: "foo", } - mockedTemplateService.EXPECT().List(mock.AnythingOfType("*context.emptyCtx"), template.Filter{Tag: "foo"}). + mockedTemplateService.EXPECT().List(mock.AnythingOfType("context.todoCtx"), template.Filter{Tag: "foo"}). Return(nil, errors.New("random error")).Once() - res, err := dummyGRPCServer.ListTemplates(context.Background(), dummyReq) + res, err := dummyGRPCServer.ListTemplates(context.TODO(), dummyReq) assert.Nil(t, res) assert.EqualError(t, err, "rpc error: code = Internal desc = some unexpected error occurred") mockedTemplateService.AssertExpectations(t) @@ -124,9 +124,9 @@ func TestGRPCServer_GetTemplate(t *testing.T) { }, } - mockedTemplateService.EXPECT().GetByName(mock.AnythingOfType("*context.emptyCtx"), "foo"). + mockedTemplateService.EXPECT().GetByName(mock.AnythingOfType("context.todoCtx"), "foo"). Return(dummyResult, nil).Once() - res, err := dummyGRPCServer.GetTemplate(context.Background(), dummyReq) + res, err := dummyGRPCServer.GetTemplate(context.TODO(), dummyReq) assert.Nil(t, err) assert.Equal(t, uint64(1), res.GetTemplate().GetId()) assert.Equal(t, "foo", res.GetTemplate().GetName()) @@ -141,9 +141,9 @@ func TestGRPCServer_GetTemplate(t *testing.T) { dummyReq := &sirenv1beta1.GetTemplateRequest{ Name: "foo", } - mockedTemplateService.EXPECT().GetByName(mock.AnythingOfType("*context.emptyCtx"), "foo"). + mockedTemplateService.EXPECT().GetByName(mock.AnythingOfType("context.todoCtx"), "foo"). Return(nil, errors.ErrNotFound).Once() - res, err := dummyGRPCServer.GetTemplate(context.Background(), dummyReq) + res, err := dummyGRPCServer.GetTemplate(context.TODO(), dummyReq) assert.Nil(t, res) assert.EqualError(t, err, "rpc error: code = NotFound desc = requested entity not found") mockedTemplateService.AssertExpectations(t) @@ -155,9 +155,9 @@ func TestGRPCServer_GetTemplate(t *testing.T) { dummyReq := &sirenv1beta1.GetTemplateRequest{ Name: "foo", } - mockedTemplateService.EXPECT().GetByName(mock.AnythingOfType("*context.emptyCtx"), "foo"). + mockedTemplateService.EXPECT().GetByName(mock.AnythingOfType("context.todoCtx"), "foo"). Return(nil, errors.New("random error")).Once() - res, err := dummyGRPCServer.GetTemplate(context.Background(), dummyReq) + res, err := dummyGRPCServer.GetTemplate(context.TODO(), dummyReq) assert.Nil(t, res) assert.EqualError(t, err, "rpc error: code = Internal desc = some unexpected error occurred") mockedTemplateService.AssertExpectations(t) @@ -198,10 +198,10 @@ func TestGRPCServer_UpsertTemplate(t *testing.T) { mockedTemplateService := &mocks.TemplateService{} dummyGRPCServer := v1beta1.NewGRPCServer(nil, log.NewNoop(), api.HeadersConfig{}, &api.Deps{TemplateService: mockedTemplateService}) - mockedTemplateService.EXPECT().Upsert(mock.AnythingOfType("*context.emptyCtx"), tmpl).Run(func(_a0 context.Context, _a1 *template.Template) { + mockedTemplateService.EXPECT().Upsert(mock.AnythingOfType("context.todoCtx"), tmpl).Run(func(_a0 context.Context, _a1 *template.Template) { _a1.ID = uint64(1) }).Return(nil).Once() - res, err := dummyGRPCServer.UpsertTemplate(context.Background(), dummyReq) + res, err := dummyGRPCServer.UpsertTemplate(context.TODO(), dummyReq) assert.Nil(t, err) assert.Equal(t, uint64(1), res.GetId()) mockedTemplateService.AssertExpectations(t) @@ -210,8 +210,8 @@ func TestGRPCServer_UpsertTemplate(t *testing.T) { t.Run("should return error AlreadyExists if upsert template return err conflict", func(t *testing.T) { mockedTemplateService := &mocks.TemplateService{} dummyGRPCServer := v1beta1.NewGRPCServer(nil, log.NewNoop(), api.HeadersConfig{}, &api.Deps{TemplateService: mockedTemplateService}) - mockedTemplateService.EXPECT().Upsert(mock.AnythingOfType("*context.emptyCtx"), tmpl).Return(errors.ErrConflict).Once() - res, err := dummyGRPCServer.UpsertTemplate(context.Background(), dummyReq) + mockedTemplateService.EXPECT().Upsert(mock.AnythingOfType("context.todoCtx"), tmpl).Return(errors.ErrConflict).Once() + res, err := dummyGRPCServer.UpsertTemplate(context.TODO(), dummyReq) assert.Nil(t, res) assert.EqualError(t, err, "rpc error: code = AlreadyExists desc = an entity with conflicting identifier exists") mockedTemplateService.AssertExpectations(t) @@ -220,8 +220,8 @@ func TestGRPCServer_UpsertTemplate(t *testing.T) { t.Run("should return error Internal if upsert template failed", func(t *testing.T) { mockedTemplateService := &mocks.TemplateService{} dummyGRPCServer := v1beta1.NewGRPCServer(nil, log.NewNoop(), api.HeadersConfig{}, &api.Deps{TemplateService: mockedTemplateService}) - mockedTemplateService.EXPECT().Upsert(mock.AnythingOfType("*context.emptyCtx"), tmpl).Return(errors.New("random error")).Once() - res, err := dummyGRPCServer.UpsertTemplate(context.Background(), dummyReq) + mockedTemplateService.EXPECT().Upsert(mock.AnythingOfType("context.todoCtx"), tmpl).Return(errors.New("random error")).Once() + res, err := dummyGRPCServer.UpsertTemplate(context.TODO(), dummyReq) assert.Nil(t, res) assert.EqualError(t, err, "rpc error: code = Internal desc = some unexpected error occurred") mockedTemplateService.AssertExpectations(t) @@ -236,9 +236,9 @@ func TestGRPCServer_DeleteTemplate(t *testing.T) { Name: "foo", } - mockedTemplateService.EXPECT().Delete(mock.AnythingOfType("*context.emptyCtx"), "foo"). + mockedTemplateService.EXPECT().Delete(mock.AnythingOfType("context.todoCtx"), "foo"). Return(nil).Once() - res, err := dummyGRPCServer.DeleteTemplate(context.Background(), dummyReq) + res, err := dummyGRPCServer.DeleteTemplate(context.TODO(), dummyReq) assert.Nil(t, err) assert.Equal(t, &sirenv1beta1.DeleteTemplateResponse{}, res) mockedTemplateService.AssertExpectations(t) @@ -250,9 +250,9 @@ func TestGRPCServer_DeleteTemplate(t *testing.T) { dummyReq := &sirenv1beta1.DeleteTemplateRequest{ Name: "foo", } - mockedTemplateService.EXPECT().Delete(mock.AnythingOfType("*context.emptyCtx"), "foo"). + mockedTemplateService.EXPECT().Delete(mock.AnythingOfType("context.todoCtx"), "foo"). Return(errors.New("random error")).Once() - res, err := dummyGRPCServer.DeleteTemplate(context.Background(), dummyReq) + res, err := dummyGRPCServer.DeleteTemplate(context.TODO(), dummyReq) assert.Nil(t, res) assert.EqualError(t, err, "rpc error: code = Internal desc = some unexpected error occurred") mockedTemplateService.AssertExpectations(t) @@ -271,9 +271,9 @@ func TestGRPCServer_RenderTemplate(t *testing.T) { mockedTemplateService := &mocks.TemplateService{} dummyGRPCServer := v1beta1.NewGRPCServer(nil, log.NewNoop(), api.HeadersConfig{}, &api.Deps{TemplateService: mockedTemplateService}) - mockedTemplateService.EXPECT().Render(mock.AnythingOfType("*context.emptyCtx"), "foo", dummyReq.GetVariables()). + mockedTemplateService.EXPECT().Render(mock.AnythingOfType("context.todoCtx"), "foo", dummyReq.GetVariables()). Return("random", nil).Once() - res, err := dummyGRPCServer.RenderTemplate(context.Background(), dummyReq) + res, err := dummyGRPCServer.RenderTemplate(context.TODO(), dummyReq) assert.Nil(t, err) assert.Equal(t, "random", res.GetBody()) mockedTemplateService.AssertExpectations(t) @@ -282,9 +282,9 @@ func TestGRPCServer_RenderTemplate(t *testing.T) { t.Run("should return error Internal if rendering template failed", func(t *testing.T) { mockedTemplateService := &mocks.TemplateService{} dummyGRPCServer := v1beta1.NewGRPCServer(nil, log.NewNoop(), api.HeadersConfig{}, &api.Deps{TemplateService: mockedTemplateService}) - mockedTemplateService.EXPECT().Render(mock.AnythingOfType("*context.emptyCtx"), "foo", dummyReq.GetVariables()). + mockedTemplateService.EXPECT().Render(mock.AnythingOfType("context.todoCtx"), "foo", dummyReq.GetVariables()). Return("", errors.New("random error")).Once() - res, err := dummyGRPCServer.RenderTemplate(context.Background(), dummyReq) + res, err := dummyGRPCServer.RenderTemplate(context.TODO(), dummyReq) assert.Empty(t, res) assert.EqualError(t, err, "rpc error: code = Internal desc = some unexpected error occurred") mockedTemplateService.AssertExpectations(t) diff --git a/plugins/providers/cortex/go.mod b/plugins/providers/cortex/go.mod index f5ff7e80..cdc45ef9 100644 --- a/plugins/providers/cortex/go.mod +++ b/plugins/providers/cortex/go.mod @@ -1,6 +1,6 @@ module github.com/goto/siren/plugins/providers/cortex -go 1.18 +go 1.21 require ( github.com/MakeNowJust/heredoc v1.0.0 diff --git a/plugins/receivers/httpreceiver/service_test.go b/plugins/receivers/httpreceiver/service_test.go index 577adeb2..ac65b6ac 100644 --- a/plugins/receivers/httpreceiver/service_test.go +++ b/plugins/receivers/httpreceiver/service_test.go @@ -55,7 +55,7 @@ func TestService_Notify_HTTPCall(t *testing.T) { })) c := httpreceiver.NewPluginService(log.NewNoop(), httpreceiver.AppConfig{}) - err := c.Notify(context.Background(), testServer.URL, nil) + err := c.Notify(context.TODO(), testServer.URL, nil) assert.EqualError(t, err, "Too Many Requests") diff --git a/plugins/receivers/pagerduty/service_test.go b/plugins/receivers/pagerduty/service_test.go index 9aa64572..fccea6d5 100644 --- a/plugins/receivers/pagerduty/service_test.go +++ b/plugins/receivers/pagerduty/service_test.go @@ -41,7 +41,7 @@ func TestService_Send_V1(t *testing.T) { { name: "should return error and not retryable if notify return error", setup: func(pd *mocks.PagerDutyCaller) { - pd.EXPECT().NotifyV1(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("pagerduty.MessageV1")).Return(errors.New("some error")) + pd.EXPECT().NotifyV1(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("pagerduty.MessageV1")).Return(errors.New("some error")) }, notificationMessage: notification.Message{ Configs: map[string]any{ @@ -57,7 +57,7 @@ func TestService_Send_V1(t *testing.T) { { name: "should return error and retryable if notify return retryable error", setup: func(sc *mocks.PagerDutyCaller) { - sc.EXPECT().NotifyV1(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("pagerduty.MessageV1")).Return(retry.RetryableError{Err: errors.New("some error")}) + sc.EXPECT().NotifyV1(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("pagerduty.MessageV1")).Return(retry.RetryableError{Err: errors.New("some error")}) }, notificationMessage: notification.Message{ Configs: map[string]any{ @@ -81,7 +81,7 @@ func TestService_Send_V1(t *testing.T) { pd := pagerduty.NewPluginService(pagerduty.AppConfig{}, pagerduty.WithPagerDutyClient(mockPDClient)) - got, err := pd.Send(context.Background(), tt.notificationMessage) + got, err := pd.Send(context.TODO(), tt.notificationMessage) if (err != nil) != tt.wantErr { t.Errorf("NotificationService.Send() error = %v, wantErr %v", err, tt.wantErr) return diff --git a/plugins/receivers/slack/service_test.go b/plugins/receivers/slack/service_test.go index b6e6f635..dc9aaa0f 100644 --- a/plugins/receivers/slack/service_test.go +++ b/plugins/receivers/slack/service_test.go @@ -33,7 +33,7 @@ func TestService_BuildData(t *testing.T) { { Description: "should return error if failed to get workspace channels with slack client", Setup: func(sc *mocks.SlackCaller, e *mocks.Encryptor) { - sc.EXPECT().GetWorkspaceChannels(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("secret.MaskableString")).Return(nil, errors.New("some error")) + sc.EXPECT().GetWorkspaceChannels(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("secret.MaskableString")).Return(nil, errors.New("some error")) }, Confs: map[string]any{ "token": secret.MaskableString("key"), @@ -44,7 +44,7 @@ func TestService_BuildData(t *testing.T) { { Description: "should return nil error if success populating receiver.Receiver", Setup: func(sc *mocks.SlackCaller, e *mocks.Encryptor) { - sc.EXPECT().GetWorkspaceChannels(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("secret.MaskableString")).Return([]slack.Channel{ + sc.EXPECT().GetWorkspaceChannels(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("secret.MaskableString")).Return([]slack.Channel{ { ID: "id", Name: "name", @@ -112,7 +112,7 @@ func TestService_Send(t *testing.T) { { name: "should return error and not retryable if notify return error", setup: func(sc *mocks.SlackCaller) { - sc.EXPECT().Notify(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("slack.NotificationConfig"), mock.AnythingOfType("slack.Message")).Return(errors.New("some error")) + sc.EXPECT().Notify(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("slack.NotificationConfig"), mock.AnythingOfType("slack.Message")).Return(errors.New("some error")) }, notificationMessage: notification.Message{ Configs: map[string]any{ @@ -128,7 +128,7 @@ func TestService_Send(t *testing.T) { { name: "should return error and retryable if notify return retryable error", setup: func(sc *mocks.SlackCaller) { - sc.EXPECT().Notify(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("slack.NotificationConfig"), mock.AnythingOfType("slack.Message")).Return(retry.RetryableError{Err: errors.New("some error")}) + sc.EXPECT().Notify(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("slack.NotificationConfig"), mock.AnythingOfType("slack.Message")).Return(retry.RetryableError{Err: errors.New("some error")}) }, notificationMessage: notification.Message{ Configs: map[string]any{ @@ -152,7 +152,7 @@ func TestService_Send(t *testing.T) { s := slack.NewPluginService(slack.AppConfig{}, nil, slack.WithSlackClient(mockSlackClient)) - got, err := s.Send(context.Background(), tt.notificationMessage) + got, err := s.Send(context.TODO(), tt.notificationMessage) if (err != nil) != tt.wantErr { t.Errorf("Service.Publish() error = %v, wantErr %v", err, tt.wantErr) return diff --git a/plugins/receivers/slackchannel/service_test.go b/plugins/receivers/slackchannel/service_test.go index 84917076..5fcd6a41 100644 --- a/plugins/receivers/slackchannel/service_test.go +++ b/plugins/receivers/slackchannel/service_test.go @@ -44,7 +44,7 @@ func TestService_Send(t *testing.T) { { name: "should return error and not retryable if notify return error", setup: func(sc *mocks.SlackCaller) { - sc.EXPECT().Notify(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("slack.NotificationConfig"), mock.AnythingOfType("slack.Message")).Return(errors.New("some error")) + sc.EXPECT().Notify(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("slack.NotificationConfig"), mock.AnythingOfType("slack.Message")).Return(errors.New("some error")) }, notificationMessage: notification.Message{ Configs: map[string]any{ @@ -60,7 +60,7 @@ func TestService_Send(t *testing.T) { { name: "should return error and retryable if notify return retryable error", setup: func(sc *mocks.SlackCaller) { - sc.EXPECT().Notify(mock.AnythingOfType("*context.emptyCtx"), mock.AnythingOfType("slack.NotificationConfig"), mock.AnythingOfType("slack.Message")).Return(retry.RetryableError{Err: errors.New("some error")}) + sc.EXPECT().Notify(mock.AnythingOfType("context.todoCtx"), mock.AnythingOfType("slack.NotificationConfig"), mock.AnythingOfType("slack.Message")).Return(retry.RetryableError{Err: errors.New("some error")}) }, notificationMessage: notification.Message{ Configs: map[string]any{ @@ -84,7 +84,7 @@ func TestService_Send(t *testing.T) { s := slackchannel.NewPluginService(slack.AppConfig{}, nil, slack.WithSlackClient(mockSlackClient)) - got, err := s.Send(context.Background(), tt.notificationMessage) + got, err := s.Send(context.TODO(), tt.notificationMessage) if (err != nil) != tt.wantErr { t.Errorf("Service.Publish() error = %v, wantErr %v", err, tt.wantErr) return