Documentation
¶
Index ¶
Constants ¶
View Source
const ( MaxAttachments = 4 MaxImageBytes = 5 << 20 MaxGIFBytes = 15 << 20 MaxVideoBytes = 512 << 20 )
Variables ¶
This section is empty.
Functions ¶
func HumanBytes ¶
func NormalizePath ¶
Types ¶
type Attachment ¶
type Attachment struct {
ID string
Name string
Source Source
Path string
MIME string
Format string
Width int
Height int
Size int64
Data []byte
}
func FromClipboard ¶
func FromClipboard(data []byte) (Attachment, error)
func FromPath ¶
func FromPath(input string) (Attachment, error)
func (Attachment) IsVideo ¶
func (a Attachment) IsVideo() bool
IsVideo reports whether the attachment streams from disk as video rather than travelling in Data as an image.
Click to show internal directories.
Click to hide internal directories.