gcstest

package
v0.0.0-...-948650a Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package gcstest assists in testing code that relies on Google Cloud Storage.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SignedURLClientOption

func SignedURLClientOption(tb testing.TB, clientEmail string, privateKeySeed []byte) option.ClientOption

SignedURLClientOption constructs JSON credentials for a Service Account with the provided email address and a deterministic private key, the seed for which MAY be nil.

If the ClientOption is passed to storage.NewClient(), the credentials will be used by all attempts to sign URLs with BucketHandles obtained via the Client. As a result, no network calls should be made and the signing is entirely self-contained. The returned URLs will be syntactically but not semantically valid; i.e. they are well-formed but won't provide access to anything.

Types

This section is empty.

Jump to

Keyboard shortcuts

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