-
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.
feat: implement /api/v1/auth/sign_up
- Loading branch information
Showing
3 changed files
with
135 additions
and
6 deletions.
There are no files selected for viewing
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,36 @@ | ||
syntax = "proto3"; | ||
|
||
package proto.schema.auth.sign_up.resources; | ||
import "proto/third_party/grpc/openapiv2/options/annotations.proto"; | ||
|
||
option go_package = "./"; | ||
|
||
message InitialAccountTemplate { | ||
string name = 1; | ||
string email = 2; | ||
string password = 3; | ||
string display_name = 4; | ||
string avatar_url = 5; | ||
} | ||
|
||
message Account { | ||
string id = 1; | ||
string name = 2; | ||
string display_name = 3; | ||
string avatar_url = 4; | ||
string profile = 5; | ||
string twitter_id = 6; | ||
string github_id = 7; | ||
string created_at = 8; // google.type.Date ? | ||
string updated_at = 9; // google.type.Date ? | ||
|
||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { | ||
example : "{\"id\": \"string\",\"name\": \"string\",\"display_name\": " | ||
"\"string\",\"avatar_url\": " | ||
"\"https://example.com/\",\"profile\": " | ||
"\"string\",\"twitter_id\": \"string\",\"github_id\": " | ||
"\"string\",\"created_at\": " | ||
"\"2024-01-11T07:56:02.206Z\",\"updated_at\": " | ||
"\"2024-01-11T07:56:02.206Z\"}" | ||
}; | ||
} |
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,17 @@ | ||
syntax = "proto3"; | ||
|
||
package proto.schema.auth.sign_up; | ||
|
||
import "proto/schema/auth/sign_up/resources/signup.proto"; | ||
import "proto/third_party/google/api/annotations.proto"; | ||
|
||
option go_package = "./"; | ||
|
||
service SignUpService { | ||
rpc PostSignUp(proto.schema.auth.sign_up.resources.InitialAccountTemplate) | ||
returns (proto.schema.auth.sign_up.resources.Account) { | ||
option (google.api.http) = { | ||
post : "/v1/auth/sign_up" | ||
}; | ||
}; | ||
} |