Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add package APIs and change user group APIs #450

Merged
merged 1 commit into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
128 changes: 128 additions & 0 deletions proto/spaceone/api/identity/v2/package.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
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 Package {

rpc create (CreatePackageRequest) returns (PackageInfo) {
option (google.api.http) = {
post: "/identity/v2/package/create"
body: "*"
};
}

rpc update (UpdatePackageRequest) returns (PackageInfo) {
option (google.api.http) = {
post: "/identity/v2/package/update"
body: "*"
};
}

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

rpc set_default (PackageRequest) returns (PackageInfo) {
option (google.api.http) = {
post: "/identity/v2/package/set-default"
body: "*"
};
}

rpc change_order (ChangePackageOrderRequest) returns (PackageInfo) {
option (google.api.http) = {
post: "/identity/v2/package/change-order"
body: "*"
};
}

rpc get (PackageRequest) returns (PackageInfo) {
option (google.api.http) = {
post: "/identity/v2/package/get"
body: "*"
};
}

rpc list (PackageSearchQuery) returns (PackagesInfo) {
option (google.api.http) = {
post: "/identity/v2/package/list"
body: "*"
};
}
rpc stat (PackageStatQuery) returns (google.protobuf.Struct) {
option (google.api.http) = {
post: "/identity/v1/package/stat"
body: "*"
};
}
}


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

message UpdatePackageRequest {
string package_id = 1;
// +optional
string name = 2;
// +optional
string description = 3;
// +optional
google.protobuf.Struct tags = 4;
}

message PackageRequest {
string package_id = 1;
}

message ChangePackageOrderRequest {
string package_id = 1;
int32 order = 2;
}

message PackageInfo {
string package_id = 1;
string name = 2;
string description = 3;
int32 order = 4;
bool is_default = 5;
google.protobuf.Struct tags = 11;
string domain_id = 21;
string workspace_id = 22;
string created_at = 31;
string updated_at = 32;
}

message PackageSearchQuery {
// +optional
spaceone.api.core.v2.Query query = 1;
// +optional
string package_id = 2;
// +optional
string name = 3;
}

message PackagesInfo {
repeated PackageInfo results = 1;
int32 total_count = 2;
}

message PackageStatQuery {
spaceone.api.core.v2.StatisticsQuery query = 1;
}
13 changes: 9 additions & 4 deletions proto/spaceone/api/identity/v2/user_group.proto
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,19 @@ service UserGroup {
message CreateUserGroupRequest {
string name = 1;
// +optional
google.protobuf.Struct tags = 2;
string description = 2;
// +optional
google.protobuf.Struct tags = 3;
}

message UpdateUserGroupRequest {
string user_group_id = 1;
// +optional
string name = 2;
// +optional
google.protobuf.Struct tags = 3;
string description = 3;
// +optional
google.protobuf.Struct tags = 4;
}

message UserGroupRequest {
Expand All @@ -95,8 +99,9 @@ message UsersUserGroupRequest {
message UserGroupInfo {
string user_group_id = 1;
string name = 2;
repeated string users = 3;
google.protobuf.Struct tags = 4;
string description = 3;
repeated string users = 4;
google.protobuf.Struct tags = 5;
string domain_id = 21;
string workspace_id = 22;
string created_at = 31;
Expand Down
Loading