backend

package
v0.1.0-beta.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 31, 2026 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*SynapseBackend)

Option configures SynapseBackend runtime behavior.

func WithEvictMaxRetries

func WithEvictMaxRetries(maxRetries int) Option

WithEvictMaxRetries configures max retries for newly-created cache eviction tasks.

func WithEvictionPolicy

func WithEvictionPolicy(policy cache.EvictionPolicy) Option

WithEvictionPolicy configures automatic local cache eviction.

func WithStorageCleanupMaxRetries

func WithStorageCleanupMaxRetries(maxRetries int) Option

WithStorageCleanupMaxRetries configures max retries for newly-created storage cleanup tasks.

func WithUploadMaxRetries

func WithUploadMaxRetries(maxRetries int) Option

WithUploadMaxRetries configures max retries for newly-created upload tasks.

type SynapseBackend

type SynapseBackend struct {
	backend.BackendUnsupported // provides ErrNotImplemented for unimplemented methods
	// contains filtered or unexported fields
}

SynapseBackend implements the VersityGW backend.Backend interface, bridging S3 operations to Filecoin via the Synapse SDK.

func New

func New(
	repos *repository.Repositories,
	c cache.Cache,
	sm *state.Machine,
	sc synapse.StorageClient,
	cacheGate *cacheaccess.Gate,
	cacheAccessTracker *cacheaccess.Tracker,
	logger *slog.Logger,
	opts ...Option,
) *SynapseBackend

New creates a new SynapseBackend.

func (*SynapseBackend) AbortMultipartUpload

func (b *SynapseBackend) AbortMultipartUpload(ctx context.Context, input *s3.AbortMultipartUploadInput) error

func (*SynapseBackend) ChangeBucketOwner

func (b *SynapseBackend) ChangeBucketOwner(ctx context.Context, bucket, owner string) error

func (*SynapseBackend) CopyObject

func (*SynapseBackend) CreateBucket

func (b *SynapseBackend) CreateBucket(ctx context.Context, input *s3.CreateBucketInput, defaultACL []byte) error

func (*SynapseBackend) DeleteBucketOwnershipControls

func (b *SynapseBackend) DeleteBucketOwnershipControls(ctx context.Context, bucket string) error

func (*SynapseBackend) DeleteBucketPolicy

func (b *SynapseBackend) DeleteBucketPolicy(ctx context.Context, bucket string) error

func (*SynapseBackend) DeleteObject

func (b *SynapseBackend) DeleteObject(ctx context.Context, input *s3.DeleteObjectInput) (*s3.DeleteObjectOutput, error)

func (*SynapseBackend) DeleteObjects

func (*SynapseBackend) GetBucketAcl

func (b *SynapseBackend) GetBucketAcl(ctx context.Context, input *s3.GetBucketAclInput) ([]byte, error)

GetBucketAcl returns the persisted ACL for the specified bucket.

func (*SynapseBackend) GetBucketOwnershipControls

func (b *SynapseBackend) GetBucketOwnershipControls(ctx context.Context, bucket string) (types.ObjectOwnership, error)

GetBucketOwnershipControls returns an ACL-compatible ownership mode.

func (*SynapseBackend) GetBucketPolicy

func (b *SynapseBackend) GetBucketPolicy(ctx context.Context, bucket string) ([]byte, error)

func (*SynapseBackend) GetBucketTagging

func (b *SynapseBackend) GetBucketTagging(ctx context.Context, bucket string) (map[string]string, error)

GetBucketTagging returns no tags for the specified bucket.

func (*SynapseBackend) GetBucketVersioning

func (b *SynapseBackend) GetBucketVersioning(ctx context.Context, bucket string) (s3response.GetBucketVersioningOutput, error)

GetBucketVersioning reports that SynapS3 buckets are always versioning-enabled.

func (*SynapseBackend) GetObject

func (b *SynapseBackend) GetObject(ctx context.Context, input *s3.GetObjectInput) (*s3.GetObjectOutput, error)

func (*SynapseBackend) GetObjectAcl

func (b *SynapseBackend) GetObjectAcl(ctx context.Context, input *s3.GetObjectAclInput) (*s3.GetObjectAclOutput, error)

GetObjectAcl returns an empty ACL for the specified object. TODO: verify object exists and return NoSuchKey for missing keys.

func (*SynapseBackend) GetObjectAttributes

GetObjectAttributes returns object metadata and honors an explicit versionId.

func (*SynapseBackend) GetObjectLockConfiguration

func (b *SynapseBackend) GetObjectLockConfiguration(ctx context.Context, bucket string) ([]byte, error)

GetObjectLockConfiguration reports that object lock is not configured.

func (*SynapseBackend) HeadBucket

func (b *SynapseBackend) HeadBucket(ctx context.Context, input *s3.HeadBucketInput) (*s3.HeadBucketOutput, error)

func (*SynapseBackend) HeadObject

func (b *SynapseBackend) HeadObject(ctx context.Context, input *s3.HeadObjectInput) (*s3.HeadObjectOutput, error)

func (*SynapseBackend) ListBuckets

func (*SynapseBackend) ListBucketsAndOwners

func (b *SynapseBackend) ListBucketsAndOwners(ctx context.Context) ([]s3response.Bucket, error)

func (*SynapseBackend) ListMultipartUploads

func (*SynapseBackend) ListObjectVersions

ListObjectVersions lists object versions and delete markers with S3 markers and delimiter grouping.

func (*SynapseBackend) ListObjects

func (*SynapseBackend) ListObjectsV2

func (*SynapseBackend) ListParts

func (*SynapseBackend) PutBucketAcl

func (b *SynapseBackend) PutBucketAcl(ctx context.Context, bucket string, data []byte) error

PutBucketAcl persists bucket ACL updates used by VersityGW access control.

func (*SynapseBackend) PutBucketOwnershipControls

func (b *SynapseBackend) PutBucketOwnershipControls(ctx context.Context, bucket string, ownership types.ObjectOwnership) error

func (*SynapseBackend) PutBucketVersioning

func (b *SynapseBackend) PutBucketVersioning(ctx context.Context, bucket string, status types.BucketVersioningStatus) error

PutBucketVersioning accepts Enabled because SynapS3 enforces versioning for every bucket.

func (*SynapseBackend) PutObject

func (*SynapseBackend) PutObjectAcl

func (b *SynapseBackend) PutObjectAcl(ctx context.Context, input *s3.PutObjectAclInput) error

PutObjectAcl accepts and discards object-level ACL updates. TODO: verify object exists and return NoSuchKey for missing keys.

func (*SynapseBackend) RestoreObjectVersion

func (b *SynapseBackend) RestoreObjectVersion(ctx context.Context, bucketName, key, sourceVersionID, expectedCurrentVersionID string) (string, error)

RestoreObjectVersion copies a selected data version to a new current version of the same object.

func (*SynapseBackend) Shutdown

func (b *SynapseBackend) Shutdown()

func (*SynapseBackend) String

func (b *SynapseBackend) String() string

func (*SynapseBackend) UploadPart

func (b *SynapseBackend) UploadPart(ctx context.Context, input *s3.UploadPartInput) (*s3.UploadPartOutput, error)

func (*SynapseBackend) UploadPartCopy

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL