updated as per the review comments

This commit is contained in:
MohitKatare-protean
2025-03-30 19:13:02 +05:30
parent 244a7be7c1
commit f0e39e34e7
35 changed files with 1605 additions and 124 deletions

View File

@@ -7,13 +7,13 @@ import (
decrypter "github.com/beckn/beckn-onix/pkg/plugin/implementation/decrypter"
)
// DecrypterProvider implements the definition.DecrypterProvider interface.
type DecrypterProvider struct{}
// decrypterProvider implements the definition.decrypterProvider interface.
type decrypterProvider struct{}
// New creates a new Decrypter instance using the provided configuration.
func (dp DecrypterProvider) New(ctx context.Context, config map[string]string) (definition.Decrypter, func() error, error) {
func (dp decrypterProvider) New(ctx context.Context, config map[string]string) (definition.Decrypter, func() error, error) {
return decrypter.New(ctx)
}
// Provider is the exported symbol that the plugin manager will look for.
var Provider definition.DecrypterProvider = DecrypterProvider{}
var Provider = decrypterProvider{}

View File

@@ -25,7 +25,7 @@ func TestDecrypterProviderSuccess(t *testing.T) {
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
provider := DecrypterProvider{}
provider := decrypterProvider{}
decrypter, cleanup, err := provider.New(tt.ctx, tt.config)
// Check error.