Documentation ¶
Index ¶
- func AddressOf(obj *objectSDK.Object) oid.Address
- func IsECSupported(obj *objectSDK.Object) bool
- func LookupKeyInContainer(nm *netmap.NetMap, pkey, idCnr []byte, cnr container.Container) (bool, error)
- type ClassifyResult
- type ContentMeta
- type ECInfo
- type FormatValidator
- type FormatValidatorOption
- func WithContainersSource(cs container.Source) FormatValidatorOption
- func WithInnerRing(ir InnerRing) FormatValidatorOption
- func WithLockSource(e LockSource) FormatValidatorOption
- func WithLogger(l *logger.Logger) FormatValidatorOption
- func WithNetState(netState netmap.State) FormatValidatorOption
- func WithNetmapSource(ns netmap.Source) FormatValidatorOption
- func WithVerifySessionTokenIssuer(verifySessionTokenIssuer bool) FormatValidatorOption
- type Info
- type InnerRing
- type LockSource
- type SenderClassifier
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsECSupported ¶ added in v0.39.0
IsECSupported returns True if EC supported for object.
EC supported only for regular, not linking objects.
Types ¶
type ClassifyResult ¶ added in v0.37.0
type ContentMeta ¶
type ContentMeta struct {
// contains filtered or unexported fields
}
ContentMeta describes FrostFS meta information that brings object's payload if the object is one of:
- object.TypeTombstone;
- object.TypeLock.
func (ContentMeta) Objects ¶
func (i ContentMeta) Objects() []oid.ID
Objects returns objects that the original object's payload affects:
- inhumed objects, if the original object is a Tombstone;
- locked objects, if the original object is a Lock;
- nil, if the original object is a Regular object.
type FormatValidator ¶
type FormatValidator struct {
// contains filtered or unexported fields
}
FormatValidator represents an object format validator.
func NewFormatValidator ¶
func NewFormatValidator(opts ...FormatValidatorOption) *FormatValidator
NewFormatValidator creates, initializes and returns FormatValidator instance.
func (*FormatValidator) Validate ¶
func (v *FormatValidator) Validate(ctx context.Context, obj *objectSDK.Object, unprepared bool) error
Validate validates object format.
Does not validate payload checksum and content. If unprepared is true, only fields set by user are validated.
Returns nil error if the object has valid structure.
func (*FormatValidator) ValidateContent ¶
func (v *FormatValidator) ValidateContent(o *objectSDK.Object) (ContentMeta, error)
ValidateContent validates payload content according to the object type.
type FormatValidatorOption ¶
type FormatValidatorOption func(*cfg)
FormatValidatorOption represents a FormatValidator constructor option.
func WithContainersSource ¶ added in v0.37.0
func WithContainersSource(cs container.Source) FormatValidatorOption
WithContainersSource return option to set Containers source.
func WithInnerRing ¶ added in v0.37.0
func WithInnerRing(ir InnerRing) FormatValidatorOption
WithInnerRing return option to set Inner Ring source.
func WithLockSource ¶
func WithLockSource(e LockSource) FormatValidatorOption
WithLockSource return option to set the Storage Engine.
func WithLogger ¶ added in v0.37.0
func WithLogger(l *logger.Logger) FormatValidatorOption
WithLogger return option to set logger.
func WithNetState ¶
func WithNetState(netState netmap.State) FormatValidatorOption
WithNetState returns options to set the network state interface.
func WithNetmapSource ¶ added in v0.37.0
func WithNetmapSource(ns netmap.Source) FormatValidatorOption
WithNetmapSource return option to set Netmap source.
func WithVerifySessionTokenIssuer ¶ added in v0.37.0
func WithVerifySessionTokenIssuer(verifySessionTokenIssuer bool) FormatValidatorOption
WithVerifySessionTokenIssuer return option to set verify session token issuer value.
type LockSource ¶
type LockSource interface { // IsLocked must clarify object's lock status. IsLocked(ctx context.Context, address oid.Address) (bool, error) }
LockSource is a source of lock relations between the objects.
type SenderClassifier ¶ added in v0.37.0
type SenderClassifier struct {
// contains filtered or unexported fields
}
func NewSenderClassifier ¶ added in v0.37.0
func (SenderClassifier) IsInnerRingOrContainerNode ¶ added in v0.37.0
func (c SenderClassifier) IsInnerRingOrContainerNode(ctx context.Context, ownerKeyInBytes []byte, idCnr cid.ID, cnr container.Container) (*ClassifyResult, error)