-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathimage.go
34 lines (30 loc) · 1022 Bytes
/
image.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package typeform
const (
ImageFormatImage = "image"
ImageFormatChoice = "choice"
ImageFormatBackground = "background"
ImageSizeDefault = "default"
ImageSizeMobile = "mobile"
ImageSizeSuperMobile = "supermobile"
ImageSizeSuperMobileFit = "supermobilefit"
ImageSizeSuperSize = "supersize"
ImageSizeSuperSizeFit = "supersizefit"
ImageSizeSuperTablet = "supertablet"
ImageSizeTablet = "tablet"
ImageSizeThumbnail = "thumbnail"
)
type Image struct {
ID string `json:"id,omitempty"`
Src string `json:"src,omitempty"`
FileName string `json:"file_name,omitempty"`
Width int `json:"width,omitempty"`
Height int `json:"height,omitempty"`
MediaType string `json:"media_type,omitempty"`
HasAlpha bool `json:"has_alpha,omitempty"`
AvgColor string `json:"avg_color,omitempty"`
}
type CreateImageParams struct {
Image string `json:"image,omitempty"`
FileName string `json:"file_name"`
Url string `json:"url,omitempty"`
}