forked from TrueCloudLab/frostfs-api-go
edf2e2d62f
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
17 lines
467 B
Go
17 lines
467 B
Go
package eacl_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/nspcc-dev/neofs-api-go/pkg/acl/eacl"
|
|
"github.com/nspcc-dev/neofs-crypto/test"
|
|
)
|
|
|
|
func TextExample(t *testing.T) {
|
|
record := eacl.CreateRecord(eacl.ActionDeny, eacl.OperationPut)
|
|
record.AddFilter(eacl.HeaderFromObject, eacl.MatchStringEqual, "filename", "cat.jpg")
|
|
record.AddTarget(eacl.RoleOthers, test.DecodeKey(1).PublicKey, test.DecodeKey(2).PublicKey)
|
|
|
|
table := eacl.NewTable()
|
|
table.AddRecord(record)
|
|
}
|