* feat: Implement encryption plugin. * fix: Removed interface test file * fix: Test case changes * fix: Test case for encryption * fix: formatting changes * fix: lint change * fix: shared renamed to pkg * fix: shared rename to pkg * fix: resolved pr comments * fix: indentation, formatting * fix: removed config, ctx check, test enhancements * fix: removed close function * fix: remove config and enhance test cases * fix: formatting changes, test case enhancement
19 lines
560 B
Go
19 lines
560 B
Go
package main
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/beckn/beckn-onix/pkg/plugin/definition"
|
|
"github.com/beckn/beckn-onix/pkg/plugin/implementation/encrypter"
|
|
)
|
|
|
|
// EncrypterProvider implements the definition.EncrypterProvider interface.
|
|
type EncrypterProvider struct{}
|
|
|
|
func (ep EncrypterProvider) New(ctx context.Context, config map[string]string) (definition.Encrypter, func() error, error) {
|
|
return encrypter.New(ctx)
|
|
}
|
|
|
|
// Provider is the exported symbol that the plugin manager will look for.
|
|
var Provider definition.EncrypterProvider = EncrypterProvider{}
|