Documentation ¶
Index ¶
- Constants
- func CalculateAndSetID(obj *RawObject) error
- func CalculateAndSetPayloadChecksum(obj *RawObject)
- func CalculateAndSetSignature(key *ecdsa.PrivateKey, obj *RawObject) error
- func CalculateIDSignature(key *ecdsa.PrivateKey, id *ID) (*pkg.Signature, error)
- func CalculatePayloadChecksum(payload []byte) *pkg.Checksum
- func CheckHeaderVerificationFields(obj *Object) error
- func CheckVerificationFields(obj *Object) error
- func SetIDWithSignature(key *ecdsa.PrivateKey, obj *RawObject) error
- func SetVerificationFields(key *ecdsa.PrivateKey, obj *RawObject) error
- func VerifyID(obj *Object) error
- func VerifyIDSignature(obj *Object) error
- func VerifyPayloadChecksum(obj *Object) error
- type Address
- func (a *Address) ContainerID() *cid.ID
- func (a *Address) Marshal(b ...[]byte) ([]byte, error)
- func (a *Address) MarshalJSON() ([]byte, error)
- func (a *Address) ObjectID() *ID
- func (a *Address) Parse(s string) error
- func (a *Address) SetContainerID(id *cid.ID)
- func (a *Address) SetObjectID(id *ID)
- func (a *Address) String() string
- func (a *Address) ToV2() *refs.Address
- func (a *Address) Unmarshal(data []byte) error
- func (a *Address) UnmarshalJSON(data []byte) error
- type Attribute
- func (a *Attribute) Key() string
- func (a *Attribute) Marshal(b ...[]byte) ([]byte, error)
- func (a *Attribute) MarshalJSON() ([]byte, error)
- func (a *Attribute) SetKey(v string)
- func (a *Attribute) SetValue(v string)
- func (a *Attribute) ToV2() *object.Attribute
- func (a *Attribute) Unmarshal(data []byte) error
- func (a *Attribute) UnmarshalJSON(data []byte) error
- func (a *Attribute) Value() string
- type ID
- func (id *ID) Equal(id2 *ID) bool
- func (id *ID) Marshal(b ...[]byte) ([]byte, error)
- func (id *ID) MarshalJSON() ([]byte, error)
- func (id *ID) Parse(s string) error
- func (id *ID) SetSHA256(v [sha256.Size]byte)
- func (id *ID) String() string
- func (id *ID) ToV2() *refs.ObjectID
- func (id *ID) Unmarshal(data []byte) error
- func (id *ID) UnmarshalJSON(data []byte) error
- type Object
- func (o Object) Attributes() []*Attribute
- func (o Object) Children() []*ID
- func (o Object) ContainerID() *cid.ID
- func (o Object) CreationEpoch() uint64
- func (o Object) HasParent() bool
- func (o Object) ID() *ID
- func (o Object) Marshal(b ...[]byte) ([]byte, error)
- func (o *Object) MarshalHeaderJSON() ([]byte, error)
- func (o Object) MarshalJSON() ([]byte, error)
- func (o Object) OwnerID() *owner.ID
- func (o Object) Parent() *Object
- func (o Object) ParentID() *ID
- func (o Object) Payload() []byte
- func (o Object) PayloadChecksum() *pkg.Checksum
- func (o Object) PayloadHomomorphicHash() *pkg.Checksum
- func (o Object) PayloadSize() uint64
- func (o Object) PreviousID() *ID
- func (o Object) SessionToken() *session.Token
- func (o Object) Signature() *pkg.Signature
- func (o Object) SplitID() *SplitID
- func (o *Object) ToV2() *object.Object
- func (o Object) Type() Type
- func (o Object) Unmarshal(data []byte) error
- func (o Object) UnmarshalJSON(data []byte) error
- func (o Object) Version() *pkg.Version
- type Range
- type RawObject
- func (o RawObject) Attributes() []*Attribute
- func (o RawObject) Children() []*ID
- func (o RawObject) ContainerID() *cid.ID
- func (o RawObject) CreationEpoch() uint64
- func (o *RawObject) CutPayload() *RawObject
- func (o RawObject) HasParent() bool
- func (o RawObject) ID() *ID
- func (o *RawObject) InitRelations()
- func (o RawObject) Marshal(b ...[]byte) ([]byte, error)
- func (o RawObject) MarshalJSON() ([]byte, error)
- func (o *RawObject) Object() *Object
- func (o RawObject) OwnerID() *owner.ID
- func (o RawObject) Parent() *Object
- func (o RawObject) ParentID() *ID
- func (o RawObject) Payload() []byte
- func (o RawObject) PayloadChecksum() *pkg.Checksum
- func (o RawObject) PayloadHomomorphicHash() *pkg.Checksum
- func (o RawObject) PayloadSize() uint64
- func (o RawObject) PreviousID() *ID
- func (o *RawObject) ResetRelations()
- func (o RawObject) SessionToken() *session.Token
- func (o *RawObject) SetAttributes(v ...*Attribute)
- func (o *RawObject) SetChildren(v ...*ID)
- func (o *RawObject) SetContainerID(v *cid.ID)
- func (o *RawObject) SetCreationEpoch(v uint64)
- func (o *RawObject) SetID(v *ID)
- func (o *RawObject) SetOwnerID(v *owner.ID)
- func (o *RawObject) SetParent(v *Object)
- func (o *RawObject) SetParentID(v *ID)
- func (o *RawObject) SetPayload(v []byte)
- func (o *RawObject) SetPayloadChecksum(v *pkg.Checksum)
- func (o *RawObject) SetPayloadHomomorphicHash(v *pkg.Checksum)
- func (o *RawObject) SetPayloadSize(v uint64)
- func (o *RawObject) SetPreviousID(v *ID)
- func (o *RawObject) SetSessionToken(v *session.Token)
- func (o *RawObject) SetSignature(v *pkg.Signature)
- func (o *RawObject) SetSplitID(id *SplitID)
- func (o *RawObject) SetType(v Type)
- func (o *RawObject) SetVersion(v *pkg.Version)
- func (o RawObject) Signature() *pkg.Signature
- func (o RawObject) SplitID() *SplitID
- func (o RawObject) ToV2() *object.Object
- func (o RawObject) Type() Type
- func (o RawObject) Unmarshal(data []byte) error
- func (o RawObject) UnmarshalJSON(data []byte) error
- func (o RawObject) Version() *pkg.Version
- type SearchFilter
- type SearchFilters
- func (f *SearchFilters) AddFilter(header, value string, op SearchMatchType)
- func (f *SearchFilters) AddObjectContainerIDFilter(m SearchMatchType, id *cid.ID)
- func (f *SearchFilters) AddObjectIDFilter(m SearchMatchType, id *ID)
- func (f *SearchFilters) AddObjectOwnerIDFilter(m SearchMatchType, id *owner.ID)
- func (f *SearchFilters) AddObjectVersionFilter(op SearchMatchType, v *pkg.Version)
- func (f *SearchFilters) AddParentIDFilter(m SearchMatchType, id *ID)
- func (f *SearchFilters) AddPhyFilter()
- func (f *SearchFilters) AddRootFilter()
- func (f *SearchFilters) AddSplitIDFilter(m SearchMatchType, id *SplitID)
- func (f *SearchFilters) AddTypeFilter(m SearchMatchType, typ Type)
- func (f *SearchFilters) MarshalJSON() ([]byte, error)
- func (f SearchFilters) ToV2() []*v2object.SearchFilter
- func (f *SearchFilters) UnmarshalJSON(data []byte) error
- type SearchMatchType
- type SplitID
- type SplitInfo
- func (s *SplitInfo) LastPart() *ID
- func (s *SplitInfo) Link() *ID
- func (s *SplitInfo) Marshal(b ...[]byte) ([]byte, error)
- func (s *SplitInfo) SetLastPart(v *ID)
- func (s *SplitInfo) SetLink(v *ID)
- func (s *SplitInfo) SetSplitID(v *SplitID)
- func (s *SplitInfo) SplitID() *SplitID
- func (s *SplitInfo) ToV2() *object.SplitInfo
- func (s *SplitInfo) Unmarshal(data []byte) error
- type SplitInfoError
- type Tombstone
- func (t *Tombstone) ExpirationEpoch() uint64
- func (t *Tombstone) Marshal(b ...[]byte) ([]byte, error)
- func (t *Tombstone) MarshalJSON() ([]byte, error)
- func (t *Tombstone) Members() []*ID
- func (t *Tombstone) SetExpirationEpoch(v uint64)
- func (t *Tombstone) SetMembers(v []*ID)
- func (t *Tombstone) SetSplitID(v *SplitID)
- func (t *Tombstone) SplitID() *SplitID
- func (t *Tombstone) ToV2() *tombstone.Tombstone
- func (t *Tombstone) Unmarshal(data []byte) error
- func (t *Tombstone) UnmarshalJSON(data []byte) error
- type Type
Constants ¶
const ( // AttributeName is an attribute key that is commonly used to denote // human-friendly name. AttributeName = "Name" // AttributeFileName is an attribute key that is commonly used to denote // file name to be associated with the object on saving. AttributeFileName = "FileName" // AttributeTimestamp is an attribute key that is commonly used to denote // user-defined local time of object creation in Unix Timestamp format. AttributeTimestamp = "Timestamp" // AttributeTimestamp is an attribute key that is commonly used to denote // MIME Content Type of object's payload. AttributeContentType = "Content-Type" )
Variables ¶
This section is empty.
Functions ¶
func CalculateAndSetID ¶
CalculateAndSetID calculates identifier for the object and writes the result to it.
func CalculateAndSetPayloadChecksum ¶
func CalculateAndSetPayloadChecksum(obj *RawObject)
CalculateAndSetPayloadChecksum calculates checksum of current object payload and writes it to the object.
func CalculateAndSetSignature ¶
func CalculateAndSetSignature(key *ecdsa.PrivateKey, obj *RawObject) error
func CalculateIDSignature ¶
func CalculatePayloadChecksum ¶
CalculatePayloadChecksum calculates and returns checksum of object payload bytes.
func CheckHeaderVerificationFields ¶
CheckHeaderVerificationFields checks all verification fields except payload.
func CheckVerificationFields ¶
CheckVerificationFields checks all verification fields of the object.
func SetIDWithSignature ¶
func SetIDWithSignature(key *ecdsa.PrivateKey, obj *RawObject) error
SetIDWithSignature sets object identifier and signature.
func SetVerificationFields ¶
func SetVerificationFields(key *ecdsa.PrivateKey, obj *RawObject) error
SetVerificationFields calculates and sets all verification fields of the object.
func VerifyIDSignature ¶
func VerifyPayloadChecksum ¶
VerifyPayloadChecksum checks if payload checksum in the object corresponds to its payload.
Types ¶
type Address ¶
Address represents v2-compatible object address.
func NewAddress ¶
func NewAddress() *Address
NewAddress creates and initializes blank Address.
Works similar as NewAddressFromV2(new(Address)).
Defaults:
- cid: nil;
- oid: nil.
func NewAddressFromV2 ¶
NewAddressFromV2 converts v2 Address message to Address.
Nil refs.Address converts to nil.
func (*Address) ContainerID ¶
ContainerID returns container identifier.
func (*Address) Marshal ¶
Marshal marshals Address into a protobuf binary form.
Buffer is allocated when the argument is empty. Otherwise, the first buffer is used.
func (*Address) MarshalJSON ¶
MarshalJSON encodes Address to protobuf JSON format.
func (*Address) SetContainerID ¶
SetContainerID sets container identifier.
func (*Address) SetObjectID ¶
SetObjectID sets object identifier.
func (*Address) UnmarshalJSON ¶
UnmarshalJSON decodes Address from protobuf JSON format.
type Attribute ¶
Attribute represents v2-compatible object attribute.
func NewAttribute ¶
func NewAttribute() *Attribute
NewAttribute creates and initializes blank Attribute.
Works similar as NewAttributeFromV2(new(Attribute)).
Defaults:
- key: "";
- value: "".
func NewAttributeFromV2 ¶
NewAttributeFromV2 wraps v2 Attribute message to Attribute.
Nil object.Attribute converts to nil.
func (*Attribute) Marshal ¶
Marshal marshals Attribute into a protobuf binary form.
Buffer is allocated when the argument is empty. Otherwise, the first buffer is used.
func (*Attribute) MarshalJSON ¶
MarshalJSON encodes Attribute to protobuf JSON format.
func (*Attribute) ToV2 ¶
ToV2 converts Attribute to v2 Attribute message.
Nil Attribute converts to nil.
func (*Attribute) UnmarshalJSON ¶
UnmarshalJSON decodes Attribute from protobuf JSON format.
type ID ¶
ID represents v2-compatible object identifier.
func CalculateID ¶
CalculateID calculates identifier for the object.
func NewID ¶
func NewID() *ID
NewID creates and initializes blank ID.
Works similar as NewIDFromV2(new(ObjectID)).
Defaults:
- value: nil.
func (*ID) Marshal ¶
Marshal marshals ID into a protobuf binary form.
Buffer is allocated when the argument is empty. Otherwise, the first buffer is used.
func (*ID) MarshalJSON ¶
MarshalJSON encodes ID to protobuf JSON format.
func (*ID) UnmarshalJSON ¶
UnmarshalJSON decodes ID from protobuf JSON format.
type Object ¶
type Object struct {
// contains filtered or unexported fields
}
Object represents v2-compatible NeoFS object that provides a convenient interface for working in isolation from the internal structure of an object.
Object allows to work with the object in read-only mode as a reflection of the immutability of objects in the system.
func New ¶
func New() *Object
New creates and initializes blank Object.
Works similar as NewFromV2(new(Object)).
func (Object) Attributes ¶
func (o Object) Attributes() []*Attribute
Attributes returns object attributes.
func (Object) Children ¶
func (o Object) Children() []*ID
Children return list of the identifiers of the child objects.
func (Object) ContainerID ¶
ContainerID returns identifier of the related container.
func (Object) CreationEpoch ¶
func (o Object) CreationEpoch() uint64
CreationEpoch returns epoch number in which object was created.
func (Object) Marshal ¶
Marshal marshals object into a protobuf binary form.
Buffer is allocated when the argument is empty. Otherwise, the first buffer is used.
func (*Object) MarshalHeaderJSON ¶ added in v1.27.1
MarshalHeaderJSON marshals object's header into JSON format.
func (Object) MarshalJSON ¶
MarshalJSON encodes object to protobuf JSON format.
func (Object) ParentID ¶
func (o Object) ParentID() *ID
ParentID returns identifier of the parent object.
func (Object) PayloadChecksum ¶
PayloadChecksum returns checksum of the object payload.
func (Object) PayloadHomomorphicHash ¶
PayloadHomomorphicHash returns homomorphic hash of the object payload.
func (Object) PayloadSize ¶
func (o Object) PayloadSize() uint64
PayloadSize returns payload length of the object.
func (Object) PreviousID ¶
func (o Object) PreviousID() *ID
PreviousID returns identifier of the previous sibling object.
func (Object) SessionToken ¶
SessionToken returns token of the session within which object was created.
func (Object) SplitID ¶ added in v1.21.0
func (o Object) SplitID() *SplitID
SplitID return split identity of split object. If object is not split returns nil.
func (Object) UnmarshalJSON ¶
UnmarshalJSON decodes object from protobuf JSON format.
type Range ¶
Range represents v2-compatible object payload range.
func NewRange ¶
func NewRange() *Range
NewRange creates and initializes blank Range.
Defaults:
- offset: 0;
- length: 0.
func NewRangeFromV2 ¶
NewRangeFromV2 wraps v2 Range message to Range.
Nil object.Range converts to nil.
type RawObject ¶
type RawObject struct {
// contains filtered or unexported fields
}
RawObject represents v2-compatible NeoFS object that provides a convenient interface to fill in the fields of an object in isolation from its internal structure.
func NewRaw ¶
func NewRaw() *RawObject
NewRaw creates and initializes blank RawObject.
Works similar as NewRawFromV2(new(Object)).
func NewRawFrom ¶
NewRawFrom wraps Object instance to RawObject.
func NewRawFromV2 ¶
NewRawFromV2 wraps v2 Object message to RawObject.
func (RawObject) Attributes ¶
func (o RawObject) Attributes() []*Attribute
Attributes returns object attributes.
func (RawObject) Children ¶
func (o RawObject) Children() []*ID
Children return list of the identifiers of the child objects.
func (RawObject) ContainerID ¶
ContainerID returns identifier of the related container.
func (RawObject) CreationEpoch ¶
func (o RawObject) CreationEpoch() uint64
CreationEpoch returns epoch number in which object was created.
func (*RawObject) CutPayload ¶
CutPayload returns RawObject w/ empty payload.
Changes of non-payload fields affect source object.
func (*RawObject) InitRelations ¶
func (o *RawObject) InitRelations()
InitRelations initializes relation field.
func (RawObject) Marshal ¶
Marshal marshals object into a protobuf binary form.
Buffer is allocated when the argument is empty. Otherwise, the first buffer is used.
func (RawObject) MarshalJSON ¶
MarshalJSON encodes object to protobuf JSON format.
func (RawObject) Parent ¶
func (o RawObject) Parent() *Object
Parent returns parent object w/o payload.
func (RawObject) ParentID ¶
func (o RawObject) ParentID() *ID
ParentID returns identifier of the parent object.
func (RawObject) PayloadChecksum ¶
PayloadChecksum returns checksum of the object payload.
func (RawObject) PayloadHomomorphicHash ¶
PayloadHomomorphicHash returns homomorphic hash of the object payload.
func (RawObject) PayloadSize ¶
func (o RawObject) PayloadSize() uint64
PayloadSize returns payload length of the object.
func (RawObject) PreviousID ¶
func (o RawObject) PreviousID() *ID
PreviousID returns identifier of the previous sibling object.
func (*RawObject) ResetRelations ¶
func (o *RawObject) ResetRelations()
ResetRelations removes all fields of links with other objects.
func (RawObject) SessionToken ¶
SessionToken returns token of the session within which object was created.
func (*RawObject) SetAttributes ¶
SetAttributes sets object attributes.
func (*RawObject) SetChildren ¶
SetChildren sets list of the identifiers of the child objects.
func (*RawObject) SetContainerID ¶
SetContainerID sets identifier of the related container.
func (*RawObject) SetCreationEpoch ¶
SetCreationEpoch sets epoch number in which object was created.
func (*RawObject) SetOwnerID ¶
SetOwnerID sets identifier of the object owner.
func (*RawObject) SetParentID ¶
SetParentID sets identifier of the parent object.
func (*RawObject) SetPayload ¶
SetPayload sets payload bytes.
func (*RawObject) SetPayloadChecksum ¶
SetPayloadChecksum sets checksum of the object payload.
func (*RawObject) SetPayloadHomomorphicHash ¶
SetPayloadHomomorphicHash sets homomorphic hash of the object payload.
func (*RawObject) SetPayloadSize ¶
SetPayloadSize sets payload length of the object.
func (*RawObject) SetPreviousID ¶
SetPreviousID sets identifier of the previous sibling object.
func (*RawObject) SetSessionToken ¶
SetSessionToken sets token of the session within which object was created.
func (*RawObject) SetSignature ¶
SetSignature sets signature of the object identifier.
func (*RawObject) SetSplitID ¶ added in v1.21.0
SetSplitID sets split identifier for the split object.
func (*RawObject) SetVersion ¶
SetVersion sets version of the object.
func (RawObject) SplitID ¶ added in v1.21.0
func (o RawObject) SplitID() *SplitID
SplitID return split identity of split object. If object is not split returns nil.
func (RawObject) UnmarshalJSON ¶
UnmarshalJSON decodes object from protobuf JSON format.
type SearchFilter ¶
type SearchFilter struct {
// contains filtered or unexported fields
}
func (*SearchFilter) Header ¶
func (f *SearchFilter) Header() string
func (*SearchFilter) Operation ¶
func (f *SearchFilter) Operation() SearchMatchType
func (*SearchFilter) Value ¶
func (f *SearchFilter) Value() string
type SearchFilters ¶
type SearchFilters []SearchFilter
func NewSearchFilters ¶
func NewSearchFilters() SearchFilters
func NewSearchFiltersFromV2 ¶
func NewSearchFiltersFromV2(v2 []*v2object.SearchFilter) SearchFilters
func (*SearchFilters) AddFilter ¶
func (f *SearchFilters) AddFilter(header, value string, op SearchMatchType)
func (*SearchFilters) AddObjectContainerIDFilter ¶
func (f *SearchFilters) AddObjectContainerIDFilter(m SearchMatchType, id *cid.ID)
func (*SearchFilters) AddObjectIDFilter ¶ added in v1.20.3
func (f *SearchFilters) AddObjectIDFilter(m SearchMatchType, id *ID)
AddObjectIDFilter adds filter by object identifier.
func (*SearchFilters) AddObjectOwnerIDFilter ¶
func (f *SearchFilters) AddObjectOwnerIDFilter(m SearchMatchType, id *owner.ID)
func (*SearchFilters) AddObjectVersionFilter ¶
func (f *SearchFilters) AddObjectVersionFilter(op SearchMatchType, v *pkg.Version)
func (*SearchFilters) AddParentIDFilter ¶
func (f *SearchFilters) AddParentIDFilter(m SearchMatchType, id *ID)
AddParentIDFilter adds filter by parent identifier.
func (*SearchFilters) AddPhyFilter ¶
func (f *SearchFilters) AddPhyFilter()
func (*SearchFilters) AddRootFilter ¶
func (f *SearchFilters) AddRootFilter()
func (*SearchFilters) AddSplitIDFilter ¶ added in v1.21.0
func (f *SearchFilters) AddSplitIDFilter(m SearchMatchType, id *SplitID)
func (*SearchFilters) AddTypeFilter ¶ added in v1.22.0
func (f *SearchFilters) AddTypeFilter(m SearchMatchType, typ Type)
AddTypeFilter adds filter by object type.
func (*SearchFilters) MarshalJSON ¶ added in v1.23.0
func (f *SearchFilters) MarshalJSON() ([]byte, error)
MarshalJSON encodes SearchFilters to protobuf JSON format.
func (SearchFilters) ToV2 ¶
func (f SearchFilters) ToV2() []*v2object.SearchFilter
func (*SearchFilters) UnmarshalJSON ¶ added in v1.23.0
func (f *SearchFilters) UnmarshalJSON(data []byte) error
UnmarshalJSON decodes SearchFilters from protobuf JSON format.
type SearchMatchType ¶
type SearchMatchType uint32
SearchMatchType indicates match operation on specified header.
const ( MatchUnknown SearchMatchType = iota MatchStringEqual MatchStringNotEqual MatchNotPresent MatchCommonPrefix )
func SearchMatchFromV2 ¶
func SearchMatchFromV2(t v2object.MatchType) (m SearchMatchType)
func (*SearchMatchType) FromString ¶ added in v1.28.0
func (m *SearchMatchType) FromString(s string) bool
FromString parses SearchMatchType from a string representation. It is a reverse action to String().
Returns true if s was parsed successfully.
func (SearchMatchType) String ¶ added in v1.28.0
func (m SearchMatchType) String() string
String returns string representation of SearchMatchType.
String mapping:
- MatchStringEqual: STRING_EQUAL;
- MatchStringNotEqual: STRING_NOT_EQUAL;
- MatchNotPresent: NOT_PRESENT;
- MatchCommonPrefix: COMMON_PREFIX;
- MatchUnknown, default: MATCH_TYPE_UNSPECIFIED.
func (SearchMatchType) ToV2 ¶
func (m SearchMatchType) ToV2() v2object.MatchType
type SplitID ¶ added in v1.21.0
type SplitID struct {
// contains filtered or unexported fields
}
SplitID is a UUIDv4 used as attribute in split objects.
func NewSplitID ¶ added in v1.21.0
func NewSplitID() *SplitID
NewSplitID returns UUID representation of splitID attribute.
Defaults:
- id: random UUID.
func NewSplitIDFromV2 ¶ added in v1.21.0
NewSplitIDFromV2 returns parsed UUID from bytes. If v is invalid UUIDv4 byte sequence, then function returns nil.
Nil converts to nil.
type SplitInfo ¶ added in v1.21.0
func NewSplitInfo ¶ added in v1.21.0
func NewSplitInfo() *SplitInfo
NewSplitInfo creates and initializes blank SplitInfo.
Defaults:
- splitID: nil;
- lastPart nil;
- link: nil.
func NewSplitInfoFromV2 ¶ added in v1.21.0
NewSplitInfoFromV2 wraps v2 SplitInfo message to SplitInfo.
Nil object.SplitInfo converts to nil.
func (*SplitInfo) SetLastPart ¶ added in v1.21.0
func (*SplitInfo) SetSplitID ¶ added in v1.21.0
type SplitInfoError ¶ added in v1.21.0
type SplitInfoError struct {
// contains filtered or unexported fields
}
func NewSplitInfoError ¶ added in v1.21.0
func NewSplitInfoError(v *SplitInfo) *SplitInfoError
func (*SplitInfoError) Error ¶ added in v1.21.0
func (s *SplitInfoError) Error() string
func (*SplitInfoError) SplitInfo ¶ added in v1.21.0
func (s *SplitInfoError) SplitInfo() *SplitInfo
type Tombstone ¶ added in v1.21.0
Tombstone represents v2-compatible tombstone structure.
func NewTombstone ¶ added in v1.21.0
func NewTombstone() *Tombstone
NewTombstone creates and initializes blank Tombstone.
Defaults:
- exp: 0;
- splitID: nil;
- members: nil.
func NewTombstoneFromV2 ¶ added in v1.21.0
NewTombstoneFromV2 wraps v2 Tombstone message to Tombstone.
Nil tombstone.Tombstone converts to nil.
func (*Tombstone) ExpirationEpoch ¶ added in v1.21.0
ExpirationEpoch return number of tombstone expiration epoch.
func (*Tombstone) Marshal ¶ added in v1.21.0
Marshal marshals Tombstone into a protobuf binary form.
Buffer is allocated when the argument is empty. Otherwise, the first buffer is used.
func (*Tombstone) MarshalJSON ¶ added in v1.21.0
MarshalJSON encodes Tombstone to protobuf JSON format.
func (*Tombstone) SetExpirationEpoch ¶ added in v1.21.0
SetExpirationEpoch sets number of tombstone expiration epoch.
func (*Tombstone) SetMembers ¶ added in v1.21.0
SetMembers sets list of objects to be deleted.
func (*Tombstone) SetSplitID ¶ added in v1.21.0
SetSplitID sets identifier of object split hierarchy.
func (*Tombstone) ToV2 ¶ added in v1.27.1
ToV2 converts Tombstone to v2 Tombstone message.
Nil Tombstone converts to nil.
func (*Tombstone) Unmarshal ¶ added in v1.21.0
Unmarshal unmarshals protobuf binary representation of Tombstone.
func (*Tombstone) UnmarshalJSON ¶ added in v1.21.0
UnmarshalJSON decodes Tombstone from protobuf JSON format.
type Type ¶
type Type uint8
func TypeFromString
deprecated
added in
v1.22.0
func TypeFromV2 ¶
func (*Type) FromString ¶ added in v1.28.0
FromString parses Type from a string representation. It is a reverse action to String().
Returns true if s was parsed successfully.