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.

31 lines
639 B

  1. package backends
  2. import (
  3. "io"
  4. "net/http"
  5. "github.com/andreimarcu/linx-server/torrent"
  6. )
  7. type ReadSeekCloser interface {
  8. io.Reader
  9. io.Closer
  10. io.Seeker
  11. io.ReaderAt
  12. }
  13. type StorageBackend interface {
  14. Delete(key string) error
  15. Exists(key string) (bool, error)
  16. Get(key string) ([]byte, error)
  17. Put(key string, r io.Reader) (int64, error)
  18. Open(key string) (ReadSeekCloser, error)
  19. ServeFile(key string, w http.ResponseWriter, r *http.Request) error
  20. Size(key string) (int64, error)
  21. GetTorrent(fileName string, url string) (torrent.Torrent, error)
  22. }
  23. type MetaStorageBackend interface {
  24. StorageBackend
  25. List() ([]string, error)
  26. }