[#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:
parent
312071b9bd
commit
a82ac0edcd
1 changed files with 5 additions and 9 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue