Documentation ¶
Index ¶
- type MemoryGCSClient
- func (c *MemoryGCSClient) AllFilesInDirectory(ctx context.Context, prefix string, ...) error
- func (c *MemoryGCSClient) Bucket() string
- func (c *MemoryGCSClient) DeleteFile(ctx context.Context, path string) error
- func (c *MemoryGCSClient) DoesFileExist(ctx context.Context, path string) (bool, error)
- func (c *MemoryGCSClient) FileReader(ctx context.Context, path string) (io.ReadCloser, error)
- func (c *MemoryGCSClient) FileWriter(ctx context.Context, path string, opts gcs.FileWriteOptions) io.WriteCloser
- func (c *MemoryGCSClient) GetFileContents(ctx context.Context, path string) ([]byte, error)
- func (c *MemoryGCSClient) GetFileObjectAttrs(ctx context.Context, path string) (*storage.ObjectAttrs, error)
- func (c *MemoryGCSClient) SetFileContents(ctx context.Context, path string, opts gcs.FileWriteOptions, contents []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MemoryGCSClient ¶
type MemoryGCSClient struct {
// contains filtered or unexported fields
}
MemoryGCSClient is a struct used for testing. Instead of writing to GCS, it stores data in memory.
func (*MemoryGCSClient) AllFilesInDirectory ¶
func (c *MemoryGCSClient) AllFilesInDirectory(ctx context.Context, prefix string, callback func(item *storage.ObjectAttrs) error) error
See documentation for GCSClient interface.
func (*MemoryGCSClient) Bucket ¶
func (c *MemoryGCSClient) Bucket() string
See documentation for GCSClient interface.
func (*MemoryGCSClient) DeleteFile ¶
func (c *MemoryGCSClient) DeleteFile(ctx context.Context, path string) error
See documentation for GCSClient interface.
func (*MemoryGCSClient) DoesFileExist ¶
See documentation for GCSClient interface.
func (*MemoryGCSClient) FileReader ¶
func (c *MemoryGCSClient) FileReader(ctx context.Context, path string) (io.ReadCloser, error)
See documentationn for GCSClient interface.
func (*MemoryGCSClient) FileWriter ¶
func (c *MemoryGCSClient) FileWriter(ctx context.Context, path string, opts gcs.FileWriteOptions) io.WriteCloser
See documentation for GCSClient interface.
func (*MemoryGCSClient) GetFileContents ¶
See documentation for GCSClient interface.
func (*MemoryGCSClient) GetFileObjectAttrs ¶
func (c *MemoryGCSClient) GetFileObjectAttrs(ctx context.Context, path string) (*storage.ObjectAttrs, error)
See documentation for GCSClient interface.
func (*MemoryGCSClient) SetFileContents ¶
func (c *MemoryGCSClient) SetFileContents(ctx context.Context, path string, opts gcs.FileWriteOptions, contents []byte) error
See documentation for GCSClient interface.
Click to show internal directories.
Click to hide internal directories.