Documentation ¶
Index ¶
- Constants
- func CalculateAndSetID(obj *Object) error
- func CalculateAndSetPayloadChecksum(obj *Object)
- func CalculateAndSetSignature(key ecdsa.PrivateKey, obj *Object) error
- func CalculateID(obj *Object) (oid.ID, error)
- func CalculatePayloadChecksum(payload []byte) checksum.Checksum
- func CheckHeaderVerificationFields(obj *Object) error
- func CheckVerificationFields(obj *Object) error
- func InitCreation(dst *Object, rf RequiredFields)
- func ReadLock(l *Lock, obj Object) error
- func SetIDWithSignature(key ecdsa.PrivateKey, obj *Object) error
- func SetVerificationFields(key ecdsa.PrivateKey, obj *Object) error
- func VerifyID(obj *Object) error
- func VerifyPayloadChecksum(obj *Object) error
- func WriteLock(obj *Object, l Lock)
- type Attribute
- func (a *Attribute) Key() string
- func (a *Attribute) Marshal() ([]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 ECChunk
- type ECHeader
- func (e *ECHeader) Header() []byte
- func (e *ECHeader) HeaderLength() uint32
- func (e *ECHeader) Index() uint32
- func (e *ECHeader) Parent() oid.ID
- func (e *ECHeader) ParentAttributes() []Attribute
- func (e *ECHeader) ParentSplitID() *SplitID
- func (e *ECHeader) ParentSplitParentID() *oid.ID
- func (e *ECHeader) ReadFromV2(h *object.ECHeader) error
- func (e *ECHeader) SetHeader(header []byte)
- func (e *ECHeader) SetHeaderLength(l uint32)
- func (e *ECHeader) SetIndex(i uint32)
- func (e *ECHeader) SetParent(id oid.ID)
- func (e *ECHeader) SetParentAttributes(attrs []Attribute)
- func (e *ECHeader) SetParentSplitID(parentSplitID *SplitID)
- func (e *ECHeader) SetParentSplitParentID(parentSplitParentID *oid.ID)
- func (e *ECHeader) SetTotal(i uint32)
- func (e *ECHeader) Total() uint32
- func (e *ECHeader) WriteToV2(h *object.ECHeader)
- type ECInfo
- type ECInfoError
- type ECParentInfo
- type Lock
- type NotificationInfo
- type Object
- func (o *Object) Attributes() []Attribute
- func (o *Object) Children() []oid.ID
- func (o *Object) ContainerID() (v cid.ID, isSet bool)
- func (o *Object) CreationEpoch() uint64
- func (o *Object) CutPayload() *Object
- func (o *Object) ECHeader() *ECHeader
- func (o *Object) GetECHeader() *ECHeader
- func (o *Object) HasParent() bool
- func (o *Object) ID() (v oid.ID, isSet bool)
- func (o *Object) InitRelations()
- func (o *Object) Marshal() ([]byte, error)
- func (o *Object) MarshalHeaderJSON() ([]byte, error)
- func (o *Object) MarshalJSON() ([]byte, error)
- func (o *Object) NotificationInfo() (*NotificationInfo, error)
- func (o *Object) Object() *Objectdeprecated
- func (o *Object) OwnerID() user.ID
- func (o *Object) Parent() *Object
- func (o *Object) ParentID() (v oid.ID, isSet bool)
- func (o *Object) Payload() []byte
- func (o *Object) PayloadChecksum() (checksum.Checksum, bool)
- func (o *Object) PayloadHomomorphicHash() (checksum.Checksum, bool)
- func (o *Object) PayloadSize() uint64
- func (o *Object) PreviousID() (v oid.ID, isSet bool)
- func (o *Object) ResetRelations()
- func (o *Object) SessionToken() *session.Object
- func (o *Object) SetAttributes(v ...Attribute)
- func (o *Object) SetChildren(v ...oid.ID)
- func (o *Object) SetContainerID(v cid.ID)
- func (o *Object) SetCreationEpoch(v uint64)
- func (o *Object) SetECHeader(ec *ECHeader)
- func (o *Object) SetID(v oid.ID)
- func (o *Object) SetNotification(ni NotificationInfo)
- func (o *Object) SetOwnerID(v user.ID)
- func (o *Object) SetParent(v *Object)
- func (o *Object) SetParentID(v oid.ID)
- func (o *Object) SetPayload(v []byte)
- func (o *Object) SetPayloadChecksum(v checksum.Checksum)
- func (o *Object) SetPayloadHomomorphicHash(v checksum.Checksum)
- func (o *Object) SetPayloadSize(v uint64)
- func (o *Object) SetPreviousID(v oid.ID)
- func (o *Object) SetSessionToken(v *session.Object)
- func (o *Object) SetSignature(v *frostfscrypto.Signature)
- func (o *Object) SetSplitID(id *SplitID)
- func (o *Object) SetType(v Type)
- func (o *Object) SetVersion(v *version.Version)
- func (o *Object) Signature() *frostfscrypto.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) UserAttributes() []Attribute
- func (o *Object) VerifyIDSignature() bool
- func (o *Object) Version() *version.Version
- type Patch
- type PayloadPatch
- type Range
- type RawObjectdeprecated
- type RequiredFields
- type SearchFilter
- type SearchFilters
- func (f *SearchFilters) AddECParentFilter(m SearchMatchType, parentID oid.ID)
- func (f *SearchFilters) AddFilter(header, value string, op SearchMatchType)
- func (f *SearchFilters) AddNotificationEpochFilter(epoch uint64)
- func (f *SearchFilters) AddObjectContainerIDFilter(m SearchMatchType, id cid.ID)
- func (f *SearchFilters) AddObjectIDFilter(m SearchMatchType, id oid.ID)
- func (f *SearchFilters) AddObjectOwnerIDFilter(m SearchMatchType, id user.ID)
- func (f *SearchFilters) AddObjectVersionFilter(op SearchMatchType, v version.Version)
- func (f *SearchFilters) AddParentIDFilter(m SearchMatchType, id oid.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() (v oid.ID, isSet bool)
- func (s SplitInfo) Link() (v oid.ID, isSet bool)
- func (s *SplitInfo) Marshal() ([]byte, error)
- func (s *SplitInfo) MarshalJSON() ([]byte, error)
- func (s *SplitInfo) SetLastPart(v oid.ID)
- func (s *SplitInfo) SetLink(v oid.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
- func (s *SplitInfo) UnmarshalJSON(data []byte) error
- type SplitInfoError
- type Tombstone
- func (t *Tombstone) ExpirationEpoch() uint64
- func (t *Tombstone) Marshal() ([]byte, error)
- func (t *Tombstone) MarshalJSON() ([]byte, error)
- func (t *Tombstone) Members() []oid.ID
- func (t *Tombstone) SetExpirationEpoch(v uint64)
- func (t *Tombstone) SetMembers(v []oid.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" // AttributeFilePath is an attribute key that is commonly used to denote // full path to be associated with the object on saving. Should start with a // '/' and use '/' as a delimiting symbol. Trailing '/' should be // interpreted as a virtual directory marker. If an object has conflicting // FilePath and FileName, FilePath should have higher priority, because it // is used to construct the directory tree. FilePath with trailing '/' and // non-empty FileName attribute should not be used together. AttributeFilePath = "FilePath" // AttributeTimestamp is an attribute key that is commonly used to denote // user-defined local time of object creation in Unix Timestamp format. AttributeTimestamp = "Timestamp" // AttributeContentType 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 *Object)
CalculateAndSetPayloadChecksum calculates checksum of current object payload and writes it to the object.
func CalculateAndSetSignature ¶
func CalculateAndSetSignature(key ecdsa.PrivateKey, obj *Object) error
CalculateAndSetSignature signs id with provided key and sets that signature to the object.
func CalculateID ¶
CalculateID calculates identifier for the object.
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 InitCreation ¶
func InitCreation(dst *Object, rf RequiredFields)
InitCreation initializes the object instance with minimum set of required fields. Object is expected (but not required) to be blank. Object must not be nil.
func ReadLock ¶
ReadLock reads Lock from the Object. The lock must not be nil. Returns an error describing incorrect format. Makes sense only if object has TypeLock type.
See also WriteLock.
func SetIDWithSignature ¶
func SetIDWithSignature(key ecdsa.PrivateKey, obj *Object) error
SetIDWithSignature sets object identifier and signature.
func SetVerificationFields ¶
func SetVerificationFields(key ecdsa.PrivateKey, obj *Object) error
SetVerificationFields calculates and sets all verification fields of the object.
func VerifyPayloadChecksum ¶
VerifyPayloadChecksum checks if payload checksum in the object corresponds to its payload.
Types ¶
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) 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 ECChunk ¶
func NewECChunkFromV2 ¶
type ECHeader ¶
type ECHeader struct {
// contains filtered or unexported fields
}
ECHeader represents erasure coding header.
func NewECHeader ¶
func NewECHeader(ecParentInfo ECParentInfo, index, total uint32, header []byte, headerLength uint32) *ECHeader
NewECHeader constructs new erasure coding header.
func (*ECHeader) HeaderLength ¶
func (*ECHeader) ParentAttributes ¶
func (*ECHeader) ParentSplitID ¶
func (*ECHeader) ParentSplitParentID ¶
func (*ECHeader) ReadFromV2 ¶
ReadFromV2 converts v2-api structure to SDK one.
func (*ECHeader) SetHeaderLength ¶
func (*ECHeader) SetParentAttributes ¶
func (*ECHeader) SetParentSplitID ¶
func (*ECHeader) SetParentSplitParentID ¶
type ECInfo ¶
func NewECInfoFromV2 ¶
NewECInfoFromV2 wraps v2 ECInfo message to ECInfo.
Nil object.ECInfo converts to nil.
func (*ECInfo) MarshalJSON ¶
MarshalJSON implements json.Marshaler.
func (*ECInfo) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler.
type ECInfoError ¶
type ECInfoError struct {
// contains filtered or unexported fields
}
func NewECInfoError ¶
func NewECInfoError(v *ECInfo) *ECInfoError
func (*ECInfoError) ECInfo ¶
func (e *ECInfoError) ECInfo() *ECInfo
func (*ECInfoError) Error ¶
func (e *ECInfoError) Error() string
type ECParentInfo ¶
type Lock ¶
Lock represents record with locked objects. It is compatible with FrostFS API V2 protocol.
Lock instance can be written to the Object, see WriteLock/ReadLock.
func (Lock) NumberOfMembers ¶
NumberOfMembers returns number of members in lock list.
func (Lock) ReadMembers ¶
ReadMembers reads list of locked members.
Buffer length must not be less than NumberOfMembers.
func (*Lock) Unmarshal ¶
Unmarshal decodes the Lock from its FrostFS protocol binary representation.
func (*Lock) WriteMembers ¶
WriteMembers writes list of locked members.
type NotificationInfo ¶
type NotificationInfo struct {
// contains filtered or unexported fields
}
NotificationInfo groups information about object notification that can be written to object.
Topic is an optional field.
func (NotificationInfo) Epoch ¶
func (n NotificationInfo) Epoch() uint64
Epoch returns object notification tick epoch.
func (*NotificationInfo) SetEpoch ¶
func (n *NotificationInfo) SetEpoch(epoch uint64)
SetEpoch sets object notification tick epoch.
func (*NotificationInfo) SetTopic ¶
func (n *NotificationInfo) SetTopic(topic string)
SetTopic sets optional object notification topic.
func (NotificationInfo) Topic ¶
func (n NotificationInfo) Topic() string
Topic return optional object notification topic.
type Object ¶
Object represents in-memory structure of the FrostFS object. Type is compatible with FrostFS API V2 protocol.
Instance can be created depending on scenario:
- InitCreation (an object to be placed in container);
- New (blank instance, usually needed for decoding);
- NewFromV2 (when working under FrostFS API V2 protocol).
func New ¶
func New() *Object
New creates and initializes blank Object.
Works similar as NewFromV2(new(Object)).
func NewRawFrom
deprecated
func NewRawFromV2
deprecated
func (*Object) Attributes ¶
Attributes returns object attributes.
func (*Object) ContainerID ¶
ContainerID returns identifier of the related container.
func (*Object) CreationEpoch ¶
CreationEpoch returns epoch number in which object was created.
func (*Object) CutPayload ¶
CutPayload returns Object w/ empty payload.
Changes of non-payload fields affect source object.
func (*Object) GetECHeader ¶
func (*Object) InitRelations ¶
func (o *Object) InitRelations()
InitRelations initializes relation field.
func (*Object) MarshalHeaderJSON ¶
MarshalHeaderJSON marshals object's header into JSON format.
func (*Object) MarshalJSON ¶
MarshalJSON encodes object to protobuf JSON format.
func (*Object) NotificationInfo ¶
func (o *Object) NotificationInfo() (*NotificationInfo, error)
NotificationInfo returns notification info read from the object structure. Returns any error that appeared during notification information parsing.
func (*Object) PayloadChecksum ¶
PayloadChecksum returns checksum of the object payload and bool that indicates checksum presence in the object.
Zero Object does not have payload checksum.
See also SetPayloadChecksum.
func (*Object) PayloadHomomorphicHash ¶
PayloadHomomorphicHash returns homomorphic hash of the object payload and bool that indicates checksum presence in the object.
Zero Object does not have payload homomorphic checksum.
See also SetPayloadHomomorphicHash.
func (*Object) PayloadSize ¶
PayloadSize returns payload length of the object.
func (*Object) PreviousID ¶
PreviousID returns identifier of the previous sibling object.
func (*Object) ResetRelations ¶
func (o *Object) ResetRelations()
ResetRelations removes all fields of links with other objects.
func (*Object) SessionToken ¶
SessionToken returns token of the session within which object was created.
func (*Object) SetAttributes ¶
SetAttributes sets object attributes.
func (*Object) SetChildren ¶
SetChildren sets list of the identifiers of the child objects.
func (*Object) SetContainerID ¶
SetContainerID sets identifier of the related container.
func (*Object) SetCreationEpoch ¶
SetCreationEpoch sets epoch number in which object was created.
func (*Object) SetECHeader ¶
func (*Object) SetNotification ¶
func (o *Object) SetNotification(ni NotificationInfo)
SetNotification writes NotificationInfo to the object structure.
func (*Object) SetOwnerID ¶
SetOwnerID sets identifier of the object owner.
func (*Object) SetParentID ¶
SetParentID sets identifier of the parent object.
func (*Object) SetPayloadChecksum ¶
SetPayloadChecksum sets checksum of the object payload.
See also PayloadChecksum.
func (*Object) SetPayloadHomomorphicHash ¶
SetPayloadHomomorphicHash sets homomorphic hash of the object payload.
See also PayloadHomomorphicHash.
func (*Object) SetPayloadSize ¶
SetPayloadSize sets payload length of the object.
func (*Object) SetPreviousID ¶
SetPreviousID sets identifier of the previous sibling object.
func (*Object) SetSessionToken ¶
SetSessionToken sets token of the session within which object was created.
func (*Object) SetSignature ¶
func (o *Object) SetSignature(v *frostfscrypto.Signature)
SetSignature sets signature of the object identifier.
func (*Object) SetSplitID ¶
SetSplitID sets split identifier for the split object.
func (*Object) SetVersion ¶
SetVersion sets version of the object.
func (*Object) Signature ¶
func (o *Object) Signature() *frostfscrypto.Signature
Signature returns signature of the object identifier.
func (*Object) 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.
func (*Object) UserAttributes ¶
UserAttributes returns object user attributes.
func (*Object) VerifyIDSignature ¶
VerifyIDSignature verifies object ID signature.
type Patch ¶
type Patch struct { // The address of the object for which the patch is being applied. Address oid.Address // The list of new attributes to set in the object's header. NewAttributes []Attribute // If ReplaceAttributes flag is true, then the header's attributes are reset and // filled with NewAttributes. Otherwise, the attributes are just merged. ReplaceAttributes bool // Payload patch. If this field is not set, then it assumed such Patch patches only // header (see NewAttributes, ReplaceAttributes). PayloadPatch *PayloadPatch }
Patch is a patch that's applied for an object.
func (*Patch) FromV2 ¶
func (p *Patch) FromV2(patch *v2object.PatchRequestBody)
func (*Patch) ToV2 ¶
func (p *Patch) ToV2() *v2object.PatchRequestBody
type PayloadPatch ¶
type PayloadPatch struct { // Range of the patch application. Range *Range // Chunk is the payload that replaces (or is appended to) the original object payload. Chunk []byte }
Patch is a patch that's applied for an object's payload.
func (*PayloadPatch) FromV2 ¶
func (p *PayloadPatch) FromV2(patch *v2object.PatchRequestBodyPatch)
func (*PayloadPatch) ToV2 ¶
func (p *PayloadPatch) ToV2() *v2object.PatchRequestBodyPatch
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 RequiredFields ¶
type RequiredFields struct { // Identifier of the FrostFS container associated with the object. Container cid.ID // Object owner's user ID in the FrostFS system. Owner user.ID }
RequiredFields contains the minimum set of object data that must be set by the FrostFS user at the stage of creation.
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) AddECParentFilter ¶
func (f *SearchFilters) AddECParentFilter(m SearchMatchType, parentID oid.ID)
func (*SearchFilters) AddFilter ¶
func (f *SearchFilters) AddFilter(header, value string, op SearchMatchType)
func (*SearchFilters) AddNotificationEpochFilter ¶
func (f *SearchFilters) AddNotificationEpochFilter(epoch uint64)
func (*SearchFilters) AddObjectContainerIDFilter ¶
func (f *SearchFilters) AddObjectContainerIDFilter(m SearchMatchType, id cid.ID)
func (*SearchFilters) AddObjectIDFilter ¶
func (f *SearchFilters) AddObjectIDFilter(m SearchMatchType, id oid.ID)
AddObjectIDFilter adds filter by object identifier.
func (*SearchFilters) AddObjectOwnerIDFilter ¶
func (f *SearchFilters) AddObjectOwnerIDFilter(m SearchMatchType, id user.ID)
func (*SearchFilters) AddObjectVersionFilter ¶
func (f *SearchFilters) AddObjectVersionFilter(op SearchMatchType, v version.Version)
func (*SearchFilters) AddParentIDFilter ¶
func (f *SearchFilters) AddParentIDFilter(m SearchMatchType, id oid.ID)
AddParentIDFilter adds filter by parent identifier.
func (*SearchFilters) AddPhyFilter ¶
func (f *SearchFilters) AddPhyFilter()
func (*SearchFilters) AddRootFilter ¶
func (f *SearchFilters) AddRootFilter()
func (*SearchFilters) AddSplitIDFilter ¶
func (f *SearchFilters) AddSplitIDFilter(m SearchMatchType, id *SplitID)
func (*SearchFilters) AddTypeFilter ¶
func (f *SearchFilters) AddTypeFilter(m SearchMatchType, typ Type)
AddTypeFilter adds filter by object type.
func (*SearchFilters) MarshalJSON ¶
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 ¶
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 ¶
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 ¶
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 ¶
type SplitID struct {
// contains filtered or unexported fields
}
SplitID is a UUIDv4 used as attribute in split objects.
func NewSplitID ¶
func NewSplitID() *SplitID
NewSplitID returns UUID representation of splitID attribute.
Defaults:
- id: random UUID.
func NewSplitIDFromV2 ¶
NewSplitIDFromV2 returns parsed UUID from bytes. If v is invalid UUIDv4 byte sequence, then function returns nil.
Nil converts to nil.
type SplitInfo ¶
func NewSplitInfo ¶
func NewSplitInfo() *SplitInfo
NewSplitInfo creates and initializes blank SplitInfo.
Defaults:
- splitID: nil;
- lastPart nil;
- link: nil.
func NewSplitInfoFromV2 ¶
NewSplitInfoFromV2 wraps v2 SplitInfo message to SplitInfo.
Nil object.SplitInfo converts to nil.
func (*SplitInfo) MarshalJSON ¶
MarshalJSON implements json.Marshaler.
func (*SplitInfo) SetLastPart ¶
func (*SplitInfo) SetSplitID ¶
func (*SplitInfo) ToV2 ¶
ToV2 converts SplitInfo to v2 SplitInfo message.
Nil SplitInfo converts to nil.
func (*SplitInfo) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler.
type SplitInfoError ¶
type SplitInfoError struct {
// contains filtered or unexported fields
}
func NewSplitInfoError ¶
func NewSplitInfoError(v *SplitInfo) *SplitInfoError
func (*SplitInfoError) Error ¶
func (s *SplitInfoError) Error() string
func (*SplitInfoError) SplitInfo ¶
func (s *SplitInfoError) SplitInfo() *SplitInfo
type Tombstone ¶
Tombstone represents v2-compatible tombstone structure.
func NewTombstone ¶
func NewTombstone() *Tombstone
NewTombstone creates and initializes blank Tombstone.
Defaults:
- exp: 0;
- splitID: nil;
- members: nil.
func NewTombstoneFromV2 ¶
NewTombstoneFromV2 wraps v2 Tombstone message to Tombstone.
Nil tombstone.Tombstone converts to nil.
func (*Tombstone) ExpirationEpoch ¶
ExpirationEpoch returns the last FrostFS epoch number of the tombstone lifetime.
See also SetExpirationEpoch.
func (*Tombstone) MarshalJSON ¶
MarshalJSON encodes Tombstone to protobuf JSON format.
func (*Tombstone) SetExpirationEpoch ¶
SetExpirationEpoch sets the last FrostFS epoch number of the tombstone lifetime.
See also ExpirationEpoch.
func (*Tombstone) SetMembers ¶
SetMembers sets list of objects to be deleted.
func (*Tombstone) SetSplitID ¶
SetSplitID sets identifier of object split hierarchy.
func (*Tombstone) ToV2 ¶
ToV2 converts Tombstone to v2 Tombstone message.
Nil Tombstone converts to nil.
func (*Tombstone) UnmarshalJSON ¶
UnmarshalJSON decodes Tombstone from protobuf JSON format.
type Type ¶
func TypeFromV2 ¶
func (*Type) FromString ¶
FromString parses Type from a string representation. It is a reverse action to String().
Returns true if s was parsed successfully.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package oid provides primitives to work with object identification in FrostFS.
|
Package oid provides primitives to work with object identification in FrostFS. |
test
Package oidtest provides functions for convenient testing of oid package API.
|
Package oidtest provides functions for convenient testing of oid package API. |
Package relations provides feature to process inner object structure.
|
Package relations provides feature to process inner object structure. |