[#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>
This commit is contained in:
Evgenii Stratonikov 2022-01-29 16:33:11 +03:00 committed by Alex Vanin
parent 312071b9bd
commit a82ac0edcd

View file

@ -58,6 +58,11 @@ func (x *commonPrm) SetBearerToken(tok *token.BearerToken) {
x.opts = append(x.opts, client.WithBearer(tok)) 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. // SetXHeaders sets request X-Headers.
// //
// By default X-Headers will not be attached to the request. // 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 { type readPrmCommon struct {
commonPrm commonPrm
ttl uint32
} }
// SetNetmapEpoch sets the epoch number to be used to locate the object. // 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)) 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. // GetObjectPrm groups parameters of GetObject operation.
type GetObjectPrm struct { type GetObjectPrm struct {
readPrmCommon readPrmCommon