updated as per the review comments
This commit is contained in:
@@ -6,18 +6,10 @@ import (
|
||||
"github.com/beckn/beckn-onix/pkg/model"
|
||||
)
|
||||
|
||||
type Keyset struct {
|
||||
UniqueKeyID string
|
||||
SigningPrivate string
|
||||
SigningPublic string
|
||||
EncrPrivate string
|
||||
EncrPublic string
|
||||
}
|
||||
|
||||
// KeyManager defines the interface for key management operations/methods.
|
||||
type KeyManager interface {
|
||||
GenerateKeyPairs() (*Keyset, error)
|
||||
StorePrivateKeys(ctx context.Context, keyID string, keys *Keyset) error
|
||||
GenerateKeyPairs() (*model.Keyset, error)
|
||||
StorePrivateKeys(ctx context.Context, keyID string, keys *model.Keyset) error
|
||||
SigningPrivateKey(ctx context.Context, keyID string) (string, string, error)
|
||||
EncrPrivateKey(ctx context.Context, keyID string) (string, string, error)
|
||||
SigningPublicKey(ctx context.Context, subscriberID, uniqueKeyID string) (string, error)
|
||||
@@ -29,7 +21,3 @@ type KeyManager interface {
|
||||
type KeyManagerProvider interface {
|
||||
New(context.Context, Cache, RegistryLookup, map[string]string) (KeyManager, func() error, error)
|
||||
}
|
||||
|
||||
type RegistryLookup interface {
|
||||
Lookup(ctx context.Context, req *model.Subscription) ([]model.Subscription, error)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user