Contains the Concourse pipeline definition for building a line-server container
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
594 B

  1. package backends
  2. import (
  3. "errors"
  4. "io"
  5. "time"
  6. "github.com/andreimarcu/linx-server/torrent"
  7. )
  8. type StorageBackend interface {
  9. Delete(key string) error
  10. Exists(key string) (bool, error)
  11. Head(key string) (Metadata, error)
  12. Get(key string) (Metadata, io.ReadCloser, error)
  13. Put(key string, r io.Reader, expiry time.Time, deleteKey string) (Metadata, error)
  14. Size(key string) (int64, error)
  15. GetTorrent(fileName string, url string) (torrent.Torrent, error)
  16. }
  17. type MetaStorageBackend interface {
  18. StorageBackend
  19. List() ([]string, error)
  20. }
  21. var NotFoundErr = errors.New("File not found.")