[#225] Do not use wrappers on oneof object.HeadResponse types

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
Alex Vanin 2020-12-07 17:41:05 +03:00 committed by Alex Vanin
parent 6db6b569e0
commit 28aad71860
7 changed files with 35 additions and 162 deletions

View file

@ -151,14 +151,6 @@ type GetHeaderPart interface {
getHeaderPart()
}
type GetHeaderPartFull struct {
hdr *HeaderWithSignature
}
type GetHeaderPartShort struct {
hdr *ShortHeader
}
type HeadResponseBody struct {
hdrPart GetHeaderPart
}
@ -292,6 +284,8 @@ func (h *ShortHeader) SetPayloadLength(v uint64) {
}
}
func (h *ShortHeader) getHeaderPart() {}
func (a *Attribute) GetKey() string {
if a != nil {
return a.key
@ -586,6 +580,8 @@ func (h *HeaderWithSignature) SetSignature(v *refs.Signature) {
}
}
func (h *HeaderWithSignature) getHeaderPart() {}
func (o *Object) GetObjectID() *refs.ObjectID {
if o != nil {
return o.objectID
@ -1240,38 +1236,6 @@ func (r *HeadRequest) SetVerificationHeader(v *session.RequestVerificationHeader
}
}
func (h *GetHeaderPartFull) GetHeaderWithSignature() *HeaderWithSignature {
if h != nil {
return h.hdr
}
return nil
}
func (h *GetHeaderPartFull) SetHeaderWithSignature(v *HeaderWithSignature) {
if h != nil {
h.hdr = v
}
}
func (*GetHeaderPartFull) getHeaderPart() {}
func (h *GetHeaderPartShort) GetShortHeader() *ShortHeader {
if h != nil {
return h.hdr
}
return nil
}
func (h *GetHeaderPartShort) SetShortHeader(v *ShortHeader) {
if h != nil {
h.hdr = v
}
}
func (*GetHeaderPartShort) getHeaderPart() {}
func (r *HeadResponseBody) GetHeaderPart() GetHeaderPart {
if r != nil {
return r.hdrPart