Documentation
¶
Index ¶
- Constants
- func Quote(val string) string
- func UnQuote(val string) string
- type AbortIncompleteMultipartUpload
- type BaseNodeVersion
- type BucketInfo
- func (b *BucketInfo) CORSObjectFilePath() string
- func (b *BucketInfo) CORSObjectName() string
- func (b *BucketInfo) GetCID() cid.ID
- func (b *BucketInfo) LifecycleConfigurationObjectName() string
- func (b *BucketInfo) SettingsObjectName() string
- func (b *BucketInfo) WebsiteConfigurationObjectName() string
- func (b *BucketInfo) WebsiteObjectFilePath() string
- type BucketSettings
- func (b BucketSettings) FlatBucket() bool
- func (b BucketSettings) MFADeleteDisabled() bool
- func (b BucketSettings) MFADeleteEnabled() bool
- func (b BucketSettings) TreeID() string
- func (b BucketSettings) Unversioned() bool
- func (b BucketSettings) VersioningEnabled() bool
- func (b BucketSettings) VersioningSuspended() bool
- type CORSConfiguration
- type CORSRule
- type CacheControlRule
- type CacheControlRules
- type CommonSession
- type Condition
- type CreatedObjectInfo
- type DefaultRetention
- type ErrorDocument
- type ExpiresRule
- type ExpiresRules
- type ExtendedNodeVersion
- type ExtendedObjectInfo
- type GetObjectTaggingParams
- type GlacierJobParameters
- type IndexDocument
- type LegalHold
- type LegalHoldLock
- type LifecycleConfiguration
- type LifecycleExpiration
- type LifecycleRule
- type LifecycleRuleAndOperator
- type LifecycleRuleFilter
- type LifecycleTransition
- type ListMultipartSession
- type ListSession
- type LockInfo
- func (l LockInfo) ID() uint64
- func (l LockInfo) IsCompliance() bool
- func (l LockInfo) IsLegalHoldSet() bool
- func (l LockInfo) IsRetentionSet() bool
- func (l LockInfo) LegalHold() oid.ID
- func (l *LockInfo) ResetLegalHold()
- func (l LockInfo) Retention() oid.ID
- func (l *LockInfo) SetLegalHold(objID oid.ID)
- func (l *LockInfo) SetRetention(objID oid.ID, until time.Time, isCompliance bool)
- func (l LockInfo) UntilDate() time.Time
- func (l LockInfo) UntilDateString() string
- type MultipartInfo
- type MultipartInfoStream
- type MultipartStreamParams
- type NodeVersion
- type NodeVersionToDelete
- type NonCurrentVersionExpiration
- type NonCurrentVersionTransition
- type OIDInfo
- type ObjectInfo
- type ObjectLock
- type ObjectLockConfiguration
- type ObjectLockRule
- type ObjectTaggingInfo
- type ObjectVersion
- type PartHash
- type PartInfo
- type PartInfoExtended
- type PublicAccessBlockConfiguration
- type PutObjectTaggingParams
- type Redirect
- type RedirectAllRequestsTo
- type RestoreRequest
- type Retention
- type RetentionLock
- type RoutingRule
- type RoutingRules
- type StreamOptions
- type Tag
- type Tagging
- type TransitionInfo
- type TransitionState
- type UploadID
- type Versioning
- type VersionsStream
- type WebsiteConfiguration
Constants ¶
const ( VersioningUnversioned = "Unversioned" VersioningEnabled = "Enabled" VersioningSuspended = "Suspended" CannedACLPrivate = "private" CannedACLPublicRead = "public-read" CannedACLPublicReadWrite = "public-read-write" GovernanceMode = "GOVERNANCE" ComplianceMode = "COMPLIANCE" MFADeleteDisabled = "Disabled" MFADeleteEnabled = "Enabled" BucketTypeHierarchical = "hierarchical" BucketTypeFlat = "flat" // VersionTree -- ID of a tree with object versions. VersionTree = "version" // FlatVersionTree - ID of a tree with flat key:value structure. FlatVersionTree = "flatversion" )
const ( LifecycleStatusEnabled = "Enabled" LifecycleStatusDisabled = "Disabled" )
const ReservedLiteListingTagKey = "frostfs:#lite_listing"
ReservedLiteListingTagKey is a reserved key to avoid collisions with user-defined bucket tags.
const (
UnversionedObjectVersionID = "null"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AbortIncompleteMultipartUpload ¶ added in v0.31.0
type AbortIncompleteMultipartUpload struct {
DaysAfterInitiation *int `xml:"DaysAfterInitiation,omitempty"`
}
type BaseNodeVersion ¶
type BaseNodeVersion struct {
ID uint64
ParentID uint64
OID oid.ID
Timestamp uint64
Size uint64
ETag []byte
MD5 []byte
FilePath string
Created *time.Time // this field set from tree only for listings requests, but to tree it is always set
Owner *user.ID // this field set from tree only for listings requests, but to tree it is always set
IsDeleteMarker bool
CreationEpoch uint64
TransitionInfo TransitionInfo
}
BaseNodeVersion is minimal node info from tree service. Basically used for "system" object.
func (BaseNodeVersion) IsFilledExtra ¶ added in v0.29.0
func (v BaseNodeVersion) IsFilledExtra() bool
IsFilledExtra returns true is node was created by version of gate v0.29.x and later.
type BucketInfo ¶
type BucketInfo struct {
Name string // container name from system attribute
Zone string // container zone from system attribute
CID cid.ID
Owner user.ID
Created time.Time
LocationConstraint string
ObjectLockEnabled bool
HomomorphicHashDisabled bool
PlacementPolicy netmap.PlacementPolicy
}
BucketInfo stores basic bucket data.
func (*BucketInfo) CORSObjectFilePath ¶ added in v0.33.0
func (b *BucketInfo) CORSObjectFilePath() string
CORSObjectFilePath returns a FilePath for a bucket CORS configuration file.
func (*BucketInfo) CORSObjectName ¶
func (b *BucketInfo) CORSObjectName() string
CORSObjectName returns a system name for a bucket CORS configuration file.
func (*BucketInfo) GetCID ¶ added in v0.39.0
func (b *BucketInfo) GetCID() cid.ID
func (*BucketInfo) LifecycleConfigurationObjectName ¶ added in v0.31.0
func (b *BucketInfo) LifecycleConfigurationObjectName() string
LifecycleConfigurationObjectName returns a FilePath for a bucket Lifecycle configuration file.
func (*BucketInfo) SettingsObjectName ¶
func (b *BucketInfo) SettingsObjectName() string
SettingsObjectName is a system name for a bucket settings file.
func (*BucketInfo) WebsiteConfigurationObjectName ¶ added in v0.33.0
func (b *BucketInfo) WebsiteConfigurationObjectName() string
func (*BucketInfo) WebsiteObjectFilePath ¶ added in v0.33.0
func (b *BucketInfo) WebsiteObjectFilePath() string
WebsiteObjectFilePath returns a FilePath for a bucket website configuration file.
type BucketSettings ¶
type BucketSettings struct {
Versioning Versioning
LockConfiguration *ObjectLockConfiguration
CannedACL string
OwnerKey *keys.PublicKey
PublicAccessBlock *PublicAccessBlockConfiguration
BucketType string
}
BucketSettings stores settings such as versioning.
func (BucketSettings) FlatBucket ¶ added in v0.38.0
func (b BucketSettings) FlatBucket() bool
func (BucketSettings) MFADeleteDisabled ¶ added in v0.33.0
func (b BucketSettings) MFADeleteDisabled() bool
func (BucketSettings) MFADeleteEnabled ¶ added in v0.33.0
func (b BucketSettings) MFADeleteEnabled() bool
func (BucketSettings) TreeID ¶ added in v0.38.0
func (b BucketSettings) TreeID() string
func (BucketSettings) Unversioned ¶
func (b BucketSettings) Unversioned() bool
func (BucketSettings) VersioningEnabled ¶
func (b BucketSettings) VersioningEnabled() bool
func (BucketSettings) VersioningSuspended ¶
func (b BucketSettings) VersioningSuspended() bool
type CORSConfiguration ¶
type CORSConfiguration struct {
XMLName xml.Name `xml:"http://s3.amazonaws.com/doc/2006-03-01/ CORSConfiguration" json:"-"`
CORSRules []CORSRule `xml:"CORSRule" json:"CORSRules"`
}
CORSConfiguration stores CORS configuration of a request.
type CORSRule ¶
type CORSRule struct {
ID string `xml:"ID,omitempty" json:"ID,omitempty"`
AllowedHeaders []string `xml:"AllowedHeader" json:"AllowedHeaders"`
AllowedMethods []string `xml:"AllowedMethod" json:"AllowedMethods"`
AllowedOrigins []string `xml:"AllowedOrigin" json:"AllowedOrigins"`
ExposeHeaders []string `xml:"ExposeHeader" json:"ExposeHeaders"`
MaxAgeSeconds int `xml:"MaxAgeSeconds,omitempty" json:"MaxAgeSeconds,omitempty"`
}
CORSRule stores rules for CORS in a bucket.
type CacheControlRule ¶ added in v0.37.0
type CacheControlRules ¶ added in v0.37.0
type CacheControlRules struct {
CacheControlRule []CacheControlRule
}
type CommonSession ¶ added in v0.33.0
type CreatedObjectInfo ¶ added in v0.31.0
type CreatedObjectInfo struct {
ID oid.ID
Size uint64
HashSum []byte
MD5Sum []byte
CreationEpoch uint64
}
CreatedObjectInfo stores created object info.
type DefaultRetention ¶
type ErrorDocument ¶ added in v0.33.0
type ErrorDocument struct {
Key string `xml:"Key" json:"Key"`
}
type ExpiresRule ¶ added in v0.38.0
type ExpiresRules ¶ added in v0.38.0
type ExpiresRules struct {
ExpiresRule []ExpiresRule
}
type ExtendedNodeVersion ¶ added in v0.29.0
type ExtendedNodeVersion struct {
NodeVersion *NodeVersion
IsLatest bool
DirName string
}
ExtendedNodeVersion contains additional node info to be able to sort versions by timestamp.
func (ExtendedNodeVersion) Name ¶ added in v0.29.0
func (e ExtendedNodeVersion) Name() string
func (ExtendedNodeVersion) Version ¶ added in v0.29.0
func (e ExtendedNodeVersion) Version() string
type ExtendedObjectInfo ¶
type ExtendedObjectInfo struct {
ObjectInfo *ObjectInfo
NodeVersion *NodeVersion
IsLatest bool
}
ExtendedObjectInfo contains additional node info to be able to sort versions by timestamp.
func (ExtendedObjectInfo) Version ¶
func (e ExtendedObjectInfo) Version() string
type GetObjectTaggingParams ¶ added in v0.30.0
type GetObjectTaggingParams struct {
ObjectVersion *ObjectVersion
CopiesNumbers []uint32
// NodeVersion can be nil. If not nil we save one request to tree service.
NodeVersion *NodeVersion // optional
}
type GlacierJobParameters ¶ added in v0.38.0
type GlacierJobParameters struct {
Tier string `xml:"Tier,omitempty"`
}
type IndexDocument ¶ added in v0.33.0
type IndexDocument struct {
Suffix string `xml:"Suffix" json:"Suffix"`
}
type LegalHoldLock ¶
type LegalHoldLock struct {
Enabled bool
}
type LifecycleConfiguration ¶ added in v0.31.0
type LifecycleConfiguration struct {
XMLName xml.Name `xml:"http://s3.amazonaws.com/doc/2006-03-01/ LifecycleConfiguration" json:"-"`
Rules []LifecycleRule `xml:"Rule"`
}
type LifecycleExpiration ¶ added in v0.31.0
type LifecycleRule ¶ added in v0.31.0
type LifecycleRule struct {
Status string `xml:"Status,omitempty"`
AbortIncompleteMultipartUpload *AbortIncompleteMultipartUpload `xml:"AbortIncompleteMultipartUpload,omitempty"`
Expiration *LifecycleExpiration `xml:"Expiration,omitempty"`
Filter *LifecycleRuleFilter `xml:"Filter,omitempty"`
ID string `xml:"ID,omitempty"`
NonCurrentVersionExpiration *NonCurrentVersionExpiration `xml:"NoncurrentVersionExpiration,omitempty"`
Prefix string `xml:"Prefix,omitempty"`
Transition *LifecycleTransition `xml:"Transition"`
NonCurrentVersionTransition *NonCurrentVersionTransition `xml:"NoncurrentVersionTransition"`
}
type LifecycleRuleAndOperator ¶ added in v0.31.0
type LifecycleRuleFilter ¶ added in v0.31.0
type LifecycleRuleFilter struct {
And *LifecycleRuleAndOperator `xml:"And,omitempty"`
ObjectSizeGreaterThan *uint64 `xml:"ObjectSizeGreaterThan,omitempty"`
ObjectSizeLessThan *uint64 `xml:"ObjectSizeLessThan,omitempty"`
Prefix string `xml:"Prefix,omitempty"`
Tag *Tag `xml:"Tag,omitempty"`
}
type LifecycleTransition ¶ added in v0.38.0
type ListMultipartSession ¶ added in v0.33.0
type ListMultipartSession struct {
CommonSession
Next []*MultipartInfo
Stream MultipartInfoStream
}
type ListSession ¶ added in v0.29.0
type ListSession struct {
CommonSession
Next []*ExtendedNodeVersion
Stream VersionsStream
}
type LockInfo ¶
type LockInfo struct {
// contains filtered or unexported fields
}
LockInfo is lock information to create appropriate tree node.
func NewLockInfo ¶
func (LockInfo) IsCompliance ¶
func (LockInfo) IsLegalHoldSet ¶
func (LockInfo) IsRetentionSet ¶
func (*LockInfo) ResetLegalHold ¶
func (l *LockInfo) ResetLegalHold()
func (*LockInfo) SetLegalHold ¶
func (*LockInfo) SetRetention ¶
func (LockInfo) UntilDateString ¶ added in v0.38.0
type MultipartInfo ¶
type MultipartInfo struct {
// ID is node id in tree service.
// It's ignored when creating a new multipart upload.
ID uint64
Key string
UploadID UploadID
Owner user.ID
Created time.Time
Meta map[string]string
// Finished field is no longer written to the tree structure,
// but continues to be read from it for compatibility purposes.
Finished bool
CreationEpoch uint64
Lock *ObjectLock
}
MultipartInfo is multipart upload information.
type MultipartInfoStream ¶ added in v0.33.0
type MultipartInfoStream interface {
// Next returns first valid multipart upload with respect to key marker constraint.
Next(ctx context.Context) (*MultipartInfo, error)
}
type MultipartStreamParams ¶ added in v0.33.0
type NodeVersion ¶
type NodeVersion struct {
BaseNodeVersion
IsUnversioned bool
IsCombined bool
UploadID UploadID
Parts int // we need this to avoid redundant head objects in listing
}
NodeVersion represent node from tree service.
func (*NodeVersion) GetETag ¶ added in v0.38.0
func (v *NodeVersion) GetETag(md5Enabled bool) string
type NodeVersionToDelete ¶ added in v0.35.0
type NodeVersionToDelete struct {
*NodeVersion
RemoveOnlyFromTree bool
}
NodeVersionToDelete represent node from tree service and how it should be removed.
type NonCurrentVersionExpiration ¶ added in v0.31.0
type NonCurrentVersionTransition ¶ added in v0.38.0
type OIDInfo ¶ added in v0.33.0
type OIDInfo struct {
ID oid.ID
Size uint64
// UploadID is used to determine whether the object being deleted is part of a multipart object.
UploadID UploadID
}
OIDInfo represent OID to delete.
type ObjectInfo ¶
type ObjectInfo struct {
ID oid.ID
CID cid.ID
Bucket string
Name string
Size uint64
ContentType string
Created time.Time
CreationEpoch uint64
HashSum string
MD5Sum string
Owner user.ID
Headers map[string]string
UseMD5 bool
}
ObjectInfo holds S3 object data.
func (*ObjectInfo) Address ¶
func (o *ObjectInfo) Address() oid.Address
Address returns object address.
func (*ObjectInfo) ETag ¶ added in v0.28.1
func (o *ObjectInfo) ETag() string
func (*ObjectInfo) NiceName ¶
func (o *ObjectInfo) NiceName() string
NiceName returns object name for cache.
func (*ObjectInfo) VersionID ¶
func (o *ObjectInfo) VersionID() string
VersionID returns object version from ObjectInfo.
type ObjectLock ¶
type ObjectLock struct {
LegalHold *LegalHoldLock
Retention *RetentionLock
}
type ObjectLockConfiguration ¶
type ObjectLockConfiguration struct {
XMLName xml.Name `xml:"http://s3.amazonaws.com/doc/2006-03-01/ ObjectLockConfiguration" json:"-"`
ObjectLockEnabled string `xml:"ObjectLockEnabled" json:"ObjectLockEnabled"`
Rule *ObjectLockRule `xml:"Rule" json:"Rule"`
}
type ObjectLockRule ¶
type ObjectLockRule struct {
DefaultRetention *DefaultRetention `xml:"DefaultRetention" json:"DefaultRetention"`
}
type ObjectTaggingInfo ¶
type ObjectVersion ¶ added in v0.30.0
type ObjectVersion struct {
BktInfo *BucketInfo
ObjectName string
VersionID string
NoErrorOnDeleteMarker bool
}
ObjectVersion stores object version info.
type PartHash ¶ added in v0.38.0
type PartHash []byte
func (PartHash) MarshalJSON ¶ added in v0.38.0
func (*PartHash) UnmarshalJSON ¶ added in v0.38.0
type PartInfo ¶
type PartInfo struct {
Key string `json:"key"`
UploadID UploadID `json:"uploadId"`
Number int `json:"number"`
OID oid.ID `json:"oid"`
Size uint64 `json:"size"`
ETag PartHash `json:"etag"`
MD5 PartHash `json:"md5"`
Created time.Time `json:"created"`
}
PartInfo is upload information about part.
func (*PartInfo) ToHeaderString ¶
ToHeaderString form short part representation to use in S3-Completed-Parts header.
type PartInfoExtended ¶ added in v0.31.0
type PublicAccessBlockConfiguration ¶ added in v0.33.0
type PublicAccessBlockConfiguration struct {
XMLName xml.Name `xml:"http://s3.amazonaws.com/doc/2006-03-01/ PublicAccessBlockConfiguration" json:"-"`
BlockPublicAcls bool `xml:"BlockPublicAcls" json:"BlockPublicAcls"`
IgnorePublicAcls bool `xml:"IgnorePublicAcls" json:"IgnorePublicAcls"`
BlockPublicPolicy bool `xml:"BlockPublicPolicy" json:"BlockPublicPolicy"`
RestrictPublicBuckets bool `xml:"RestrictPublicBuckets" json:"RestrictPublicBuckets"`
}
type PutObjectTaggingParams ¶ added in v0.30.0
type PutObjectTaggingParams struct {
ObjectVersion *ObjectVersion
TagSet map[string]string
CopiesNumbers []uint32
// NodeVersion can be nil. If not nil we save one request to tree service.
NodeVersion *NodeVersion // optional
}
type Redirect ¶ added in v0.33.0
type Redirect struct {
HostName string `xml:"HostName,omitempty" json:"HostName,omitempty"`
Protocol string `xml:"Protocol,omitempty" json:"Protocol,omitempty"`
ReplaceKeyPrefixWith string `xml:"ReplaceKeyPrefixWith,omitempty" json:"ReplaceKeyPrefixWith,omitempty"`
ReplaceKeyWith string `xml:"ReplaceKeyWith,omitempty" json:"ReplaceKeyWith,omitempty"`
HTTPRedirectCode string `xml:"HttpRedirectCode,omitempty" json:"HttpRedirectCode,omitempty"`
}
type RedirectAllRequestsTo ¶ added in v0.33.0
type RestoreRequest ¶ added in v0.38.0
type RestoreRequest struct {
XMLName xml.Name `xml:"http://s3.amazonaws.com/doc/2006-03-01/ RestoreRequest"`
Days *int `xml:"Days,omitempty"`
GlacierJobParameters *GlacierJobParameters `xml:"GlacierJobParameters,omitempty"`
}
type RetentionLock ¶
type RoutingRule ¶ added in v0.33.0
type RoutingRules ¶ added in v0.33.0
type RoutingRules struct {
RoutingRule []RoutingRule
}
type StreamOptions ¶ added in v0.36.0
type Tagging ¶ added in v0.30.0
type Tagging struct {
XMLName xml.Name `xml:"http://s3.amazonaws.com/doc/2006-03-01/ Tagging"`
TagSet []Tag `xml:"TagSet>Tag"`
}
Tagging contains tag set.
type TransitionInfo ¶ added in v0.38.0
type TransitionInfo struct {
ModuleID string
State TransitionState
RestoreExpirationEpoch uint64
}
func (*TransitionInfo) IsTransitioned ¶ added in v0.38.0
func (t *TransitionInfo) IsTransitioned() bool
type TransitionState ¶ added in v0.38.0
type TransitionState uint16
const ( StatusNotTransitioned TransitionState = 0 StatusTransitioning TransitionState = 1 StatusTransitioned TransitionState = 2 StatusRestoring TransitionState = 3 StatusRestored TransitionState = 4 )
type UploadID ¶ added in v0.38.0
func NewUploadID ¶ added in v0.38.0
func NewUploadID() UploadID
func (UploadID) MarshalJSON ¶ added in v0.38.0
func (*UploadID) ParseString ¶ added in v0.38.0
func (*UploadID) UnmarshalJSON ¶ added in v0.38.0
type Versioning ¶ added in v0.33.0
Versioning stores bucket versioning settings.
type VersionsStream ¶ added in v0.29.0
type VersionsStream interface {
Next(ctx context.Context) (*NodeVersion, error)
}
type WebsiteConfiguration ¶ added in v0.33.0
type WebsiteConfiguration struct {
XMLName xml.Name `xml:"http://s3.amazonaws.com/doc/2006-03-01/ WebsiteConfiguration" json:"-"`
ErrorDocument *ErrorDocument `xml:"ErrorDocument" json:"ErrorDocument"`
IndexDocument *IndexDocument `xml:"IndexDocument" json:"IndexDocument"`
RedirectAllRequestsTo *RedirectAllRequestsTo `xml:"RedirectAllRequestsTo" json:"RedirectAllRequestsTo"`
RoutingRules *RoutingRules `xml:"RoutingRules" json:"RoutingRules"`
CacheControlRules *CacheControlRules `xml:"CacheControlRules" json:"CacheControlRules"`
ExpiresRules *ExpiresRules `xml:"ExpiresRules" json:"ExpiresRules"`
}
func (*WebsiteConfiguration) UnmarshalXML ¶ added in v0.33.0
func (wc *WebsiteConfiguration) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
UnmarshalXML checks whether RoutingRules is empty or is absent. Default unmarshalling do not distinguish it.