2024-04-10 22:38:19 +07:00
|
|
|
package bmessage
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/alecthomas/units"
|
|
|
|
)
|
|
|
|
|
|
|
|
type ImageMetadata struct {
|
2024-04-11 16:04:13 +07:00
|
|
|
Kind ImageKind
|
|
|
|
URL string
|
|
|
|
Height int
|
|
|
|
Width int
|
2024-04-10 22:38:19 +07:00
|
|
|
}
|
|
|
|
|
2024-04-11 16:04:13 +07:00
|
|
|
type ImageKind int
|
|
|
|
|
|
|
|
const (
|
|
|
|
KindImage ImageKind = iota
|
|
|
|
KindThumbnail
|
|
|
|
)
|
|
|
|
|
|
|
|
type ImageDownloadMessage struct {
|
2024-04-10 22:38:19 +07:00
|
|
|
Metadata ImageMetadata
|
2024-04-11 16:04:13 +07:00
|
|
|
ContentLength units.MetricBytes
|
2024-04-10 22:38:19 +07:00
|
|
|
Downloaded units.MetricBytes
|
|
|
|
Subreddit string
|
|
|
|
PostURL string
|
|
|
|
PostID string
|
|
|
|
Error error
|
|
|
|
}
|