[#496] node: Fix linter importas
All checks were successful
Build / Build Components (1.20) (pull_request) Successful in 3m52s
Build / Build Components (1.19) (pull_request) Successful in 4m1s
ci/woodpecker/pr/pre-commit Pipeline was successful
Tests and linters / Tests with -race (pull_request) Successful in 5m36s
Tests and linters / Tests (1.20) (pull_request) Successful in 5m55s
Tests and linters / Lint (pull_request) Successful in 14m40s
Tests and linters / Tests (1.19) (pull_request) Successful in 15m29s
ci/woodpecker/push/pre-commit Pipeline was successful
All checks were successful
Build / Build Components (1.20) (pull_request) Successful in 3m52s
Build / Build Components (1.19) (pull_request) Successful in 4m1s
ci/woodpecker/pr/pre-commit Pipeline was successful
Tests and linters / Tests with -race (pull_request) Successful in 5m36s
Tests and linters / Tests (1.20) (pull_request) Successful in 5m55s
Tests and linters / Lint (pull_request) Successful in 14m40s
Tests and linters / Tests (1.19) (pull_request) Successful in 15m29s
ci/woodpecker/push/pre-commit Pipeline was successful
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:
parent
4bbe9cc936
commit
033eaf77e1
80 changed files with 444 additions and 443 deletions
|
@ -5,7 +5,7 @@ import (
|
|||
"fmt"
|
||||
|
||||
objectCore "git.frostfs.info/TrueCloudLab/frostfs-node/pkg/core/object"
|
||||
"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/object/transformer"
|
||||
)
|
||||
|
@ -14,7 +14,7 @@ import (
|
|||
type ObjectStorage interface {
|
||||
// Put must save passed object
|
||||
// and return any appeared error.
|
||||
Put(context.Context, *object.Object) error
|
||||
Put(context.Context, *objectSDK.Object) error
|
||||
// Delete must delete passed objects
|
||||
// and return any appeared error.
|
||||
Delete(ctx context.Context, tombstone oid.Address, toDelete []oid.ID) error
|
||||
|
@ -28,11 +28,11 @@ type ObjectStorage interface {
|
|||
type localTarget struct {
|
||||
storage ObjectStorage
|
||||
|
||||
obj *object.Object
|
||||
obj *objectSDK.Object
|
||||
meta objectCore.ContentMeta
|
||||
}
|
||||
|
||||
func (t *localTarget) WriteObject(obj *object.Object, meta objectCore.ContentMeta) error {
|
||||
func (t *localTarget) WriteObject(obj *objectSDK.Object, meta objectCore.ContentMeta) error {
|
||||
t.obj = obj
|
||||
t.meta = meta
|
||||
|
||||
|
@ -41,12 +41,12 @@ func (t *localTarget) WriteObject(obj *object.Object, meta objectCore.ContentMet
|
|||
|
||||
func (t *localTarget) Close(ctx context.Context) (*transformer.AccessIdentifiers, error) {
|
||||
switch t.meta.Type() {
|
||||
case object.TypeTombstone:
|
||||
case objectSDK.TypeTombstone:
|
||||
err := t.storage.Delete(ctx, objectCore.AddressOf(t.obj), t.meta.Objects())
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("could not delete objects from tombstone locally: %w", err)
|
||||
}
|
||||
case object.TypeLock:
|
||||
case objectSDK.TypeLock:
|
||||
err := t.storage.Lock(ctx, objectCore.AddressOf(t.obj), t.meta.Objects())
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("could not lock object from lock objects locally: %w", err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue