[#172] v2/acl: Rename target keyList field to keys

According to new neofs-api target filed `key_list`
rename to `keys`.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
Alex Vanin 2020-10-19 15:39:13 +03:00 committed by Alex Vanin
parent 80b7033606
commit 5f6720f456
6 changed files with 12 additions and 12 deletions

View file

@ -205,7 +205,7 @@ func TargetToGRPCMessage(t *Target) *acl.EACLRecord_Target {
RoleToGRPCField(t.GetRole()),
)
m.SetKeyList(t.GetKeyList())
m.SetKeys(t.GetKeys())
return m
}
@ -222,7 +222,7 @@ func TargetInfoFromGRPCMessage(m *acl.EACLRecord_Target) *Target {
RoleFromGRPCField(m.GetRole()),
)
t.SetKeyList(m.GetKeyList())
t.SetKeys(m.GetKeys())
return t
}

View file

@ -88,10 +88,10 @@ func (m *EACLRecord_Target) SetRole(v Role) {
}
}
// SetKeyList sets key list of the eACL target.
func (m *EACLRecord_Target) SetKeyList(v [][]byte) {
// SetKeys of the eACL target.
func (m *EACLRecord_Target) SetKeys(v [][]byte) {
if m != nil {
m.KeyList = v
m.Keys = v
}
}

View file

@ -141,7 +141,7 @@ func TestTargetInfo_StableMarshal(t *testing.T) {
t.Run("non empty", func(t *testing.T) {
targetFrom.SetRole(acl.RoleUser)
targetFrom.SetKeyList([][]byte{
targetFrom.SetKeys([][]byte{
[]byte("Public Key 1"),
[]byte("Public Key 2"),
})

View file

@ -181,7 +181,7 @@ func (t *Target) SetRole(v Role) {
}
}
func (t *Target) GetKeyList() [][]byte {
func (t *Target) GetKeys() [][]byte {
if t != nil {
return t.keys
}
@ -189,7 +189,7 @@ func (t *Target) GetKeyList() [][]byte {
return nil
}
func (t *Target) SetKeyList(v [][]byte) {
func (t *Target) SetKeys(v [][]byte) {
if t != nil {
t.keys = v
}