forked from TrueCloudLab/frostfs-sdk-go
[#225] container: Replace basic ACL code to a separate package
Create `acl` package inside `container` path. Replace basic ACL functionality into it. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
e82a2d86ef
commit
c4ebe8d854
14 changed files with 524 additions and 499 deletions
|
@ -2,6 +2,7 @@ package containertest
|
|||
|
||||
import (
|
||||
"github.com/nspcc-dev/neofs-sdk-go/container"
|
||||
"github.com/nspcc-dev/neofs-sdk-go/container/acl"
|
||||
cidtest "github.com/nspcc-dev/neofs-sdk-go/container/id/test"
|
||||
netmaptest "github.com/nspcc-dev/neofs-sdk-go/netmap/test"
|
||||
usertest "github.com/nspcc-dev/neofs-sdk-go/user/test"
|
||||
|
@ -31,7 +32,7 @@ func Container() *container.Container {
|
|||
x.SetVersion(&ver)
|
||||
x.SetAttributes(Attributes())
|
||||
x.SetOwnerID(usertest.ID())
|
||||
x.SetBasicACL(container.BasicACLPublicRW)
|
||||
x.SetBasicACL(BasicACL())
|
||||
p := netmaptest.PlacementPolicy()
|
||||
x.SetPlacementPolicy(&p)
|
||||
|
||||
|
@ -48,3 +49,9 @@ func UsedSpaceAnnouncement() *container.UsedSpaceAnnouncement {
|
|||
|
||||
return x
|
||||
}
|
||||
|
||||
// BasicACL returns random acl.Basic.
|
||||
func BasicACL() (x acl.Basic) {
|
||||
x.FromBits(0xffffffff)
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue