Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| bfc17b45d4 | |||
| 4d2ebbd805 | |||
| 5b349724eb |
@@ -158,12 +158,12 @@ type ESSetImage struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type ESSetImagePayload struct {
|
type ESSetImagePayload struct {
|
||||||
Image string `json:"title"`
|
Image string `json:"image"`
|
||||||
Target EventTarget `json:"target"`
|
Target EventTarget `json:"target"`
|
||||||
State int `json:"state"`
|
State int `json:"state"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewESSetImagePayload(context string, imageBase64 string, target EventTarget, state int) ESSetImage {
|
func NewESSetImage(context string, imageBase64 string, target EventTarget, state int) ESSetImage {
|
||||||
return ESSetImage{
|
return ESSetImage{
|
||||||
ESCommon: ESCommon{
|
ESCommon: ESCommon{
|
||||||
Event: "setImage",
|
Event: "setImage",
|
||||||
|
|||||||
@@ -24,6 +24,6 @@ func ImageToPayload(i image.Image) string {
|
|||||||
|
|
||||||
// SVGToPayload create the string necessary to send an SVG
|
// SVGToPayload create the string necessary to send an SVG
|
||||||
// via a ESSetImage struct
|
// via a ESSetImage struct
|
||||||
func SVGToPayload(context string, svg string) string {
|
func SVGToPayload(svg string) string {
|
||||||
return "data:image/svg+xml;charset=utf8," + svg
|
return "data:image/svg+xml;charset=utf8," + svg
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user