Documentation ¶
Overview ¶
r2 package is inspired by a proposal in distribution/distribution repository, created by tpoxa Discussion: https://github.com/distribution/distribution/pull/3940 Revision: https://github.com/container-registry/distribution/tree/r2-multipart-issue License at revision: https://github.com/container-registry/distribution/blob/r2-multipart-issue/LICENSE
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Driver ¶
type Driver struct {
// contains filtered or unexported fields
}
Driver is a storagedriver.StorageDriver implementation backed by Cloudflare's R2 Objects are stored at absolute keys in the provided bucket.
func FromParameters ¶
FromParameters constructs a new Driver with a given parameters map Required parameters: - accesskey - secretkey - region - bucket - regionendpoint
func New ¶
func New(params DriverParameters) (*Driver, error)
func (*Driver) S3BucketKey ¶
S3BucketKey returns the s3 bucket key for the given storage driver path.
type DriverParameters ¶
type DriverParameters struct { AccessKey string SecretKey string Bucket string Region string RegionEndpoint string ForcePathStyle bool Secure bool SkipVerify bool ChunkSize int64 MultipartCopyChunkSize int64 MultipartCopyMaxConcurrency int64 MultipartCopyThresholdSize int64 RootDirectory string }
DriverParameters A struct that encapsulates all of the driver parameters after all values have been set