[#1023] services/object: remove TTL from `Get` parameters

It was unused an should be provided as a `CallOption` instead.

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
remotes/fyrchik/morph-wrappers
Evgenii Stratonikov 2022-01-29 16:33:11 +03:00 committed by Alex Vanin
parent 312071b9bd
commit a82ac0edcd
1 changed files with 5 additions and 9 deletions

View File

@ -58,6 +58,11 @@ func (x *commonPrm) SetBearerToken(tok *token.BearerToken) {
x.opts = append(x.opts, client.WithBearer(tok))
}
// SetTTL sets time-to-live call option.
func (x *commonPrm) SetTTL(ttl uint32) {
x.opts = append(x.opts, client.WithTTL(ttl))
}
// SetXHeaders sets request X-Headers.
//
// By default X-Headers will not be attached to the request.
@ -69,8 +74,6 @@ func (x *commonPrm) SetXHeaders(xhdrs []*session.XHeader) {
type readPrmCommon struct {
commonPrm
ttl uint32
}
// SetNetmapEpoch sets the epoch number to be used to locate the object.
@ -84,13 +87,6 @@ func (x *readPrmCommon) SetNetmapEpoch(epoch uint64) {
x.opts = append(x.opts, client.WithXHeader(xNetmapEpoch))
}
// SetTTL sets request TTL value.
//
// Required parameter.
func (x *readPrmCommon) SetTTL(ttl uint32) {
x.opts = append(x.opts, client.WithTTL(ttl))
}
// GetObjectPrm groups parameters of GetObject operation.
type GetObjectPrm struct {
readPrmCommon