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 ¶
- type Client
- func NewClient(tp auth.TokenProvider) *Client
- func (c *Client) CreateBucket(ctx context.Context, projectID, bucket string) error
- func (c *Client) DeleteBucket(ctx context.Context, bucket string) error
- func (c *Client) DownloadObject(ctx context.Context, bucket, object string) (*http.Response, error)
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 ¶
CreateBucket creates the specified bucket.
func (*Client) DeleteBucket ¶
DeleteBucket deletes the specified bucket.
func (*Client) DownloadObject ¶
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.