package testgcs

import "cloud.google.com/go/auth/internal/testutil/testgcs"

Package testgcs is a light GCS client used for testings to avoid pulling in dependencies.

Index

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is a lightweight GCS client for testing.

func NewClient

func NewClient(tp auth.TokenProvider) *Client

NewClient creates a Client using the provided cloud.google.com/go/auth.TokenProvider for authentication.

func (*Client) CreateBucket

func (c *Client) CreateBucket(ctx context.Context, projectID, bucket string) error

CreateBucket creates the specified bucket.

func (*Client) DeleteBucket

func (c *Client) DeleteBucket(ctx context.Context, bucket string) error

DeleteBucket deletes the specified bucket.

func (*Client) DownloadObject

func (c *Client) DownloadObject(ctx context.Context, bucket, object string) (*http.Response, error)

DownloadObject returns an http.Response who's body can be consumed to read the contents of an object.

Source Files

storage.go

Version
v0.20.0 (latest)
Published
Apr 6, 2026
Platform
darwin/amd64
Imports
9 packages
Last checked
1 hour ago

Tools for package owners.