Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // Type is the type of file system to use Type string `toml:"type"` Local LocalConfig `toml:"local"` S3 S3Config `toml:"s3"` }
Config is a configuration for the file storage backend
type Local ¶
type Local struct {
// contains filtered or unexported fields
}
Local implements local file storage
type LocalConfig ¶
type LocalConfig struct {
DataDir string `toml:"data_dir"`
}
LocalConfig is the storage configuration for local file system
type S3 ¶
type S3 struct {
// contains filtered or unexported fields
}
S3 implements file storage for S3-compatible providers.
type S3Config ¶
type S3Config struct { // S3 Bucket to store files Bucket string `toml:"bucket"` // Region of the S3 service Region string `toml:"region"` // EndpointURL is an HTTP endpoint of the S3 API EndpointURL string `toml:"endpoint_url"` // Prefix is a prefix (subfolder) to use to build key names Prefix string `toml:"prefix"` }
S3Config is the configuration for a S3-compatible storage provider
type Storage ¶
type Storage interface { // FileSystem must be implemented to in order to pass Storage interface to HTTP file server. http.FileSystem // Create will create a new file from reader Create(ctx context.Context, name string, reader io.Reader) (int64, error) // Delete deletes the file Delete(ctx context.Context, name string) error // Size returns a storage object's size in bytes Size(ctx context.Context, name string) (int64, error) }
Storage is a file system interface to host downloaded episodes and feeds.
Click to show internal directories.
Click to hide internal directories.