forked from TrueCloudLab/frostfs-api-go
[#295] pkg: Remove usage of deprecated elements
Remove usage of deprecated of `container.ID` and `token.SessionToken` code elements. Replace using of custom message generators with the ones provided by packages. Replace string comparison with `Equal` method call. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
89be8d3f5a
commit
65080c8b69
22 changed files with 97 additions and 209 deletions
|
@ -1,6 +1,7 @@
|
|||
package container
|
||||
|
||||
import (
|
||||
cid "github.com/nspcc-dev/neofs-api-go/pkg/container/id"
|
||||
"github.com/nspcc-dev/neofs-api-go/v2/container"
|
||||
)
|
||||
|
||||
|
@ -30,14 +31,14 @@ func (a *UsedSpaceAnnouncement) SetEpoch(epoch uint64) {
|
|||
}
|
||||
|
||||
// ContainerID of the announcement.
|
||||
func (a *UsedSpaceAnnouncement) ContainerID() *ID {
|
||||
return NewIDFromV2(
|
||||
func (a *UsedSpaceAnnouncement) ContainerID() *cid.ID {
|
||||
return cid.NewFromV2(
|
||||
(*container.UsedSpaceAnnouncement)(a).GetContainerID(),
|
||||
)
|
||||
}
|
||||
|
||||
// SetContainerID sets announcement container value.
|
||||
func (a *UsedSpaceAnnouncement) SetContainerID(cid *ID) {
|
||||
func (a *UsedSpaceAnnouncement) SetContainerID(cid *cid.ID) {
|
||||
(*container.UsedSpaceAnnouncement)(a).SetContainerID(cid.ToV2())
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue