r2blob

package module
v0.0.0-...-3affc6f Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2023 License: MIT Imports: 9 Imported by: 0

README

r2blob

Installation

go get -u github.com/moonrhythm/r2blob

Usage

package main

import (
    "gocloud.dev/blob"

    _ "github.com/moonrhythm/r2blob"
)

func main() {
    bucket, err := blob.OpenBucket(context.Background(), "r2://bucket-name?account=xxx&access_key_id=xxx&access_key_secret=xxx")
    if err != nil {
        panic(err)
    }
    defer bucket.Close()

    // ...
}

Documentation

Index

Constants

View Source
const Scheme = "r2"

Variables

This section is empty.

Functions

This section is empty.

Types

type URLOpener

type URLOpener struct {
}

func (*URLOpener) OpenBucketURL

func (o *URLOpener) OpenBucketURL(ctx context.Context, u *url.URL) (*blob.Bucket, error)

Jump to

Keyboard shortcuts

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