feat: storage plugin list objects (#6723)
* feat(proto): add storage plugin proto definitions for session recording recovery Co-authored-by: Damian Debkowski <damian.debkowski@hashicorp.com> Co-authored-by: Ryan Derr <ryan.derr@hashicorp.com> * feat(gen): add generated storage plugin code for session recording recovery Co-authored-by: Damian Debkowski <damian.debkowski@hashicorp.com> Co-authored-by: Manjeet Singh <manjeet.singh@hashicorp.com> * feat(plugin): add plugin loopback support for session recording recovery Co-authored-by: Ryan Derr <ryan.derr@hashicorp.com> Co-authored-by: aditya2548 <aditya25dec2000@gmail.com> --------- Co-authored-by: Ryan Derr <ryan.derr@hashicorp.com> Co-authored-by: Manjeet Singh <manjeet.singh@hashicorp.com> Co-authored-by: aditya2548 <aditya25dec2000@gmail.com>
This commit is contained in:
9 files changed
+1771
-103
No files matched your search
@@ -45,17 +45,20 @@ service StoragePluginService {
|
||||
// deleted.
|
||||
rpc OnDeleteStorageBucket(OnDeleteStorageBucketRequest) returns (OnDeleteStorageBucketResponse);
|
||||
|
||||
// ValidatePermissions is a hook that checks if the secrets associated with
|
||||
// ValidatePermissions checks if the secrets associated with
|
||||
// the storage bucket meet the requirements of the plugin.
|
||||
rpc ValidatePermissions(ValidatePermissionsRequest) returns (ValidatePermissionsResponse);
|
||||
|
||||
// HeadObject is a hook that retrieves metadata about an object.
|
||||
// HeadObject returns metadata about an object.
|
||||
rpc HeadObject(HeadObjectRequest) returns (HeadObjectResponse);
|
||||
|
||||
// GetObject is a hook that retrieves objects.
|
||||
// GetObject returns object requested.
|
||||
rpc GetObject(GetObjectRequest) returns (stream GetObjectResponse);
|
||||
|
||||
// PutObject is a hook that reads a file stored on local disk and
|
||||
// ListObjects returns a list of objects within a storage bucket that matches the provided prefix.
|
||||
rpc ListObjects(ListObjectsRequest) returns (ListObjectsResponse);
|
||||
|
||||
// PutObject reads a file stored on local disk and
|
||||
// stores it to an external object store.
|
||||
rpc PutObject(PutObjectRequest) returns (PutObjectResponse);
|
||||
|
||||
@@ -157,6 +160,30 @@ message GetObjectResponse {
|
||||
bytes file_chunk = 10;
|
||||
}
|
||||
|
||||
message ListObjectsRequest {
|
||||
// Required. The existing state of the storage bucket.
|
||||
controller.api.resources.storagebuckets.v1.StorageBucket bucket = 10;
|
||||
|
||||
// Optional. The key prefix used to scope the object search.
|
||||
string key_prefix = 20;
|
||||
|
||||
// Optional. Flag to recursively list all objects under a given prefix.
|
||||
bool recursive = 30;
|
||||
}
|
||||
|
||||
message Object {
|
||||
// The object key defined within the object storage.
|
||||
string key = 10;
|
||||
|
||||
// Informs whether or not the object is a directory.
|
||||
bool is_dir = 20;
|
||||
}
|
||||
|
||||
message ListObjectsResponse {
|
||||
// A list of objects found under a provided prefix.
|
||||
repeated Object objects = 10;
|
||||
}
|
||||
|
||||
message PutObjectRequest {
|
||||
// Required. The existing state of the storage bucket.
|
||||
controller.api.resources.storagebuckets.v1.StorageBucket bucket = 10;
|
||||
|
||||
Reference in new issue
Block a user