-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #31 from Ilhasoft/feature/integrations-user-permis…
…sion Add weni-integrations user permission protobuffer
- Loading branch information
Showing
4 changed files
with
249 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! | ||
"""Client and server classes corresponding to protobuf-defined services.""" | ||
import grpc | ||
|
||
from weni.protobuf.integrations import user_pb2 as weni_dot_protobuf_dot_integrations_dot_user__pb2 | ||
|
||
|
||
class UserPermissionControllerStub(object): | ||
"""Missing associated documentation comment in .proto file.""" | ||
|
||
def __init__(self, channel): | ||
"""Constructor. | ||
Args: | ||
channel: A grpc.Channel. | ||
""" | ||
self.Update = channel.unary_unary( | ||
'/weni.integrations.user.UserPermissionController/Update', | ||
request_serializer=weni_dot_protobuf_dot_integrations_dot_user__pb2.UserPermissionUpdateRequest.SerializeToString, | ||
response_deserializer=weni_dot_protobuf_dot_integrations_dot_user__pb2.Permission.FromString, | ||
) | ||
|
||
|
||
class UserPermissionControllerServicer(object): | ||
"""Missing associated documentation comment in .proto file.""" | ||
|
||
def Update(self, request, context): | ||
"""Missing associated documentation comment in .proto file.""" | ||
context.set_code(grpc.StatusCode.UNIMPLEMENTED) | ||
context.set_details('Method not implemented!') | ||
raise NotImplementedError('Method not implemented!') | ||
|
||
|
||
def add_UserPermissionControllerServicer_to_server(servicer, server): | ||
rpc_method_handlers = { | ||
'Update': grpc.unary_unary_rpc_method_handler( | ||
servicer.Update, | ||
request_deserializer=weni_dot_protobuf_dot_integrations_dot_user__pb2.UserPermissionUpdateRequest.FromString, | ||
response_serializer=weni_dot_protobuf_dot_integrations_dot_user__pb2.Permission.SerializeToString, | ||
), | ||
} | ||
generic_handler = grpc.method_handlers_generic_handler( | ||
'weni.integrations.user.UserPermissionController', rpc_method_handlers) | ||
server.add_generic_rpc_handlers((generic_handler,)) | ||
|
||
|
||
# This class is part of an EXPERIMENTAL API. | ||
class UserPermissionController(object): | ||
"""Missing associated documentation comment in .proto file.""" | ||
|
||
@staticmethod | ||
def Update(request, | ||
target, | ||
options=(), | ||
channel_credentials=None, | ||
call_credentials=None, | ||
insecure=False, | ||
compression=None, | ||
wait_for_ready=None, | ||
timeout=None, | ||
metadata=None): | ||
return grpc.experimental.unary_unary(request, target, '/weni.integrations.user.UserPermissionController/Update', | ||
weni_dot_protobuf_dot_integrations_dot_user__pb2.UserPermissionUpdateRequest.SerializeToString, | ||
weni_dot_protobuf_dot_integrations_dot_user__pb2.Permission.FromString, | ||
options, channel_credentials, | ||
insecure, call_credentials, compression, wait_for_ready, timeout, metadata) |
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,19 @@ | ||
syntax = "proto3"; | ||
|
||
package weni.integrations.user; | ||
|
||
service UserPermissionController { | ||
rpc Update(UserPermissionUpdateRequest) returns (Permission) {} | ||
} | ||
|
||
message UserPermissionUpdateRequest { | ||
string project_uuid = 1; | ||
string user = 2; | ||
int32 role = 3; | ||
} | ||
|
||
message Permission { | ||
string project_uuid = 1; | ||
string user = 2; | ||
int32 role = 3; | ||
} |