-
Notifications
You must be signed in to change notification settings - Fork 2
[feature] Features: workspaces, list object v2, hooks #77
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
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
db5ca0f
fix: Fixed description for GetProjectCollectionIdsByPath
St4NNi dc0a944
feat: Added GetObjectsAsListV2Request
St4NNi 2edfd12
feat: Added workspace API
St4NNi c56a878
feat: First iteration of a hook service
St4NNi dbf898b
feat: Updated hook service
St4NNi e67a815
chore: Update google dependencies
St4NNi facfa78
feat: Added project_name to create_workspace_request
St4NNi 6169246
feat: Made hooks project specific
St4NNi a5b73a7
feat: Added timeout to hook, added Trigger to hookinfo
St4NNi c4bd583
feat: Added hooks to build.rs
St4NNi e5c371d
fix: Revert pin collection path
St4NNi ba3f424
feat: Rename ListHook to ListHooks
St4NNi 9fdb404
feat: Rename ListHook to ListHooks
St4NNi 8096436
feat: Rename ListHook to ListHooks
St4NNi 4677e34
feat: Rename hook_info to hook
St4NNi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,106 @@ | ||
| syntax = "proto3"; | ||
|
|
||
| package aruna.api.hooks.services.v1; | ||
| option go_package = "github.com/ArunaStorage/go-api/aruna/api/storage/services/v1"; | ||
| option java_multiple_files = true; | ||
| option java_package = "com.github.ArunaStorage.java_api.aruna.api.storage.services.v1"; | ||
| option java_outer_classname = "HooksService"; | ||
|
|
||
| import "aruna/api/storage/models/v1/models.proto"; | ||
|
|
||
| // HooksService | ||
| // | ||
| // Status: ALPHA | ||
| // | ||
| // A service that enables automatic Hook scheduling | ||
| service HooksService { | ||
| rpc CreateHook(CreateHookRequest) returns (CreateHookResponse) {} | ||
| rpc ListHooks(ListHooksRequest) returns (ListHooksResponse) {} | ||
| rpc DeleteHook(DeleteHookRequest) returns (DeleteHookResponse) {} | ||
| rpc HookCallback(HookCallbackRequest) returns (HookCallbackResponse) {} | ||
| } | ||
|
|
||
| enum TriggerType { | ||
| TRIGGER_TYPE_UNSPECIFIED = 0; | ||
| TRIGGER_TYPE_HOOK_ADDED = 1; | ||
| } | ||
|
|
||
| message Trigger { | ||
| TriggerType trigger_type = 1; | ||
| string key = 2; | ||
| string value = 3; | ||
| } | ||
|
|
||
| message ExternalHook { | ||
| string url = 1; | ||
| Credentials credentials = 2; | ||
| string json_template = 3; | ||
| } | ||
|
|
||
| enum InternalAction { | ||
| INTERNAL_ACTION_UNSPECIFIED = 0; | ||
| INTERNAL_ACTION_ADD_LABEL = 1; | ||
| INTERNAL_ACTION_ADD_HOOK = 2; | ||
| INTERNAL_ACTION_CREATE_READ_REFERENCE = 3; | ||
| INTERNAL_ACTION_CREATE_WRITE_REFERENCE = 4; | ||
| } | ||
|
|
||
| message InternalHook { | ||
| InternalAction internal_action = 1; | ||
| // Either key or target ID | ||
| string target_id = 2; | ||
| // Optional value | ||
| string value = 3; | ||
| } | ||
|
|
||
| message Hook { | ||
| oneof hook_type { | ||
| ExternalHook external_hook = 1; | ||
| InternalHook internal_hook = 2; | ||
| } | ||
| } | ||
|
|
||
| // Will be updated with additional credential types | ||
| message Credentials { | ||
| string token = 1; | ||
| } | ||
|
|
||
| message CreateHookRequest { | ||
| Trigger trigger = 1; | ||
| Hook hook = 2; | ||
| uint64 timeout = 3; | ||
| string project_id = 4; | ||
| } | ||
| message CreateHookResponse { | ||
| string hook_id = 1; | ||
| } | ||
|
|
||
| message DeleteHookRequest { | ||
| string hook_id = 1; | ||
| } | ||
|
|
||
| message DeleteHookResponse {} | ||
|
|
||
| message HookCallbackRequest { | ||
| bool success = 1; | ||
| repeated aruna.api.storage.models.v1.KeyValue labels = 2; | ||
| repeated aruna.api.storage.models.v1.KeyValue hooks = 3; | ||
| } | ||
|
|
||
| message HookCallbackResponse{} | ||
|
|
||
| message ListHooksRequest{ | ||
| string project_id = 1; | ||
| } | ||
|
|
||
|
|
||
| message HookInfo { | ||
| string hook_id = 1; | ||
| Hook hook = 2; | ||
| Trigger trigger = 3; | ||
| uint64 timeout = 4; | ||
| } | ||
|
|
||
| message ListHooksResponse{ | ||
| repeated HookInfo infos = 1; | ||
| } |
This file contains hidden or 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 hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.