refactor: change driver interface

This commit is contained in:
Noah Hsu
2022-06-15 20:31:23 +08:00
parent d9eb188b7a
commit 09ef7c7106
12 changed files with 181 additions and 136 deletions

28
internal/model/object.go Normal file
View File

@ -0,0 +1,28 @@
package model
import (
"io"
"time"
)
type Object interface {
GetSize() uint64
GetName() string
ModTime() time.Time
IsDir() bool
GetID() string
}
type FileStreamer interface {
io.ReadCloser
Object
GetMimetype() string
}
type URL interface {
URL() string
}
type Thumbnail interface {
Thumbnail() string
}