Skip to content

Commit b7829d5

Browse files
committed
feat: aws secret manager
1 parent fb35d46 commit b7829d5

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

internal/store/awssecretmanager/aws_secret_manager.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ var _ store.Store = (*Keystore)(nil)
2222
const storagePrefix = "cerberus/"
2323

2424
type Keystore struct {
25-
Region string
25+
region string
2626

2727
logger *slog.Logger
2828
}
2929

3030
func NewStore(region string, logger *slog.Logger) *Keystore {
3131
return &Keystore{
32-
Region: region,
32+
region: region,
3333
logger: logger.With("component", "aws-secret-manager-store"),
3434
}
3535
}
@@ -39,7 +39,7 @@ func (k *Keystore) RetrieveKey(
3939
pubKey string,
4040
password string,
4141
) (*crypto.KeyPair, error) {
42-
cfg, err := config.LoadDefaultConfig(ctx, config.WithRegion(k.Region))
42+
cfg, err := config.LoadDefaultConfig(ctx, config.WithRegion(k.region))
4343
if err != nil {
4444
return nil, err
4545
}
@@ -69,7 +69,7 @@ func (k *Keystore) RetrieveKey(
6969
}
7070

7171
func (k *Keystore) StoreKey(ctx context.Context, keyPair *keystore.KeyPair) (string, error) {
72-
cfg, err := config.LoadDefaultConfig(ctx, config.WithRegion(k.Region))
72+
cfg, err := config.LoadDefaultConfig(ctx, config.WithRegion(k.region))
7373
if err != nil {
7474
return "", err
7575
}
@@ -98,7 +98,7 @@ func (k *Keystore) StoreKey(ctx context.Context, keyPair *keystore.KeyPair) (str
9898
}
9999

100100
func (k *Keystore) ListKeys(ctx context.Context) ([]string, error) {
101-
cfg, err := config.LoadDefaultConfig(ctx, config.WithRegion(k.Region))
101+
cfg, err := config.LoadDefaultConfig(ctx, config.WithRegion(k.region))
102102
if err != nil {
103103
return nil, err
104104
}

0 commit comments

Comments
 (0)