Skip to content
This repository has been archived by the owner on Feb 1, 2022. It is now read-only.

Commit

Permalink
Merge pull request #65 from HPI-de/issue/64-create-club-service
Browse files Browse the repository at this point in the history
feat(club): add service
  • Loading branch information
JonasWanke authored Dec 20, 2019
2 parents d69cc47 + 00101e5 commit 4f8f21e
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 0 deletions.
26 changes: 26 additions & 0 deletions hpi/cloud/club/v1test/club.proto
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;
}
44 changes: 44 additions & 0 deletions hpi/cloud/club/v1test/club_service.proto
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;
}

0 comments on commit 4f8f21e

Please sign in to comment.