Skip to content
This repository has been archived by the owner on Aug 25, 2023. It is now read-only.

Commit

Permalink
refactor: use gomock
Browse files Browse the repository at this point in the history
Signed-off-by: Stas D <[email protected]>
  • Loading branch information
skynet2 committed Mar 22, 2023
1 parent f649946 commit cbcc576
Show file tree
Hide file tree
Showing 4 changed files with 480 additions and 176 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ go 1.18

require (
github.com/aws/aws-sdk-go v1.43.9
github.com/aws/aws-sdk-go-v2 v1.17.3
github.com/aws/aws-sdk-go-v2/service/kms v1.20.0
github.com/btcsuite/btcd v0.22.1
github.com/golang/mock v1.6.0
Expand All @@ -29,7 +30,6 @@ require (

require (
github.com/VictoriaMetrics/fastcache v1.5.7 // indirect
github.com/aws/aws-sdk-go-v2 v1.17.3 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.27 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.21 // indirect
github.com/aws/smithy-go v1.13.5 // indirect
Expand Down
6 changes: 6 additions & 0 deletions pkg/aws/opts.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (

type opts struct {
keyAliasPrefix string
awsClient awsClient
}

// NewOpts create new opts populated with environment variable.
Expand All @@ -34,3 +35,8 @@ type Opts func(opts *opts)
func WithKeyAliasPrefix(prefix string) Opts {
return func(opts *opts) { opts.keyAliasPrefix = prefix }
}

// WithAWSClient sets custom aws client
func WithAWSClient(client awsClient) Opts {
return func(opts *opts) { opts.awsClient = client }
}
340 changes: 340 additions & 0 deletions pkg/aws/service_mocks.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit cbcc576

Please sign in to comment.