Adding interfaces for implementing against

master
Frederick F. Kautz IV 10 years ago
parent 982a52e0d4
commit d7f00194b5
  1. 18
      pkg/donutbox/donutbox.go

@ -19,6 +19,24 @@ type DonutBox interface {
GetObjectMetadata(bucket, object string, column uint) (map[string]string, error)
}
// Bucket contains major operations on a bucket
type Bucket interface {
AddDisk(Disk) error
RemoveDisk(Disk)
GetDisk(i uint) (Disk, error)
GetDisks() ([]Disk, error)
GetMetadata() (map[string]string, error)
ListObjects(prefix string) ([]string, error)
SetMetadata(metadata map[string]string) error
}
// Disk represents major operations on a bucket's disk
type Disk interface {
GetObjectMetadata(object string) (map[string]string, error)
GetObjectReader(object string) (io.Reader, error)
GetObjectWriter(object string) (*NewObject, error)
}
// Result is a result for async tasks
type Result struct {
Err error

Loading…
Cancel
Save