alist/internal/model/object.go

29 lines
320 B
Go
Raw Normal View History

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