-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moved KVS functionality behind interfaces and grouped them based on d…
…omains for decoupling Signed-off-by: Alexandros Filios <[email protected]>
- Loading branch information
1 parent
b4b0e2a
commit b7e8914
Showing
26 changed files
with
571 additions
and
372 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/* | ||
Copyright IBM Corp. All Rights Reserved. | ||
SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package driver | ||
|
||
import ( | ||
"github.com/hyperledger-labs/fabric-smart-client/platform/view/view" | ||
) | ||
|
||
type SignerEntry struct { | ||
Signer Signer | ||
DebugStack []byte | ||
} | ||
|
||
type SignerKVS interface { | ||
GetSigner(id view.Identity) (*SignerEntry, error) | ||
FilterExistingSigners(ids ...view.Identity) ([]view.Identity, error) | ||
PutSigner(id view.Identity, entry *SignerEntry) error | ||
} | ||
|
||
type AuditInfoKVS interface { | ||
GetAuditInfo(id view.Identity) ([]byte, error) | ||
PutAuditInfo(id view.Identity, info []byte) error | ||
} | ||
|
||
type BindingKVS interface { | ||
GetBinding(ephemeral view.Identity) (view.Identity, error) | ||
PutBinding(ephemeral, longTerm view.Identity) error | ||
} | ||
|
||
type MetadataKVS[K any, M any] interface { | ||
GetMetadata(key K) (M, error) | ||
ExistMetadata(key K) (bool, error) | ||
PutMetadata(key K, transientMap M) error | ||
} | ||
|
||
type EnvelopeKVS[K any] interface { | ||
GetEnvelope(key K) ([]byte, error) | ||
ExistsEnvelope(key K) (bool, error) | ||
PutEnvelope(key K, env []byte) error | ||
} | ||
|
||
type EndorseTxKVS[K any] interface { | ||
GetEndorseTx(key K) ([]byte, error) | ||
ExistsEndorseTx(key K) (bool, error) | ||
PutEndorseTx(key K, etx []byte) error | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.