diff options
| author | garder500 <jeremy27.clara22@gmail.com> | 2025-10-26 15:29:23 +0100 |
|---|---|---|
| committer | garder500 <jeremy27.clara22@gmail.com> | 2025-10-26 15:29:23 +0100 |
| commit | fc485c8de10e6dea63054278c8d30d24d87fd621 (patch) | |
| tree | c314a952e53a819dc62a796b63e8b76cc5ee8ba4 /proto/sovrabase.proto | |
| parent | 2f3ab35c11a82a77aee77f91a83ddf9a5b6aea12 (diff) | |
feat: add gRPC services for User, Project, and Organization management
- Implemented UserService with methods for GetUser, CreateUser, UpdateUser, and DeleteUser.
- Implemented ProjectService with methods for GetProject, CreateProject, UpdateProject, and DeleteProject.
- Implemented OrganizationService with methods for GetOrganization, CreateOrganization, UpdateOrganization, and DeleteOrganization.
- Defined corresponding request and response message types for each service.
- Generated gRPC code from proto definitions for seamless integration.
Diffstat (limited to 'proto/sovrabase.proto')
| -rw-r--r-- | proto/sovrabase.proto | 146 |
1 files changed, 146 insertions, 0 deletions
diff --git a/proto/sovrabase.proto b/proto/sovrabase.proto new file mode 100644 index 0000000..14ce3fc --- /dev/null +++ b/proto/sovrabase.proto @@ -0,0 +1,146 @@ +syntax = "proto3"; + +package sovrabase; + +option go_package = "github.com/ketsuna-org/sovrabase"; + +/** + +Example Proto file defining gRPC services for User, Project, and Organization management. Not intended for production use. +*/ + + +// User service +service UserService { + rpc GetUser(GetUserRequest) returns (GetUserResponse); + rpc CreateUser(CreateUserRequest) returns (CreateUserResponse); + rpc UpdateUser(UpdateUserRequest) returns (UpdateUserResponse); + rpc DeleteUser(DeleteUserRequest) returns (DeleteUserResponse); +} + +message GetUserRequest { + string id = 1; +} + +message GetUserResponse { + string id = 1; + string name = 2; + string email = 3; +} + +message CreateUserRequest { + string name = 1; + string email = 2; +} + +message CreateUserResponse { + string id = 1; +} + +message UpdateUserRequest { + string id = 1; + string name = 2; + string email = 3; +} + +message UpdateUserResponse { + bool success = 1; +} + +message DeleteUserRequest { + string id = 1; +} + +message DeleteUserResponse { + bool success = 1; +} + +// Project service +service ProjectService { + rpc GetProject(GetProjectRequest) returns (GetProjectResponse); + rpc CreateProject(CreateProjectRequest) returns (CreateProjectResponse); + rpc UpdateProject(UpdateProjectRequest) returns (UpdateProjectResponse); + rpc DeleteProject(DeleteProjectRequest) returns (DeleteProjectResponse); +} + +message GetProjectRequest { + string id = 1; +} + +message GetProjectResponse { + string id = 1; + string name = 2; + string description = 3; +} + +message CreateProjectRequest { + string name = 1; + string description = 2; +} + +message CreateProjectResponse { + string id = 1; +} + +message UpdateProjectRequest { + string id = 1; + string name = 2; + string description = 3; +} + +message UpdateProjectResponse { + bool success = 1; +} + +message DeleteProjectRequest { + string id = 1; +} + +message DeleteProjectResponse { + bool success = 1; +} + +// Organization service +service OrganizationService { + rpc GetOrganization(GetOrganizationRequest) returns (GetOrganizationResponse); + rpc CreateOrganization(CreateOrganizationRequest) returns (CreateOrganizationResponse); + rpc UpdateOrganization(UpdateOrganizationRequest) returns (UpdateOrganizationResponse); + rpc DeleteOrganization(DeleteOrganizationRequest) returns (DeleteOrganizationResponse); +} + +message GetOrganizationRequest { + string id = 1; +} + +message GetOrganizationResponse { + string id = 1; + string name = 2; + string description = 3; +} + +message CreateOrganizationRequest { + string name = 1; + string description = 2; +} + +message CreateOrganizationResponse { + string id = 1; +} + +message UpdateOrganizationRequest { + string id = 1; + string name = 2; + string description = 3; +} + +message UpdateOrganizationResponse { + bool success = 1; +} + +message DeleteOrganizationRequest { + string id = 1; +} + +message DeleteOrganizationResponse { + bool success = 1; +} |
