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.

25 lines
570 B

  1. package backends
  2. import (
  3. "errors"
  4. "io"
  5. "time"
  6. )
  7. type StorageBackend interface {
  8. Delete(key string) error
  9. Exists(key string) (bool, error)
  10. Head(key string) (Metadata, error)
  11. Get(key string) (Metadata, io.ReadCloser, error)
  12. Put(key string, r io.Reader, expiry time.Time, deleteKey string) (Metadata, error)
  13. PutMetadata(key string, m Metadata) error
  14. Size(key string) (int64, error)
  15. }
  16. type MetaStorageBackend interface {
  17. StorageBackend
  18. List() ([]string, error)
  19. }
  20. var NotFoundErr = errors.New("File not found.")
  21. var FileEmptyError = errors.New("Empty file")