This repository has been archived by the owner on Feb 1, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
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 #65 from HPI-de/issue/64-create-club-service
feat(club): add service
- Loading branch information
Showing
2 changed files
with
70 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
syntax = "proto3"; | ||
|
||
package hpi.cloud.club.v1test; | ||
|
||
option java_multiple_files = true; | ||
option java_outer_classname = "ClubProto"; | ||
option java_package = "de.hpi.cloud.club.v1test"; | ||
|
||
|
||
// An HPI's student club, e.g. MobileDev. | ||
message Club { | ||
// Required, output only. The unique ID of this club. | ||
string id = 1; | ||
|
||
// Required. The title of this club (e.g. "MobileDev"). | ||
string title = 2; | ||
|
||
// Required. An abbreviation of the title (e.g. "MD"). | ||
string abbreviation = 3; | ||
|
||
// Required. ID of the group of people representing this club's head/speakers. | ||
string head_group_id = 4; | ||
|
||
// Required. ID of the group of people representing this club's members. | ||
string member_group_id = 5; | ||
} |
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,44 @@ | ||
syntax = "proto3"; | ||
|
||
package hpi.cloud.club.v1test; | ||
|
||
import "hpi/cloud/club/v1test/club.proto"; | ||
|
||
option java_multiple_files = true; | ||
option java_outer_classname = "ClubServiceProto"; | ||
option java_package = "de.hpi.cloud.club.v1test"; | ||
|
||
// Provides access to all HPI student clubs. | ||
service ClubService { | ||
// Lists all clubs. | ||
rpc ListClubs (ListClubsRequest) returns (ListClubsResponse); | ||
|
||
// Gets a club. | ||
rpc GetClub (GetClubRequest) returns (Club); | ||
} | ||
|
||
// Request message for listing clubs using [ListClubs][hpi.cloud.club.v1test.ClubService.ListClubs]. | ||
message ListClubsRequest { | ||
// The maximum number of clubs to return in the response. | ||
int32 page_size = 1; | ||
|
||
// A pagination token returned from a previous call to `ListClubs` | ||
// that indicates where this listing should continue from. | ||
string page_token = 2; | ||
} | ||
|
||
// Response message for listing clubs using [ListClubs][hpi.cloud.club.v1test.ClubService.ListClubs]. | ||
message ListClubsResponse { | ||
// A possibly paginated list of clubs. | ||
repeated Club clubs = 1; | ||
|
||
// Token to retrieve the next page of results, or empty if there are no | ||
// more results. | ||
string next_page_token = 2; | ||
} | ||
|
||
// Request message for [GetClub][hpi.cloud.club.v1test.ClubService.GetClub]. | ||
message GetClubRequest { | ||
// Required. The club ID. | ||
string id = 1; | ||
} |