-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #163 from ImMin5/master
Add App Service
- Loading branch information
Showing
3 changed files
with
213 additions
and
21 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,182 @@ | ||
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/v1/query.proto"; | ||
|
||
|
||
service App { | ||
rpc create (CreateAppRequest) returns (AppInfo) { | ||
option (google.api.http) = { | ||
post: "/identity/v2/app/create" | ||
body: "*" | ||
}; | ||
} | ||
|
||
rpc update (UpdateAppRequest) returns (AppInfo) { | ||
option (google.api.http) = { | ||
post: "/identity/v2/app/update" | ||
body: "*" | ||
}; | ||
} | ||
|
||
rpc generate_api_key (AppRequest) returns (AppInfo) { | ||
option (google.api.http) = { | ||
post: "/identity/v2/app/generate-api-key" | ||
body: "*" | ||
}; | ||
} | ||
|
||
rpc enable (AppRequest) returns (AppInfo) { | ||
option (google.api.http) = { | ||
post: "/identity/v2/app/enable" | ||
body: "*" | ||
}; | ||
} | ||
|
||
rpc disable (AppRequest) returns (AppInfo) { | ||
option (google.api.http) = { | ||
post: "/identity/v2/app/disable" | ||
body: "*" | ||
}; | ||
} | ||
|
||
rpc delete (AppRequest) returns (google.protobuf.Empty) { | ||
option (google.api.http) = { | ||
post: "/identity/v2/app/delete" | ||
body: "*" | ||
}; | ||
} | ||
|
||
rpc get (AppRequest) returns (AppInfo) { | ||
option (google.api.http) = { | ||
post: "/identity/v2/app/get" | ||
body: "*" | ||
}; | ||
} | ||
|
||
rpc list (AppSearchQuery) returns (AppsInfo) { | ||
option (google.api.http) = { | ||
post: "/identity/v2/app/list" | ||
body: "*" | ||
}; | ||
} | ||
|
||
rpc stat (AppStatQuery) returns (google.protobuf.Struct) { | ||
option (google.api.http) = { | ||
post: "/identity/v2/app/stat" | ||
body: "*" | ||
}; | ||
} | ||
} | ||
|
||
message CreateAppRequest { | ||
string name = 1; | ||
string role_id = 2; | ||
string scope = 3; | ||
google.protobuf.Struct tags = 4; | ||
string domain_id = 21; | ||
string workspace_id = 22; | ||
string expired_at = 31; | ||
} | ||
|
||
message UpdateAppRequest { | ||
string app_id = 1; | ||
// +optional | ||
string name = 2; | ||
// +optional | ||
google.protobuf.Struct tags = 3; | ||
string domain_id = 21; | ||
// +optional | ||
string workspace_id = 22; | ||
} | ||
|
||
message AppRequest { | ||
string app_id = 1; | ||
string domain_id = 21; | ||
// +optional | ||
string workspace_id = 22; | ||
} | ||
|
||
message AppInfo { | ||
enum State { | ||
NONE_STATE = 0; | ||
ENABLED = 1; | ||
DISABLED = 2; | ||
} | ||
|
||
string app_id = 1; | ||
string api_key = 2; | ||
State state = 3; | ||
string domain_id = 21; | ||
string user_id = 22; | ||
string role_id = 23; | ||
string api_key_id = 24; | ||
string created_at = 31; | ||
string last_accessed_at = 32; | ||
string expired_at = 33; | ||
} | ||
|
||
message AppSearchQuery { | ||
enum State { | ||
NONE_STATE = 0; | ||
ENABLED = 1; | ||
DISABLED = 2; | ||
} | ||
|
||
enum Scope { | ||
NONE_SCOPE = 0; | ||
DOMAIN = 1; | ||
WORKSPACE = 2; | ||
} | ||
|
||
// +optional | ||
spaceone.api.core.v1.Query query = 1; | ||
// +optional | ||
string app_id = 2; | ||
// +optional | ||
string app_key = 3; | ||
// +optional | ||
string name = 4; | ||
// +optional | ||
State state = 5; | ||
// +optional | ||
Scope scope = 6; | ||
// +optional | ||
string role_type = 7; | ||
string domain_id = 21; | ||
// +optional | ||
string workspace_id = 22; | ||
// +optional | ||
string role_id = 23; | ||
} | ||
|
||
message AppsInfo { | ||
repeated AppInfo results = 1; | ||
int32 total_count = 2; | ||
} | ||
|
||
message AppStatQuery { | ||
enum State { | ||
NONE_STATE = 0; | ||
ENABLED = 1; | ||
DISABLED = 2; | ||
} | ||
|
||
spaceone.api.core.v1.StatisticsQuery query = 1; | ||
string app_key = 2; | ||
string name = 3; | ||
State state = 4; | ||
string scope = 5; | ||
string role_type = 6; | ||
string domain_id = 21; | ||
string workspace_id = 22; | ||
string app_id = 23; | ||
string role_id = 24; | ||
|
||
} |
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