mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-21 15:05:01 +00:00
Invites Service (#44)
This commit is contained in:
56
invites/proto/invites.proto
Normal file
56
invites/proto/invites.proto
Normal file
@@ -0,0 +1,56 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package invites;
|
||||
option go_package = "proto;invites";
|
||||
import "google/protobuf/wrappers.proto";
|
||||
|
||||
service Invites {
|
||||
// Create an invite
|
||||
rpc Create(CreateRequest) returns (CreateResponse);
|
||||
// Read an invite using ID or code
|
||||
rpc Read(ReadRequest) returns (ReadResponse);
|
||||
// List invited for a group or specific email
|
||||
rpc List(ListRequest) returns (ListResponse);
|
||||
// Delete an invite
|
||||
rpc Delete(DeleteRequest) returns (DeleteResponse);
|
||||
}
|
||||
|
||||
message Invite {
|
||||
string id = 1;
|
||||
string group_id = 2;
|
||||
string email = 3;
|
||||
string code = 4;
|
||||
}
|
||||
|
||||
message CreateRequest {
|
||||
string group_id = 1;
|
||||
string email = 2;
|
||||
}
|
||||
|
||||
message CreateResponse {
|
||||
Invite invite = 1;
|
||||
}
|
||||
|
||||
message ReadRequest {
|
||||
google.protobuf.StringValue id = 1;
|
||||
google.protobuf.StringValue code = 2;
|
||||
}
|
||||
|
||||
message ReadResponse {
|
||||
Invite invite = 1;
|
||||
}
|
||||
|
||||
message ListRequest {
|
||||
google.protobuf.StringValue group_id = 1;
|
||||
google.protobuf.StringValue email = 2;
|
||||
}
|
||||
|
||||
message ListResponse {
|
||||
repeated Invite invites = 1;
|
||||
}
|
||||
|
||||
message DeleteRequest {
|
||||
string id = 1;
|
||||
}
|
||||
|
||||
message DeleteResponse {}
|
||||
Reference in New Issue
Block a user