[#182] sdk/eacl: Implement convenient methods for adding object filters

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2020-10-27 20:20:01 +03:00 committed by Alex Vanin
parent 309c39481e
commit 6f45f713c1
4 changed files with 116 additions and 31 deletions

View file

@ -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()