chore: move some types to model

This commit is contained in:
Noah Hsu
2022-06-15 18:06:42 +08:00
parent 2cddd3cf2b
commit 979f8383d8
10 changed files with 62 additions and 37 deletions

27
internal/model/ifile.go Normal file
View File

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