mirror of
https://github.com/syumai/workers.git
synced 2025-03-10 17:29:11 +00:00
integrate cloudflare/(r2bucket,r2object,r2objects).go into cloudflare/r2.go
This commit is contained in:
parent
443e50a8bb
commit
c30f8b601c
31
cloudflare/r2.go
Normal file
31
cloudflare/r2.go
Normal file
@ -0,0 +1,31 @@
|
||||
package cloudflare
|
||||
|
||||
import (
|
||||
"github.com/syumai/workers/cloudflare/r2"
|
||||
)
|
||||
|
||||
// R2Bucket represents interface of Cloudflare Worker's R2 Bucket instance.
|
||||
// Deprecated: use r2.Bucket instead.
|
||||
type R2Bucket = r2.Bucket
|
||||
|
||||
// NewR2Bucket returns R2Bucket for given variable name.
|
||||
// Deprecated: use r2.NewBucket instead.
|
||||
func NewR2Bucket(varName string) (*R2Bucket, error) {
|
||||
return r2.NewBucket(varName)
|
||||
}
|
||||
|
||||
// R2PutOptions represents Cloudflare R2 put options.
|
||||
// Deprecated: use r2.PutOptions instead.
|
||||
type R2PutOptions = r2.PutOptions
|
||||
|
||||
// R2Object represents Cloudflare R2 object.
|
||||
// Deprecated: use r2.Object instead.
|
||||
type R2Object = r2.Object
|
||||
|
||||
// R2HTTPMetadata represents metadata of R2Object.
|
||||
// Deprecated: use r2.HTTPMetadata instead.
|
||||
type R2HTTPMetadata = r2.HTTPMetadata
|
||||
|
||||
// R2Objects represents Cloudflare R2 objects.
|
||||
// Deprecated: use r2.Objects instead.
|
||||
type R2Objects = r2.Objects
|
@ -1,19 +1 @@
|
||||
package cloudflare
|
||||
|
||||
import (
|
||||
"github.com/syumai/workers/cloudflare/r2"
|
||||
)
|
||||
|
||||
// R2Bucket represents interface of Cloudflare Worker's R2 Bucket instance.
|
||||
// Deprecated: use r2.Bucket instead.
|
||||
type R2Bucket = r2.Bucket
|
||||
|
||||
// NewR2Bucket returns R2Bucket for given variable name.
|
||||
// Deprecated: use r2.NewBucket instead.
|
||||
func NewR2Bucket(varName string) (*R2Bucket, error) {
|
||||
return r2.NewBucket(varName)
|
||||
}
|
||||
|
||||
// R2PutOptions represents Cloudflare R2 put options.
|
||||
// Deprecated: use r2.PutOptions instead.
|
||||
type R2PutOptions = r2.PutOptions
|
||||
|
@ -1,13 +1 @@
|
||||
package cloudflare
|
||||
|
||||
import (
|
||||
"github.com/syumai/workers/cloudflare/r2"
|
||||
)
|
||||
|
||||
// R2Object represents Cloudflare R2 object.
|
||||
// Deprecated: use r2.Object instead.
|
||||
type R2Object = r2.Object
|
||||
|
||||
// R2HTTPMetadata represents metadata of R2Object.
|
||||
// Deprecated: use r2.HTTPMetadata instead.
|
||||
type R2HTTPMetadata = r2.HTTPMetadata
|
||||
|
@ -1,9 +1 @@
|
||||
package cloudflare
|
||||
|
||||
import (
|
||||
"github.com/syumai/workers/cloudflare/r2"
|
||||
)
|
||||
|
||||
// R2Objects represents Cloudflare R2 objects.
|
||||
// Deprecated: use r2.Objects instead.
|
||||
type R2Objects = r2.Objects
|
||||
|
Loading…
x
Reference in New Issue
Block a user