Skip to content

feat: Implement GetSpecSchema plugin gRPC call #130

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions cloudquery/sdk/internal/servers/plugin_v3/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ def GetName(self, request, context):
def GetVersion(self, request, context):
return plugin_pb2.GetVersion.Response(version=self._plugin.version())

def GetSpecSchema(self, request, context):
return plugin_pb2.GetSpecSchema.Response(json_schema=self._plugin.json_schema())

def Init(self, request: plugin_pb2.Init.Request, context):
self._plugin.init(request.spec, no_connection=request.no_connection)
return plugin_pb2.Init.Response()
Expand Down
4 changes: 4 additions & 0 deletions cloudquery/sdk/plugin/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ class Options:
build_targets: List[BuildTarget] = None
team: str = None
kind: str = None
json_schema: str = None


class Plugin:
Expand Down Expand Up @@ -74,6 +75,9 @@ def team(self) -> str:
def kind(self) -> str:
return self._opts.kind

def json_schema(self) -> str:
return self._opts.json_schema

def dockerfile(self) -> str:
return self._opts.dockerfile

Expand Down