Documentation
¶
Index ¶
- Constants
- Variables
- func FormEncryptionInfo(headers map[string]string) encryption.ObjectEncryption
- func GetObjectSize(objInfo *data.ObjectInfo) (uint64, error)
- func IsAuthenticatedRequest(ctx context.Context) bool
- func IsSystemHeader(key string) bool
- func MimeByFilePath(path string) string
- func NameFromString(name string) (string, string)
- func TimeNow(ctx context.Context) time.Time
- type AnonymousKey
- type BucketResolver
- type Cache
- func (c *Cache) DeleteBucket(bktInfo *data.BucketInfo)
- func (c *Cache) DeleteCORS(bktInfo *data.BucketInfo)
- func (c *Cache) DeleteLifecycleConfiguration(bktInfo *data.BucketInfo)
- func (c *Cache) DeleteListMultipartSession(owner user.ID, key cache.ListMultipartSessionKey)
- func (c *Cache) DeleteListSession(owner user.ID, key cache.ListSessionKey)
- func (c *Cache) DeleteMultipartInfo(bkt *data.BucketInfo, info *data.MultipartInfo)
- func (c *Cache) DeleteObject(addr oid.Address)
- func (c *Cache) DeleteObjectName(cnrID cid.ID, objName string)
- func (c *Cache) DeleteTagging(key string)
- func (c *Cache) DeleteWebsiteConfiguration(bktInfo *data.BucketInfo)
- func (c *Cache) GetBucket(zone, name string) *data.BucketInfo
- func (c *Cache) GetCORS(owner user.ID, bkt *data.BucketInfo) *data.CORSConfiguration
- func (c *Cache) GetLastObject(owner user.ID, cnrID cid.ID, objName string) *data.ExtendedObjectInfo
- func (c *Cache) GetLifecycleConfiguration(owner user.ID, bkt *data.BucketInfo) *data.LifecycleConfiguration
- func (c *Cache) GetListMultipartSession(owner user.ID, key cache.ListMultipartSessionKey) *data.ListMultipartSession
- func (c *Cache) GetListSession(owner user.ID, key cache.ListSessionKey) *data.ListSession
- func (c *Cache) GetLockInfo(owner user.ID, key string) *data.LockInfo
- func (c *Cache) GetMultipartInfo(bkt *data.BucketInfo, uploadID string) *data.MultipartInfo
- func (c *Cache) GetNetmap() *netmap.NetMap
- func (c *Cache) GetNetworkInfo() *netmap.NetworkInfo
- func (c *Cache) GetObject(owner user.ID, addr oid.Address) *data.ExtendedObjectInfo
- func (c *Cache) GetPartsInfo(bktInfo *data.BucketInfo, uploadID string) []*data.PartInfoExtended
- func (c *Cache) GetPlacementPolicy(cnrID cid.ID) *netmap.PlacementPolicy
- func (c *Cache) GetSettings(owner user.ID, bktInfo *data.BucketInfo) *data.BucketSettings
- func (c *Cache) GetTagging(owner user.ID, key string) map[string]string
- func (c *Cache) GetWebsiteConfiguration(owner user.ID, bkt *data.BucketInfo) *data.WebsiteConfiguration
- func (c *Cache) PutBucket(bktInfo *data.BucketInfo)
- func (c *Cache) PutCORS(owner user.ID, bkt *data.BucketInfo, cors *data.CORSConfiguration)
- func (c *Cache) PutLifecycleConfiguration(owner user.ID, bkt *data.BucketInfo, cfg *data.LifecycleConfiguration)
- func (c *Cache) PutListMultipartSession(owner user.ID, key cache.ListMultipartSessionKey, ...)
- func (c *Cache) PutListSession(owner user.ID, key cache.ListSessionKey, session *data.ListSession)
- func (c *Cache) PutLockInfo(owner user.ID, key string, lockInfo *data.LockInfo)
- func (c *Cache) PutMultipartInfo(bkt *data.BucketInfo, info *data.MultipartInfo) error
- func (c *Cache) PutNetmap(nm netmap.NetMap)
- func (c *Cache) PutNetworkInfo(info netmap.NetworkInfo)
- func (c *Cache) PutObject(owner user.ID, extObjInfo *data.ExtendedObjectInfo)
- func (c *Cache) PutObjectWithName(owner user.ID, extObjInfo *data.ExtendedObjectInfo)
- func (c *Cache) PutSettings(owner user.ID, bktInfo *data.BucketInfo, settings *data.BucketSettings)
- func (c *Cache) PutTagging(owner user.ID, key string, tags map[string]string)
- func (c *Cache) PutWebsiteConfiguration(owner user.ID, bkt *data.BucketInfo, cfg *data.WebsiteConfiguration)
- func (c *Cache) StorePartInfo(bktInfo *data.BucketInfo, part *data.PartInfoExtended) error
- func (c *Cache) TryLockMPU(bktInfo *data.BucketInfo, uploadID string) bool
- func (c *Cache) UnLockMPU(bktInfo *data.BucketInfo, uploadID string)
- type CachesConfig
- type CompleteMultipartParams
- type CompletedPart
- type Config
- type CopyObjectParams
- type CreateBucketParams
- type CreateMultipartParams
- type DeleteBucketParams
- type DeleteMarkerError
- type DeleteObjectParams
- type EncryptedPart
- type FeatureSettings
- type FeatureSettingsMock
- func (k *FeatureSettingsMock) BufferMaxSizeForPut() uint64
- func (k *FeatureSettingsMock) ClientCut() bool
- func (k *FeatureSettingsMock) CorsContainer() *data.BucketInfo
- func (k *FeatureSettingsMock) FormContainerZone(ns string) string
- func (k *FeatureSettingsMock) LifecycleContainer() *data.BucketInfo
- func (k *FeatureSettingsMock) LiteListingTagKey() string
- func (k *FeatureSettingsMock) MD5Enabled() bool
- func (k *FeatureSettingsMock) MfaManager() *mfa.Manager
- func (k *FeatureSettingsMock) RemoveOnReplace() bool
- func (k *FeatureSettingsMock) RemoveOnReplaceQueue() int
- func (k *FeatureSettingsMock) RemoveOnReplaceTimeout() time.Duration
- func (k *FeatureSettingsMock) SetClientCut(clientCut bool)
- func (k *FeatureSettingsMock) SetCorsContainer(info *data.BucketInfo)
- func (k *FeatureSettingsMock) SetLifecyclerContainer(info *data.BucketInfo)
- func (k *FeatureSettingsMock) SetListObjectsLiteCustomTagKey(key string)
- func (k *FeatureSettingsMock) SetMD5Enabled(md5Enabled bool)
- func (k *FeatureSettingsMock) SetMfaManager(mgr *mfa.Manager)
- func (k *FeatureSettingsMock) SetRemoveOnReplace(removeOnReplace bool)
- func (k *FeatureSettingsMock) SetWebStaticHostingContainer(info *data.BucketInfo)
- func (k *FeatureSettingsMock) TombstoneLifetime() uint64
- func (k *FeatureSettingsMock) TombstoneMembersSize() int
- func (k *FeatureSettingsMock) WebStaticHostingContainer() *data.BucketInfo
- type GetObjectParams
- type HeadObjectParams
- type Layer
- func (n *Layer) AbortMultipartUpload(ctx context.Context, p *UploadInfoParams) error
- func (n *Layer) BearerOwner(ctx context.Context) user.ID
- func (n *Layer) CompleteMultipartUpload(ctx context.Context, p *CompleteMultipartParams) (*UploadData, *data.ExtendedObjectInfo, error)
- func (n *Layer) CopyObject(ctx context.Context, p *CopyObjectParams) (*data.ExtendedObjectInfo, error)
- func (n *Layer) CreateBucket(ctx context.Context, p *CreateBucketParams) (*data.BucketInfo, error)
- func (n *Layer) CreateMultipartUpload(ctx context.Context, p *CreateMultipartParams) error
- func (n *Layer) DeleteBucket(ctx context.Context, p *DeleteBucketParams) error
- func (n *Layer) DeleteBucketCORS(ctx context.Context, bktInfo, corsCnr *data.BucketInfo) error
- func (n *Layer) DeleteBucketLifecycle(ctx context.Context, bktInfo, lifecycleCnr *data.BucketInfo) error
- func (n *Layer) DeleteBucketTagging(ctx context.Context, bktInfo *data.BucketInfo) error
- func (n *Layer) DeleteBucketWebsite(ctx context.Context, bktInfo, websiteCnr *data.BucketInfo) error
- func (n *Layer) DeleteContainer(ctx context.Context, p *DeleteBucketParams) error
- func (n *Layer) DeleteObjectTagging(ctx context.Context, p *data.ObjectVersion) error
- func (n *Layer) DeleteObjects(ctx context.Context, p *DeleteObjectParams) []*VersionedObject
- func (n *Layer) EphemeralKey() *keys.PublicKey
- func (n *Layer) GetBucketCORS(ctx context.Context, bktInfo, corsCnr *data.BucketInfo, ...) (*data.CORSConfiguration, error)
- func (n *Layer) GetBucketInfo(ctx context.Context, name string) (*data.BucketInfo, error)
- func (n *Layer) GetBucketLifecycle(ctx context.Context, bktInfo, lifecycleCnr *data.BucketInfo) (*data.LifecycleConfiguration, error)
- func (n *Layer) GetBucketSettings(ctx context.Context, bktInfo *data.BucketInfo) (*data.BucketSettings, error)
- func (n *Layer) GetBucketTagging(ctx context.Context, bktInfo *data.BucketInfo) (map[string]string, error)
- func (n *Layer) GetBucketWebsite(ctx context.Context, bktInfo, websiteCnr *data.BucketInfo) (*data.WebsiteConfiguration, error)
- func (n *Layer) GetExtendedObjectInfo(ctx context.Context, p *HeadObjectParams) (*data.ExtendedObjectInfo, error)
- func (n *Layer) GetLockInfo(ctx context.Context, objVersion *data.ObjectVersion) (*data.LockInfo, error)
- func (n *Layer) GetNetworkInfo(ctx context.Context) (netmap.NetworkInfo, error)
- func (n *Layer) GetObject(ctx context.Context, p *GetObjectParams) (*ObjectPayload, error)
- func (n *Layer) GetObjectInfo(ctx context.Context, p *HeadObjectParams) (*data.ObjectInfo, error)
- func (n *Layer) GetObjectTagging(ctx context.Context, p *data.GetObjectTaggingParams) (string, map[string]string, error)
- func (n *Layer) GetObjectTaggingAndLock(ctx context.Context, objVersion *data.ObjectVersion, ...) (map[string]string, data.LockInfo, error)
- func (n *Layer) ListBuckets(ctx context.Context, params ListBucketsParams) (ListBucketsResult, error)
- func (n *Layer) ListMultipartUploads(ctx context.Context, p *ListMultipartUploadsParams) (ListMultipartUploadsInfo, error)
- func (n *Layer) ListObjectVersions(ctx context.Context, p *ListObjectVersionsParams) (*ListObjectVersionsInfo, error)
- func (n *Layer) ListObjectsV1(ctx context.Context, p *ListObjectsParamsV1) (*ListObjectsInfoV1, error)
- func (n *Layer) ListObjectsV2(ctx context.Context, p *ListObjectsParamsV2) (*ListObjectsInfoV2, error)
- func (n *Layer) ListParts(ctx context.Context, p *ListPartsParams) (*ListPartsInfo, error)
- func (n *Layer) PatchObject(ctx context.Context, p *PatchObjectParams) (*data.ExtendedObjectInfo, error)
- func (n *Layer) PutBucketCORS(ctx context.Context, p *PutCORSParams) error
- func (n *Layer) PutBucketLifecycleConfiguration(ctx context.Context, p *PutBucketLifecycleParams) error
- func (n *Layer) PutBucketSettings(ctx context.Context, p *PutSettingsParams) error
- func (n *Layer) PutBucketTagging(ctx context.Context, bktInfo *data.BucketInfo, tagSet map[string]string) error
- func (n *Layer) PutBucketWebsite(ctx context.Context, p *PutWebsiteParams) error
- func (n *Layer) PutLockInfo(ctx context.Context, p *PutLockInfoParams) (err error)
- func (n *Layer) PutObject(ctx context.Context, p *PutObjectParams) (*data.ExtendedObjectInfo, error)
- func (n *Layer) PutObjectTagging(ctx context.Context, p *data.PutObjectTaggingParams) (err error)
- func (n *Layer) ResolveBucket(ctx context.Context, zone, name string) (cid.ID, error)
- func (n *Layer) ResolveCID(ctx context.Context, name string) (cid.ID, error)
- func (n *Layer) SessionTokenForRead(ctx context.Context) *session.Container
- func (n *Layer) UploadPart(ctx context.Context, p *UploadPartParams) (string, error)
- func (n *Layer) UploadPartCopy(ctx context.Context, p *UploadCopyParams) (*data.ObjectInfo, error)
- type ListBucketsParams
- type ListBucketsResult
- type ListMultipartUploadsInfo
- type ListMultipartUploadsParams
- type ListObjectVersionsInfo
- type ListObjectVersionsParams
- type ListObjectsInfo
- type ListObjectsInfoV1
- type ListObjectsInfoV2
- type ListObjectsParamsCommon
- type ListObjectsParamsV1
- type ListObjectsParamsV2
- type ListPartsInfo
- type ListPartsParams
- type ListType
- type ObjectPayload
- type Part
- type PartsInfo
- type PatchObjectParams
- type PutBucketLifecycleParams
- type PutCORSParams
- type PutCombinedObjectParams
- type PutLockInfoParams
- type PutObjectParams
- type PutSettingsParams
- type PutWebsiteParams
- type RangeParams
- type RelationsMock
- func (r *RelationsMock) FindSiblingByParentID(_ context.Context, _ cid.ID, _ oid.ID, _ relations.Tokens) ([]oid.ID, error)
- func (r *RelationsMock) FindSiblingBySplitID(context.Context, cid.ID, *object.SplitID, relations.Tokens) ([]oid.ID, error)
- func (r *RelationsMock) GetLeftSibling(context.Context, cid.ID, oid.ID, relations.Tokens) (oid.ID, error)
- func (r *RelationsMock) GetSplitInfo(context.Context, cid.ID, oid.ID, relations.Tokens) (*object.SplitInfo, error)
- func (r *RelationsMock) ListChildrenByLinker(context.Context, cid.ID, oid.ID, relations.Tokens) ([]oid.ID, error)
- type TestFrostFS
- func (t *TestFrostFS) AddCORSObject(bkt *data.BucketInfo, corsCnrID cid.ID, cors string)
- func (t *TestFrostFS) AddContainerPolicyChain(_ context.Context, prm frostfs.PrmAddContainerPolicyChain) error
- func (t *TestFrostFS) AddObject(key string, obj *object.Object)
- func (t *TestFrostFS) AllObjects(cnrID cid.ID) (result []oid.ID)
- func (t *TestFrostFS) ClearTombstoneOIDCount()
- func (t *TestFrostFS) Container(_ context.Context, prm frostfs.PrmContainer) (*container.Container, error)
- func (t *TestFrostFS) ContainerID(zone, name string) (cid.ID, error)
- func (t *TestFrostFS) CopiesNumbers(addr string) []uint32
- func (t *TestFrostFS) CreateContainer(_ context.Context, prm frostfs.PrmContainerCreate) (*frostfs.ContainerCreateResult, error)
- func (t *TestFrostFS) CreateObject(ctx context.Context, prm frostfs.PrmObjectCreate) (*frostfs.CreateObjectResult, error)
- func (t *TestFrostFS) CurrentEpoch() uint64
- func (t *TestFrostFS) DeleteContainer(_ context.Context, cnrID cid.ID, _ *session.Container) error
- func (t *TestFrostFS) DeleteObject(ctx context.Context, prm frostfs.PrmObjectDelete) error
- func (t *TestFrostFS) GetContainerByID(cid cid.ID) (*container.Container, error)
- func (t *TestFrostFS) GetObject(ctx context.Context, prm frostfs.PrmObjectGet) (*frostfs.Object, error)
- func (t *TestFrostFS) HeadObject(ctx context.Context, prm frostfs.PrmObjectHead) (*object.Object, error)
- func (t *TestFrostFS) LatestReceivedEpoch() uint64
- func (t *TestFrostFS) NetmapSnapshot(context.Context) (netmap.NetMap, error)
- func (t *TestFrostFS) NetworkInfo(context.Context) (netmap.NetworkInfo, error)
- func (t *TestFrostFS) ObjectExists(objID oid.ID) (result bool)
- func (t *TestFrostFS) Objects() (res []*object.Object)
- func (t *TestFrostFS) PatchObject(ctx context.Context, prm frostfs.PrmObjectPatch) (oid.ID, error)
- func (t *TestFrostFS) RangeObject(ctx context.Context, prm frostfs.PrmObjectRange) (io.ReadCloser, error)
- func (t *TestFrostFS) Relations() relations.Relations
- func (t *TestFrostFS) SearchObjects(_ context.Context, prm frostfs.PrmObjectSearch) ([]oid.ID, error)
- func (t *TestFrostFS) SetContainer(cnrID cid.ID, cnr *container.Container)
- func (t *TestFrostFS) SetEpoch(val uint64)
- func (t *TestFrostFS) SetObject(addr oid.Address, obj *object.Object)
- func (t *TestFrostFS) SetObjectError(addr oid.Address, err error)
- func (t *TestFrostFS) SetObjectPutError(fileName string, err error)
- func (t *TestFrostFS) SetObjectStreamError(addr oid.Address, offset int, err error)
- func (t *TestFrostFS) SufficientCopies(addr string) [][]uint32
- func (t *TestFrostFS) TimeToEpoch(_ context.Context, now, futureTime time.Time) (uint64, uint64, error)
- func (t *TestFrostFS) TombstoneOIDCount() int
- func (t *TestFrostFS) UserContainers(context.Context, frostfs.PrmUserContainers) ([]cid.ID, error)
- type TreeServiceMock
- func (t *TreeServiceMock) AddPart(ctx context.Context, bktInfo *data.BucketInfo, multipartNodeID uint64, ...) (oldObjIDsToDelete []oid.ID, err error)
- func (t *TreeServiceMock) AddVersion(_ context.Context, bktInfo *data.BucketInfo, newVersion *data.NodeVersion) (uint64, []data.OIDInfo, error)
- func (t *TreeServiceMock) CreateMultipartUpload(_ context.Context, bktInfo *data.BucketInfo, info *data.MultipartInfo) (uint64, error)
- func (t *TreeServiceMock) DeleteBucketTagging(context.Context, *data.BucketInfo) error
- func (t *TreeServiceMock) DeleteMultipartUpload(_ context.Context, bktInfo *data.BucketInfo, multipartInfo *data.MultipartInfo) error
- func (t *TreeServiceMock) DeleteObjectTagging(ctx context.Context, bktInfo *data.BucketInfo, objVersion *data.NodeVersion) error
- func (t *TreeServiceMock) GetAllVersionsByPrefix(_ context.Context, bktInfo *data.BucketInfo, prefix string) ([]*data.NodeVersion, error)
- func (t *TreeServiceMock) GetBucketTagging(context.Context, *data.BucketInfo) (map[string]string, error)
- func (t *TreeServiceMock) GetLatestVersion(_ context.Context, bktInfo *data.BucketInfo, objectName string) (*data.NodeVersion, error)
- func (t *TreeServiceMock) GetLock(_ context.Context, bktInfo *data.BucketInfo, nodeID uint64) (*data.LockInfo, error)
- func (t *TreeServiceMock) GetMultipartUpload(_ context.Context, bktInfo *data.BucketInfo, objectName, uploadID string) (*data.MultipartInfo, error)
- func (t *TreeServiceMock) GetMultipartUploadsByPrefix(context.Context, *data.BucketInfo, data.MultipartStreamParams) (data.MultipartInfoStream, error)
- func (t *TreeServiceMock) GetObjectTagging(_ context.Context, bktInfo *data.BucketInfo, nodeVersion *data.NodeVersion) (map[string]string, error)
- func (t *TreeServiceMock) GetObjectTaggingAndLock(ctx context.Context, bktInfo *data.BucketInfo, objVersion *data.NodeVersion) (map[string]string, *data.LockInfo, error)
- func (t *TreeServiceMock) GetParts(_ context.Context, bktInfo *data.BucketInfo, multipartNodeID uint64) ([]*data.PartInfoExtended, error)
- func (t *TreeServiceMock) GetSettingsNode(_ context.Context, bktInfo *data.BucketInfo) (*data.BucketSettings, error)
- func (t *TreeServiceMock) GetUnversioned(_ context.Context, bktInfo *data.BucketInfo, objectName string) (*data.NodeVersion, error)
- func (t *TreeServiceMock) GetVersions(_ context.Context, bktInfo *data.BucketInfo, objectName string) ([]*data.NodeVersion, error)
- func (t *TreeServiceMock) InitVersionsByPrefixStream(_ context.Context, bktInfo *data.BucketInfo, prefix string, ...) (data.VersionsStream, error)
- func (t *TreeServiceMock) PutBucketTagging(context.Context, *data.BucketInfo, map[string]string) error
- func (t *TreeServiceMock) PutLock(_ context.Context, bktInfo *data.BucketInfo, nodeID uint64, ...) error
- func (t *TreeServiceMock) PutObjectTagging(_ context.Context, bktInfo *data.BucketInfo, nodeVersion *data.NodeVersion, ...) error
- func (t *TreeServiceMock) PutSettingsNode(_ context.Context, bktInfo *data.BucketInfo, settings *data.BucketSettings) error
- func (t *TreeServiceMock) RemoveVersion(_ context.Context, bktInfo *data.BucketInfo, nodeID uint64) error
- type UploadCopyParams
- type UploadData
- type UploadInfo
- type UploadInfoParams
- type UploadPartParams
- type VersionedObject
- type VersionsByPrefixStreamMock
Constants ¶
const ( AESEncryptionAlgorithm = "AES256" AESKeySize = 32 AttributeEncryptionAlgorithm = apiconst.FrostFSSystemMetadataPrefix + "Algorithm" AttributeDecryptedSize = apiconst.FrostFSSystemMetadataPrefix + "Decrypted-Size" AttributeHMACSalt = apiconst.FrostFSSystemMetadataPrefix + "HMAC-Salt" AttributeHMACKey = apiconst.FrostFSSystemMetadataPrefix + "HMAC-Key" AttributeFrostfsCopiesNumber = "frostfs-copies-number" // such format to match X-Amz-Meta-Frostfs-Copies-Number header AttributeFrostfsSufficientCopiesNumber = "frostfs-sufficient-copies-number" // such format to match X-Amz-Meta-Frostfs-Sufficient-Copies-Number header )
const ( UploadIDAttributeName = "S3-Upload-Id" UploadPartNumberAttributeName = "S3-Upload-Part-Number" UploadCompletedParts = "S3-Completed-Parts" // MultipartObjectSize contains the real object size if object is combined (payload contains list of parts). // This header is used to determine if object is combined. MultipartObjectSize = "S3-Multipart-Object-Size" MaxSizeUploadsList = 1000 MaxSizePartsList = 1000 UploadMinPartNumber = 1 UploadMaxPartNumber = 10000 UploadMinSize = 5 * 1024 * 1024 // 5MB UploadMaxSize = 1024 * UploadMinSize // 5GB )
const (
AttributeComplianceMode = ".s3-compliance-mode"
)
const (
AttributeLockEnabled = "LockEnabled"
)
const PathSeparator = string(os.PathSeparator)
PathSeparator is a path components separator string.
Variables ¶
var EncryptionMetadata = map[string]struct{}{ AttributeEncryptionAlgorithm: {}, AttributeDecryptedSize: {}, AttributeHMACSalt: {}, AttributeHMACKey: {}, }
Functions ¶
func FormEncryptionInfo ¶
func FormEncryptionInfo(headers map[string]string) encryption.ObjectEncryption
func GetObjectSize ¶ added in v0.28.0
func GetObjectSize(objInfo *data.ObjectInfo) (uint64, error)
GetObjectSize retrieves the size of the entire object from header. Considers part objects sizes and excludes encryption overhead.
func IsAuthenticatedRequest ¶
IsAuthenticatedRequest checks if access box exists in the current request.
func IsSystemHeader ¶
func MimeByFilePath ¶
MimeByFilePath detect mime type by file path extension.
func NameFromString ¶
NameFromString splits name into a base file name and a directory path.
Types ¶
type AnonymousKey ¶
type AnonymousKey struct {
Key *keys.PrivateKey
}
AnonymousKey contains data for anonymous requests.
type BucketResolver ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
func NewCache ¶
func NewCache(cfg *CachesConfig) *Cache
func (*Cache) DeleteBucket ¶
func (c *Cache) DeleteBucket(bktInfo *data.BucketInfo)
func (*Cache) DeleteCORS ¶
func (c *Cache) DeleteCORS(bktInfo *data.BucketInfo)
func (*Cache) DeleteLifecycleConfiguration ¶ added in v0.31.0
func (c *Cache) DeleteLifecycleConfiguration(bktInfo *data.BucketInfo)
func (*Cache) DeleteListMultipartSession ¶ added in v0.33.0
func (c *Cache) DeleteListMultipartSession(owner user.ID, key cache.ListMultipartSessionKey)
func (*Cache) DeleteListSession ¶ added in v0.29.0
func (c *Cache) DeleteListSession(owner user.ID, key cache.ListSessionKey)
func (*Cache) DeleteMultipartInfo ¶ added in v0.36.0
func (c *Cache) DeleteMultipartInfo(bkt *data.BucketInfo, info *data.MultipartInfo)
func (*Cache) DeleteObject ¶
func (*Cache) DeleteTagging ¶
func (*Cache) DeleteWebsiteConfiguration ¶ added in v0.33.0
func (c *Cache) DeleteWebsiteConfiguration(bktInfo *data.BucketInfo)
func (*Cache) GetCORS ¶
func (c *Cache) GetCORS(owner user.ID, bkt *data.BucketInfo) *data.CORSConfiguration
func (*Cache) GetLastObject ¶
func (*Cache) GetLifecycleConfiguration ¶ added in v0.31.0
func (c *Cache) GetLifecycleConfiguration(owner user.ID, bkt *data.BucketInfo) *data.LifecycleConfiguration
func (*Cache) GetListMultipartSession ¶ added in v0.33.0
func (c *Cache) GetListMultipartSession(owner user.ID, key cache.ListMultipartSessionKey) *data.ListMultipartSession
func (*Cache) GetListSession ¶ added in v0.29.0
func (c *Cache) GetListSession(owner user.ID, key cache.ListSessionKey) *data.ListSession
func (*Cache) GetMultipartInfo ¶ added in v0.36.0
func (c *Cache) GetMultipartInfo(bkt *data.BucketInfo, uploadID string) *data.MultipartInfo
func (*Cache) GetNetworkInfo ¶ added in v0.31.0
func (c *Cache) GetNetworkInfo() *netmap.NetworkInfo
func (*Cache) GetPartsInfo ¶ added in v0.35.0
func (c *Cache) GetPartsInfo(bktInfo *data.BucketInfo, uploadID string) []*data.PartInfoExtended
func (*Cache) GetPlacementPolicy ¶ added in v0.32.0
func (c *Cache) GetPlacementPolicy(cnrID cid.ID) *netmap.PlacementPolicy
func (*Cache) GetSettings ¶
func (c *Cache) GetSettings(owner user.ID, bktInfo *data.BucketInfo) *data.BucketSettings
func (*Cache) GetWebsiteConfiguration ¶ added in v0.33.0
func (c *Cache) GetWebsiteConfiguration(owner user.ID, bkt *data.BucketInfo) *data.WebsiteConfiguration
func (*Cache) PutBucket ¶
func (c *Cache) PutBucket(bktInfo *data.BucketInfo)
func (*Cache) PutCORS ¶
func (c *Cache) PutCORS(owner user.ID, bkt *data.BucketInfo, cors *data.CORSConfiguration)
func (*Cache) PutLifecycleConfiguration ¶ added in v0.31.0
func (c *Cache) PutLifecycleConfiguration(owner user.ID, bkt *data.BucketInfo, cfg *data.LifecycleConfiguration)
func (*Cache) PutListMultipartSession ¶ added in v0.33.0
func (c *Cache) PutListMultipartSession(owner user.ID, key cache.ListMultipartSessionKey, session *data.ListMultipartSession)
func (*Cache) PutListSession ¶ added in v0.29.0
func (c *Cache) PutListSession(owner user.ID, key cache.ListSessionKey, session *data.ListSession)
func (*Cache) PutLockInfo ¶
func (*Cache) PutMultipartInfo ¶ added in v0.36.0
func (c *Cache) PutMultipartInfo(bkt *data.BucketInfo, info *data.MultipartInfo) error
func (*Cache) PutNetworkInfo ¶ added in v0.31.0
func (c *Cache) PutNetworkInfo(info netmap.NetworkInfo)
func (*Cache) PutObject ¶
func (c *Cache) PutObject(owner user.ID, extObjInfo *data.ExtendedObjectInfo)
func (*Cache) PutObjectWithName ¶
func (c *Cache) PutObjectWithName(owner user.ID, extObjInfo *data.ExtendedObjectInfo)
func (*Cache) PutSettings ¶
func (c *Cache) PutSettings(owner user.ID, bktInfo *data.BucketInfo, settings *data.BucketSettings)
func (*Cache) PutTagging ¶
func (*Cache) PutWebsiteConfiguration ¶ added in v0.33.0
func (c *Cache) PutWebsiteConfiguration(owner user.ID, bkt *data.BucketInfo, cfg *data.WebsiteConfiguration)
func (*Cache) StorePartInfo ¶ added in v0.35.0
func (c *Cache) StorePartInfo(bktInfo *data.BucketInfo, part *data.PartInfoExtended) error
func (*Cache) TryLockMPU ¶ added in v0.35.0
func (c *Cache) TryLockMPU(bktInfo *data.BucketInfo, uploadID string) bool
type CachesConfig ¶
type CachesConfig struct {
Logger *zap.Logger
Objects *cache.Config
SessionList *cache.Config
Names *cache.Config
Buckets *cache.Config
System *cache.Config
AccessControl *cache.Config
Network *cache.NetworkCacheConfig
MultipartList *cache.Config
CIDCache bool
MPU *cache.Config
}
CachesConfig contains params for caches.
func DefaultCachesConfigs ¶
func DefaultCachesConfigs(logger *zap.Logger) *CachesConfig
DefaultCachesConfigs returns filled configs.
type CompleteMultipartParams ¶
type CompleteMultipartParams struct {
Info *UploadInfoParams
Parts []*CompletedPart
CopiesNumbers []uint32
SufficientCopies [][]uint32
}
type CompletedPart ¶
type Config ¶
type Config struct {
GateOwner user.ID
ChainAddress string
Cache *Cache
AnonKey AnonymousKey
Resolver BucketResolver
TreeService tree.Service
Features FeatureSettings
GateKey *keys.PrivateKey
WorkerPool *ants.Pool
CnrContract frostfs.ContainerContract
}
type CopyObjectParams ¶
type CopyObjectParams struct {
SrcVersioned bool
SrcObject *data.ObjectInfo
ScrBktInfo *data.BucketInfo
DstBktInfo *data.BucketInfo
DstObject string
DstSize uint64
Header map[string]string
Range *RangeParams
Lock *data.ObjectLock
SrcEncryption encryption.Params
DstEncryption encryption.Params
CopiesNumbers []uint32
SufficientCopies [][]uint32
}
CopyObjectParams stores object copy request parameters.
type CreateBucketParams ¶
type CreateBucketParams struct {
Name string
Namespace string
Policy netmap.PlacementPolicy
SessionContainerCreation *session.Container
LocationConstraint string
ObjectLockEnabled bool
}
CreateBucketParams stores bucket create request parameters.
type CreateMultipartParams ¶
type CreateMultipartParams struct {
Info *UploadInfoParams
Header map[string]string
Data *UploadData
}
type DeleteBucketParams ¶
type DeleteBucketParams struct {
BktInfo *data.BucketInfo
CorsCnr *data.BucketInfo
WebsiteCnr *data.BucketInfo
LifecycleCnr *data.BucketInfo
SessionToken *session.Container
SkipCheck bool
}
DeleteBucketParams stores delete bucket request parameters.
type DeleteMarkerError ¶ added in v0.29.0
func (DeleteMarkerError) Error ¶ added in v0.29.0
func (e DeleteMarkerError) Error() string
type DeleteObjectParams ¶
type DeleteObjectParams struct {
BktInfo *data.BucketInfo
Objects []*VersionedObject
Settings *data.BucketSettings
NetworkInfo netmap.NetworkInfo
IsMultiple bool
WorkerPool *ants.Pool
// Chan is a channel to prevent client from context canceling during long removing.
// Must be set if IsMultiple is true.
Chan chan<- struct{}
}
type EncryptedPart ¶
type FeatureSettings ¶ added in v0.28.0
type FeatureSettings interface {
ClientCut() bool
BufferMaxSizeForPut() uint64
MD5Enabled() bool
FormContainerZone(ns string) string
TombstoneMembersSize() int
TombstoneLifetime() uint64
RemoveOnReplace() bool
RemoveOnReplaceTimeout() time.Duration
RemoveOnReplaceQueue() int
LiteListingTagKey() string
}
type FeatureSettingsMock ¶ added in v0.28.0
type FeatureSettingsMock struct {
// contains filtered or unexported fields
}
func (*FeatureSettingsMock) BufferMaxSizeForPut ¶ added in v0.29.0
func (k *FeatureSettingsMock) BufferMaxSizeForPut() uint64
func (*FeatureSettingsMock) ClientCut ¶ added in v0.28.0
func (k *FeatureSettingsMock) ClientCut() bool
func (*FeatureSettingsMock) CorsContainer ¶ added in v0.34.0
func (k *FeatureSettingsMock) CorsContainer() *data.BucketInfo
func (*FeatureSettingsMock) FormContainerZone ¶ added in v0.29.0
func (k *FeatureSettingsMock) FormContainerZone(ns string) string
func (*FeatureSettingsMock) LifecycleContainer ¶ added in v0.34.0
func (k *FeatureSettingsMock) LifecycleContainer() *data.BucketInfo
func (*FeatureSettingsMock) LiteListingTagKey ¶ added in v0.36.0
func (k *FeatureSettingsMock) LiteListingTagKey() string
func (*FeatureSettingsMock) MD5Enabled ¶ added in v0.28.1
func (k *FeatureSettingsMock) MD5Enabled() bool
func (*FeatureSettingsMock) MfaManager ¶ added in v0.34.0
func (k *FeatureSettingsMock) MfaManager() *mfa.Manager
func (*FeatureSettingsMock) RemoveOnReplace ¶ added in v0.33.0
func (k *FeatureSettingsMock) RemoveOnReplace() bool
func (*FeatureSettingsMock) RemoveOnReplaceQueue ¶ added in v0.33.0
func (k *FeatureSettingsMock) RemoveOnReplaceQueue() int
func (*FeatureSettingsMock) RemoveOnReplaceTimeout ¶ added in v0.33.0
func (k *FeatureSettingsMock) RemoveOnReplaceTimeout() time.Duration
func (*FeatureSettingsMock) SetClientCut ¶ added in v0.28.0
func (k *FeatureSettingsMock) SetClientCut(clientCut bool)
func (*FeatureSettingsMock) SetCorsContainer ¶ added in v0.34.0
func (k *FeatureSettingsMock) SetCorsContainer(info *data.BucketInfo)
func (*FeatureSettingsMock) SetLifecyclerContainer ¶ added in v0.34.0
func (k *FeatureSettingsMock) SetLifecyclerContainer(info *data.BucketInfo)
func (*FeatureSettingsMock) SetListObjectsLiteCustomTagKey ¶ added in v0.36.0
func (k *FeatureSettingsMock) SetListObjectsLiteCustomTagKey(key string)
func (*FeatureSettingsMock) SetMD5Enabled ¶ added in v0.28.1
func (k *FeatureSettingsMock) SetMD5Enabled(md5Enabled bool)
func (*FeatureSettingsMock) SetMfaManager ¶ added in v0.34.0
func (k *FeatureSettingsMock) SetMfaManager(mgr *mfa.Manager)
func (*FeatureSettingsMock) SetRemoveOnReplace ¶ added in v0.33.0
func (k *FeatureSettingsMock) SetRemoveOnReplace(removeOnReplace bool)
func (*FeatureSettingsMock) SetWebStaticHostingContainer ¶ added in v0.34.0
func (k *FeatureSettingsMock) SetWebStaticHostingContainer(info *data.BucketInfo)
func (*FeatureSettingsMock) TombstoneLifetime ¶ added in v0.32.0
func (k *FeatureSettingsMock) TombstoneLifetime() uint64
func (*FeatureSettingsMock) TombstoneMembersSize ¶ added in v0.32.0
func (k *FeatureSettingsMock) TombstoneMembersSize() int
func (*FeatureSettingsMock) WebStaticHostingContainer ¶ added in v0.34.0
func (k *FeatureSettingsMock) WebStaticHostingContainer() *data.BucketInfo
type GetObjectParams ¶
type GetObjectParams struct {
Range *RangeParams
PartNumber int
ObjectInfo *data.ObjectInfo
BucketInfo *data.BucketInfo
Versioned bool
Encryption encryption.Params
}
GetObjectParams stores object get request parameters.
type HeadObjectParams ¶
type HeadObjectParams struct {
BktInfo *data.BucketInfo
Object string
VersionID string
}
HeadObjectParams stores object head request parameters.
func (HeadObjectParams) Versioned ¶ added in v0.28.0
func (p HeadObjectParams) Versioned() bool
type Layer ¶ added in v0.30.0
type Layer struct {
// contains filtered or unexported fields
}
func NewLayer ¶
NewLayer creates an instance of a Layer. It checks credentials and establishes gRPC connection with the node.
func (*Layer) AbortMultipartUpload ¶ added in v0.30.0
func (n *Layer) AbortMultipartUpload(ctx context.Context, p *UploadInfoParams) error
func (*Layer) BearerOwner ¶ added in v0.30.0
BearerOwner returns owner id from BearerToken (context) or from client owner.
func (*Layer) CompleteMultipartUpload ¶ added in v0.30.0
func (n *Layer) CompleteMultipartUpload(ctx context.Context, p *CompleteMultipartParams) (*UploadData, *data.ExtendedObjectInfo, error)
func (*Layer) CopyObject ¶ added in v0.30.0
func (n *Layer) CopyObject(ctx context.Context, p *CopyObjectParams) (*data.ExtendedObjectInfo, error)
CopyObject from one bucket into another bucket.
func (*Layer) CreateBucket ¶ added in v0.30.0
func (n *Layer) CreateBucket(ctx context.Context, p *CreateBucketParams) (*data.BucketInfo, error)
func (*Layer) CreateMultipartUpload ¶ added in v0.30.0
func (n *Layer) CreateMultipartUpload(ctx context.Context, p *CreateMultipartParams) error
func (*Layer) DeleteBucket ¶ added in v0.30.0
func (n *Layer) DeleteBucket(ctx context.Context, p *DeleteBucketParams) error
func (*Layer) DeleteBucketCORS ¶ added in v0.30.0
func (*Layer) DeleteBucketLifecycle ¶ added in v0.36.0
func (*Layer) DeleteBucketTagging ¶ added in v0.30.0
func (*Layer) DeleteBucketWebsite ¶ added in v0.33.0
func (*Layer) DeleteContainer ¶ added in v0.31.0
func (n *Layer) DeleteContainer(ctx context.Context, p *DeleteBucketParams) error
func (*Layer) DeleteObjectTagging ¶ added in v0.30.0
func (*Layer) DeleteObjects ¶ added in v0.30.0
func (n *Layer) DeleteObjects(ctx context.Context, p *DeleteObjectParams) []*VersionedObject
DeleteObjects from the storage.
func (*Layer) EphemeralKey ¶ added in v0.30.0
func (*Layer) GetBucketCORS ¶ added in v0.30.0
func (*Layer) GetBucketInfo ¶ added in v0.30.0
GetBucketInfo returns bucket info by name.
func (*Layer) GetBucketLifecycle ¶ added in v0.36.0
func (n *Layer) GetBucketLifecycle(ctx context.Context, bktInfo, lifecycleCnr *data.BucketInfo) (*data.LifecycleConfiguration, error)
func (*Layer) GetBucketSettings ¶ added in v0.30.0
func (n *Layer) GetBucketSettings(ctx context.Context, bktInfo *data.BucketInfo) (*data.BucketSettings, error)
func (*Layer) GetBucketTagging ¶ added in v0.30.0
func (*Layer) GetBucketWebsite ¶ added in v0.33.0
func (n *Layer) GetBucketWebsite(ctx context.Context, bktInfo, websiteCnr *data.BucketInfo) (*data.WebsiteConfiguration, error)
func (*Layer) GetExtendedObjectInfo ¶ added in v0.30.0
func (n *Layer) GetExtendedObjectInfo(ctx context.Context, p *HeadObjectParams) (*data.ExtendedObjectInfo, error)
GetExtendedObjectInfo returns meta information and corresponding info from the tree service about the object.
func (*Layer) GetLockInfo ¶ added in v0.30.0
func (*Layer) GetNetworkInfo ¶ added in v0.31.0
func (*Layer) GetObject ¶ added in v0.30.0
func (n *Layer) GetObject(ctx context.Context, p *GetObjectParams) (*ObjectPayload, error)
GetObject from storage.
func (*Layer) GetObjectInfo ¶ added in v0.30.0
func (n *Layer) GetObjectInfo(ctx context.Context, p *HeadObjectParams) (*data.ObjectInfo, error)
GetObjectInfo returns meta information about the object.
func (*Layer) GetObjectTagging ¶ added in v0.30.0
func (*Layer) GetObjectTaggingAndLock ¶ added in v0.30.0
func (*Layer) ListBuckets ¶ added in v0.30.0
func (n *Layer) ListBuckets(ctx context.Context, params ListBucketsParams) (ListBucketsResult, error)
ListBuckets returns all user containers. The name of the bucket is a container id. Timestamp is omitted since it is not saved in frostfs container.
func (*Layer) ListMultipartUploads ¶ added in v0.30.0
func (n *Layer) ListMultipartUploads(ctx context.Context, p *ListMultipartUploadsParams) (ListMultipartUploadsInfo, error)
func (*Layer) ListObjectVersions ¶ added in v0.30.0
func (n *Layer) ListObjectVersions(ctx context.Context, p *ListObjectVersionsParams) (*ListObjectVersionsInfo, error)
func (*Layer) ListObjectsV1 ¶ added in v0.30.0
func (n *Layer) ListObjectsV1(ctx context.Context, p *ListObjectsParamsV1) (*ListObjectsInfoV1, error)
ListObjectsV1 returns objects in a bucket for requests of Version 1.
func (*Layer) ListObjectsV2 ¶ added in v0.30.0
func (n *Layer) ListObjectsV2(ctx context.Context, p *ListObjectsParamsV2) (*ListObjectsInfoV2, error)
ListObjectsV2 returns objects in a bucket for requests of Version 2.
func (*Layer) ListParts ¶ added in v0.30.0
func (n *Layer) ListParts(ctx context.Context, p *ListPartsParams) (*ListPartsInfo, error)
func (*Layer) PatchObject ¶ added in v0.31.0
func (n *Layer) PatchObject(ctx context.Context, p *PatchObjectParams) (*data.ExtendedObjectInfo, error)
func (*Layer) PutBucketCORS ¶ added in v0.30.0
func (n *Layer) PutBucketCORS(ctx context.Context, p *PutCORSParams) error
func (*Layer) PutBucketLifecycleConfiguration ¶ added in v0.31.0
func (n *Layer) PutBucketLifecycleConfiguration(ctx context.Context, p *PutBucketLifecycleParams) error
func (*Layer) PutBucketSettings ¶ added in v0.30.0
func (n *Layer) PutBucketSettings(ctx context.Context, p *PutSettingsParams) error
func (*Layer) PutBucketTagging ¶ added in v0.30.0
func (*Layer) PutBucketWebsite ¶ added in v0.33.0
func (n *Layer) PutBucketWebsite(ctx context.Context, p *PutWebsiteParams) error
func (*Layer) PutLockInfo ¶ added in v0.30.0
func (n *Layer) PutLockInfo(ctx context.Context, p *PutLockInfoParams) (err error)
func (*Layer) PutObject ¶ added in v0.30.0
func (n *Layer) PutObject(ctx context.Context, p *PutObjectParams) (*data.ExtendedObjectInfo, error)
PutObject stores object into FrostFS, took payload from io.Reader.
func (*Layer) PutObjectTagging ¶ added in v0.30.0
func (*Layer) ResolveBucket ¶ added in v0.30.0
func (*Layer) ResolveCID ¶ added in v0.30.0
ResolveCID returns container id by name.
func (*Layer) SessionTokenForRead ¶ added in v0.30.0
SessionTokenForRead returns session container token.
func (*Layer) UploadPart ¶ added in v0.30.0
func (*Layer) UploadPartCopy ¶ added in v0.30.0
func (n *Layer) UploadPartCopy(ctx context.Context, p *UploadCopyParams) (*data.ObjectInfo, error)
type ListBucketsParams ¶ added in v0.33.0
type ListBucketsResult ¶ added in v0.33.0
type ListBucketsResult struct {
Containers []*data.BucketInfo
ContinuationToken string
}
type ListMultipartUploadsInfo ¶
type ListMultipartUploadsInfo struct {
Prefixes []string
Uploads []*UploadInfo
IsTruncated bool
NextKeyMarker string
NextUploadIDMarker string
}
type ListObjectVersionsInfo ¶
type ListObjectVersionsInfo struct {
CommonPrefixes []string
IsTruncated bool
KeyMarker string
NextKeyMarker string
NextVersionIDMarker string
Version []*data.ExtendedNodeVersion
DeleteMarker []*data.ExtendedNodeVersion
VersionIDMarker string
LiteMode bool
}
ListObjectVersionsInfo stores info and list of objects versions.
type ListObjectVersionsParams ¶
type ListObjectVersionsParams struct {
BktInfo *data.BucketInfo
Delimiter string
KeyMarker string
MaxKeys int
Prefix string
VersionIDMarker string
Encode string
Chan chan<- struct{}
}
ListObjectVersionsParams stores list objects versions parameters.
type ListObjectsInfo ¶
type ListObjectsInfo struct {
Prefixes []string
Objects []*data.ExtendedNodeVersion
IsTruncated bool
}
ListObjectsInfo contains common fields of data for ListObjectsV1 and ListObjectsV2.
type ListObjectsInfoV1 ¶
type ListObjectsInfoV1 struct {
ListObjectsInfo
NextMarker string
}
ListObjectsInfoV1 holds data which ListObjectsV1 returns.
type ListObjectsInfoV2 ¶
type ListObjectsInfoV2 struct {
ListObjectsInfo
NextContinuationToken string
LiteMode bool
}
ListObjectsInfoV2 holds data which ListObjectsV2 returns.
type ListObjectsParamsCommon ¶
type ListObjectsParamsCommon struct {
BktInfo *data.BucketInfo
Delimiter string
Encode string
MaxKeys int
Prefix string
Chan chan<- struct{}
}
ListObjectsParamsCommon contains common parameters for ListObjectsV1 and ListObjectsV2.
type ListObjectsParamsV1 ¶
type ListObjectsParamsV1 struct {
ListObjectsParamsCommon
Marker string
}
ListObjectsParamsV1 contains params for ListObjectsV1.
type ListObjectsParamsV2 ¶
type ListObjectsParamsV2 struct {
ListObjectsParamsCommon
ContinuationToken string
StartAfter string
FetchOwner bool
}
ListObjectsParamsV2 contains params for ListObjectsV2.
type ListPartsInfo ¶
type ListPartsParams ¶
type ListPartsParams struct {
Info *UploadInfoParams
MaxParts int
PartNumberMarker int
}
type ObjectPayload ¶ added in v0.28.0
type ObjectPayload struct {
Size uint64
// contains filtered or unexported fields
}
func (*ObjectPayload) GetPartInfo ¶ added in v0.35.0
func (o *ObjectPayload) GetPartInfo() *data.PartInfo
GetPartInfo returns metadata if current payload is a single part of combined object.
type Part ¶
type PatchObjectParams ¶ added in v0.31.0
type PatchObjectParams struct {
Object *data.ExtendedObjectInfo
BktInfo *data.BucketInfo
NewBytes io.Reader
Range *RangeParams
VersioningEnabled bool
CopiesNumbers []uint32
SufficientCopies [][]uint32
}
type PutBucketLifecycleParams ¶ added in v0.31.0
type PutBucketLifecycleParams struct {
BktInfo *data.BucketInfo
LifecycleCnr *data.BucketInfo
LifecycleCfg *data.LifecycleConfiguration
CopiesNumbers []uint32
SufficientCopies [][]uint32
}
type PutCORSParams ¶
type PutCORSParams struct {
BktInfo *data.BucketInfo
CorsCnr *data.BucketInfo
Reader io.Reader
CopiesNumbers []uint32
SufficientCopies [][]uint32
NewDecoder func(io.Reader, string) *xml.Decoder
UserAgent string
}
PutCORSParams stores PutCORS request parameters.
type PutCombinedObjectParams ¶ added in v0.28.0
type PutCombinedObjectParams struct {
BktInfo *data.BucketInfo
Object string
Size uint64
Header map[string]string
Lock *data.ObjectLock
Encryption encryption.Params
}
type PutLockInfoParams ¶
type PutLockInfoParams struct {
ObjVersion *data.ObjectVersion
NewLock *data.ObjectLock
CopiesNumbers []uint32
SufficientCopies [][]uint32
NodeVersion *data.NodeVersion // optional
}
type PutObjectParams ¶
type PutObjectParams struct {
BktInfo *data.BucketInfo
Object string
Size *uint64
Reader io.Reader
Header map[string]string
Lock *data.ObjectLock
Encryption encryption.Params
CopiesNumbers []uint32
SufficientCopies [][]uint32
CompleteMD5Hash string
ContentMD5 *string
ContentSHA256Hash string
}
PutObjectParams stores object put request parameters.
type PutSettingsParams ¶
type PutSettingsParams struct {
BktInfo *data.BucketInfo
Settings *data.BucketSettings
}
PutSettingsParams stores object copy request parameters.
type PutWebsiteParams ¶ added in v0.33.0
type PutWebsiteParams struct {
BktInfo *data.BucketInfo
WebsiteCnr *data.BucketInfo
WebsiteConfiguration *data.WebsiteConfiguration
CopiesNumbers []uint32
SufficientCopies [][]uint32
}
PutWebsiteParams stores PutBucketWebsite request parameters.
type RangeParams ¶
RangeParams stores range header request parameters.
type RelationsMock ¶ added in v0.32.0
type RelationsMock struct{}
func (*RelationsMock) FindSiblingByParentID ¶ added in v0.32.0
func (*RelationsMock) FindSiblingBySplitID ¶ added in v0.32.0
func (*RelationsMock) GetLeftSibling ¶ added in v0.32.0
func (*RelationsMock) GetSplitInfo ¶ added in v0.32.0
type TestFrostFS ¶
type TestFrostFS struct {
// contains filtered or unexported fields
}
func NewTestFrostFS ¶
func NewTestFrostFS(key *keys.PrivateKey) *TestFrostFS
func (*TestFrostFS) AddCORSObject ¶ added in v0.33.0
func (t *TestFrostFS) AddCORSObject(bkt *data.BucketInfo, corsCnrID cid.ID, cors string)
func (*TestFrostFS) AddContainerPolicyChain ¶ added in v0.31.0
func (t *TestFrostFS) AddContainerPolicyChain(_ context.Context, prm frostfs.PrmAddContainerPolicyChain) error
func (*TestFrostFS) AllObjects ¶
func (t *TestFrostFS) AllObjects(cnrID cid.ID) (result []oid.ID)
func (*TestFrostFS) ClearTombstoneOIDCount ¶ added in v0.32.0
func (t *TestFrostFS) ClearTombstoneOIDCount()
func (*TestFrostFS) Container ¶
func (t *TestFrostFS) Container(_ context.Context, prm frostfs.PrmContainer) (*container.Container, error)
func (*TestFrostFS) ContainerID ¶
func (t *TestFrostFS) ContainerID(zone, name string) (cid.ID, error)
func (*TestFrostFS) CopiesNumbers ¶ added in v0.32.7
func (t *TestFrostFS) CopiesNumbers(addr string) []uint32
func (*TestFrostFS) CreateContainer ¶
func (t *TestFrostFS) CreateContainer(_ context.Context, prm frostfs.PrmContainerCreate) (*frostfs.ContainerCreateResult, error)
func (*TestFrostFS) CreateObject ¶
func (t *TestFrostFS) CreateObject(ctx context.Context, prm frostfs.PrmObjectCreate) (*frostfs.CreateObjectResult, error)
func (*TestFrostFS) CurrentEpoch ¶
func (t *TestFrostFS) CurrentEpoch() uint64
func (*TestFrostFS) DeleteContainer ¶
func (*TestFrostFS) DeleteObject ¶
func (t *TestFrostFS) DeleteObject(ctx context.Context, prm frostfs.PrmObjectDelete) error
func (*TestFrostFS) GetContainerByID ¶ added in v0.33.0
func (*TestFrostFS) GetObject ¶ added in v0.31.0
func (t *TestFrostFS) GetObject(ctx context.Context, prm frostfs.PrmObjectGet) (*frostfs.Object, error)
func (*TestFrostFS) HeadObject ¶ added in v0.31.0
func (t *TestFrostFS) HeadObject(ctx context.Context, prm frostfs.PrmObjectHead) (*object.Object, error)
func (*TestFrostFS) LatestReceivedEpoch ¶ added in v0.33.0
func (t *TestFrostFS) LatestReceivedEpoch() uint64
LatestReceivedEpoch returns the epoch number extracted from the metadata of responses received from the client pool's most recent request.
func (*TestFrostFS) NetmapSnapshot ¶ added in v0.32.0
func (*TestFrostFS) NetworkInfo ¶ added in v0.31.0
func (t *TestFrostFS) NetworkInfo(context.Context) (netmap.NetworkInfo, error)
func (*TestFrostFS) ObjectExists ¶
func (t *TestFrostFS) ObjectExists(objID oid.ID) (result bool)
func (*TestFrostFS) Objects ¶
func (t *TestFrostFS) Objects() (res []*object.Object)
func (*TestFrostFS) PatchObject ¶ added in v0.31.0
func (t *TestFrostFS) PatchObject(ctx context.Context, prm frostfs.PrmObjectPatch) (oid.ID, error)
func (*TestFrostFS) RangeObject ¶ added in v0.31.0
func (t *TestFrostFS) RangeObject(ctx context.Context, prm frostfs.PrmObjectRange) (io.ReadCloser, error)
func (*TestFrostFS) Relations ¶ added in v0.32.0
func (t *TestFrostFS) Relations() relations.Relations
func (*TestFrostFS) SearchObjects ¶ added in v0.30.0
func (t *TestFrostFS) SearchObjects(_ context.Context, prm frostfs.PrmObjectSearch) ([]oid.ID, error)
func (*TestFrostFS) SetContainer ¶ added in v0.29.0
func (t *TestFrostFS) SetContainer(cnrID cid.ID, cnr *container.Container)
func (*TestFrostFS) SetEpoch ¶ added in v0.35.0
func (t *TestFrostFS) SetEpoch(val uint64)
func (*TestFrostFS) SetObject ¶ added in v0.33.0
func (t *TestFrostFS) SetObject(addr oid.Address, obj *object.Object)
func (*TestFrostFS) SetObjectError ¶ added in v0.28.0
func (t *TestFrostFS) SetObjectError(addr oid.Address, err error)
func (*TestFrostFS) SetObjectPutError ¶ added in v0.28.0
func (t *TestFrostFS) SetObjectPutError(fileName string, err error)
func (*TestFrostFS) SetObjectStreamError ¶ added in v0.33.0
func (t *TestFrostFS) SetObjectStreamError(addr oid.Address, offset int, err error)
func (*TestFrostFS) SufficientCopies ¶ added in v0.34.0
func (t *TestFrostFS) SufficientCopies(addr string) [][]uint32
func (*TestFrostFS) TimeToEpoch ¶
func (*TestFrostFS) TombstoneOIDCount ¶ added in v0.32.0
func (t *TestFrostFS) TombstoneOIDCount() int
func (*TestFrostFS) UserContainers ¶
func (t *TestFrostFS) UserContainers(context.Context, frostfs.PrmUserContainers) ([]cid.ID, error)
type TreeServiceMock ¶
type TreeServiceMock struct {
// contains filtered or unexported fields
}
func NewTreeService ¶
func NewTreeService() *TreeServiceMock
func (*TreeServiceMock) AddVersion ¶
func (t *TreeServiceMock) AddVersion(_ context.Context, bktInfo *data.BucketInfo, newVersion *data.NodeVersion) (uint64, []data.OIDInfo, error)
func (*TreeServiceMock) CreateMultipartUpload ¶
func (t *TreeServiceMock) CreateMultipartUpload(_ context.Context, bktInfo *data.BucketInfo, info *data.MultipartInfo) (uint64, error)
func (*TreeServiceMock) DeleteBucketTagging ¶
func (t *TreeServiceMock) DeleteBucketTagging(context.Context, *data.BucketInfo) error
func (*TreeServiceMock) DeleteMultipartUpload ¶
func (t *TreeServiceMock) DeleteMultipartUpload(_ context.Context, bktInfo *data.BucketInfo, multipartInfo *data.MultipartInfo) error
func (*TreeServiceMock) DeleteObjectTagging ¶
func (t *TreeServiceMock) DeleteObjectTagging(ctx context.Context, bktInfo *data.BucketInfo, objVersion *data.NodeVersion) error
func (*TreeServiceMock) GetAllVersionsByPrefix ¶
func (t *TreeServiceMock) GetAllVersionsByPrefix(_ context.Context, bktInfo *data.BucketInfo, prefix string) ([]*data.NodeVersion, error)
func (*TreeServiceMock) GetBucketTagging ¶
func (t *TreeServiceMock) GetBucketTagging(context.Context, *data.BucketInfo) (map[string]string, error)
func (*TreeServiceMock) GetLatestVersion ¶
func (t *TreeServiceMock) GetLatestVersion(_ context.Context, bktInfo *data.BucketInfo, objectName string) (*data.NodeVersion, error)
func (*TreeServiceMock) GetLock ¶
func (t *TreeServiceMock) GetLock(_ context.Context, bktInfo *data.BucketInfo, nodeID uint64) (*data.LockInfo, error)
func (*TreeServiceMock) GetMultipartUpload ¶
func (t *TreeServiceMock) GetMultipartUpload(_ context.Context, bktInfo *data.BucketInfo, objectName, uploadID string) (*data.MultipartInfo, error)
func (*TreeServiceMock) GetMultipartUploadsByPrefix ¶
func (t *TreeServiceMock) GetMultipartUploadsByPrefix(context.Context, *data.BucketInfo, data.MultipartStreamParams) (data.MultipartInfoStream, error)
func (*TreeServiceMock) GetObjectTagging ¶
func (t *TreeServiceMock) GetObjectTagging(_ context.Context, bktInfo *data.BucketInfo, nodeVersion *data.NodeVersion) (map[string]string, error)
func (*TreeServiceMock) GetObjectTaggingAndLock ¶
func (t *TreeServiceMock) GetObjectTaggingAndLock(ctx context.Context, bktInfo *data.BucketInfo, objVersion *data.NodeVersion) (map[string]string, *data.LockInfo, error)
func (*TreeServiceMock) GetParts ¶
func (t *TreeServiceMock) GetParts(_ context.Context, bktInfo *data.BucketInfo, multipartNodeID uint64) ([]*data.PartInfoExtended, error)
func (*TreeServiceMock) GetSettingsNode ¶
func (t *TreeServiceMock) GetSettingsNode(_ context.Context, bktInfo *data.BucketInfo) (*data.BucketSettings, error)
func (*TreeServiceMock) GetUnversioned ¶
func (t *TreeServiceMock) GetUnversioned(_ context.Context, bktInfo *data.BucketInfo, objectName string) (*data.NodeVersion, error)
func (*TreeServiceMock) GetVersions ¶
func (t *TreeServiceMock) GetVersions(_ context.Context, bktInfo *data.BucketInfo, objectName string) ([]*data.NodeVersion, error)
func (*TreeServiceMock) InitVersionsByPrefixStream ¶ added in v0.29.0
func (t *TreeServiceMock) InitVersionsByPrefixStream(_ context.Context, bktInfo *data.BucketInfo, prefix string, opts data.StreamOptions) (data.VersionsStream, error)
func (*TreeServiceMock) PutBucketTagging ¶
func (t *TreeServiceMock) PutBucketTagging(context.Context, *data.BucketInfo, map[string]string) error
func (*TreeServiceMock) PutLock ¶
func (t *TreeServiceMock) PutLock(_ context.Context, bktInfo *data.BucketInfo, nodeID uint64, lock *data.LockInfo) error
func (*TreeServiceMock) PutObjectTagging ¶
func (t *TreeServiceMock) PutObjectTagging(_ context.Context, bktInfo *data.BucketInfo, nodeVersion *data.NodeVersion, tagSet map[string]string) error
func (*TreeServiceMock) PutSettingsNode ¶
func (t *TreeServiceMock) PutSettingsNode(_ context.Context, bktInfo *data.BucketInfo, settings *data.BucketSettings) error
func (*TreeServiceMock) RemoveVersion ¶
func (t *TreeServiceMock) RemoveVersion(_ context.Context, bktInfo *data.BucketInfo, nodeID uint64) error
type UploadCopyParams ¶
type UploadCopyParams struct {
Versioned bool
Info *UploadInfoParams
SrcObjInfo *data.ObjectInfo
SrcBktInfo *data.BucketInfo
SrcEncryption encryption.Params
PartNumber int
Range *RangeParams
CopiesNumbers []uint32
SufficientCopies [][]uint32
}
type UploadData ¶
type UploadInfo ¶
type UploadInfo struct {
*data.MultipartInfo
DirName string
}
func (UploadInfo) Name ¶ added in v0.35.0
func (e UploadInfo) Name() string
type UploadInfoParams ¶
type UploadInfoParams struct {
UploadID string
Bkt *data.BucketInfo
Key string
Encryption encryption.Params
}
type UploadPartParams ¶
type VersionedObject ¶
type VersionedObject struct {
Name string
VersionID string
DeleteMarkVersion string
DeleteMarkerEtag string
Error error
}
VersionedObject stores info about objects to delete.
func (*VersionedObject) String ¶
func (t *VersionedObject) String() string
type VersionsByPrefixStreamMock ¶ added in v0.29.0
type VersionsByPrefixStreamMock struct {
// contains filtered or unexported fields
}
func (*VersionsByPrefixStreamMock) Next ¶ added in v0.29.0
func (s *VersionsByPrefixStreamMock) Next(context.Context) (*data.NodeVersion, error)