Documentation
¶
Index ¶
- type Fs
- func (l *Fs) Read(ctx context.Context, key string) ([]byte, error)
- func (l *Fs) Remove(ctx context.Context, key string) error
- func (l *Fs) RemoveFolder(ctx context.Context, folder string) error
- func (l *Fs) Write(ctx context.Context, key string, data []byte) error
- func (l *Fs) WriteIfMissing(ctx context.Context, key string, data []byte) error
- type Gcs
- func (g *Gcs) Read(ctx context.Context, key string) ([]byte, error)
- func (g *Gcs) Remove(ctx context.Context, key string) error
- func (g *Gcs) RemoveFolder(ctx context.Context, folder string) error
- func (g *Gcs) Write(ctx context.Context, key string, data []byte) error
- func (g *Gcs) WriteIfMissing(ctx context.Context, key string, data []byte) error
- type Storage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Fs ¶ added in v1.0.4
type Fs struct {
// contains filtered or unexported fields
}
Implements the Storage interface for the local file system.
func NewFsStorage ¶ added in v1.0.5
Returns a new Fs instance.
func (*Fs) RemoveFolder ¶ added in v1.0.6
Removes a folder
type Gcs ¶ added in v1.0.4
type Gcs struct {
// contains filtered or unexported fields
}
Gcs implements Storage for Google Cloud Storage.
func NewGcsStorage ¶ added in v1.0.5
Returns a new Gcs blob storage instance.
func (*Gcs) RemoveFolder ¶ added in v1.0.6
Removes all objects at the specified folder (prefix)
type Storage ¶ added in v1.0.5
type Storage interface { // Reads a blob Read(ctx context.Context, key string) ([]byte, error) // Writes a blob Write(ctx context.Context, key string, data []byte) error // Writes a blob if the key does not contain any data yet WriteIfMissing(ctx context.Context, key string, data []byte) error // Removes a blob if it exists Remove(ctx context.Context, key string) error // Removes a folder and all children blobs RemoveFolder(ctx context.Context, folder string) error }
A simplified interface for interacting with blob storage.
Click to show internal directories.
Click to hide internal directories.