[#544] layer: Add session token parameter to DeleteBucketParams

Add `DeleteBucketParams.SessionToken` field in order to unify the
parameters with `CreateBucketParams` and `PutBucketACLParams`.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2022-06-22 16:22:28 +03:00 committed by Alex Vanin
parent 4fe833164e
commit f596c8be06
3 changed files with 16 additions and 10 deletions

View file

@ -151,7 +151,8 @@ type (
}
// DeleteBucketParams stores delete bucket request parameters.
DeleteBucketParams struct {
BktInfo *data.BucketInfo
BktInfo *data.BucketInfo
SessionToken *session.Container
}
// PutSystemObjectParams stores putSystemObject parameters.
@ -658,5 +659,5 @@ func (n *layer) DeleteBucket(ctx context.Context, p *DeleteBucketParams) error {
}
n.bucketCache.Delete(p.BktInfo.Name)
return n.deleteContainer(ctx, p.BktInfo.CID)
return n.deleteContainer(ctx, p.BktInfo.CID, p.SessionToken)
}