Skip to content

Commit

Permalink
Merge pull request #385 from yjinjo/master
Browse files Browse the repository at this point in the history
Add workspace group template APIs
  • Loading branch information
yjinjo authored Aug 11, 2024
2 parents 4cdbc36 + c850d5f commit 47ba39a
Show file tree
Hide file tree
Showing 3 changed files with 148 additions and 2 deletions.
2 changes: 1 addition & 1 deletion proto/spaceone/api/identity/v2/workspace.proto
Original file line number Diff line number Diff line change
Expand Up @@ -159,4 +159,4 @@ message WorkspacesInfo {

message WorkspaceStatQuery {
spaceone.api.core.v2.StatisticsQuery query = 1;
}
}
146 changes: 146 additions & 0 deletions proto/spaceone/api/identity/v2/workspace_group.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
syntax = "proto3";

package spaceone.api.identity.v2;

option go_package = "github.com/cloudforet-io/api/dist/go/spaceone/api/identity/v2";

import "google/protobuf/empty.proto";
import "google/protobuf/struct.proto";
import "google/api/annotations.proto";
import "spaceone/api/core/v2/query.proto";


service WorkspaceGroup {
rpc create (CreateWorkspaceGroupRequest) returns (WorkspaceGroupInfo) {
option (google.api.http) = {
post: "/identity/v2/workspace-group/create"
body: "*"
};
}

rpc update (UpdateWorkspaceGroupRequest) returns (WorkspaceGroupInfo) {
option (google.api.http) = {
post: "/identity/v2/workspace-group/update"
body: "*"
};
}

rpc delete (WorkspaceGroupRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
post: "/identity/v2/workspace-group/delete"
body: "*"
};
}

rpc add_workspaces (WorkspacesWorkspaceGroupRequest) returns (WorkspaceGroupInfo) {
option (google.api.http) = {
post: "/identity/v2/workspace-group/add-workspaces"
body: "*"
};
}

rpc remove_workspaces (WorkspacesWorkspaceGroupRequest) returns (WorkspaceGroupInfo) {
option (google.api.http) = {
post: "/identity/v2/workspace-group/remove-workspaces"
body: "*"
};
}

rpc add_users (UsersWorkspaceGroupRequest) returns (WorkspaceGroupInfo) {
option (google.api.http) = {
post: "/identity/v2/workspace-group/add-users"
body: "*"
};
}

rpc remove_users (UsersWorkspaceGroupRequest) returns (WorkspaceGroupInfo) {
option (google.api.http) = {
post: "/identity/v2/workspace-group/remove-users"
body: "*"
};
}

rpc get (WorkspaceGroupRequest) returns (WorkspaceGroupInfo) {
option (google.api.http) = {
post: "/identity/v2/workspace-group/get"
body: "*"
};
}

rpc list (WorkspaceGroupSearchQuery) returns (WorkspaceGroupsInfo) {
option (google.api.http) = {
post: "/identity/v2/workspace-group/list"
body: "*"
};
}

rpc stat (WorkspaceGroupStatQuery) returns (google.protobuf.Struct) {
option (google.api.http) = {
post: "/identity/v2/workspace-group/stat"
body: "*"
};
}
}

message CreateWorkspaceGroupRequest {
string name = 1;
// +optional
google.protobuf.Struct tags = 2;
}

message UpdateWorkspaceGroupRequest {
string workspace_group_id = 1;
// +optional
string name = 2;
// +optional
google.protobuf.Struct tags = 3;
}

message WorkspacesWorkspaceGroupRequest {
string workspace_group_id = 1;
repeated string workspaces = 2;
}

message UsersWorkspaceGroupRequest {
string workspace_group_id = 1;
repeated string users = 2;
}

message WorkspaceGroupRequest {
string workspace_group_id = 1;
}

message WorkspaceGroupInfo {
string workspace_group_id = 1;
string name = 2;
repeated string workspaces = 3;
repeated string users = 4;
google.protobuf.Struct tags = 5;
string created_by = 6;
string updated_by = 7;
string domain_id = 21;
string created_at = 31;
string updated_at = 32;
}

message WorkspaceGroupSearchQuery {
// +optional
spaceone.api.core.v2.Query query = 1;
// +optional
string workspace_group_id = 2;
// +optional
string name = 3;
// +optional
string created_by = 4;
// +optional
string updated_by = 5;
}

message WorkspaceGroupsInfo {
repeated WorkspaceGroupInfo results = 1;
int32 total_count = 2;
}

message WorkspaceGroupStatQuery {
spaceone.api.core.v2.StatisticsQuery query = 1;
}
2 changes: 1 addition & 1 deletion proto/spaceone/api/identity/v2/workspace_user.proto
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ message WorkspaceUserInfo {
string timezone = 8;
int32 api_key_count = 9;
google.protobuf.Struct tags = 10;
spaceone.api.identity.v2.RoleBindingInfo role_binding_info = 11;
repeated spaceone.api.identity.v2.RoleBindingInfo role_binding_info = 11;
bool email_verified = 12;
string domain_id = 21;
string created_at = 31;
Expand Down

0 comments on commit 47ba39a

Please sign in to comment.