diff --git a/pkg/acl/eacl/record.go b/pkg/acl/eacl/record.go index fec9d500..9b9e7185 100644 --- a/pkg/acl/eacl/record.go +++ b/pkg/acl/eacl/record.go @@ -5,7 +5,7 @@ import ( "fmt" "github.com/nspcc-dev/neofs-api-go/pkg" - "github.com/nspcc-dev/neofs-api-go/pkg/container" + cid "github.com/nspcc-dev/neofs-api-go/pkg/container/id" "github.com/nspcc-dev/neofs-api-go/pkg/owner" v2acl "github.com/nspcc-dev/neofs-api-go/v2/acl" ) @@ -116,7 +116,7 @@ func (r *Record) AddObjectVersionFilter(m Match, v *pkg.Version) { } // AddObjectContainerIDFilter adds filter by object container ID. -func (r *Record) AddObjectContainerIDFilter(m Match, id *container.ID) { +func (r *Record) AddObjectContainerIDFilter(m Match, id *cid.ID) { r.addObjectReservedFilter(m, fKeyObjContainerID, id) } diff --git a/pkg/acl/eacl/table.go b/pkg/acl/eacl/table.go index 606d5b21..a3175293 100644 --- a/pkg/acl/eacl/table.go +++ b/pkg/acl/eacl/table.go @@ -4,7 +4,7 @@ import ( "crypto/sha256" "github.com/nspcc-dev/neofs-api-go/pkg" - "github.com/nspcc-dev/neofs-api-go/pkg/container" + cid "github.com/nspcc-dev/neofs-api-go/pkg/container/id" v2acl "github.com/nspcc-dev/neofs-api-go/v2/acl" ) @@ -13,17 +13,17 @@ import ( // Table is compatible with v2 acl.EACLTable message. type Table struct { version pkg.Version - cid *container.ID + cid *cid.ID records []*Record } // CID returns identifier of the container that should use given access control rules. -func (t Table) CID() *container.ID { +func (t Table) CID() *cid.ID { return t.cid } // SetCID sets identifier of the container that should use given access control rules. -func (t *Table) SetCID(cid *container.ID) { +func (t *Table) SetCID(cid *cid.ID) { t.cid = cid } @@ -77,7 +77,7 @@ func NewTable() *Table { } // CreateTable creates, initializes with parameters and returns Table instance. -func CreateTable(cid container.ID) *Table { +func CreateTable(cid cid.ID) *Table { t := NewTable() t.SetCID(&cid) @@ -102,14 +102,14 @@ func NewTableFromV2(table *v2acl.Table) *Table { } // set container id - if cid := table.GetContainerID(); cid != nil { + if id := table.GetContainerID(); id != nil { if t.cid == nil { - t.cid = new(container.ID) + t.cid = new(cid.ID) } var h [sha256.Size]byte - copy(h[:], table.GetContainerID().GetValue()) + copy(h[:], id.GetValue()) t.cid.SetSHA256(h) }