[#496] node: Fix linter importas

Standardize the alias of the
import frostfs-sdk-go/object as objectSDK.

Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
This commit is contained in:
Alexander Chuprov 2023-07-06 15:36:41 +03:00
parent 4bbe9cc936
commit 033eaf77e1
80 changed files with 444 additions and 443 deletions

View file

@ -10,7 +10,7 @@ import (
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/util/logger"
apiclient "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/client"
cid "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/container/id"
"git.frostfs.info/TrueCloudLab/frostfs-sdk-go/object"
objectSDK "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/object"
oid "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/object/id"
"go.uber.org/zap"
)
@ -29,11 +29,11 @@ type execCtx struct {
log *logger.Logger
tombstone *object.Tombstone
tombstone *objectSDK.Tombstone
splitInfo *object.SplitInfo
splitInfo *objectSDK.SplitInfo
tombstoneObj *object.Object
tombstoneObj *objectSDK.Object
}
const (
@ -241,9 +241,9 @@ func (exec *execCtx) initTombstoneObject() bool {
return false
}
exec.tombstoneObj = object.New()
exec.tombstoneObj = objectSDK.New()
exec.tombstoneObj.SetContainerID(exec.containerID())
exec.tombstoneObj.SetType(object.TypeTombstone)
exec.tombstoneObj.SetType(objectSDK.TypeTombstone)
exec.tombstoneObj.SetPayload(payload)
tokenSession := exec.commonParameters().SessionToken()
@ -256,7 +256,7 @@ func (exec *execCtx) initTombstoneObject() bool {
exec.tombstoneObj.SetOwnerID(&localUser)
}
var a object.Attribute
var a objectSDK.Attribute
a.SetKey(objectV2.SysAttributeExpEpoch)
a.SetValue(strconv.FormatUint(exec.tombstone.ExpirationEpoch(), 10))

View file

@ -4,7 +4,7 @@ import (
"context"
"git.frostfs.info/TrueCloudLab/frostfs-node/internal/logs"
"git.frostfs.info/TrueCloudLab/frostfs-sdk-go/object"
objectSDK "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/object"
oid "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/object/id"
"go.uber.org/zap"
)
@ -35,7 +35,7 @@ func (exec *execCtx) formTombstone(ctx context.Context) (ok bool) {
return false
}
exec.tombstone = object.NewTombstone()
exec.tombstone = objectSDK.NewTombstone()
exec.tombstone.SetExpirationEpoch(
exec.svc.netInfo.CurrentEpoch() + tsLifetime,
)

View file

@ -9,7 +9,7 @@ import (
searchsvc "git.frostfs.info/TrueCloudLab/frostfs-node/pkg/services/object/search"
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/services/object/util"
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/util/logger"
"git.frostfs.info/TrueCloudLab/frostfs-sdk-go/object"
objectSDK "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/object"
oid "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/object/id"
"git.frostfs.info/TrueCloudLab/frostfs-sdk-go/user"
"go.uber.org/zap"
@ -41,7 +41,7 @@ type cfg struct {
header interface {
// must return (nil, nil) for PHY objects
splitInfo(context.Context, *execCtx) (*object.SplitInfo, error)
splitInfo(context.Context, *execCtx) (*objectSDK.SplitInfo, error)
children(context.Context, *execCtx) ([]oid.ID, error)
@ -85,7 +85,7 @@ func New(opts ...Option) *Service {
// WithLogger returns option to specify Delete service's logger.
func WithLogger(l *logger.Logger) Option {
return func(c *cfg) {
c.log = &logger.Logger{Logger: l.With(zap.String("component", "Object.Delete service"))}
c.log = &logger.Logger{Logger: l.With(zap.String("component", "objectSDK.Delete service"))}
}
}

View file

@ -7,7 +7,7 @@ import (
getsvc "git.frostfs.info/TrueCloudLab/frostfs-node/pkg/services/object/get"
putsvc "git.frostfs.info/TrueCloudLab/frostfs-node/pkg/services/object/put"
searchsvc "git.frostfs.info/TrueCloudLab/frostfs-node/pkg/services/object/search"
"git.frostfs.info/TrueCloudLab/frostfs-sdk-go/object"
objectSDK "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/object"
oid "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/object/id"
)
@ -21,7 +21,7 @@ type simpleIDWriter struct {
ids []oid.ID
}
func (w *headSvcWrapper) headAddress(ctx context.Context, exec *execCtx, addr oid.Address) (*object.Object, error) {
func (w *headSvcWrapper) headAddress(ctx context.Context, exec *execCtx, addr oid.Address) (*objectSDK.Object, error) {
wr := getsvc.NewSimpleObjectWriter()
p := getsvc.HeadPrm{}
@ -38,10 +38,10 @@ func (w *headSvcWrapper) headAddress(ctx context.Context, exec *execCtx, addr oi
return wr.Object(), nil
}
func (w *headSvcWrapper) splitInfo(ctx context.Context, exec *execCtx) (*object.SplitInfo, error) {
func (w *headSvcWrapper) splitInfo(ctx context.Context, exec *execCtx) (*objectSDK.SplitInfo, error) {
_, err := w.headAddress(ctx, exec, exec.address())
var errSplitInfo *object.SplitInfoError
var errSplitInfo *objectSDK.SplitInfoError
switch {
case err == nil:
@ -83,8 +83,8 @@ func (w *headSvcWrapper) previous(ctx context.Context, exec *execCtx, id oid.ID)
}
func (w *searchSvcWrapper) splitMembers(ctx context.Context, exec *execCtx) ([]oid.ID, error) {
fs := object.SearchFilters{}
fs.AddSplitIDFilter(object.MatchStringEqual, exec.splitInfo.SplitID())
fs := objectSDK.SearchFilters{}
fs.AddSplitIDFilter(objectSDK.MatchStringEqual, exec.splitInfo.SplitID())
wr := new(simpleIDWriter)