forked from TrueCloudLab/frostfs-api-go
[#139] v2/acl: Rename TargetInfo to Target
Corresponds with proto definition. Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
parent
3c7c363002
commit
182a3af9b8
6 changed files with 24 additions and 24 deletions
|
@ -10,8 +10,8 @@ import (
|
|||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func generateTarget(u acl.Role, k int) *acl.TargetInfo {
|
||||
target := new(acl.TargetInfo)
|
||||
func generateTarget(u acl.Role, k int) *acl.Target {
|
||||
target := new(acl.Target)
|
||||
target.SetRole(u)
|
||||
|
||||
keys := make([][]byte, k)
|
||||
|
@ -44,7 +44,7 @@ func generateRecord(another bool) *acl.Record {
|
|||
|
||||
record.SetOperation(acl.OperationHead)
|
||||
record.SetAction(acl.ActionDeny)
|
||||
record.SetTargets([]*acl.TargetInfo{t1})
|
||||
record.SetTargets([]*acl.Target{t1})
|
||||
record.SetFilters([]*acl.HeaderFilter{f1})
|
||||
default:
|
||||
t1 := generateTarget(acl.RoleUser, 2)
|
||||
|
@ -54,7 +54,7 @@ func generateRecord(another bool) *acl.Record {
|
|||
|
||||
record.SetOperation(acl.OperationPut)
|
||||
record.SetAction(acl.ActionAllow)
|
||||
record.SetTargets([]*acl.TargetInfo{t1, t2})
|
||||
record.SetTargets([]*acl.Target{t1, t2})
|
||||
record.SetFilters([]*acl.HeaderFilter{f1, f2})
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue