-
Notifications
You must be signed in to change notification settings - Fork 289
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(core-api): add plugin object store interface definition
This will be implemented by object store plugins so as to have guarantee that at runtime the plugins can be used the way the caller expects them to. Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
- weaver/sdks/fabric/go-sdk/v2.1.0
- weaver/sdks/fabric/go-sdk/v2.0.0-rc.7
- weaver/sdks/fabric/go-sdk/v2.0.0-rc.6
- weaver/sdks/fabric/go-sdk/v2.0.0-rc.5
- weaver/sdks/fabric/go-sdk/v2.0.0-rc.4
- weaver/sdks/fabric/go-sdk/v2.0.0-rc.3
- weaver/sdks/fabric/go-sdk/v2.0.0-rc.2
- weaver/sdks/fabric/go-sdk/v2.0.0-alpha.2
- weaver/sdks/fabric/go-sdk/v2.0.0-alpha.1
- weaver/core/network/fabric-interop-cc/libs/utils/v2.1.0
- weaver/core/network/fabric-interop-cc/libs/utils/v2.0.0-rc.7
- weaver/core/network/fabric-interop-cc/libs/utils/v2.0.0-rc.6
- weaver/core/network/fabric-interop-cc/libs/utils/v2.0.0-rc.5
- weaver/core/network/fabric-interop-cc/libs/utils/v2.0.0-rc.4
- weaver/core/network/fabric-interop-cc/libs/utils/v2.0.0-rc.3
- weaver/core/network/fabric-interop-cc/libs/utils/v2.0.0-rc.2
- weaver/core/network/fabric-interop-cc/libs/utils/v2.0.0-rc.1
- weaver/core/network/fabric-interop-cc/libs/utils/v2.0.0-alpha.2
- weaver/core/network/fabric-interop-cc/libs/utils/v2.0.0-alpha.1
- weaver/core/network/fabric-interop-cc/libs/assetexchange/v2.1.0
- weaver/core/network/fabric-interop-cc/libs/assetexchange/v2.0.0-rc.7
- weaver/core/network/fabric-interop-cc/libs/assetexchange/v2.0.0-rc.6
- weaver/core/network/fabric-interop-cc/libs/assetexchange/v2.0.0-rc.5
- weaver/core/network/fabric-interop-cc/libs/assetexchange/v2.0.0-rc.4
- weaver/core/network/fabric-interop-cc/libs/assetexchange/v2.0.0-rc.3
- weaver/core/network/fabric-interop-cc/libs/assetexchange/v2.0.0-rc.2
- weaver/core/network/fabric-interop-cc/libs/assetexchange/v2.0.0-rc.1
- weaver/core/network/fabric-interop-cc/libs/assetexchange/v2.0.0-alpha.2
- weaver/core/network/fabric-interop-cc/libs/assetexchange/v2.0.0-alpha.1
- weaver/core/network/fabric-interop-cc/interfaces/asset-mgmt/v2.1.0
- weaver/core/network/fabric-interop-cc/interfaces/asset-mgmt/v2.0.0-rc.7
- weaver/core/network/fabric-interop-cc/interfaces/asset-mgmt/v2.0.0-rc.6
- weaver/core/network/fabric-interop-cc/interfaces/asset-mgmt/v2.0.0-rc.5
- weaver/core/network/fabric-interop-cc/interfaces/asset-mgmt/v2.0.0-rc.4
- weaver/core/network/fabric-interop-cc/interfaces/asset-mgmt/v2.0.0-rc.3
- weaver/core/network/fabric-interop-cc/interfaces/asset-mgmt/v2.0.0-rc.2
- weaver/core/network/fabric-interop-cc/interfaces/asset-mgmt/v2.0.0-rc.1
- weaver/core/network/fabric-interop-cc/interfaces/asset-mgmt/v2.0.0-alpha.2
- weaver/core/network/fabric-interop-cc/interfaces/asset-mgmt/v2.0.0-alpha.1
- weaver/core/network/fabric-interop-cc/contracts/interop/v2.1.0
- weaver/core/network/fabric-interop-cc/contracts/interop/v2.0.0-rc.7
- weaver/core/network/fabric-interop-cc/contracts/interop/v2.0.0-rc.6
- weaver/core/network/fabric-interop-cc/contracts/interop/v2.0.0-rc.5
- weaver/core/network/fabric-interop-cc/contracts/interop/v2.0.0-rc.4
- weaver/core/network/fabric-interop-cc/contracts/interop/v2.0.0-rc.3
- weaver/core/network/fabric-interop-cc/contracts/interop/v2.0.0-rc.2
- weaver/core/network/fabric-interop-cc/contracts/interop/v2.0.0-rc.1
- weaver/core/network/fabric-interop-cc/contracts/interop/v2.0.0-alpha.2
- weaver/core/network/fabric-interop-cc/contracts/interop/v2.0.0-alpha.1
- weaver/common/protos-go/v2.1.0
- weaver/common/protos-go/v2.0.0-rc.7
- weaver/common/protos-go/v2.0.0-rc.6
- weaver/common/protos-go/v2.0.0-rc.5
- weaver/common/protos-go/v2.0.0-rc.4
- weaver/common/protos-go/v2.0.0-rc.3
- weaver/common/protos-go/v2.0.0-rc.2
- weaver/common/protos-go/v2.0.0-rc.1
- weaver/common/protos-go/v2.0.0-alpha.2
- weaver/common/protos-go/v2.0.0-alpha.1
- v2.1.0
- v2.0.0
- v2.0.0-rc.7
- v2.0.0-rc.6
- v2.0.0-rc.5
- v2.0.0-rc.4
- v2.0.0-rc.3
- v2.0.0-rc.2
- v2.0.0-rc.1
- v2.0.0-alpha-prerelease
- v2.0.0-alpha.2
- v2.0.0-alpha.1
- v1.2.0
- v1.1.3
- v1.1.2
- v1.1.1
- v1.1.0
- v1.0.0
- v1.0.0-rc.3
- v1.0.0-rc.2
- v1.0.0-rc.1
- v0.10.0
- v0.9.0
- v0.8.0
- v0.7.0
- v0.6.0
- fix-847--2021-07-14
- 2021-07-12-hotfix-847
Showing
6 changed files
with
318 additions
and
30 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
18 changes: 18 additions & 0 deletions
18
packages/cactus-core-api/src/main/typescript/plugin/object-store/i-plugin-object-store.ts
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,18 @@ | ||
import type { GetObjectRequestV1 } from "../../generated/openapi/typescript-axios"; | ||
import type { GetObjectResponseV1 } from "../../generated/openapi/typescript-axios"; | ||
import type { HasObjectRequestV1 } from "../../generated/openapi/typescript-axios"; | ||
import type { SetObjectRequestV1 } from "../../generated/openapi/typescript-axios"; | ||
import type { SetObjectResponseV1 } from "../../generated/openapi/typescript-axios"; | ||
import type { HasObjectResponseV1 } from "../../generated/openapi/typescript-axios"; | ||
import type { ICactusPlugin } from "../i-cactus-plugin"; | ||
import type { IPluginWebService } from "../web-service/i-plugin-web-service"; | ||
|
||
/** | ||
* Common interface to be implemented by classes that act as plugins behind | ||
* object stores. | ||
*/ | ||
export interface IPluginObjectStore extends ICactusPlugin, IPluginWebService { | ||
has(req: HasObjectRequestV1): Promise<HasObjectResponseV1>; | ||
get(req: GetObjectRequestV1): Promise<GetObjectResponseV1>; | ||
set(req: SetObjectRequestV1): Promise<SetObjectResponseV1>; | ||
} |
12 changes: 12 additions & 0 deletions
12
packages/cactus-core-api/src/main/typescript/plugin/object-store/is-i-plugin-object-store.ts
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,12 @@ | ||
import { IPluginObjectStore } from "./i-plugin-object-store"; | ||
|
||
export function isIPluginObjectStore(x: unknown): x is IPluginObjectStore { | ||
return ( | ||
!!x && | ||
typeof (x as IPluginObjectStore).get === "function" && | ||
typeof (x as IPluginObjectStore).getInstanceId === "function" && | ||
typeof (x as IPluginObjectStore).getPackageName === "function" && | ||
typeof (x as IPluginObjectStore).has === "function" && | ||
typeof (x as IPluginObjectStore).set === "function" | ||
); | ||
} |
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