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.auth.v1;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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.panel.v1;
|
||||
@@ -6,64 +20,64 @@ import "google/protobuf/empty.proto";
|
||||
import "google/protobuf/timestamp.proto";
|
||||
|
||||
service PanelService {
|
||||
rpc CreatePanel(CreatePanelRequest) returns (Panel) {}
|
||||
rpc CreatePanel(CreatePanelRequest) returns (Panel) {}
|
||||
|
||||
rpc GetPanel(GetPanelByIdRequest) returns (Panel) {}
|
||||
rpc GetPanelByName(GetPanelByNameRequest) returns (Panel) {}
|
||||
rpc GetPanel(GetPanelByIdRequest) returns (Panel) {}
|
||||
rpc GetPanelByName(GetPanelByNameRequest) returns (Panel) {}
|
||||
|
||||
rpc UpdatePanel(UpdatePanelByIdRequest) returns (Panel) {}
|
||||
rpc UpdatePanelByName(UpdatePanelByNameRequest) returns (Panel) {}
|
||||
rpc UpdatePanel(UpdatePanelByIdRequest) returns (Panel) {}
|
||||
rpc UpdatePanelByName(UpdatePanelByNameRequest) returns (Panel) {}
|
||||
|
||||
rpc DeletePanel(DeletePanelByIdRequest) returns (google.protobuf.Empty) {}
|
||||
rpc DeletePanelByName(DeletePanelByNameRequest) returns (google.protobuf.Empty) {}
|
||||
rpc DeletePanel(DeletePanelByIdRequest) returns (google.protobuf.Empty) {}
|
||||
rpc DeletePanelByName(DeletePanelByNameRequest) returns (google.protobuf.Empty) {}
|
||||
}
|
||||
|
||||
message Panel {
|
||||
string id = 1;
|
||||
string name = 2;
|
||||
string description = 3;
|
||||
|
||||
google.protobuf.Timestamp created_at = 4;
|
||||
google.protobuf.Timestamp updated_at = 5;
|
||||
string id = 1;
|
||||
string name = 2;
|
||||
string description = 3;
|
||||
|
||||
google.protobuf.Timestamp created_at = 4;
|
||||
google.protobuf.Timestamp updated_at = 5;
|
||||
}
|
||||
|
||||
message PanelMutable {
|
||||
optional string name = 1;
|
||||
optional string description = 2;
|
||||
optional string name = 1;
|
||||
optional string description = 2;
|
||||
}
|
||||
|
||||
message CreatePanelRequest {
|
||||
PanelMutable data = 1;
|
||||
PanelMutable data = 1;
|
||||
}
|
||||
|
||||
message GetPanelByIdRequest {
|
||||
string id = 1;
|
||||
string id = 1;
|
||||
}
|
||||
|
||||
message GetPanelByNameRequest {
|
||||
string name = 1;
|
||||
string name = 1;
|
||||
}
|
||||
|
||||
message UpdatePanelByIdRequest {
|
||||
string id = 1;
|
||||
PanelMutable data = 2;
|
||||
string id = 1;
|
||||
PanelMutable data = 2;
|
||||
}
|
||||
|
||||
message UpdatePanelByNameRequest {
|
||||
string name = 1;
|
||||
PanelMutable data = 2;
|
||||
string name = 1;
|
||||
PanelMutable data = 2;
|
||||
}
|
||||
|
||||
message DeletePanelByIdRequest {
|
||||
string id = 1;
|
||||
string id = 1;
|
||||
}
|
||||
|
||||
message DeletePanelByNameRequest {
|
||||
string name = 1;
|
||||
string name = 1;
|
||||
}
|
||||
|
||||
// Kafka Event Schema
|
||||
message PanelEvent {
|
||||
string type = 1;
|
||||
Panel data = 2;
|
||||
}
|
||||
string type = 1;
|
||||
Panel data = 2;
|
||||
}
|
||||
|
||||
@@ -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.post.v1;
|
||||
@@ -6,88 +20,86 @@ import "google/protobuf/empty.proto";
|
||||
import "google/protobuf/timestamp.proto";
|
||||
|
||||
service PostService {
|
||||
rpc CreatePost(CreatePostRequest) returns (Post) {}
|
||||
rpc CreatePost(CreatePostRequest) returns (Post) {}
|
||||
|
||||
rpc GetPost(GetPostRequest) returns (Post) {}
|
||||
rpc GetPanelPost(GetPanelPostRequest) returns (Post) {}
|
||||
rpc GetPost(GetPostRequest) returns (Post) {}
|
||||
rpc GetPanelPost(GetPanelPostRequest) returns (Post) {}
|
||||
|
||||
rpc UpdatePost(UpdatePostRequest) returns (Post) {}
|
||||
rpc UpdatePost(UpdatePostRequest) returns (Post) {}
|
||||
|
||||
rpc DeletePost(DeletePostRequest) returns (google.protobuf.Empty) {}
|
||||
rpc DeletePost(DeletePostRequest) returns (google.protobuf.Empty) {}
|
||||
|
||||
rpc GetFeedPosts(GetFeedPostsRequest) returns (FeedPosts) {}
|
||||
rpc GetUserPosts(GetUserPostsRequest) returns (UserPosts) {}
|
||||
rpc GetPanelPosts(GetPanelPostsRequest) returns (PanelPosts) {}
|
||||
rpc GetFeedPosts(GetFeedPostsRequest) returns (FeedPosts) {}
|
||||
rpc GetUserPosts(GetUserPostsRequest) returns (UserPosts) {}
|
||||
rpc GetPanelPosts(GetPanelPostsRequest) returns (PanelPosts) {}
|
||||
}
|
||||
|
||||
message Post {
|
||||
string id = 1;
|
||||
string id = 1;
|
||||
|
||||
string panel_id = 2; // External Ref: Panel Id
|
||||
string author_id = 3; // External Ref: User Id
|
||||
string panel_id = 2; // External Ref: Panel Id
|
||||
string author_id = 3; // External Ref: User Id
|
||||
|
||||
string title = 4;
|
||||
string content = 5;
|
||||
string title = 4;
|
||||
string content = 5;
|
||||
|
||||
google.protobuf.Timestamp created_at = 6;
|
||||
google.protobuf.Timestamp updated_at = 7;
|
||||
google.protobuf.Timestamp created_at = 6;
|
||||
google.protobuf.Timestamp updated_at = 7;
|
||||
}
|
||||
|
||||
message PostMutable {
|
||||
optional string title = 1;
|
||||
optional string content = 2;
|
||||
optional string title = 1;
|
||||
optional string content = 2;
|
||||
}
|
||||
|
||||
message CreatePostRequest {
|
||||
string panel_id = 1; // External Ref: Panel Id
|
||||
string user_id = 2; // External Ref: User Id
|
||||
PostMutable data = 3;
|
||||
string panel_id = 1; // External Ref: Panel Id
|
||||
string user_id = 2; // External Ref: User Id
|
||||
PostMutable data = 3;
|
||||
}
|
||||
|
||||
message GetPostRequest {
|
||||
string id = 1;
|
||||
string id = 1;
|
||||
}
|
||||
|
||||
message GetPanelPostRequest {
|
||||
string panel_id = 1; // External Ref: Panel Id
|
||||
string id = 2;
|
||||
string panel_id = 1; // External Ref: Panel Id
|
||||
string id = 2;
|
||||
}
|
||||
|
||||
message UpdatePostRequest {
|
||||
string id = 1;
|
||||
PostMutable data = 2;
|
||||
string id = 1;
|
||||
PostMutable data = 2;
|
||||
}
|
||||
|
||||
message DeletePostRequest {
|
||||
string id = 1;
|
||||
string id = 1;
|
||||
}
|
||||
|
||||
message GetFeedPostsRequest {
|
||||
|
||||
}
|
||||
message GetFeedPostsRequest {}
|
||||
|
||||
message FeedPosts {
|
||||
repeated Post posts = 1;
|
||||
repeated Post posts = 1;
|
||||
}
|
||||
|
||||
message GetUserPostsRequest {
|
||||
string user_id = 1; // External Ref: User Id
|
||||
string user_id = 1; // External Ref: User Id
|
||||
}
|
||||
|
||||
message UserPosts {
|
||||
repeated Post posts = 1;
|
||||
repeated Post posts = 1;
|
||||
}
|
||||
|
||||
message GetPanelPostsRequest {
|
||||
string panel_id = 1; // External Ref: Panel Id
|
||||
string panel_id = 1; // External Ref: Panel Id
|
||||
}
|
||||
|
||||
message PanelPosts {
|
||||
repeated Post posts = 1;
|
||||
repeated Post posts = 1;
|
||||
}
|
||||
|
||||
// Kafka Event Schema
|
||||
message PostEvent {
|
||||
string type = 1;
|
||||
Post data = 2;
|
||||
}
|
||||
string type = 1;
|
||||
Post data = 2;
|
||||
}
|
||||
|
||||
@@ -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.user.v1;
|
||||
@@ -6,63 +20,63 @@ import "google/protobuf/empty.proto";
|
||||
import "google/protobuf/timestamp.proto";
|
||||
|
||||
service UserService {
|
||||
rpc CreateUser(CreateUserRequest) returns (User) {}
|
||||
rpc CreateUser(CreateUserRequest) returns (User) {}
|
||||
|
||||
rpc GetUser(GetUserByIdRequest) returns (User) {}
|
||||
rpc GetUserByName(GetUserByNameRequest) returns (User) {}
|
||||
rpc GetUser(GetUserByIdRequest) returns (User) {}
|
||||
rpc GetUserByName(GetUserByNameRequest) returns (User) {}
|
||||
|
||||
rpc UpdateUser(UpdateUserByIdRequest) returns (User) {}
|
||||
rpc UpdateUserByName(UpdateUserByNameRequest) returns (User) {}
|
||||
rpc UpdateUser(UpdateUserByIdRequest) returns (User) {}
|
||||
rpc UpdateUserByName(UpdateUserByNameRequest) returns (User) {}
|
||||
|
||||
rpc DeleteUser(DeleteUserByIdRequest) returns (google.protobuf.Empty) {}
|
||||
rpc DeleteUserByName(DeleteUserByNameRequest) returns (google.protobuf.Empty) {}
|
||||
rpc DeleteUser(DeleteUserByIdRequest) returns (google.protobuf.Empty) {}
|
||||
rpc DeleteUserByName(DeleteUserByNameRequest) returns (google.protobuf.Empty) {}
|
||||
}
|
||||
|
||||
message User {
|
||||
string id = 1;
|
||||
string username = 2;
|
||||
bool is_admin = 3;
|
||||
string id = 1;
|
||||
string username = 2;
|
||||
bool is_admin = 3;
|
||||
|
||||
google.protobuf.Timestamp created_at = 4;
|
||||
google.protobuf.Timestamp updated_at = 5;
|
||||
google.protobuf.Timestamp created_at = 4;
|
||||
google.protobuf.Timestamp updated_at = 5;
|
||||
}
|
||||
|
||||
message UserMutable {
|
||||
optional string username = 1;
|
||||
optional string username = 1;
|
||||
}
|
||||
|
||||
message CreateUserRequest {
|
||||
UserMutable data = 1;
|
||||
UserMutable data = 1;
|
||||
}
|
||||
|
||||
message GetUserByIdRequest {
|
||||
string id = 1;
|
||||
string id = 1;
|
||||
}
|
||||
|
||||
message GetUserByNameRequest {
|
||||
string username = 1;
|
||||
string username = 1;
|
||||
}
|
||||
|
||||
message UpdateUserByIdRequest {
|
||||
string id = 1;
|
||||
UserMutable data = 2;
|
||||
string id = 1;
|
||||
UserMutable data = 2;
|
||||
}
|
||||
|
||||
message UpdateUserByNameRequest {
|
||||
string username = 1;
|
||||
UserMutable data = 2;
|
||||
string username = 1;
|
||||
UserMutable data = 2;
|
||||
}
|
||||
|
||||
message DeleteUserByIdRequest {
|
||||
string id = 1;
|
||||
string id = 1;
|
||||
}
|
||||
|
||||
message DeleteUserByNameRequest {
|
||||
string username = 1;
|
||||
string username = 1;
|
||||
}
|
||||
|
||||
// Kafka Event Schema
|
||||
message UserEvent {
|
||||
string type = 1;
|
||||
User data = 2;
|
||||
}
|
||||
string type = 1;
|
||||
User data = 2;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user