forked from TrueCloudLab/frostfs-s3-gw
[#346] Upgrade NeoFS SDK Go library
Core changes: - `object.ID` moved to new package `oid`; - `object.Address` moved to new package `address`; - `pool.Object` interface changes. Additionally: - Set container owner in `Agent.IssueSecret`. - Remove no longer needed fields from `GetObjectParams` - `Length` and `Offset` are never assigned. These values are set in `Range` field. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
6a4fba4d09
commit
34a221c5c9
28 changed files with 430 additions and 518 deletions
8
api/cache/objectslist.go
vendored
8
api/cache/objectslist.go
vendored
|
@ -7,7 +7,7 @@ import (
|
|||
|
||||
"github.com/bluele/gcache"
|
||||
cid "github.com/nspcc-dev/neofs-sdk-go/container/id"
|
||||
"github.com/nspcc-dev/neofs-sdk-go/object"
|
||||
oid "github.com/nspcc-dev/neofs-sdk-go/object/id"
|
||||
)
|
||||
|
||||
/*
|
||||
|
@ -55,13 +55,13 @@ func NewObjectsListCache(config *Config) *ObjectsListCache {
|
|||
}
|
||||
|
||||
// Get return list of ObjectInfo.
|
||||
func (l *ObjectsListCache) Get(key ObjectsListKey) []*object.ID {
|
||||
func (l *ObjectsListCache) Get(key ObjectsListKey) []oid.ID {
|
||||
entry, err := l.cache.Get(key)
|
||||
if err != nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
result, ok := entry.([]*object.ID)
|
||||
result, ok := entry.([]oid.ID)
|
||||
if !ok {
|
||||
return nil
|
||||
}
|
||||
|
@ -70,7 +70,7 @@ func (l *ObjectsListCache) Get(key ObjectsListKey) []*object.ID {
|
|||
}
|
||||
|
||||
// Put puts a list of objects to cache.
|
||||
func (l *ObjectsListCache) Put(key ObjectsListKey, oids []*object.ID) error {
|
||||
func (l *ObjectsListCache) Put(key ObjectsListKey, oids []oid.ID) error {
|
||||
if len(oids) == 0 {
|
||||
return fmt.Errorf("list is empty, cid: %s, prefix: %s", key.cid, key.prefix)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue