Update to NeoFS API v1.1.0
This commit is contained in:
parent
d78a2c4488
commit
55a257f5ff
4 changed files with 11 additions and 11 deletions
|
@ -15,7 +15,7 @@ func (n *neofsObject) containerList(ctx context.Context) ([]refs.CID, error) {
|
|||
req.SetTTL(service.SingleForwardingTTL)
|
||||
req.SetVersion(APIVersion)
|
||||
|
||||
err := service.SignDataWithSessionToken(n.key, req)
|
||||
err := service.SignRequestData(n.key, req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
@ -72,7 +72,7 @@ func (n *neofsObject) objectSearchContainer(ctx context.Context, cid refs.CID) (
|
|||
req.SetVersion(APIVersion)
|
||||
req.SetToken(token)
|
||||
|
||||
err = service.SignDataWithSessionToken(n.key, req)
|
||||
err = service.SignRequestData(n.key, req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -156,7 +156,7 @@ func (n *neofsObject) objectFindID(ctx context.Context, cid refs.CID, name strin
|
|||
req.SetVersion(APIVersion)
|
||||
req.SetToken(token)
|
||||
|
||||
err = service.SignDataWithSessionToken(n.key, req)
|
||||
err = service.SignRequestData(n.key, req)
|
||||
if err != nil {
|
||||
return id, err
|
||||
}
|
||||
|
@ -232,7 +232,7 @@ func (n *neofsObject) objectHead(ctx context.Context, addr refs.Address) (*objec
|
|||
req.SetVersion(APIVersion)
|
||||
req.SetToken(token)
|
||||
|
||||
err = service.SignDataWithSessionToken(n.key, req)
|
||||
err = service.SignRequestData(n.key, req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -274,7 +274,7 @@ func (n *neofsObject) objectGet(ctx context.Context, p getParams) (*object.Objec
|
|||
req.SetVersion(APIVersion)
|
||||
req.SetToken(token)
|
||||
|
||||
err = service.SignDataWithSessionToken(n.key, req)
|
||||
err = service.SignRequestData(n.key, req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -388,7 +388,7 @@ func (n *neofsObject) objectPut(ctx context.Context, p putParams) (*object.Objec
|
|||
req.SetVersion(APIVersion)
|
||||
req.SetToken(token)
|
||||
|
||||
err = service.SignDataWithSessionToken(n.key, req)
|
||||
err = service.SignRequestData(n.key, req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -409,7 +409,7 @@ func (n *neofsObject) objectPut(ctx context.Context, p putParams) (*object.Objec
|
|||
req.SetTTL(service.SingleForwardingTTL)
|
||||
req.SetVersion(APIVersion)
|
||||
|
||||
err = service.SignDataWithSessionToken(n.key, req)
|
||||
err = service.SignRequestData(n.key, req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -478,7 +478,7 @@ func (n *neofsObject) storageGroupPut(ctx context.Context, p sgParams) (*object.
|
|||
req.SetVersion(APIVersion)
|
||||
req.SetToken(token)
|
||||
|
||||
err = service.SignDataWithSessionToken(n.key, req)
|
||||
err = service.SignRequestData(n.key, req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -514,7 +514,7 @@ func (n *neofsObject) objectDelete(ctx context.Context, p delParams) error {
|
|||
req.SetVersion(APIVersion)
|
||||
req.SetToken(token)
|
||||
|
||||
err = service.SignDataWithSessionToken(n.key, req)
|
||||
err = service.SignRequestData(n.key, req)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ func (n *neofsObject) statusHealth(ctx context.Context) bool {
|
|||
req.SetTTL(service.NonForwardingTTL)
|
||||
req.SetVersion(APIVersion)
|
||||
|
||||
err := service.SignDataWithSessionToken(n.key, req)
|
||||
err := service.SignRequestData(n.key, req)
|
||||
if err != nil {
|
||||
return false
|
||||
}
|
||||
|
|
|
@ -122,7 +122,7 @@ func New(l *zap.Logger, v *viper.Viper, key *ecdsa.PrivateKey) (Pool, error) {
|
|||
p.reqHealth = new(state.HealthRequest)
|
||||
p.reqHealth.SetTTL(service.NonForwardingTTL)
|
||||
|
||||
if err := service.SignDataWithSessionToken(key, p.reqHealth); err != nil {
|
||||
if err := service.SignRequestData(key, p.reqHealth); err != nil {
|
||||
return nil, errors.Wrap(err, "could not sign `HealthRequest`")
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue