[#51] policy: Support Get and ListByPrefix methods #51

Merged
dkirillov merged 1 commit from dkirillov/frostfs-contract:feature/support_iam_operations into master 2024-09-04 19:51:17 +00:00
Member

Signed-off-by: Denis Kirillov d.kirillov@yadro.com

Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
dkirillov self-assigned this 2023-11-17 08:06:50 +00:00
dkirillov changed title from WIP: [#XX] policy: Support Get and ListByPrefix methods to WIP: [#51] policy: Support Get and ListByPrefix methods 2023-11-17 08:06:58 +00:00
dkirillov force-pushed feature/support_iam_operations from 3c8596090b to 9103b4f04d 2023-11-17 08:07:19 +00:00 Compare
dkirillov force-pushed feature/support_iam_operations from 9103b4f04d to e4d7bd44a8 2023-11-17 08:16:35 +00:00 Compare
dkirillov changed title from WIP: [#51] policy: Support Get and ListByPrefix methods to [#51] policy: Support Get and ListByPrefix methods 2023-11-17 08:19:47 +00:00
dkirillov requested review from storage-core-committers 2023-11-17 08:19:53 +00:00
dkirillov requested review from storage-services-committers 2023-11-17 08:19:54 +00:00
dkirillov requested review from storage-core-developers 2023-11-17 08:19:54 +00:00
dkirillov requested review from storage-services-developers 2023-11-17 08:19:54 +00:00
alexvanin approved these changes 2023-11-17 08:28:25 +00:00
dkirillov force-pushed feature/support_iam_operations from e4d7bd44a8 to d6ec60f5b8 2023-11-17 08:45:18 +00:00 Compare
dkirillov force-pushed feature/support_iam_operations from d6ec60f5b8 to 567a160ec3 2023-11-17 08:51:20 +00:00 Compare
dkirillov force-pushed feature/support_iam_operations from 567a160ec3 to 0961e1fe7b 2023-11-17 08:54:11 +00:00 Compare
dkirillov force-pushed feature/support_iam_operations from 0961e1fe7b to 71d250a807 2023-11-17 09:11:07 +00:00 Compare
dkirillov reviewed 2023-11-17 10:06:40 +00:00
@ -79,1 +90,4 @@
}
// ListChainsByPrefix list all chains for the provided kind and entity by prefix.
func ListChainsByPrefix(entity Kind, entityName, prefix string) [][]byte {
Author
Member

I cannot decide should the return value be slice or iterator.
In IAM we are going to use two type entity name (managed and inline) so it seems we can have more that 2048 chains for every entityName. But probably as prototype we can keep slice

I cannot decide should the return value be slice or iterator. In IAM we are going to use two type entity name (`managed` and `inline`) so it seems we can have more that 2048 chains for every `entityName`. But probably as prototype we can keep slice
dkirillov force-pushed feature/support_iam_operations from 71d250a807 to 768bb9d9da 2023-11-17 11:36:03 +00:00 Compare
dkirillov force-pushed feature/support_iam_operations from 768bb9d9da to 5cc34f98e9 2023-11-17 11:37:22 +00:00 Compare
fyrchik reviewed 2023-11-17 11:50:13 +00:00
@ -79,1 +90,4 @@
}
// ListChainsByPrefix list all chains for the provided kind and entity by prefix.
func ListChainsByPrefix(entity Kind, entityName, prefix string) [][]byte {
Owner

ListChains already can list by prefix, what is the usecase for this?

`ListChains` already can list by prefix, what is the usecase for this?
Author
Member

For i Kind

IAM = 'i'

For `i` Kind https://git.frostfs.info/TrueCloudLab/frostfs-contract/src/commit/dd5919348da9731f24504e7bc485516c2ba5f11c/policy/policy_contract.go#L16

So looks like you can just edit ListChains method definition or edit ListChains method implementation to use ListChainsByPrefix method.

So looks like you can just edit `ListChains` method definition or edit `ListChains` method implementation to use `ListChainsByPrefix` method.
dkirillov force-pushed feature/support_iam_operations from 663c53da84 to 20f86e96b2 2023-11-20 12:43:25 +00:00 Compare
aarifullin approved these changes 2023-11-21 10:12:07 +00:00
dstepanov-yadro approved these changes 2023-11-21 10:39:19 +00:00
pogpp approved these changes 2023-11-21 12:50:24 +00:00
fyrchik approved these changes 2023-11-22 07:53:59 +00:00
acid-ant approved these changes 2023-11-22 08:33:39 +00:00
dkirillov merged commit 20f86e96b2 into master 2023-11-22 08:35:24 +00:00
dkirillov deleted branch feature/support_iam_operations 2023-11-22 08:35:25 +00:00
dkirillov referenced this pull request from a commit 2023-11-22 08:35:27 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
7 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-contract#51
No description provided.