Documentation
¶
Index ¶
- Constants
- Variables
- func ContentDispositionAttachment(name string) string
- func DownloadFilename(name string) string
- func MultipartPartObjectKey(key string, uploadID UploadID, partNumber int32) string
- func MultipartUploadPrefix(key string, uploadID UploadID) (string, error)
- type AbortMultipartRequest
- type BeginMultipartRequest
- type ByteRange
- type CompleteMultipartRequest
- type CompletedPart
- type CredentialLookup
- type DeleteTarget
- type Deleter
- type ErrorKind
- type Invalidator
- type InventoryRequest
- type InventoryResult
- type Inventoryer
- type Manager
- func (m *Manager) AbortMultipart(ctx context.Context, request AbortMultipartRequest) error
- func (m *Manager) BeginMultipart(ctx context.Context, request BeginMultipartRequest) (UploadID, error)
- func (m *Manager) Close() error
- func (m *Manager) CompleteMultipart(ctx context.Context, request CompleteMultipartRequest) error
- func (m *Manager) DeleteExact(ctx context.Context, targets []DeleteTarget) error
- func (m *Manager) InvalidateBucket(bucket string)
- func (m *Manager) Inventory(ctx context.Context, request InventoryRequest) (InventoryResult, error)
- func (m *Manager) Probe(ctx context.Context, targets []ProbeTarget) []ProbeResult
- func (m *Manager) Sign(ctx context.Context, request SignRequest) (SignedAccess, error)
- func (m *Manager) SignMultipartPart(ctx context.Context, request MultipartPartRequest) (SignedAccess, error)
- type MultipartAborter
- type MultipartPartRequest
- type ObjectMetadata
- type OperationError
- type PhysicalTarget
- type ProbeResult
- type ProbeTarget
- type Prober
- type Provider
- type ProviderBinding
- type Registration
- type SignRequest
- type SignedAccess
- type Target
- type UploadID
Constants ¶
const MultipartCompletionMarkerMetadataKey = "syfon-multipart-id"
Variables ¶
var ErrMultipartCompletionIndeterminate = errors.New("multipart completion outcome is indeterminate")
Functions ¶
func DownloadFilename ¶
func MultipartPartObjectKey ¶
Types ¶
type AbortMultipartRequest ¶ added in v0.4.2
type BeginMultipartRequest ¶ added in v0.4.2
type CompleteMultipartRequest ¶
type CompleteMultipartRequest struct {
Target Target
UploadID UploadID
CompletionID string
Parts []CompletedPart
}
type CompletedPart ¶
type CredentialLookup ¶
type CredentialLookup interface {
GetS3Credential(ctx context.Context, bucket string) (*buckets.Credential, error)
}
CredentialLookup reads one configured bucket credential by identifier or physical bucket name.
type DeleteTarget ¶
type DeleteTarget struct {
Location string
}
type Deleter ¶ added in v0.4.2
type Deleter interface {
Delete(context.Context, ProviderBinding, []PhysicalTarget) error
}
type Invalidator ¶ added in v0.4.2
type Invalidator interface {
InvalidateBucket(string)
}
type InventoryRequest ¶
type InventoryResult ¶
type InventoryResult struct {
Items []ObjectMetadata
Complete bool
}
type Inventoryer ¶ added in v0.4.2
type Inventoryer interface {
Inventory(context.Context, ProviderBinding, InventoryRequest) (InventoryResult, error)
}
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func NewManager(credentials CredentialLookup, registrations ...Registration) (*Manager, error)
func (*Manager) AbortMultipart ¶ added in v0.4.2
func (m *Manager) AbortMultipart(ctx context.Context, request AbortMultipartRequest) error
AbortMultipart asks a provider to discard an in-progress multipart upload. Providers that cannot expose an abort API are reported as unsupported and the durable session remains available for a later retry.
func (*Manager) BeginMultipart ¶
func (*Manager) Close ¶ added in v0.4.2
Close releases resources owned by the manager. Registrations are closed in construction order and repeated calls return the same aggregate result.
func (*Manager) CompleteMultipart ¶
func (m *Manager) CompleteMultipart(ctx context.Context, request CompleteMultipartRequest) error
func (*Manager) DeleteExact ¶
func (m *Manager) DeleteExact(ctx context.Context, targets []DeleteTarget) error
func (*Manager) InvalidateBucket ¶
func (*Manager) Inventory ¶
func (m *Manager) Inventory(ctx context.Context, request InventoryRequest) (InventoryResult, error)
func (*Manager) Probe ¶
func (m *Manager) Probe(ctx context.Context, targets []ProbeTarget) []ProbeResult
func (*Manager) Sign ¶ added in v0.4.2
func (m *Manager) Sign(ctx context.Context, request SignRequest) (SignedAccess, error)
Sign resolves one credential binding and passes it to the provider.
func (*Manager) SignMultipartPart ¶ added in v0.4.2
func (m *Manager) SignMultipartPart(ctx context.Context, request MultipartPartRequest) (SignedAccess, error)
type MultipartAborter ¶ added in v0.4.2
type MultipartAborter interface {
AbortMultipart(context.Context, ProviderBinding, AbortMultipartRequest) error
}
MultipartAborter is optional so existing provider implementations remain source-compatible. Production providers implement exact, provider-native cleanup semantics where the backend supports them.
type MultipartPartRequest ¶
type ObjectMetadata ¶
type OperationError ¶
func (*OperationError) Error ¶
func (e *OperationError) Error() string
func (*OperationError) ErrorCategory ¶ added in v0.4.1
func (e *OperationError) ErrorCategory() errorapi.ErrorCategory
func (*OperationError) ErrorCode ¶ added in v0.4.1
func (e *OperationError) ErrorCode() errorapi.ErrorCode
func (*OperationError) Is ¶ added in v0.4.1
func (e *OperationError) Is(target error) bool
func (*OperationError) PublicMessage ¶ added in v0.4.1
func (e *OperationError) PublicMessage() string
func (*OperationError) Unwrap ¶
func (e *OperationError) Unwrap() error
type PhysicalTarget ¶
type ProbeResult ¶
type ProbeResult struct {
ID string
Target Target
Metadata ObjectMetadata
Err error
}
type ProbeTarget ¶
type Prober ¶ added in v0.4.2
type Prober interface {
Probe(context.Context, ProviderBinding, []ProbeTarget) []ProbeResult
}
type Provider ¶ added in v0.4.2
type Provider interface {
Sign(context.Context, ProviderBinding, SignRequest) (SignedAccess, error)
BeginMultipart(context.Context, ProviderBinding, BeginMultipartRequest) (UploadID, error)
SignMultipartPart(context.Context, ProviderBinding, MultipartPartRequest) (SignedAccess, error)
CompleteMultipart(context.Context, ProviderBinding, CompleteMultipartRequest) error
}
type ProviderBinding ¶ added in v0.4.2
type ProviderBinding struct {
Provider string
LookupKey string
PhysicalBucket string
Credential *buckets.Credential
}
type Registration ¶
type Registration struct {
// contains filtered or unexported fields
}
func NewRegistration ¶
func NewRegistration(provider string, backend Provider) Registration
type SignRequest ¶ added in v0.4.2
type SignedAccess ¶ added in v0.4.2
type SignedAccess struct {
Location string
}