2020-08-17 17:26:25 +00:00
|
|
|
package object
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/nspcc-dev/neofs-api-go/v2/refs"
|
2020-08-20 10:41:55 +00:00
|
|
|
"github.com/nspcc-dev/neofs-api-go/v2/session"
|
2020-08-17 17:26:25 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
type Type uint32
|
|
|
|
|
|
|
|
type MatchType uint32
|
|
|
|
|
|
|
|
type ShortHeader struct {
|
2020-08-20 09:43:47 +00:00
|
|
|
version *refs.Version
|
2020-08-17 17:26:25 +00:00
|
|
|
|
|
|
|
creatEpoch uint64
|
|
|
|
|
|
|
|
ownerID *refs.OwnerID
|
|
|
|
|
|
|
|
typ Type
|
|
|
|
|
|
|
|
payloadLen uint64
|
2020-12-17 10:18:07 +00:00
|
|
|
|
|
|
|
payloadHash, homoHash *refs.Checksum
|
2020-08-17 17:26:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type Attribute struct {
|
|
|
|
key, val string
|
|
|
|
}
|
|
|
|
|
|
|
|
type SplitHeader struct {
|
|
|
|
par, prev *refs.ObjectID
|
|
|
|
|
2020-08-20 09:43:47 +00:00
|
|
|
parSig *refs.Signature
|
2020-08-17 17:26:25 +00:00
|
|
|
|
|
|
|
parHdr *Header
|
|
|
|
|
2022-03-01 12:50:09 +00:00
|
|
|
children []refs.ObjectID
|
2020-11-24 17:14:03 +00:00
|
|
|
|
|
|
|
splitID []byte
|
2020-08-17 17:26:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type Header struct {
|
2020-08-20 09:43:47 +00:00
|
|
|
version *refs.Version
|
2020-08-17 17:26:25 +00:00
|
|
|
|
|
|
|
cid *refs.ContainerID
|
|
|
|
|
|
|
|
ownerID *refs.OwnerID
|
|
|
|
|
|
|
|
creatEpoch uint64
|
|
|
|
|
|
|
|
payloadLen uint64
|
|
|
|
|
2020-08-20 08:48:35 +00:00
|
|
|
payloadHash, homoHash *refs.Checksum
|
2020-08-17 17:26:25 +00:00
|
|
|
|
|
|
|
typ Type
|
|
|
|
|
2022-02-25 07:36:46 +00:00
|
|
|
sessionToken *session.Token
|
2020-08-17 17:26:25 +00:00
|
|
|
|
2022-02-28 12:06:51 +00:00
|
|
|
attr []Attribute
|
2020-08-17 17:26:25 +00:00
|
|
|
|
|
|
|
split *SplitHeader
|
|
|
|
}
|
|
|
|
|
2020-09-08 10:39:13 +00:00
|
|
|
type HeaderWithSignature struct {
|
|
|
|
header *Header
|
|
|
|
|
|
|
|
signature *refs.Signature
|
|
|
|
}
|
|
|
|
|
2020-08-17 17:26:25 +00:00
|
|
|
type Object struct {
|
|
|
|
objectID *refs.ObjectID
|
|
|
|
|
2020-08-20 09:43:47 +00:00
|
|
|
idSig *refs.Signature
|
2020-08-17 17:26:25 +00:00
|
|
|
|
|
|
|
header *Header
|
|
|
|
|
|
|
|
payload []byte
|
|
|
|
}
|
|
|
|
|
2020-12-02 10:10:43 +00:00
|
|
|
type SplitInfo struct {
|
|
|
|
splitID []byte
|
|
|
|
|
|
|
|
lastPart *refs.ObjectID
|
|
|
|
|
|
|
|
link *refs.ObjectID
|
|
|
|
}
|
|
|
|
|
2020-08-18 10:23:26 +00:00
|
|
|
type GetRequestBody struct {
|
|
|
|
addr *refs.Address
|
|
|
|
|
|
|
|
raw bool
|
|
|
|
}
|
|
|
|
|
|
|
|
type GetObjectPart interface {
|
|
|
|
getObjectPart()
|
|
|
|
}
|
|
|
|
|
|
|
|
type GetObjectPartInit struct {
|
|
|
|
id *refs.ObjectID
|
|
|
|
|
2020-08-20 09:43:47 +00:00
|
|
|
sig *refs.Signature
|
2020-08-18 10:23:26 +00:00
|
|
|
|
|
|
|
hdr *Header
|
|
|
|
}
|
|
|
|
|
|
|
|
type GetObjectPartChunk struct {
|
|
|
|
chunk []byte
|
|
|
|
}
|
|
|
|
|
2021-03-12 12:57:23 +00:00
|
|
|
type GetRequest struct {
|
|
|
|
body *GetRequestBody
|
|
|
|
|
|
|
|
session.RequestHeaders
|
|
|
|
}
|
|
|
|
|
2020-08-18 10:23:26 +00:00
|
|
|
type GetResponseBody struct {
|
|
|
|
objPart GetObjectPart
|
|
|
|
}
|
|
|
|
|
|
|
|
type PutObjectPart interface {
|
|
|
|
putObjectPart()
|
|
|
|
}
|
|
|
|
|
|
|
|
type PutObjectPartInit struct {
|
|
|
|
id *refs.ObjectID
|
|
|
|
|
2020-08-20 09:43:47 +00:00
|
|
|
sig *refs.Signature
|
2020-08-18 10:23:26 +00:00
|
|
|
|
|
|
|
hdr *Header
|
|
|
|
|
|
|
|
copyNum uint32
|
|
|
|
}
|
|
|
|
|
|
|
|
type PutObjectPartChunk struct {
|
|
|
|
chunk []byte
|
|
|
|
}
|
|
|
|
|
2021-03-12 12:57:23 +00:00
|
|
|
type GetResponse struct {
|
|
|
|
body *GetResponseBody
|
|
|
|
|
|
|
|
session.ResponseHeaders
|
|
|
|
}
|
|
|
|
|
2020-08-18 10:23:26 +00:00
|
|
|
type PutRequestBody struct {
|
|
|
|
objPart PutObjectPart
|
|
|
|
}
|
|
|
|
|
2021-03-12 12:57:23 +00:00
|
|
|
type PutRequest struct {
|
|
|
|
body *PutRequestBody
|
|
|
|
|
|
|
|
session.RequestHeaders
|
|
|
|
}
|
|
|
|
|
2020-08-18 10:23:26 +00:00
|
|
|
type PutResponseBody struct {
|
|
|
|
id *refs.ObjectID
|
|
|
|
}
|
|
|
|
|
2021-03-12 12:57:23 +00:00
|
|
|
type PutResponse struct {
|
|
|
|
body *PutResponseBody
|
|
|
|
|
|
|
|
session.ResponseHeaders
|
|
|
|
}
|
|
|
|
|
2020-08-18 10:23:26 +00:00
|
|
|
type DeleteRequestBody struct {
|
|
|
|
addr *refs.Address
|
|
|
|
}
|
|
|
|
|
2021-03-12 12:57:23 +00:00
|
|
|
type DeleteRequest struct {
|
|
|
|
body *DeleteRequestBody
|
|
|
|
|
|
|
|
session.RequestHeaders
|
|
|
|
}
|
|
|
|
|
2020-12-10 09:15:17 +00:00
|
|
|
type DeleteResponseBody struct {
|
|
|
|
tombstone *refs.Address
|
|
|
|
}
|
2020-08-18 10:23:26 +00:00
|
|
|
|
2021-03-12 12:57:23 +00:00
|
|
|
type DeleteResponse struct {
|
|
|
|
body *DeleteResponseBody
|
|
|
|
|
|
|
|
session.ResponseHeaders
|
|
|
|
}
|
|
|
|
|
2020-08-18 10:23:26 +00:00
|
|
|
type HeadRequestBody struct {
|
|
|
|
addr *refs.Address
|
|
|
|
|
|
|
|
mainOnly, raw bool
|
|
|
|
}
|
|
|
|
|
|
|
|
type GetHeaderPart interface {
|
|
|
|
getHeaderPart()
|
|
|
|
}
|
|
|
|
|
2021-03-12 12:57:23 +00:00
|
|
|
type HeadRequest struct {
|
|
|
|
body *HeadRequestBody
|
|
|
|
|
|
|
|
session.RequestHeaders
|
|
|
|
}
|
|
|
|
|
2020-08-18 10:23:26 +00:00
|
|
|
type HeadResponseBody struct {
|
|
|
|
hdrPart GetHeaderPart
|
|
|
|
}
|
|
|
|
|
2021-03-12 12:57:23 +00:00
|
|
|
type HeadResponse struct {
|
|
|
|
body *HeadResponseBody
|
|
|
|
|
|
|
|
session.ResponseHeaders
|
|
|
|
}
|
|
|
|
|
2020-08-18 10:23:26 +00:00
|
|
|
type SearchFilter struct {
|
|
|
|
matchType MatchType
|
|
|
|
|
2020-10-27 13:55:19 +00:00
|
|
|
key, val string
|
2020-08-18 10:23:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type SearchRequestBody struct {
|
|
|
|
cid *refs.ContainerID
|
|
|
|
|
|
|
|
version uint32
|
|
|
|
|
2022-03-02 08:03:56 +00:00
|
|
|
filters []SearchFilter
|
2020-08-18 10:23:26 +00:00
|
|
|
}
|
|
|
|
|
2021-03-12 12:57:23 +00:00
|
|
|
type SearchRequest struct {
|
|
|
|
body *SearchRequestBody
|
|
|
|
|
|
|
|
session.RequestHeaders
|
|
|
|
}
|
|
|
|
|
2020-08-18 10:23:26 +00:00
|
|
|
type SearchResponseBody struct {
|
2022-03-01 12:50:09 +00:00
|
|
|
idList []refs.ObjectID
|
2020-08-18 10:23:26 +00:00
|
|
|
}
|
|
|
|
|
2021-03-12 12:57:23 +00:00
|
|
|
type SearchResponse struct {
|
|
|
|
body *SearchResponseBody
|
|
|
|
|
|
|
|
session.ResponseHeaders
|
|
|
|
}
|
|
|
|
|
2020-08-18 10:23:26 +00:00
|
|
|
type Range struct {
|
|
|
|
off, len uint64
|
|
|
|
}
|
|
|
|
|
|
|
|
type GetRangeRequestBody struct {
|
|
|
|
addr *refs.Address
|
|
|
|
|
|
|
|
rng *Range
|
2020-12-07 15:59:01 +00:00
|
|
|
|
|
|
|
raw bool
|
2020-08-18 10:23:26 +00:00
|
|
|
}
|
|
|
|
|
2021-03-12 12:57:23 +00:00
|
|
|
type GetRangeRequest struct {
|
|
|
|
body *GetRangeRequestBody
|
|
|
|
|
|
|
|
session.RequestHeaders
|
|
|
|
}
|
|
|
|
|
2020-12-07 15:59:01 +00:00
|
|
|
type GetRangePart interface {
|
|
|
|
getRangePart()
|
|
|
|
}
|
|
|
|
|
|
|
|
type GetRangePartChunk struct {
|
2020-08-18 10:23:26 +00:00
|
|
|
chunk []byte
|
|
|
|
}
|
|
|
|
|
2020-12-07 15:59:01 +00:00
|
|
|
type GetRangeResponseBody struct {
|
|
|
|
rngPart GetRangePart
|
|
|
|
}
|
|
|
|
|
2021-03-12 12:57:23 +00:00
|
|
|
type GetRangeResponse struct {
|
|
|
|
body *GetRangeResponseBody
|
|
|
|
|
|
|
|
session.ResponseHeaders
|
|
|
|
}
|
|
|
|
|
2020-08-18 10:23:26 +00:00
|
|
|
type GetRangeHashRequestBody struct {
|
|
|
|
addr *refs.Address
|
|
|
|
|
2022-03-02 08:03:56 +00:00
|
|
|
rngs []Range
|
2020-08-18 10:23:26 +00:00
|
|
|
|
|
|
|
salt []byte
|
2020-08-20 08:48:35 +00:00
|
|
|
|
|
|
|
typ refs.ChecksumType
|
2020-08-18 10:23:26 +00:00
|
|
|
}
|
|
|
|
|
2021-03-12 12:57:23 +00:00
|
|
|
type GetRangeHashRequest struct {
|
|
|
|
body *GetRangeHashRequestBody
|
|
|
|
|
|
|
|
session.RequestHeaders
|
|
|
|
}
|
|
|
|
|
2020-08-18 10:23:26 +00:00
|
|
|
type GetRangeHashResponseBody struct {
|
2020-08-20 08:48:35 +00:00
|
|
|
typ refs.ChecksumType
|
|
|
|
|
2020-08-18 10:23:26 +00:00
|
|
|
hashList [][]byte
|
|
|
|
}
|
|
|
|
|
2021-03-12 12:57:23 +00:00
|
|
|
type GetRangeHashResponse struct {
|
|
|
|
body *GetRangeHashResponseBody
|
|
|
|
|
|
|
|
session.ResponseHeaders
|
|
|
|
}
|
|
|
|
|
2020-08-17 17:26:25 +00:00
|
|
|
const (
|
|
|
|
TypeRegular Type = iota
|
|
|
|
TypeTombstone
|
|
|
|
TypeStorageGroup
|
2022-02-21 17:57:27 +00:00
|
|
|
TypeLock
|
2020-08-17 17:26:25 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
const (
|
|
|
|
MatchUnknown MatchType = iota
|
|
|
|
MatchStringEqual
|
2021-02-01 17:57:18 +00:00
|
|
|
MatchStringNotEqual
|
|
|
|
MatchNotPresent
|
2021-08-16 11:58:57 +00:00
|
|
|
MatchCommonPrefix
|
2020-08-17 17:26:25 +00:00
|
|
|
)
|
|
|
|
|
2020-08-20 09:43:47 +00:00
|
|
|
func (h *ShortHeader) GetVersion() *refs.Version {
|
2020-08-17 17:26:25 +00:00
|
|
|
if h != nil {
|
|
|
|
return h.version
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2020-08-20 09:43:47 +00:00
|
|
|
func (h *ShortHeader) SetVersion(v *refs.Version) {
|
2022-03-23 11:42:57 +00:00
|
|
|
h.version = v
|
2020-08-17 17:26:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (h *ShortHeader) GetCreationEpoch() uint64 {
|
|
|
|
if h != nil {
|
|
|
|
return h.creatEpoch
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
func (h *ShortHeader) SetCreationEpoch(v uint64) {
|
2022-03-23 11:42:57 +00:00
|
|
|
h.creatEpoch = v
|
2020-08-17 17:26:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (h *ShortHeader) GetOwnerID() *refs.OwnerID {
|
|
|
|
if h != nil {
|
|
|
|
return h.ownerID
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (h *ShortHeader) SetOwnerID(v *refs.OwnerID) {
|
2022-03-23 11:42:57 +00:00
|
|
|
h.ownerID = v
|
2020-08-17 17:26:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (h *ShortHeader) GetObjectType() Type {
|
|
|
|
if h != nil {
|
|
|
|
return h.typ
|
|
|
|
}
|
|
|
|
|
|
|
|
return TypeRegular
|
|
|
|
}
|
|
|
|
|
|
|
|
func (h *ShortHeader) SetObjectType(v Type) {
|
2022-03-23 11:42:57 +00:00
|
|
|
h.typ = v
|
2020-08-17 17:26:25 +00:00
|
|
|
}
|
|
|
|
|
2020-08-18 10:23:26 +00:00
|
|
|
func (h *ShortHeader) GetPayloadLength() uint64 {
|
2020-08-17 17:26:25 +00:00
|
|
|
if h != nil {
|
|
|
|
return h.payloadLen
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
func (h *ShortHeader) SetPayloadLength(v uint64) {
|
2022-03-23 11:42:57 +00:00
|
|
|
h.payloadLen = v
|
2020-08-17 17:26:25 +00:00
|
|
|
}
|
|
|
|
|
2020-12-17 10:18:07 +00:00
|
|
|
func (h *ShortHeader) GetPayloadHash() *refs.Checksum {
|
|
|
|
if h != nil {
|
|
|
|
return h.payloadHash
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (h *ShortHeader) SetPayloadHash(v *refs.Checksum) {
|
2022-03-23 11:42:57 +00:00
|
|
|
h.payloadHash = v
|
2020-12-17 10:18:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (h *ShortHeader) GetHomomorphicHash() *refs.Checksum {
|
|
|
|
if h != nil {
|
|
|
|
return h.homoHash
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (h *ShortHeader) SetHomomorphicHash(v *refs.Checksum) {
|
2022-03-23 11:42:57 +00:00
|
|
|
h.homoHash = v
|
2020-12-17 10:18:07 +00:00
|
|
|
}
|
|
|
|
|
2020-12-07 14:41:05 +00:00
|
|
|
func (h *ShortHeader) getHeaderPart() {}
|
|
|
|
|
2020-08-17 17:26:25 +00:00
|
|
|
func (a *Attribute) GetKey() string {
|
|
|
|
if a != nil {
|
|
|
|
return a.key
|
|
|
|
}
|
|
|
|
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
|
|
|
func (a *Attribute) SetKey(v string) {
|
2022-03-23 11:42:57 +00:00
|
|
|
a.key = v
|
2020-08-17 17:26:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (a *Attribute) GetValue() string {
|
|
|
|
if a != nil {
|
|
|
|
return a.val
|
|
|
|
}
|
|
|
|
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
|
|
|
func (a *Attribute) SetValue(v string) {
|
2022-03-23 11:42:57 +00:00
|
|
|
a.val = v
|
2020-08-17 17:26:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (h *SplitHeader) GetParent() *refs.ObjectID {
|
|
|
|
if h != nil {
|
|
|
|
return h.par
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (h *SplitHeader) SetParent(v *refs.ObjectID) {
|
2022-03-23 11:42:57 +00:00
|
|
|
h.par = v
|
2020-08-17 17:26:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (h *SplitHeader) GetPrevious() *refs.ObjectID {
|
|
|
|
if h != nil {
|
|
|
|
return h.prev
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (h *SplitHeader) SetPrevious(v *refs.ObjectID) {
|
2022-03-23 11:42:57 +00:00
|
|
|
h.prev = v
|
2020-08-17 17:26:25 +00:00
|
|
|
}
|
|
|
|
|
2020-08-20 09:43:47 +00:00
|
|
|
func (h *SplitHeader) GetParentSignature() *refs.Signature {
|
2020-08-17 17:26:25 +00:00
|
|
|
if h != nil {
|
|
|
|
return h.parSig
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2020-08-20 09:43:47 +00:00
|
|
|
func (h *SplitHeader) SetParentSignature(v *refs.Signature) {
|
2022-03-23 11:42:57 +00:00
|
|
|
h.parSig = v
|
2020-08-17 17:26:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (h *SplitHeader) GetParentHeader() *Header {
|
|
|
|
if h != nil {
|
|
|
|
return h.parHdr
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (h *SplitHeader) SetParentHeader(v *Header) {
|
2022-03-23 11:42:57 +00:00
|
|
|
h.parHdr = v
|
2020-08-17 17:26:25 +00:00
|
|
|
}
|
|
|
|
|
2022-03-01 12:50:09 +00:00
|
|
|
func (h *SplitHeader) GetChildren() []refs.ObjectID {
|
2020-08-17 17:26:25 +00:00
|
|
|
if h != nil {
|
|
|
|
return h.children
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2022-03-01 12:50:09 +00:00
|
|
|
func (h *SplitHeader) SetChildren(v []refs.ObjectID) {
|
2022-03-23 11:42:57 +00:00
|
|
|
h.children = v
|
2020-08-17 17:26:25 +00:00
|
|
|
}
|
|
|
|
|
2020-11-24 17:14:03 +00:00
|
|
|
func (h *SplitHeader) GetSplitID() []byte {
|
|
|
|
if h != nil {
|
|
|
|
return h.splitID
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (h *SplitHeader) SetSplitID(v []byte) {
|
2022-03-23 11:42:57 +00:00
|
|
|
h.splitID = v
|
2020-11-24 17:14:03 +00:00
|
|
|
}
|
|
|
|
|
2020-08-20 09:43:47 +00:00
|
|
|
func (h *Header) GetVersion() *refs.Version {
|
2020-08-17 17:26:25 +00:00
|
|
|
if h != nil {
|
|
|
|
return h.version
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2020-08-20 09:43:47 +00:00
|
|
|
func (h *Header) SetVersion(v *refs.Version) {
|
2022-03-23 11:42:57 +00:00
|
|
|
h.version = v
|
2020-08-17 17:26:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (h *Header) GetContainerID() *refs.ContainerID {
|
|
|
|
if h != nil {
|
|
|
|
return h.cid
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (h *Header) SetContainerID(v *refs.ContainerID) {
|
2022-03-23 11:42:57 +00:00
|
|
|
h.cid = v
|
2020-08-17 17:26:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (h *Header) GetOwnerID() *refs.OwnerID {
|
|
|
|
if h != nil {
|
|
|
|
return h.ownerID
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (h *Header) SetOwnerID(v *refs.OwnerID) {
|
2022-03-23 11:42:57 +00:00
|
|
|
h.ownerID = v
|
2020-08-17 17:26:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (h *Header) GetCreationEpoch() uint64 {
|
|
|
|
if h != nil {
|
|
|
|
return h.creatEpoch
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
func (h *Header) SetCreationEpoch(v uint64) {
|
2022-03-23 11:42:57 +00:00
|
|
|
h.creatEpoch = v
|
2020-08-17 17:26:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (h *Header) GetPayloadLength() uint64 {
|
|
|
|
if h != nil {
|
|
|
|
return h.payloadLen
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
func (h *Header) SetPayloadLength(v uint64) {
|
2022-03-23 11:42:57 +00:00
|
|
|
h.payloadLen = v
|
2020-08-17 17:26:25 +00:00
|
|
|
}
|
|
|
|
|
2020-08-20 08:48:35 +00:00
|
|
|
func (h *Header) GetPayloadHash() *refs.Checksum {
|
2020-08-17 17:26:25 +00:00
|
|
|
if h != nil {
|
|
|
|
return h.payloadHash
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2020-08-20 08:48:35 +00:00
|
|
|
func (h *Header) SetPayloadHash(v *refs.Checksum) {
|
2022-03-23 11:42:57 +00:00
|
|
|
h.payloadHash = v
|
2020-08-17 17:26:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (h *Header) GetObjectType() Type {
|
|
|
|
if h != nil {
|
|
|
|
return h.typ
|
|
|
|
}
|
|
|
|
|
|
|
|
return TypeRegular
|
|
|
|
}
|
|
|
|
|
|
|
|
func (h *Header) SetObjectType(v Type) {
|
2022-03-23 11:42:57 +00:00
|
|
|
h.typ = v
|
2020-08-17 17:26:25 +00:00
|
|
|
}
|
|
|
|
|
2020-08-20 08:48:35 +00:00
|
|
|
func (h *Header) GetHomomorphicHash() *refs.Checksum {
|
2020-08-17 17:26:25 +00:00
|
|
|
if h != nil {
|
|
|
|
return h.homoHash
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2020-08-20 08:48:35 +00:00
|
|
|
func (h *Header) SetHomomorphicHash(v *refs.Checksum) {
|
2022-03-23 11:42:57 +00:00
|
|
|
h.homoHash = v
|
2020-08-17 17:26:25 +00:00
|
|
|
}
|
|
|
|
|
2022-02-25 07:36:46 +00:00
|
|
|
func (h *Header) GetSessionToken() *session.Token {
|
2020-08-17 17:26:25 +00:00
|
|
|
if h != nil {
|
|
|
|
return h.sessionToken
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2022-02-25 07:36:46 +00:00
|
|
|
func (h *Header) SetSessionToken(v *session.Token) {
|
2022-03-23 11:42:57 +00:00
|
|
|
h.sessionToken = v
|
2020-08-17 17:26:25 +00:00
|
|
|
}
|
|
|
|
|
2022-02-28 12:06:51 +00:00
|
|
|
func (h *Header) GetAttributes() []Attribute {
|
2020-08-17 17:26:25 +00:00
|
|
|
if h != nil {
|
|
|
|
return h.attr
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2022-02-28 12:06:51 +00:00
|
|
|
func (h *Header) SetAttributes(v []Attribute) {
|
2022-03-23 11:42:57 +00:00
|
|
|
h.attr = v
|
2020-08-17 17:26:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (h *Header) GetSplit() *SplitHeader {
|
|
|
|
if h != nil {
|
|
|
|
return h.split
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (h *Header) SetSplit(v *SplitHeader) {
|
2022-03-23 11:42:57 +00:00
|
|
|
h.split = v
|
2020-08-17 17:26:25 +00:00
|
|
|
}
|
|
|
|
|
2020-09-08 10:39:13 +00:00
|
|
|
func (h *HeaderWithSignature) GetHeader() *Header {
|
|
|
|
if h != nil {
|
|
|
|
return h.header
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (h *HeaderWithSignature) SetHeader(v *Header) {
|
2022-03-23 11:42:57 +00:00
|
|
|
h.header = v
|
2020-09-08 10:39:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (h *HeaderWithSignature) GetSignature() *refs.Signature {
|
|
|
|
if h != nil {
|
|
|
|
return h.signature
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (h *HeaderWithSignature) SetSignature(v *refs.Signature) {
|
2022-03-23 11:42:57 +00:00
|
|
|
h.signature = v
|
2020-09-08 10:39:13 +00:00
|
|
|
}
|
|
|
|
|
2020-12-07 14:41:05 +00:00
|
|
|
func (h *HeaderWithSignature) getHeaderPart() {}
|
|
|
|
|
2020-08-17 17:26:25 +00:00
|
|
|
func (o *Object) GetObjectID() *refs.ObjectID {
|
|
|
|
if o != nil {
|
|
|
|
return o.objectID
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (o *Object) SetObjectID(v *refs.ObjectID) {
|
2022-03-23 11:42:57 +00:00
|
|
|
o.objectID = v
|
2020-08-17 17:26:25 +00:00
|
|
|
}
|
|
|
|
|
2020-08-20 09:43:47 +00:00
|
|
|
func (o *Object) GetSignature() *refs.Signature {
|
2020-08-17 17:26:25 +00:00
|
|
|
if o != nil {
|
|
|
|
return o.idSig
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2020-08-20 09:43:47 +00:00
|
|
|
func (o *Object) SetSignature(v *refs.Signature) {
|
2022-03-23 11:42:57 +00:00
|
|
|
o.idSig = v
|
2020-08-17 17:26:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (o *Object) GetHeader() *Header {
|
|
|
|
if o != nil {
|
|
|
|
return o.header
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (o *Object) SetHeader(v *Header) {
|
2022-03-23 11:42:57 +00:00
|
|
|
o.header = v
|
2020-08-17 17:26:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (o *Object) GetPayload() []byte {
|
|
|
|
if o != nil {
|
|
|
|
return o.payload
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (o *Object) SetPayload(v []byte) {
|
2022-03-23 11:42:57 +00:00
|
|
|
o.payload = v
|
2020-08-17 17:26:25 +00:00
|
|
|
}
|
2020-08-18 10:23:26 +00:00
|
|
|
|
2020-12-02 10:10:43 +00:00
|
|
|
func (s *SplitInfo) GetSplitID() []byte {
|
2020-12-11 11:48:27 +00:00
|
|
|
if s != nil {
|
2020-12-02 10:10:43 +00:00
|
|
|
return s.splitID
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *SplitInfo) SetSplitID(v []byte) {
|
2022-03-23 11:42:57 +00:00
|
|
|
s.splitID = v
|
2020-12-02 10:10:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (s *SplitInfo) GetLastPart() *refs.ObjectID {
|
|
|
|
if s != nil {
|
|
|
|
return s.lastPart
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *SplitInfo) SetLastPart(v *refs.ObjectID) {
|
2022-03-23 11:42:57 +00:00
|
|
|
s.lastPart = v
|
2020-12-02 10:10:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (s *SplitInfo) GetLink() *refs.ObjectID {
|
|
|
|
if s != nil {
|
|
|
|
return s.link
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *SplitInfo) SetLink(v *refs.ObjectID) {
|
2022-03-23 11:42:57 +00:00
|
|
|
s.link = v
|
2020-12-02 10:10:43 +00:00
|
|
|
}
|
|
|
|
|
2020-12-07 15:59:01 +00:00
|
|
|
func (s *SplitInfo) getObjectPart() {}
|
|
|
|
|
|
|
|
func (s *SplitInfo) getHeaderPart() {}
|
|
|
|
|
|
|
|
func (s *SplitInfo) getRangePart() {}
|
2020-12-02 10:10:43 +00:00
|
|
|
|
2020-08-18 10:23:26 +00:00
|
|
|
func (r *GetRequestBody) GetAddress() *refs.Address {
|
|
|
|
if r != nil {
|
|
|
|
return r.addr
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (r *GetRequestBody) SetAddress(v *refs.Address) {
|
2022-03-23 11:42:57 +00:00
|
|
|
r.addr = v
|
2020-08-18 10:23:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (r *GetRequestBody) GetRaw() bool {
|
|
|
|
if r != nil {
|
|
|
|
return r.raw
|
|
|
|
}
|
|
|
|
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
|
|
|
func (r *GetRequestBody) SetRaw(v bool) {
|
2022-03-23 11:42:57 +00:00
|
|
|
r.raw = v
|
2020-08-18 10:23:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (r *GetRequest) GetBody() *GetRequestBody {
|
|
|
|
if r != nil {
|
|
|
|
return r.body
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (r *GetRequest) SetBody(v *GetRequestBody) {
|
2022-03-23 11:42:57 +00:00
|
|
|
r.body = v
|
2020-08-18 10:23:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (r *GetObjectPartInit) GetObjectID() *refs.ObjectID {
|
|
|
|
if r != nil {
|
|
|
|
return r.id
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (r *GetObjectPartInit) SetObjectID(v *refs.ObjectID) {
|
2022-03-23 11:42:57 +00:00
|
|
|
r.id = v
|
2020-08-18 10:23:26 +00:00
|
|
|
}
|
|
|
|
|
2020-08-20 09:43:47 +00:00
|
|
|
func (r *GetObjectPartInit) GetSignature() *refs.Signature {
|
2020-08-18 10:23:26 +00:00
|
|
|
if r != nil {
|
|
|
|
return r.sig
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2020-08-20 09:43:47 +00:00
|
|
|
func (r *GetObjectPartInit) SetSignature(v *refs.Signature) {
|
2022-03-23 11:42:57 +00:00
|
|
|
r.sig = v
|
2020-08-18 10:23:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (r *GetObjectPartInit) GetHeader() *Header {
|
|
|
|
if r != nil {
|
|
|
|
return r.hdr
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (r *GetObjectPartInit) SetHeader(v *Header) {
|
2022-03-23 11:42:57 +00:00
|
|
|
r.hdr = v
|
2020-08-18 10:23:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (r *GetObjectPartInit) getObjectPart() {}
|
|
|
|
|
|
|
|
func (r *GetObjectPartChunk) GetChunk() []byte {
|
|
|
|
if r != nil {
|
|
|
|
return r.chunk
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (r *GetObjectPartChunk) SetChunk(v []byte) {
|
2022-03-23 11:42:57 +00:00
|
|
|
r.chunk = v
|
2020-08-18 10:23:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (r *GetObjectPartChunk) getObjectPart() {}
|
|
|
|
|
|
|
|
func (r *GetResponseBody) GetObjectPart() GetObjectPart {
|
|
|
|
if r != nil {
|
|
|
|
return r.objPart
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (r *GetResponseBody) SetObjectPart(v GetObjectPart) {
|
2022-03-23 11:42:57 +00:00
|
|
|
r.objPart = v
|
2020-08-18 10:23:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (r *GetResponse) GetBody() *GetResponseBody {
|
|
|
|
if r != nil {
|
|
|
|
return r.body
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (r *GetResponse) SetBody(v *GetResponseBody) {
|
2022-03-23 11:42:57 +00:00
|
|
|
r.body = v
|
2020-08-18 10:23:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (r *PutObjectPartInit) GetObjectID() *refs.ObjectID {
|
|
|
|
if r != nil {
|
|
|
|
return r.id
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (r *PutObjectPartInit) SetObjectID(v *refs.ObjectID) {
|
2022-03-23 11:42:57 +00:00
|
|
|
r.id = v
|
2020-08-18 10:23:26 +00:00
|
|
|
}
|
|
|
|
|
2020-08-20 09:43:47 +00:00
|
|
|
func (r *PutObjectPartInit) GetSignature() *refs.Signature {
|
2020-08-18 10:23:26 +00:00
|
|
|
if r != nil {
|
|
|
|
return r.sig
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2020-08-20 09:43:47 +00:00
|
|
|
func (r *PutObjectPartInit) SetSignature(v *refs.Signature) {
|
2022-03-23 11:42:57 +00:00
|
|
|
r.sig = v
|
2020-08-18 10:23:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (r *PutObjectPartInit) GetHeader() *Header {
|
|
|
|
if r != nil {
|
|
|
|
return r.hdr
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (r *PutObjectPartInit) SetHeader(v *Header) {
|
2022-03-23 11:42:57 +00:00
|
|
|
r.hdr = v
|
2020-08-18 10:23:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (r *PutObjectPartInit) GetCopiesNumber() uint32 {
|
|
|
|
if r != nil {
|
|
|
|
return r.copyNum
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
func (r *PutObjectPartInit) SetCopiesNumber(v uint32) {
|
2022-03-23 11:42:57 +00:00
|
|
|
r.copyNum = v
|
2020-08-18 10:23:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (r *PutObjectPartInit) putObjectPart() {}
|
|
|
|
|
|
|
|
func (r *PutObjectPartChunk) GetChunk() []byte {
|
|
|
|
if r != nil {
|
|
|
|
return r.chunk
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (r *PutObjectPartChunk) SetChunk(v []byte) {
|
2022-03-23 11:42:57 +00:00
|
|
|
r.chunk = v
|
2020-08-18 10:23:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (r *PutObjectPartChunk) putObjectPart() {}
|
|
|
|
|
|
|
|
func (r *PutRequestBody) GetObjectPart() PutObjectPart {
|
|
|
|
if r != nil {
|
|
|
|
return r.objPart
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (r *PutRequestBody) SetObjectPart(v PutObjectPart) {
|
2022-03-23 11:42:57 +00:00
|
|
|
r.objPart = v
|
2020-08-18 10:23:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (r *PutRequest) GetBody() *PutRequestBody {
|
|
|
|
if r != nil {
|
|
|
|
return r.body
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (r *PutRequest) SetBody(v *PutRequestBody) {
|
2022-03-23 11:42:57 +00:00
|
|
|
r.body = v
|
2020-08-18 10:23:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (r *PutResponseBody) GetObjectID() *refs.ObjectID {
|
|
|
|
if r != nil {
|
|
|
|
return r.id
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (r *PutResponseBody) SetObjectID(v *refs.ObjectID) {
|
2022-03-23 11:42:57 +00:00
|
|
|
r.id = v
|
2020-08-18 10:23:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (r *PutResponse) GetBody() *PutResponseBody {
|
|
|
|
if r != nil {
|
|
|
|
return r.body
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (r *PutResponse) SetBody(v *PutResponseBody) {
|
2022-03-23 11:42:57 +00:00
|
|
|
r.body = v
|
2020-08-18 10:23:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (r *DeleteRequestBody) GetAddress() *refs.Address {
|
|
|
|
if r != nil {
|
|
|
|
return r.addr
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (r *DeleteRequestBody) SetAddress(v *refs.Address) {
|
2022-03-23 11:42:57 +00:00
|
|
|
r.addr = v
|
2020-08-18 10:23:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (r *DeleteRequest) GetBody() *DeleteRequestBody {
|
|
|
|
if r != nil {
|
|
|
|
return r.body
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (r *DeleteRequest) SetBody(v *DeleteRequestBody) {
|
2022-03-23 11:42:57 +00:00
|
|
|
r.body = v
|
2020-08-18 10:23:26 +00:00
|
|
|
}
|
|
|
|
|
2020-12-10 09:15:17 +00:00
|
|
|
// GetTombstone returns tombstone address.
|
|
|
|
func (r *DeleteResponseBody) GetTombstone() *refs.Address {
|
|
|
|
if r != nil {
|
|
|
|
return r.tombstone
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
// SetTombstone sets tombstone address.
|
|
|
|
func (r *DeleteResponseBody) SetTombstone(v *refs.Address) {
|
2022-03-23 11:42:57 +00:00
|
|
|
r.tombstone = v
|
2020-12-10 09:15:17 +00:00
|
|
|
}
|
|
|
|
|
2020-08-18 10:23:26 +00:00
|
|
|
func (r *DeleteResponse) GetBody() *DeleteResponseBody {
|
|
|
|
if r != nil {
|
|
|
|
return r.body
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (r *DeleteResponse) SetBody(v *DeleteResponseBody) {
|
2022-03-23 11:42:57 +00:00
|
|
|
r.body = v
|
2020-08-18 10:23:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (r *HeadRequestBody) GetAddress() *refs.Address {
|
|
|
|
if r != nil {
|
|
|
|
return r.addr
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (r *HeadRequestBody) SetAddress(v *refs.Address) {
|
2022-03-23 11:42:57 +00:00
|
|
|
r.addr = v
|
2020-08-18 10:23:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (r *HeadRequestBody) GetMainOnly() bool {
|
|
|
|
if r != nil {
|
|
|
|
return r.mainOnly
|
|
|
|
}
|
|
|
|
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
|
|
|
func (r *HeadRequestBody) SetMainOnly(v bool) {
|
2022-03-23 11:42:57 +00:00
|
|
|
r.mainOnly = v
|
2020-08-18 10:23:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (r *HeadRequestBody) GetRaw() bool {
|
|
|
|
if r != nil {
|
|
|
|
return r.raw
|
|
|
|
}
|
|
|
|
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
|
|
|
func (r *HeadRequestBody) SetRaw(v bool) {
|
2022-03-23 11:42:57 +00:00
|
|
|
r.raw = v
|
2020-08-18 10:23:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (r *HeadRequest) GetBody() *HeadRequestBody {
|
|
|
|
if r != nil {
|
|
|
|
return r.body
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (r *HeadRequest) SetBody(v *HeadRequestBody) {
|
2022-03-23 11:42:57 +00:00
|
|
|
r.body = v
|
2020-08-18 10:23:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (r *HeadResponseBody) GetHeaderPart() GetHeaderPart {
|
|
|
|
if r != nil {
|
|
|
|
return r.hdrPart
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (r *HeadResponseBody) SetHeaderPart(v GetHeaderPart) {
|
2022-03-23 11:42:57 +00:00
|
|
|
r.hdrPart = v
|
2020-08-18 10:23:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (r *HeadResponse) GetBody() *HeadResponseBody {
|
|
|
|
if r != nil {
|
|
|
|
return r.body
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (r *HeadResponse) SetBody(v *HeadResponseBody) {
|
2022-03-23 11:42:57 +00:00
|
|
|
r.body = v
|
2020-08-18 10:23:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (f *SearchFilter) GetMatchType() MatchType {
|
|
|
|
if f != nil {
|
|
|
|
return f.matchType
|
|
|
|
}
|
|
|
|
|
|
|
|
return MatchUnknown
|
|
|
|
}
|
|
|
|
|
|
|
|
func (f *SearchFilter) SetMatchType(v MatchType) {
|
2022-03-23 11:42:57 +00:00
|
|
|
f.matchType = v
|
2020-08-18 10:23:26 +00:00
|
|
|
}
|
|
|
|
|
2020-10-27 13:55:19 +00:00
|
|
|
func (f *SearchFilter) GetKey() string {
|
2020-08-18 10:23:26 +00:00
|
|
|
if f != nil {
|
2020-10-27 13:55:19 +00:00
|
|
|
return f.key
|
2020-08-18 10:23:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
2020-10-27 13:55:19 +00:00
|
|
|
func (f *SearchFilter) SetKey(v string) {
|
2022-03-23 11:42:57 +00:00
|
|
|
f.key = v
|
2020-08-18 10:23:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (f *SearchFilter) GetValue() string {
|
|
|
|
if f != nil {
|
|
|
|
return f.val
|
|
|
|
}
|
|
|
|
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
|
|
|
func (f *SearchFilter) SetValue(v string) {
|
2022-03-23 11:42:57 +00:00
|
|
|
f.val = v
|
2020-08-18 10:23:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (r *SearchRequestBody) GetContainerID() *refs.ContainerID {
|
|
|
|
if r != nil {
|
|
|
|
return r.cid
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (r *SearchRequestBody) SetContainerID(v *refs.ContainerID) {
|
2022-03-23 11:42:57 +00:00
|
|
|
r.cid = v
|
2020-08-18 10:23:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (r *SearchRequestBody) GetVersion() uint32 {
|
|
|
|
if r != nil {
|
|
|
|
return r.version
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
func (r *SearchRequestBody) SetVersion(v uint32) {
|
2022-03-23 11:42:57 +00:00
|
|
|
r.version = v
|
2020-08-18 10:23:26 +00:00
|
|
|
}
|
|
|
|
|
2022-03-02 08:03:56 +00:00
|
|
|
func (r *SearchRequestBody) GetFilters() []SearchFilter {
|
2020-08-18 10:23:26 +00:00
|
|
|
if r != nil {
|
|
|
|
return r.filters
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2022-03-02 08:03:56 +00:00
|
|
|
func (r *SearchRequestBody) SetFilters(v []SearchFilter) {
|
2022-03-23 11:42:57 +00:00
|
|
|
r.filters = v
|
2020-08-18 10:23:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (r *SearchRequest) GetBody() *SearchRequestBody {
|
|
|
|
if r != nil {
|
|
|
|
return r.body
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (r *SearchRequest) SetBody(v *SearchRequestBody) {
|
2022-03-23 11:42:57 +00:00
|
|
|
r.body = v
|
2020-08-18 10:23:26 +00:00
|
|
|
}
|
|
|
|
|
2022-03-01 12:50:09 +00:00
|
|
|
func (r *SearchResponseBody) GetIDList() []refs.ObjectID {
|
2020-08-18 10:23:26 +00:00
|
|
|
if r != nil {
|
|
|
|
return r.idList
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2022-03-01 12:50:09 +00:00
|
|
|
func (r *SearchResponseBody) SetIDList(v []refs.ObjectID) {
|
2022-03-23 11:42:57 +00:00
|
|
|
r.idList = v
|
2020-08-18 10:23:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (r *SearchResponse) GetBody() *SearchResponseBody {
|
|
|
|
if r != nil {
|
|
|
|
return r.body
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (r *SearchResponse) SetBody(v *SearchResponseBody) {
|
2022-03-23 11:42:57 +00:00
|
|
|
r.body = v
|
2020-08-18 10:23:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (r *Range) GetOffset() uint64 {
|
|
|
|
if r != nil {
|
|
|
|
return r.off
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
func (r *Range) SetOffset(v uint64) {
|
2022-03-23 11:42:57 +00:00
|
|
|
r.off = v
|
2020-08-18 10:23:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (r *Range) GetLength() uint64 {
|
|
|
|
if r != nil {
|
|
|
|
return r.len
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
func (r *Range) SetLength(v uint64) {
|
2022-03-23 11:42:57 +00:00
|
|
|
r.len = v
|
2020-08-18 10:23:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (r *GetRangeRequestBody) GetAddress() *refs.Address {
|
|
|
|
if r != nil {
|
|
|
|
return r.addr
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (r *GetRangeRequestBody) SetAddress(v *refs.Address) {
|
2022-03-23 11:42:57 +00:00
|
|
|
r.addr = v
|
2020-08-18 10:23:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (r *GetRangeRequestBody) GetRange() *Range {
|
|
|
|
if r != nil {
|
|
|
|
return r.rng
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (r *GetRangeRequestBody) SetRange(v *Range) {
|
2022-03-23 11:42:57 +00:00
|
|
|
r.rng = v
|
2020-08-18 10:23:26 +00:00
|
|
|
}
|
|
|
|
|
2020-12-07 15:59:01 +00:00
|
|
|
func (r *GetRangeRequestBody) GetRaw() bool {
|
|
|
|
if r != nil {
|
|
|
|
return r.raw
|
|
|
|
}
|
|
|
|
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
|
|
|
func (r *GetRangeRequestBody) SetRaw(v bool) {
|
2022-03-23 11:42:57 +00:00
|
|
|
r.raw = v
|
2020-12-07 15:59:01 +00:00
|
|
|
}
|
|
|
|
|
2020-08-18 10:23:26 +00:00
|
|
|
func (r *GetRangeRequest) GetBody() *GetRangeRequestBody {
|
|
|
|
if r != nil {
|
|
|
|
return r.body
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (r *GetRangeRequest) SetBody(v *GetRangeRequestBody) {
|
2022-03-23 11:42:57 +00:00
|
|
|
r.body = v
|
2020-08-18 10:23:26 +00:00
|
|
|
}
|
|
|
|
|
2020-12-07 15:59:01 +00:00
|
|
|
func (r *GetRangePartChunk) GetChunk() []byte {
|
2020-08-18 10:23:26 +00:00
|
|
|
if r != nil {
|
|
|
|
return r.chunk
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2020-12-07 15:59:01 +00:00
|
|
|
func (r *GetRangePartChunk) SetChunk(v []byte) {
|
2022-03-23 11:42:57 +00:00
|
|
|
r.chunk = v
|
2020-08-18 10:23:26 +00:00
|
|
|
}
|
|
|
|
|
2020-12-07 15:59:01 +00:00
|
|
|
func (r *GetRangePartChunk) getRangePart() {}
|
|
|
|
|
|
|
|
func (r *GetRangeResponseBody) GetRangePart() GetRangePart {
|
|
|
|
if r != nil {
|
|
|
|
return r.rngPart
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (r *GetRangeResponseBody) SetRangePart(v GetRangePart) {
|
2022-03-23 11:42:57 +00:00
|
|
|
r.rngPart = v
|
2020-12-07 15:59:01 +00:00
|
|
|
}
|
|
|
|
|
2020-08-18 10:23:26 +00:00
|
|
|
func (r *GetRangeResponse) GetBody() *GetRangeResponseBody {
|
|
|
|
if r != nil {
|
|
|
|
return r.body
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (r *GetRangeResponse) SetBody(v *GetRangeResponseBody) {
|
2022-03-23 11:42:57 +00:00
|
|
|
r.body = v
|
2020-08-18 10:23:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (r *GetRangeHashRequestBody) GetAddress() *refs.Address {
|
|
|
|
if r != nil {
|
|
|
|
return r.addr
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (r *GetRangeHashRequestBody) SetAddress(v *refs.Address) {
|
2022-03-23 11:42:57 +00:00
|
|
|
r.addr = v
|
2020-08-18 10:23:26 +00:00
|
|
|
}
|
|
|
|
|
2022-03-02 08:03:56 +00:00
|
|
|
func (r *GetRangeHashRequestBody) GetRanges() []Range {
|
2020-08-18 10:23:26 +00:00
|
|
|
if r != nil {
|
|
|
|
return r.rngs
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2022-03-02 08:03:56 +00:00
|
|
|
func (r *GetRangeHashRequestBody) SetRanges(v []Range) {
|
2022-03-23 11:42:57 +00:00
|
|
|
r.rngs = v
|
2020-08-18 10:23:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (r *GetRangeHashRequestBody) GetSalt() []byte {
|
|
|
|
if r != nil {
|
|
|
|
return r.salt
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (r *GetRangeHashRequestBody) SetSalt(v []byte) {
|
2022-03-23 11:42:57 +00:00
|
|
|
r.salt = v
|
2020-08-18 10:23:26 +00:00
|
|
|
}
|
|
|
|
|
2020-08-20 08:48:35 +00:00
|
|
|
func (r *GetRangeHashRequestBody) GetType() refs.ChecksumType {
|
|
|
|
if r != nil {
|
|
|
|
return r.typ
|
|
|
|
}
|
|
|
|
|
|
|
|
return refs.UnknownChecksum
|
|
|
|
}
|
|
|
|
|
|
|
|
func (r *GetRangeHashRequestBody) SetType(v refs.ChecksumType) {
|
2022-03-23 11:42:57 +00:00
|
|
|
r.typ = v
|
2020-08-20 08:48:35 +00:00
|
|
|
}
|
|
|
|
|
2020-08-18 10:23:26 +00:00
|
|
|
func (r *GetRangeHashRequest) GetBody() *GetRangeHashRequestBody {
|
|
|
|
if r != nil {
|
|
|
|
return r.body
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (r *GetRangeHashRequest) SetBody(v *GetRangeHashRequestBody) {
|
2022-03-23 11:42:57 +00:00
|
|
|
r.body = v
|
2020-08-18 10:23:26 +00:00
|
|
|
}
|
|
|
|
|
2020-08-20 08:48:35 +00:00
|
|
|
func (r *GetRangeHashResponseBody) GetType() refs.ChecksumType {
|
|
|
|
if r != nil {
|
|
|
|
return r.typ
|
|
|
|
}
|
|
|
|
|
|
|
|
return refs.UnknownChecksum
|
|
|
|
}
|
|
|
|
|
|
|
|
func (r *GetRangeHashResponseBody) SetType(v refs.ChecksumType) {
|
2022-03-23 11:42:57 +00:00
|
|
|
r.typ = v
|
2020-08-20 08:48:35 +00:00
|
|
|
}
|
|
|
|
|
2020-08-18 10:23:26 +00:00
|
|
|
func (r *GetRangeHashResponseBody) GetHashList() [][]byte {
|
|
|
|
if r != nil {
|
|
|
|
return r.hashList
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (r *GetRangeHashResponseBody) SetHashList(v [][]byte) {
|
2022-03-23 11:42:57 +00:00
|
|
|
r.hashList = v
|
2020-08-18 10:23:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (r *GetRangeHashResponse) GetBody() *GetRangeHashResponseBody {
|
|
|
|
if r != nil {
|
|
|
|
return r.body
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (r *GetRangeHashResponse) SetBody(v *GetRangeHashResponseBody) {
|
2022-03-23 11:42:57 +00:00
|
|
|
r.body = v
|
2020-08-18 10:23:26 +00:00
|
|
|
}
|