diff options
Diffstat (limited to 'connector/connector.go')
-rw-r--r-- | connector/connector.go | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/connector/connector.go b/connector/connector.go index d05f4a2..2bf1704 100644 --- a/connector/connector.go +++ b/connector/connector.go @@ -115,7 +115,7 @@ type Event struct { Text string // Attached files such as images - Attachements map[string]MediaObject + Attachements []MediaObject } type UserInfo struct { @@ -134,6 +134,9 @@ type MediaObject interface { Size() int64 Mimetype() string + // Returns the size of an image if it is an image, otherwise nil + ImageSize() *ImageSize + // Read: must always be implemented Read() (io.ReadCloser, error) @@ -141,3 +144,8 @@ type MediaObject interface { // If so, Read() is the only way to retrieve the object URL() string } + +type ImageSize struct { + Width int + Height int +} |