mirror of
https://github.com/hexolan/panels.git
synced 2026-03-26 12:40:21 +00:00
style: license headers + gofmt
This commit is contained in:
@@ -1,3 +1,17 @@
|
||||
// Copyright 2023 Declan Teevan
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
syntax = "proto3";
|
||||
|
||||
package panels.comment.v1;
|
||||
@@ -6,59 +20,59 @@ import "google/protobuf/empty.proto";
|
||||
import "google/protobuf/timestamp.proto";
|
||||
|
||||
service CommentService {
|
||||
rpc CreateComment(CreateCommentRequest) returns (Comment) {}
|
||||
rpc UpdateComment(UpdateCommentRequest) returns (Comment) {}
|
||||
rpc DeleteComment(DeleteCommentRequest) returns (google.protobuf.Empty) {}
|
||||
|
||||
rpc GetComment(GetCommentRequest) returns (Comment) {}
|
||||
rpc GetPostComments(GetPostCommentsRequest) returns (PostComments) {}
|
||||
rpc CreateComment(CreateCommentRequest) returns (Comment) {}
|
||||
rpc UpdateComment(UpdateCommentRequest) returns (Comment) {}
|
||||
rpc DeleteComment(DeleteCommentRequest) returns (google.protobuf.Empty) {}
|
||||
|
||||
rpc GetComment(GetCommentRequest) returns (Comment) {}
|
||||
rpc GetPostComments(GetPostCommentsRequest) returns (PostComments) {}
|
||||
}
|
||||
|
||||
message Comment {
|
||||
string id = 1;
|
||||
string id = 1;
|
||||
|
||||
string post_id = 2; // External Ref: Post Id
|
||||
string author_id = 3; // External Ref: User Id
|
||||
string post_id = 2; // External Ref: Post Id
|
||||
string author_id = 3; // External Ref: User Id
|
||||
|
||||
string message = 4;
|
||||
string message = 4;
|
||||
|
||||
google.protobuf.Timestamp created_at = 5;
|
||||
google.protobuf.Timestamp updated_at = 6;
|
||||
google.protobuf.Timestamp created_at = 5;
|
||||
google.protobuf.Timestamp updated_at = 6;
|
||||
}
|
||||
|
||||
message CommentMutable {
|
||||
string message = 1;
|
||||
string message = 1;
|
||||
}
|
||||
|
||||
message CreateCommentRequest {
|
||||
string post_id = 1; // External Ref: Post Id
|
||||
string author_id = 2; // External Ref: User Id
|
||||
CommentMutable data = 3;
|
||||
string post_id = 1; // External Ref: Post Id
|
||||
string author_id = 2; // External Ref: User Id
|
||||
CommentMutable data = 3;
|
||||
}
|
||||
|
||||
message UpdateCommentRequest {
|
||||
string id = 1;
|
||||
CommentMutable data = 2;
|
||||
string id = 1;
|
||||
CommentMutable data = 2;
|
||||
}
|
||||
|
||||
message DeleteCommentRequest {
|
||||
string id = 1;
|
||||
string id = 1;
|
||||
}
|
||||
|
||||
message GetCommentRequest {
|
||||
string id = 1;
|
||||
string id = 1;
|
||||
}
|
||||
|
||||
message GetPostCommentsRequest {
|
||||
string post_id = 1;
|
||||
string post_id = 1;
|
||||
}
|
||||
|
||||
message PostComments {
|
||||
repeated Comment comments = 1;
|
||||
repeated Comment comments = 1;
|
||||
}
|
||||
|
||||
// Kafka Event Schema
|
||||
message CommentEvent {
|
||||
string type = 1;
|
||||
Comment data = 2;
|
||||
}
|
||||
string type = 1;
|
||||
Comment data = 2;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user