Dagger
Search

r2-sync

This module provides a set of functions to upload files to Cloudlare R2 bucket and to create a development environment with AWS CLI installed.

Installation

dagger install github.com/tsirysndr/daggerverse/r2-sync@e8bed26dfefaaf4ef3d00958965575131f34c69c

Entrypoint

Return Type
R2Sync
Example
dagger -m github.com/tsirysndr/daggerverse/r2-sync@e8bed26dfefaaf4ef3d00958965575131f34c69c call \
func (m *myModule) example() *R2Sync  {
	return dag.
			R2Sync()
}
@function
def example() -> dag.R2Sync:
	return (
		dag.r2_sync()
	)
@func()
example(): R2Sync {
	return dag
		.r2Sync()
}

Types

R2Sync 🔗

upload() 🔗

Uploads files to Cloudlare R2 bucket.

Return Type
String !
Arguments
NameTypeDefault ValueDescription
srcDirectory -No description provided
accessKeySecret !-No description provided
secretKeySecret !-No description provided
bucketString !-No description provided
endpointUrlString !-No description provided
regionString "us-east-1"No description provided
Example
dagger -m github.com/tsirysndr/daggerverse/r2-sync@e8bed26dfefaaf4ef3d00958965575131f34c69c call \
 upload --access-key env:MYSECRET --secret-key env:MYSECRET --bucket string --endpoint-url string
func (m *myModule) example(ctx context.Context, accessKey *Secret, secretKey *Secret, bucket string, endpointUrl string) string  {
	return dag.
			R2Sync().
			Upload(ctxaccessKey, secretKey, bucket, endpointUrl)
}
@function
async def example(access_key: dagger.Secret, secret_key: dagger.Secret, bucket: str, endpoint_url: str) -> str:
	return await (
		dag.r2_sync()
		.upload(access_key, secret_key, bucket, endpoint_url)
	)
@func()
async example(accessKey: Secret, secretKey: Secret, bucket: string, endpointUrl: string): Promise<string> {
	return dag
		.r2Sync()
		.upload(accessKey, secretKey, bucket, endpointUrl)
}

dev() 🔗

Returns a container with AWS CLI installed.

Return Type
Container !
Arguments
NameTypeDefault ValueDescription
srcDirectory -No description provided
Example
dagger -m github.com/tsirysndr/daggerverse/r2-sync@e8bed26dfefaaf4ef3d00958965575131f34c69c call \
 dev
func (m *myModule) example() *Container  {
	return dag.
			R2Sync().
			Dev()
}
@function
def example() -> dagger.Container:
	return (
		dag.r2_sync()
		.dev()
	)
@func()
example(): Container {
	return dag
		.r2Sync()
		.dev()
}