Skip to content

Commit dfa57df

Browse files
committed
Updates based on PR feedback
1 parent 78e0eda commit dfa57df

File tree

8 files changed

+15
-15
lines changed

8 files changed

+15
-15
lines changed

cmd/webhook/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ func main() {
6161

6262
// Fetch webhook secrets from secret manager
6363
// or allow webhook secret to be defined by env var.
64-
// Not everyone is using Google kmsProvider, so we need to support other methods
64+
// Not everyone is using Google KMS, so we need to support other methods
6565
webhookSecrets := [][]byte{}
6666
if baseCfg.KMSKey != "" {
6767
secretmanager, err := secretmanager.NewClient(ctx)

pkg/ghtransport/ghtransport_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import (
1919
gcpKMS "cloud.google.com/go/kms/apiv1"
2020
"github.com/bradleyfalzon/ghinstallation/v2"
2121
"github.com/octo-sts/app/pkg/envconfig"
22-
kmsGCP "github.com/octo-sts/app/pkg/gcpkms"
22+
"github.com/octo-sts/app/pkg/kms/gcp"
2323
"github.com/stretchr/testify/assert"
2424
"google.golang.org/api/option"
2525
"google.golang.org/grpc"
@@ -181,5 +181,5 @@ type testKMSSigner struct {
181181

182182
func (k *testKMSSigner) NewSigner() (ghinstallation.Signer, error) {
183183
client := generateKMSClient(k.ctx, k.t)
184-
return kmsGCP.New(k.ctx, client, k.key)
184+
return gcp.New(k.ctx, client, k.key)
185185
}

pkg/awskms/awskms.go renamed to pkg/kms/aws/aws.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
// Copyright 2024 Chainguard, Inc.
1+
// Copyright 2025 Chainguard, Inc.
22
// SPDX-License-Identifier: Apache-2.0
33

4-
package awskms
4+
package aws
55

66
import (
77
"context"

pkg/awskms/awskms_test.go renamed to pkg/kms/aws/aws_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
// Copyright 2024 Chainguard, Inc.
1+
// Copyright 2025 Chainguard, Inc.
22
// SPDX-License-Identifier: Apache-2.0
33

4-
package awskms
4+
package aws
55

66
import (
77
"context"

pkg/gcpkms/gcpkms.go renamed to pkg/kms/gcp/gcp.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright 2024 Chainguard, Inc.
22
// SPDX-License-Identifier: Apache-2.0
33

4-
package gcpkms
4+
package gcp
55

66
import (
77
"context"

pkg/gcpkms/gcpkms_test.go renamed to pkg/kms/gcp/gcp_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright 2024 Chainguard, Inc.
22
// SPDX-License-Identifier: Apache-2.0
33

4-
package gcpkms
4+
package gcp
55

66
import (
77
"context"

pkg/kms/kms.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2024 Chainguard, Inc.
1+
// Copyright 2025 Chainguard, Inc.
22
// SPDX-License-Identifier: Apache-2.0
33

44
package kms
@@ -12,8 +12,8 @@ import (
1212
"github.com/aws/aws-sdk-go-v2/config"
1313
kmsAWS "github.com/aws/aws-sdk-go-v2/service/kms"
1414
"github.com/bradleyfalzon/ghinstallation/v2"
15-
"github.com/octo-sts/app/pkg/awskms"
16-
"github.com/octo-sts/app/pkg/gcpkms"
15+
"github.com/octo-sts/app/pkg/kms/aws"
16+
"github.com/octo-sts/app/pkg/kms/gcp"
1717
)
1818

1919
const (
@@ -64,9 +64,9 @@ func NewKMS(ctx context.Context, provider, kmsKey string) (KMS, error) {
6464
func (k *kmsProvider) NewSigner() (ghinstallation.Signer, error) {
6565
switch k.provider {
6666
case GCP:
67-
return gcpkms.New(k.ctx, k.gcpClient, k.kmsKey)
67+
return gcp.New(k.ctx, k.gcpClient, k.kmsKey)
6868
case AWS:
69-
return awskms.New(k.ctx, k.awsClient, k.kmsKey)
69+
return aws.New(k.ctx, k.awsClient, k.kmsKey)
7070
default:
7171
return nil, errors.New("unsupported kms provider")
7272
}

pkg/kms/kms_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2024 Chainguard, Inc.
1+
// Copyright 2025 Chainguard, Inc.
22
// SPDX-License-Identifier: Apache-2.0
33

44
package kms

0 commit comments

Comments
 (0)