This commit is contained in:
parent
ed4f6cb7b0
commit
557fde5dff
2 changed files with 79 additions and 1 deletions
2
main.go
2
main.go
|
|
@ -17,7 +17,7 @@ const (
|
||||||
failedColor = "8b0000/dc143c"
|
failedColor = "8b0000/dc143c"
|
||||||
)
|
)
|
||||||
|
|
||||||
//go:embed message.tpl
|
//go:embed sample.tpl
|
||||||
var message string
|
var message string
|
||||||
|
|
||||||
type templateData struct {
|
type templateData struct {
|
||||||
|
|
|
||||||
78
sample.tpl
Normal file
78
sample.tpl
Normal file
|
|
@ -0,0 +1,78 @@
|
||||||
|
{
|
||||||
|
"cardsV2": [
|
||||||
|
{
|
||||||
|
"cardId": "unique-card-id",
|
||||||
|
"card": {
|
||||||
|
"header": {
|
||||||
|
"title": "Sasha",
|
||||||
|
"subtitle": "Software Engineer",
|
||||||
|
"imageUrl":
|
||||||
|
"https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png",
|
||||||
|
"imageType": "CIRCLE",
|
||||||
|
"imageAltText": "Avatar for Sasha"
|
||||||
|
},
|
||||||
|
"sections": [
|
||||||
|
{
|
||||||
|
"header": "Contact Info",
|
||||||
|
"collapsible": true,
|
||||||
|
"uncollapsibleWidgetsCount": 1,
|
||||||
|
"widgets": [
|
||||||
|
{
|
||||||
|
"decoratedText": {
|
||||||
|
"startIcon": {
|
||||||
|
"knownIcon": "EMAIL"
|
||||||
|
},
|
||||||
|
"text": "sasha@example.com"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"decoratedText": {
|
||||||
|
"startIcon": {
|
||||||
|
"knownIcon": "PERSON"
|
||||||
|
},
|
||||||
|
"text": "<font color=\"#80e27e\">Online</font>"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"decoratedText": {
|
||||||
|
"startIcon": {
|
||||||
|
"knownIcon": "PHONE"
|
||||||
|
},
|
||||||
|
"text": "+1 (555) 555-1234"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"buttonList": {
|
||||||
|
"buttons": [
|
||||||
|
{
|
||||||
|
"text": "Share",
|
||||||
|
"onClick": {
|
||||||
|
"openLink": {
|
||||||
|
"url": "https://example.com/share"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"text": "Edit",
|
||||||
|
"onClick": {
|
||||||
|
"action": {
|
||||||
|
"function": "goToView",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"key": "viewType",
|
||||||
|
"value": "EDIT"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue