microsoftteamsV2_templates

package
v0.0.0-...-e52328d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 20, 2025 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AlertUpsertMessageTemplate = []byte(`{
	"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
	"type": "AdaptiveCard",
	"version": "1.6",
	"body": [
		{
			"type":   "TextBlock",
			"size":   "Large",
			"weight": "Bolder",
			"text":   "Alert {{.AlertAction}}!"
		},
		{
			"type":   "TextBlock",
			"text":   "{{.AdminName}} has {{.AlertAction}} the alert '[{{.AlertName}}]({{.AlertUrl}})'."
		}
	]
  }`)
View Source
var ErrorAlertMessageTemplate = []byte(`{
	"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
	"type": "AdaptiveCard",
	"version": "1.6",
	"body": [
		{
		"type": "TextBlock",
		"size": "Large",
		"weight": "Bolder",
		"text": "Error Alert: {{.ErrorCount}} Recent Occurances"
		},
		{
		"type": "TextBlock",
		"text": "[Error event in {{.Location}}]({{.ErrorLink}})"
		},
		{
		"type": "TextBlock",
		"fontType": "Monospace",
		"text": "{{.Event}}",
		"wrap": true
		},
		{
		"type": "TextBlock",
		"text": "**Session** {{.SessionLinkText}}"
		}
	],
	"actions": [
		{
			"type":  "Action.OpenUrl",
			"title": "Resolve",
			"url":   "{{.ResolveLink}}"
		},
		{
			"type":  "Action.OpenUrl",
			"title": "Ignore",
			"url":   "{{.IgnoreLink}}"
		},
		{
			"type":  "Action.OpenUrl",
			"title": "Snooze",
			"url":   "{{.SnoozeLink}}"
		}
	]
  }`)
View Source
var EventAlertMessageTemplate = []byte(`{
	"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
	"type": "AdaptiveCard",
	"version": "1.6",
	"body": [
		{
			"type":   "TextBlock",
			"size":   "Large",
			"weight": "Bolder",
			"text":   "{{.AlertName}} Alert"
		},
		{
			"type":   "TextBlock",
			"text":   "{{.AlertText}}"
		},
		{
			"type":   "TextBlock",
			"text":   "{{.CountText}}"
		}
	],
	"actions": [
		{
			"type":  "Action.OpenUrl",
			"title": "View Alert",
			"url":   "{{.AlertLink}}"
		}
	]
  }`)
View Source
var LogAlertMessageTemplate = []byte(`{
	"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
	"type": "AdaptiveCard",
	"version": "1.6",
	"body": [
		{
			"type":   "TextBlock",
			"size":   "Large",
			"weight": "Bolder",
			"text":   "{{.AlertName}} Alert"
		},
		{
			"type":   "TextBlock",
			"text":   "{{.AlertText}}"
		},
		{
			"type":   "TextBlock",
			"text":   "{{.CountText}}"
		}
	],
	"actions": [
		{
			"type":  "Action.OpenUrl",
			"title": "View Logs",
			"url":   "{{.LogsLink}}"
		}
	]
  }`)
View Source
var MetricAlertMessageTemplate = []byte(`{
	"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
	"type": "AdaptiveCard",
	"version": "1.6",
	"body": [
		{
			"type":   "TextBlock",
			"size":   "Large",
			"weight": "Bolder",
			"text":   "{{.AlertName}} Alert"
		},
		{
			"type":   "TextBlock",
			"text":   "{{.AlertText}}"
		},
		{
			"type":   "TextBlock",
			"text":   "{{.CountText}}"
		}
	],
	"actions": [
		{
			"type":  "Action.OpenUrl",
			"title": "View Metrics",
			"url":   "{{.MetricsLink}}"
		}
	]
  }`)
View Source
var SessionAlertMessageTemplate = []byte(`{
	"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
	"type": "AdaptiveCard",
	"version": "1.6",
	"body": [
		{
			"type":   "TextBlock",
			"size":   "Large",
			"weight": "Bolder",
			"text":   "{{.AlertName}} Alert"
		},
		{
			"type":   "TextBlock",
			"text":   "Session found that matches query: **{{.Query}}**"
		},
		{
			"type":   "TextBlock",
			"text":   "**Session**: [#{{.SecureID}}]({{.SessionURL}})"
		},
		{
			"type":   "TextBlock",
			"text":   "**User Identifier**: {{.Identifier}}"
		}
	],
	"actions": [
		{
			"type":  "Action.OpenUrl",
			"title": "View Session",
			"url":   "{{.SessionURL}}"
		},
		{
			"type":  "Action.OpenUrl",
			"title": "View More Sessions",
			"url":   "{{.MoreSessionsLink}}"
		}
	]
  }`)
View Source
var TraceAlertMessageTemplate = []byte(`{
	"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
	"type": "AdaptiveCard",
	"version": "1.6",
	"body": [
		{
			"type":   "TextBlock",
			"size":   "Large",
			"weight": "Bolder",
			"text":   "{{.AlertName}} Alert"
		},
		{
			"type":   "TextBlock",
			"text":   "{{.AlertText}}"
		},
		{
			"type":   "TextBlock",
			"text":   "{{.CountText}}"
		}
	],
	"actions": [
		{
			"type":  "Action.OpenUrl",
			"title": "View Traces",
			"url":   "{{.TracesLink}}"
		}
	]
  }`)

Functions

This section is empty.

Types

type AlertUpsertPayload

type AlertUpsertPayload struct {
	AdminName   string
	AlertAction string
	AlertName   string
	AlertUrl    string
}

type ErrorAlertPayload

type ErrorAlertPayload struct {
	ErrorCount      int
	Location        string
	ErrorLink       string
	Event           string
	SessionLinkText string
	ResolveLink     string
	IgnoreLink      string
	SnoozeLink      string
}

type EventAlertPayload

type EventAlertPayload struct {
	AlertName string
	AlertText string
	CountText string
	AlertLink string
}

type LogAlertPayload

type LogAlertPayload struct {
	AlertName string
	AlertText string
	CountText string
	LogsLink  string
}

type MetricAlertPayload

type MetricAlertPayload struct {
	AlertName   string
	AlertText   string
	CountText   string
	MetricsLink string
}

type SessionAlertPayload

type SessionAlertPayload struct {
	AlertName        string
	Query            string
	SecureID         string
	Identifier       string
	SessionURL       string
	MoreSessionsLink string
}

type TraceAlertPayload

type TraceAlertPayload struct {
	AlertName  string
	AlertText  string
	CountText  string
	TracesLink string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL