-
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 #9 from Kyutech-C3/refactor/schema-archtecture
スキーマのディレクトリ構造を変更
- Loading branch information
Showing
23 changed files
with
238 additions
and
439 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
4 changes: 2 additions & 2 deletions
4
...chema/auth/sign_up/resources/signup.proto → ...schema/auth/schema/sign_up/resource.proto
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
2 changes: 1 addition & 1 deletion
2
proto/schema/auth/token/rpc/token.proto → ...o/schema/auth/schema/token/resource.proto
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
syntax = "proto3"; | ||
|
||
package proto.schema.auth.token.rpc; | ||
package auth.schema.token; | ||
|
||
option go_package = "./"; | ||
|
||
|
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,38 @@ | ||
// proto/schema/users/users.proto | ||
syntax = "proto3"; | ||
|
||
package proto.schema.users; | ||
import "proto/third_party/google/api/annotations.proto"; | ||
import "proto/third_party/google/api/wrappers.proto"; | ||
import "proto/schema/auth/schema/discord_callback/resource.proto"; | ||
import "proto/schema/auth/schema/sign_up/resource.proto"; | ||
import "proto/schema/auth/schema/token/resource.proto"; | ||
import "proto/schema/users/model/model.proto"; | ||
import "google/protobuf/empty.proto"; | ||
option go_package = "./"; | ||
|
||
|
||
service AuthService { | ||
rpc DiscordCallBack(.auth.schema.discord_callback.DiscordCallbackRequest) returns (google.protobuf.StringValue) { | ||
option (google.api.http) = { | ||
get: "/v1/auth/discord/callback" | ||
}; | ||
} | ||
rpc ExchangeToken(.auth.schema.token.PostTokenRequest)returns(.auth.schema.token.PostTokenResponse){ | ||
option (google.api.http) = { | ||
post: "/v1/auth/token" | ||
body: "*" | ||
}; | ||
} | ||
rpc RedirectDiscord(google.protobuf.Empty) returns (google.protobuf.StringValue) { | ||
option (google.api.http) = { | ||
get: "/v1/auth/discord" | ||
}; | ||
} | ||
rpc SignUp(.auth.schema.sign_up.SignUpRequest) returns (proto.schema.users.model.User) { | ||
option (google.api.http) = { | ||
post: "/v1/auth/sign_up" | ||
body: "*" | ||
}; | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
proto/schema/tags/resources/tags.proto → proto/schema/tags/model/model.proto
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
This file was deleted.
Oops, something went wrong.
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,19 @@ | ||
syntax = "proto3"; | ||
|
||
package tags.schema.tags; | ||
|
||
import "proto/third_party/grpc/openapiv2/options/annotations.proto"; | ||
import "proto/third_party/google/api/field_behavior.proto"; | ||
|
||
option go_package = "./"; | ||
|
||
message GetTagsRequest { | ||
string limit = 1 [(google.api.field_behavior) = OPTIONAL]; | ||
string smallest_tag_id = 2 [(google.api.field_behavior) = OPTIONAL]; | ||
string biggest_tag_id = 3 [(google.api.field_behavior) = OPTIONAL]; | ||
string w = 4 [(google.api.field_behavior) = OPTIONAL]; | ||
|
||
option(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { | ||
example: "{\"limit\": 100, \"smallest_tag_id\": \"\", \"biggest_tag_id\": \"\", \"w\": \"\"}" | ||
}; | ||
} |
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,16 @@ | ||
syntax = "proto3"; | ||
|
||
package proto.schema.users; | ||
import "proto/schema/tags/schema/tags/resource.proto"; | ||
import "proto/schema/tags/model/model.proto"; | ||
import "proto/third_party/google/api/annotations.proto"; | ||
option go_package = "./"; | ||
|
||
service TagsService { | ||
rpc GetTags(.tags.schema.tags.GetTagsRequest) | ||
returns (stream proto.schema.tags.model.Tag) { | ||
option (google.api.http) = { | ||
get : "/v1/tags" | ||
}; | ||
}; | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
5 changes: 2 additions & 3 deletions
5
proto/schema/users/me/resources/me.proto → proto/schema/users/model/model.proto
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
5 changes: 3 additions & 2 deletions
5
proto/schema/users/me/rpc/me.proto → proto/schema/users/schema/me/resource.proto
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
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,10 @@ | ||
syntax = "proto3"; | ||
|
||
package users.schema.user_id; | ||
|
||
option go_package = "./"; | ||
|
||
// Request type for getting a user. | ||
message GetUserRequest { | ||
string user_id = 1; // Path parameter representing the user's ID | ||
} |
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,20 @@ | ||
syntax = "proto3"; | ||
|
||
package users.schema.users; | ||
|
||
import "proto/schema/users/model/model.proto"; | ||
import "proto/third_party/google/api/wrappers.proto"; | ||
|
||
option go_package = "./"; | ||
|
||
message GetUsersRequest { | ||
// Default value: 30 | ||
google.protobuf.Int32Value limit = 1; | ||
string oldest_user_id = 2; | ||
string newest_user_id = 3; | ||
} | ||
|
||
message GetUsersResponse { | ||
repeated proto.schema.users.model.User users = 1; | ||
} | ||
|
Oops, something went wrong.