-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(mgmt): separate into admin and public services (#133)
Because - we want to separate endpoints into admin (not exposed to public) and public ones This commit - make `uid` field immutable - separate into admin and public services
- Loading branch information
1 parent
fa04493
commit ddf0a4e
Showing
4 changed files
with
103 additions
and
89 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
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,71 @@ | ||
syntax = "proto3"; | ||
|
||
package vdp.mgmt.v1alpha; | ||
|
||
// Google API | ||
import "google/api/annotations.proto"; | ||
import "google/api/client.proto"; | ||
|
||
import "vdp/mgmt/v1alpha/mgmt.proto"; | ||
|
||
// User service responds to incoming user requests. | ||
service UserAdminService { | ||
option (google.api.default_host) = "api.instill.tech"; | ||
|
||
// ========== Admin API: create, get, update and delete user accounts | ||
|
||
// ListUser method receives a ListUserRequest message and returns a | ||
// ListUserResponse message. | ||
rpc ListUser(ListUserRequest) returns (ListUserResponse) { | ||
option (google.api.http) = { | ||
get : "/v1alpha/admin/users" | ||
}; | ||
} | ||
|
||
// CreateUser receives a CreateUserRequest message and returns a | ||
// aGetUserResponse | ||
rpc CreateUser(CreateUserRequest) returns (CreateUserResponse) { | ||
option (google.api.http) = { | ||
post : "/v1alpha/admin/users" | ||
body : "user" | ||
}; | ||
option (google.api.method_signature) = "user"; | ||
} | ||
|
||
// GetUser method receives a GetUserRequest message and returns | ||
// a GetUserResponse message. | ||
rpc GetUser(GetUserRequest) returns (GetUserResponse) { | ||
option (google.api.http) = { | ||
get : "/v1alpha/admin/{name=users/*}" | ||
}; | ||
option (google.api.method_signature) = "name"; | ||
} | ||
|
||
// UpdateUser method receives a UpdateUserRequest message and returns | ||
// a UpdateUserResponse | ||
rpc UpdateUser(UpdateUserRequest) returns (UpdateUserResponse) { | ||
option (google.api.http) = { | ||
patch : "/v1alpha/admin/{user.name=users/*}" | ||
body : "user" | ||
}; | ||
option (google.api.method_signature) = "user,update_mask"; | ||
} | ||
|
||
// DeleteUser method receives a DeleteUserRequest message and returns a | ||
// DeleteUserResponse | ||
rpc DeleteUser(DeleteUserRequest) returns (DeleteUserResponse) { | ||
option (google.api.http) = { | ||
delete : "/v1alpha/admin/{name=users/*}" | ||
}; | ||
option (google.api.method_signature) = "name"; | ||
} | ||
|
||
// LookUpUser method receives a LookUpUserRequest message and returns a | ||
// LookUpUserResponse | ||
rpc LookUpUser(LookUpUserRequest) returns (LookUpUserResponse) { | ||
option (google.api.http) = { | ||
get : "/v1alpha/admin/{permalink=users/*}/lookUp" | ||
}; | ||
option (google.api.method_signature) = "permalink"; | ||
} | ||
} |
Oops, something went wrong.