Files
OpenList/internal/model/object.go

29 lines
320 B
Go
Raw Normal View History

2022-06-15 18:06:42 +08:00
package model
2022-06-06 21:48:53 +08:00
import (
"io"
"time"
)
2022-06-15 20:31:23 +08:00
type Object interface {
2022-06-07 22:02:41 +08:00
GetSize() uint64
2022-06-06 21:48:53 +08:00
GetName() string
2022-06-07 22:02:41 +08:00
ModTime() time.Time
IsDir() bool
2022-06-15 20:31:23 +08:00
GetID() string
2022-06-06 21:48:53 +08:00
}
2022-06-15 18:06:42 +08:00
type FileStreamer interface {
2022-06-06 21:48:53 +08:00
io.ReadCloser
2022-06-15 20:31:23 +08:00
Object
2022-06-06 21:48:53 +08:00
GetMimetype() string
}
2022-06-07 22:02:41 +08:00
type URL interface {
URL() string
}
type Thumbnail interface {
Thumbnail() string
}