forked from TrueCloudLab/frostfs-api-go
[#164] sdk/object: Define filters to search root objects
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
9799e5d48c
commit
09e6093e64
3 changed files with 60 additions and 0 deletions
|
@ -98,3 +98,15 @@ func (f SearchFilters) ToV2() []*v2object.SearchFilter {
|
|||
|
||||
return result
|
||||
}
|
||||
|
||||
func (f *SearchFilters) addRootFilter(val string) {
|
||||
f.AddFilter(KeyRoot, val, MatchStringEqual)
|
||||
}
|
||||
|
||||
func (f *SearchFilters) AddRootFilter() {
|
||||
f.addRootFilter(ValRoot)
|
||||
}
|
||||
|
||||
func (f *SearchFilters) AddNonRootFilter() {
|
||||
f.addRootFilter(ValNonRoot)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue