Compare commits
1 Commits
main
...
add-projec
| Author | SHA1 | Date | |
|---|---|---|---|
|
4fc14c7a97
|
166
README.md
166
README.md
@@ -6,26 +6,17 @@
|
||||
- [accounts/v1/accounts_v1.proto](#accounts_v1_accounts_v1-proto)
|
||||
- [AccountData](#accounts-v1-AccountData)
|
||||
- [AccountPassword](#accounts-v1-AccountPassword)
|
||||
- [IsEmailUsedRequest](#accounts-v1-IsEmailUsedRequest)
|
||||
- [IsEmailUsedResponse](#accounts-v1-IsEmailUsedResponse)
|
||||
- [IsEmailVerifiedRequest](#accounts-v1-IsEmailVerifiedRequest)
|
||||
- [IsEmailVerifiedResponse](#accounts-v1-IsEmailVerifiedResponse)
|
||||
- [NewPasswordRequest](#accounts-v1-NewPasswordRequest)
|
||||
- [PersonalData](#accounts-v1-PersonalData)
|
||||
- [RefreshSessionRequest](#accounts-v1-RefreshSessionRequest)
|
||||
- [RefreshSessionResponse](#accounts-v1-RefreshSessionResponse)
|
||||
- [RefreshTokenRequest](#accounts-v1-RefreshTokenRequest)
|
||||
- [RemoveSessionRequest](#accounts-v1-RemoveSessionRequest)
|
||||
- [ResetPasswordRequest](#accounts-v1-ResetPasswordRequest)
|
||||
- [SignInRequest](#accounts-v1-SignInRequest)
|
||||
- [SignInResponse](#accounts-v1-SignInResponse)
|
||||
- [SignUpRequest](#accounts-v1-SignUpRequest)
|
||||
- [SignUpResponse](#accounts-v1-SignUpResponse)
|
||||
- [TokenPair](#accounts-v1-TokenPair)
|
||||
|
||||
- [AccountsService](#accounts-v1-AccountsService)
|
||||
- [PublicAccountsService](#accounts-v1-PublicAccountsService)
|
||||
- [RefreshSessionService](#accounts-v1-RefreshSessionService)
|
||||
|
||||
- [projects/v1/projects_v1.proto](#projects_v1_projects_v1-proto)
|
||||
- [CreateProjectRequest](#projects-v1-CreateProjectRequest)
|
||||
@@ -115,36 +106,6 @@ Protobuf definitions for the accounts service.
|
||||
|
||||
|
||||
|
||||
<a name="accounts-v1-IsEmailUsedRequest"></a>
|
||||
|
||||
### IsEmailUsedRequest
|
||||
|
||||
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| email | [string](#string) | | |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="accounts-v1-IsEmailUsedResponse"></a>
|
||||
|
||||
### IsEmailUsedResponse
|
||||
|
||||
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| used | [bool](#bool) | | |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="accounts-v1-IsEmailVerifiedRequest"></a>
|
||||
|
||||
### IsEmailVerifiedRequest
|
||||
@@ -208,36 +169,6 @@ Protobuf definitions for the accounts service.
|
||||
|
||||
|
||||
|
||||
<a name="accounts-v1-RefreshSessionRequest"></a>
|
||||
|
||||
### RefreshSessionRequest
|
||||
|
||||
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| refresh_token | [string](#string) | | |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="accounts-v1-RefreshSessionResponse"></a>
|
||||
|
||||
### RefreshSessionResponse
|
||||
|
||||
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| token_pair | [TokenPair](#accounts-v1-TokenPair) | | |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="accounts-v1-RefreshTokenRequest"></a>
|
||||
|
||||
### RefreshTokenRequest
|
||||
@@ -253,21 +184,6 @@ Protobuf definitions for the accounts service.
|
||||
|
||||
|
||||
|
||||
<a name="accounts-v1-RemoveSessionRequest"></a>
|
||||
|
||||
### RemoveSessionRequest
|
||||
|
||||
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| refresh_token | [string](#string) | | |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="accounts-v1-ResetPasswordRequest"></a>
|
||||
|
||||
### ResetPasswordRequest
|
||||
@@ -299,21 +215,6 @@ Protobuf definitions for the accounts service.
|
||||
|
||||
|
||||
|
||||
<a name="accounts-v1-SignInResponse"></a>
|
||||
|
||||
### SignInResponse
|
||||
|
||||
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| token_pair | [TokenPair](#accounts-v1-TokenPair) | | |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="accounts-v1-SignUpRequest"></a>
|
||||
|
||||
### SignUpRequest
|
||||
@@ -330,37 +231,6 @@ Protobuf definitions for the accounts service.
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="accounts-v1-SignUpResponse"></a>
|
||||
|
||||
### SignUpResponse
|
||||
|
||||
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| token_pair | [TokenPair](#accounts-v1-TokenPair) | | |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="accounts-v1-TokenPair"></a>
|
||||
|
||||
### TokenPair
|
||||
|
||||
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| access_token | [string](#string) | | |
|
||||
| refresh_token | [string](#string) | | |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -376,8 +246,8 @@ Protobuf definitions for the accounts service.
|
||||
| Method Name | Request Type | Response Type | Description |
|
||||
| ----------- | ------------ | ------------- | ------------|
|
||||
| IsEmailVerified | [IsEmailVerifiedRequest](#accounts-v1-IsEmailVerifiedRequest) | [IsEmailVerifiedResponse](#accounts-v1-IsEmailVerifiedResponse) | Is email for the current account verified |
|
||||
| RefreshSession | [.google.protobuf.Empty](#google-protobuf-Empty) | [.google.protobuf.Empty](#google-protobuf-Empty) | |
|
||||
| TokenAuthorization | [.google.protobuf.Empty](#google-protobuf-Empty) | [.google.protobuf.Empty](#google-protobuf-Empty) | Authorize using long living tokens |
|
||||
| RemoveSession | [RemoveSessionRequest](#accounts-v1-RemoveSessionRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Remove a session that is associated with a refresh token, should be used for logging out |
|
||||
|
||||
|
||||
<a name="accounts-v1-PublicAccountsService"></a>
|
||||
@@ -387,19 +257,8 @@ Service for handling accounts that do not require authentication
|
||||
|
||||
| Method Name | Request Type | Response Type | Description |
|
||||
| ----------- | ------------ | ------------- | ------------|
|
||||
| SignIn | [SignInRequest](#accounts-v1-SignInRequest) | [SignInResponse](#accounts-v1-SignInResponse) | Sing in into an existing account |
|
||||
| SignUp | [SignUpRequest](#accounts-v1-SignUpRequest) | [SignUpResponse](#accounts-v1-SignUpResponse) | Create a new account |
|
||||
| IsEmailUsed | [IsEmailUsedRequest](#accounts-v1-IsEmailUsedRequest) | [IsEmailUsedResponse](#accounts-v1-IsEmailUsedResponse) | Check whether a email is already in use |
|
||||
|
||||
|
||||
<a name="accounts-v1-RefreshSessionService"></a>
|
||||
|
||||
### RefreshSessionService
|
||||
Use as a separate service to make it easier to avoid interceptors on the client
|
||||
|
||||
| Method Name | Request Type | Response Type | Description |
|
||||
| ----------- | ------------ | ------------- | ------------|
|
||||
| RefreshSession | [RefreshSessionRequest](#accounts-v1-RefreshSessionRequest) | [RefreshSessionResponse](#accounts-v1-RefreshSessionResponse) | |
|
||||
| SignIn | [SignInRequest](#accounts-v1-SignInRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Sing in into an existing account |
|
||||
| SignUp | [SignUpRequest](#accounts-v1-SignUpRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Create a new account |
|
||||
|
||||
|
||||
|
||||
@@ -415,15 +274,8 @@ Protobuf definitions for the accounts service.
|
||||
<a name="projects-v1-CreateProjectRequest"></a>
|
||||
|
||||
### CreateProjectRequest
|
||||
Create a new project
|
||||
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| slug | [string](#string) | | |
|
||||
| name | [string](#string) | | |
|
||||
| description | [string](#string) | | |
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -435,11 +287,6 @@ Create a new project
|
||||
|
||||
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| id | [string](#string) | | |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -480,13 +327,6 @@ Create a new project
|
||||
|
||||
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| id | [string](#string) | | |
|
||||
| slug | [string](#string) | | |
|
||||
| name | [string](#string) | | |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
13
buf.gen.yaml
13
buf.gen.yaml
@@ -9,10 +9,6 @@ plugins:
|
||||
out: gen/go
|
||||
opt:
|
||||
- paths=source_relative
|
||||
- remote: buf.build/connectrpc/go
|
||||
out: gen/go
|
||||
opt:
|
||||
- paths=source_relative
|
||||
|
||||
- remote: buf.build/grpc/go
|
||||
out: gen/go
|
||||
@@ -20,15 +16,12 @@ plugins:
|
||||
- paths=source_relative
|
||||
- require_unimplemented_servers=false
|
||||
|
||||
- remote: buf.build/community/pseudomuto-doc
|
||||
- remote: buf.build/community/pseudomuto-doc:v1.5.1
|
||||
out: .
|
||||
opt:
|
||||
- markdown,README.md
|
||||
|
||||
- remote: buf.build/connectrpc/dart:v1.0.0
|
||||
out: gen/dart/lib
|
||||
|
||||
- remote: buf.build/protocolbuffers/dart:v22.4.0
|
||||
out: gen/dart/lib
|
||||
- remote: buf.build/protocolbuffers/dart:v25.0.0
|
||||
out: gen/dart/lib/src
|
||||
opt:
|
||||
- grpc
|
||||
|
||||
@@ -9,33 +9,19 @@ option go_package = "gitea.badhouseplants.net/softplayer/softplayer-go-proto/pkg
|
||||
*/
|
||||
service PublicAccountsService {
|
||||
// Sing in into an existing account
|
||||
rpc SignIn (SignInRequest) returns (SignInResponse) {}
|
||||
rpc SignIn (SignInRequest) returns (google.protobuf.Empty) {}
|
||||
// Create a new account
|
||||
rpc SignUp (SignUpRequest) returns (SignUpResponse) {}
|
||||
// Check whether a email is already in use
|
||||
rpc IsEmailUsed(IsEmailUsedRequest) returns (IsEmailUsedResponse) {}
|
||||
rpc SignUp (SignUpRequest) returns (google.protobuf.Empty) {}
|
||||
}
|
||||
|
||||
service AccountsService {
|
||||
// Is email for the current account verified
|
||||
rpc IsEmailVerified (IsEmailVerifiedRequest) returns (IsEmailVerifiedResponse) {}
|
||||
rpc RefreshSession (google.protobuf.Empty) returns (google.protobuf.Empty) {}
|
||||
// Authorize using long living tokens
|
||||
rpc TokenAuthorization (google.protobuf.Empty) returns (google.protobuf.Empty) {}
|
||||
// Remove a session that is associated with a refresh token, should be used for logging out
|
||||
rpc RemoveSession(RemoveSessionRequest) returns (google.protobuf.Empty) {}
|
||||
}
|
||||
|
||||
// Use as a separate service to make it easier to avoid interceptors on the client
|
||||
service RefreshSessionService {
|
||||
rpc RefreshSession(RefreshSessionRequest) returns (RefreshSessionResponse) {}
|
||||
}
|
||||
|
||||
message TokenPair {
|
||||
string access_token = 1;
|
||||
string refresh_token = 2;
|
||||
}
|
||||
|
||||
|
||||
message AccountPassword {
|
||||
string password = 1;
|
||||
}
|
||||
@@ -56,19 +42,11 @@ message SignUpRequest {
|
||||
PersonalData personal_data = 3;
|
||||
}
|
||||
|
||||
message SignUpResponse {
|
||||
TokenPair token_pair = 1;
|
||||
}
|
||||
|
||||
message SignInRequest {
|
||||
string email = 1;
|
||||
string password = 2;
|
||||
};
|
||||
|
||||
message SignInResponse {
|
||||
TokenPair token_pair = 1;
|
||||
}
|
||||
|
||||
message ResetPasswordRequest {
|
||||
AccountData data = 1;
|
||||
}
|
||||
@@ -90,23 +68,3 @@ message IsEmailVerifiedResponse {
|
||||
message RefreshTokenRequest {
|
||||
string session_id = 1;
|
||||
}
|
||||
|
||||
message RefreshSessionRequest {
|
||||
string refresh_token = 1;
|
||||
}
|
||||
|
||||
message RefreshSessionResponse {
|
||||
TokenPair token_pair = 1;
|
||||
}
|
||||
|
||||
message RemoveSessionRequest {
|
||||
string refresh_token = 1;
|
||||
}
|
||||
|
||||
message IsEmailUsedRequest {
|
||||
string email = 1;
|
||||
}
|
||||
|
||||
message IsEmailUsedResponse {
|
||||
bool used = 1;
|
||||
}
|
||||
|
||||
27
proto/project_membership/v1/project_membership_v1.proto
Normal file
27
proto/project_membership/v1/project_membership_v1.proto
Normal file
@@ -0,0 +1,27 @@
|
||||
syntax = "proto3";
|
||||
package project_membership.v1;
|
||||
option go_package = "gitea.badhouseplants.net/softplayer/softplayer-go-proto/pkg/project_membership/v1";
|
||||
|
||||
service ProjectMembershipService {
|
||||
rpc AddUserToProject(AddUserToProjectRequest) returns (AddUserToProjectResponse) {}
|
||||
rpc ChangeMembership(ChangeMembershipRequest) returns (ChangeMembershipResponse) {}
|
||||
rpc RemoveMembership(RemoveMembershipRequest) returns (RemoveMembershipResponse) {}
|
||||
rpc GetMembership(GetMembershipRequest) returns (GetMembershipResponse) {}
|
||||
rpc ListMemberships(ListMembershipsRequest) returns (stream ListMembershipsResponse) {}
|
||||
}
|
||||
|
||||
message AddUserToProjectRequest {}
|
||||
message AddUserToProjectResponse {}
|
||||
|
||||
message ChangeMembershipRequest {}
|
||||
message ChangeMembershipResponse {}
|
||||
|
||||
message RemoveMembershipRequest {}
|
||||
message RemoveMembershipResponse {}
|
||||
|
||||
message GetMembershipRequest {}
|
||||
message GetMembershipResponse {}
|
||||
|
||||
message ListMembershipsRequest {}
|
||||
message ListMembershipsResponse {}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
/// Protobuf definitions for the accounts service.
|
||||
syntax = "proto3";
|
||||
package projects.v1;
|
||||
option go_package = "gitea.badhouseplants.net/softplayer/softplayer-go-proto/pkg/projects/v1";
|
||||
@@ -10,23 +9,11 @@ service ProjectsService {
|
||||
rpc UpdateProject (UpdateProjectRequest) returns (UpdateProjectResponse) {}
|
||||
}
|
||||
|
||||
// Create a new project
|
||||
message CreateProjectRequest {
|
||||
string slug = 1;
|
||||
string name = 2;
|
||||
string description = 3;
|
||||
}
|
||||
|
||||
message CreateProjectResponse {
|
||||
string id = 1;
|
||||
}
|
||||
message CreateProjectRequest {}
|
||||
message CreateProjectResponse {}
|
||||
message GetProjectRequest {}
|
||||
message GetProjectResponse {}
|
||||
message ListProjectsRequest {}
|
||||
message ListProjectsResponse {
|
||||
string id = 1;
|
||||
string slug = 2;
|
||||
string name = 3;
|
||||
}
|
||||
message ListProjectsResponse {}
|
||||
message UpdateProjectRequest {}
|
||||
message UpdateProjectResponse {}
|
||||
|
||||
Reference in New Issue
Block a user