logginghandler/vendor/cloud.google.com/go/storage
Marvin Preuss d095180eb4
All checks were successful
continuous-integration/drone/push Build is passing
build: uses go modules for tool handling
2022-01-14 13:51:56 +01:00
..
internal/apiv2 build: uses go modules for tool handling 2022-01-14 13:51:56 +01:00
acl.go build: uses go modules for tool handling 2022-01-14 13:51:56 +01:00
bucket.go build: uses go modules for tool handling 2022-01-14 13:51:56 +01:00
CHANGES.md build: uses go modules for tool handling 2022-01-14 13:51:56 +01:00
copy.go build: uses go modules for tool handling 2022-01-14 13:51:56 +01:00
doc.go build: uses go modules for tool handling 2022-01-14 13:51:56 +01:00
go_mod_tidy_hack.go build: uses go modules for tool handling 2022-01-14 13:51:56 +01:00
go.mod build: uses go modules for tool handling 2022-01-14 13:51:56 +01:00
go.sum build: uses go modules for tool handling 2022-01-14 13:51:56 +01:00
hmac.go build: uses go modules for tool handling 2022-01-14 13:51:56 +01:00
iam.go build: uses go modules for tool handling 2022-01-14 13:51:56 +01:00
invoke.go build: uses go modules for tool handling 2022-01-14 13:51:56 +01:00
LICENSE build: uses go modules for tool handling 2022-01-14 13:51:56 +01:00
notifications.go build: uses go modules for tool handling 2022-01-14 13:51:56 +01:00
post_policy_v4.go build: uses go modules for tool handling 2022-01-14 13:51:56 +01:00
reader.go build: uses go modules for tool handling 2022-01-14 13:51:56 +01:00
README.md build: uses go modules for tool handling 2022-01-14 13:51:56 +01:00
storage.go build: uses go modules for tool handling 2022-01-14 13:51:56 +01:00
storage.replay build: uses go modules for tool handling 2022-01-14 13:51:56 +01:00
writer.go build: uses go modules for tool handling 2022-01-14 13:51:56 +01:00

Cloud Storage Go Reference

Example Usage

First create a storage.Client to use throughout your application:

client, err := storage.NewClient(ctx)
if err != nil {
	log.Fatal(err)
}
// Read the object1 from bucket.
rc, err := client.Bucket("bucket").Object("object1").NewReader(ctx)
if err != nil {
	log.Fatal(err)
}
defer rc.Close()
body, err := ioutil.ReadAll(rc)
if err != nil {
	log.Fatal(err)
}