forked from TrueCloudLab/frostfs-api-go
[#182] sdk/eacl: Implement convenient methods for adding object filters
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
309c39481e
commit
6f45f713c1
4 changed files with 116 additions and 31 deletions
|
@ -60,18 +60,8 @@ func TestRecord_AddTarget(t *testing.T) {
|
|||
|
||||
func TestRecord_AddFilter(t *testing.T) {
|
||||
filters := []Filter{
|
||||
{
|
||||
from: HeaderFromObject,
|
||||
key: "some name",
|
||||
matcher: MatchStringEqual,
|
||||
value: "ContainerID",
|
||||
},
|
||||
{
|
||||
from: HeaderFromRequest,
|
||||
key: "X-Header-Name",
|
||||
matcher: MatchStringNotEqual,
|
||||
value: "X-Header-Value",
|
||||
},
|
||||
*newObjectFilter(MatchStringEqual, "some name", "ContainerID"),
|
||||
*newObjectFilter(MatchStringNotEqual, "X-Header-Name", "X-Header-Value"),
|
||||
}
|
||||
|
||||
r := NewRecord()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue