[#182] Rename methods to match updated field names

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2020-10-27 16:55:19 +03:00 committed by Alex Vanin
parent 5be034ab80
commit dc9fcd5d98
17 changed files with 47 additions and 47 deletions

View file

@ -64,7 +64,7 @@ func NewSearchFiltersFromV2(v2 []*v2object.SearchFilter) SearchFilters {
}
filters = append(filters, SearchFilter{
header: v2[i].GetName(),
header: v2[i].GetKey(),
value: v2[i].GetValue(),
op: SearchMatchFromV2(v2[i].GetMatchType()),
})
@ -89,7 +89,7 @@ func (f SearchFilters) ToV2() []*v2object.SearchFilter {
result := make([]*v2object.SearchFilter, 0, len(f))
for i := range f {
v2 := new(v2object.SearchFilter)
v2.SetName(f[i].header)
v2.SetKey(f[i].header)
v2.SetValue(f[i].value)
v2.SetMatchType(f[i].op.ToV2())