From 557fde5dff92eed6df5f07d9c52ebd8c26090453 Mon Sep 17 00:00:00 2001 From: "Marcel S. Henselin" Date: Thu, 16 Apr 2026 12:11:24 +0200 Subject: [PATCH] chore: test old --- main.go | 2 +- sample.tpl | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 79 insertions(+), 1 deletion(-) create mode 100644 sample.tpl diff --git a/main.go b/main.go index b891ce6..3f261ce 100644 --- a/main.go +++ b/main.go @@ -17,7 +17,7 @@ const ( failedColor = "8b0000/dc143c" ) -//go:embed message.tpl +//go:embed sample.tpl var message string type templateData struct { diff --git a/sample.tpl b/sample.tpl new file mode 100644 index 0000000..4fbe3bf --- /dev/null +++ b/sample.tpl @@ -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": "Online" + } + }, + { + "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" + } + ] + } + } + } + ] + } + } + ] + } + ] + } + } + ] +}