Storage is a file system interface to host downloaded episodes and feeds.
| 8 | |
| 9 | // Storage is a file system interface to host downloaded episodes and feeds. |
| 10 | type Storage interface { |
| 11 | // FileSystem must be implemented to in order to pass Storage interface to HTTP file server. |
| 12 | http.FileSystem |
| 13 | |
| 14 | // Create will create a new file from reader |
| 15 | Create(ctx context.Context, name string, reader io.Reader) (int64, error) |
| 16 | |
| 17 | // Delete deletes the file |
| 18 | Delete(ctx context.Context, name string) error |
| 19 | |
| 20 | // Size returns a storage object's size in bytes |
| 21 | Size(ctx context.Context, name string) (int64, error) |
| 22 | } |
| 23 | |
| 24 | // Config is a configuration for the file storage backend |
| 25 | type Config struct { |
no outgoing calls
no test coverage detected