Documentation
¶
Index ¶
- type Client
- func (x *Client) Close(ctx context.Context)
- func (x *Client) CopyObject(ctx context.Context, src, dst string) error
- func (x *Client) DeleteObject(ctx context.Context, object string) error
- func (x *Client) GetObject(ctx context.Context, object string) (io.ReadCloser, error)
- func (x *Client) PutObject(ctx context.Context, object string) io.WriteCloser
- type MemoryClient
- func (m *MemoryClient) Close(ctx context.Context)
- func (m *MemoryClient) CopyObject(_ context.Context, src, dst string) error
- func (m *MemoryClient) DeleteObject(_ context.Context, object string) error
- func (m *MemoryClient) GetObject(ctx context.Context, object string) (io.ReadCloser, error)
- func (m *MemoryClient) PutObject(ctx context.Context, object string) io.WriteCloser
- type Mock
- func (m *Mock) Close(_ context.Context)
- func (m *Mock) CopyObject(_ context.Context, src, dst string) error
- func (m *Mock) DeleteObject(_ context.Context, object string) error
- func (m *Mock) GetObject(ctx context.Context, object string) (io.ReadCloser, error)
- func (m *Mock) PutObject(ctx context.Context, object string) io.WriteCloser
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) CopyObject ¶ added in v0.16.0
CopyObject copies src to dst inside the same bucket using GCS's server-side copy API. No bytes traverse the caller's process; the rewrite runs entirely on Google's side. A missing source surfaces as storage.ErrObjectNotExist, wrapped so callers can discriminate.
func (*Client) DeleteObject ¶ added in v0.16.0
type MemoryClient ¶ added in v0.1.0
type MemoryClient struct {
// contains filtered or unexported fields
}
func NewMemoryClient ¶ added in v0.1.0
func NewMemoryClient() *MemoryClient
func (*MemoryClient) Close ¶ added in v0.1.0
func (m *MemoryClient) Close(ctx context.Context)
func (*MemoryClient) CopyObject ¶ added in v0.16.0
func (m *MemoryClient) CopyObject(_ context.Context, src, dst string) error
CopyObject copies the in-memory object bytes. The test helper does not attempt to mimic GCS's "stage-then-commit" semantics; it just duplicates the byte slice so the destination is independent of later writes to the source.
func (*MemoryClient) DeleteObject ¶ added in v0.16.0
func (m *MemoryClient) DeleteObject(_ context.Context, object string) error
func (*MemoryClient) GetObject ¶ added in v0.1.0
func (m *MemoryClient) GetObject(ctx context.Context, object string) (io.ReadCloser, error)
func (*MemoryClient) PutObject ¶ added in v0.1.0
func (m *MemoryClient) PutObject(ctx context.Context, object string) io.WriteCloser
type Mock ¶
type Mock struct {
// contains filtered or unexported fields
}
func (*Mock) CopyObject ¶ added in v0.16.0
func (*Mock) DeleteObject ¶ added in v0.16.0
Click to show internal directories.
Click to hide internal directories.