Documentation ¶
Index ¶
- Constants
- type AdaptiveCards
- type Attachment
- type Config
- type Content
- type Payload
- type Teams
- func (t Teams) FormatMessage(message map[string]interface{}, position int, entiremsg *strings.Builder) string
- func (t Teams) IsValidCredential(ctx context.Context) (bool, error)
- func (t Teams) SendNotification(ctx context.Context, message []map[string]interface{}, ...) error
- func (t Teams) SendSummaryLink() bool
- func (t Teams) Sender(in chan any, wg *sync.WaitGroup)
- func (t Teams) ValidateConfig(validate *validator.Validate) error
Constants ¶
View Source
const BatchSize = 5
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdaptiveCards ¶
type AdaptiveCards struct { Type string `json:"type"` Attachments []Attachment `json:"attachments"` }
func NewAdaptiveCards ¶
func NewAdaptiveCards() *AdaptiveCards
func (*AdaptiveCards) AddAttachment ¶
func (ac *AdaptiveCards) AddAttachment(attach Attachment) *AdaptiveCards
type Attachment ¶
type Attachment struct { ContentType string `json:"contentType"` ContentURL any `json:"contentUrl"` Content Content `json:"content"` }
func NewAttachment ¶
func NewAttachment(content Content) Attachment
type Content ¶
type Content struct { Schema string `json:"$schema"` Type string `json:"type"` Version string `json:"version"` Body []map[string]interface{} `json:"body"` Actions []map[string]interface{} `json:"action"` }
func NewContent ¶
type Payload ¶
type Payload struct { CardType string `json:"@type"` Context string `json:"@context"` Markdown bool `json:"markdown"` Text string `json:"text,omitempty"` Title string `json:"title,omitempty"` Summary string `json:"summary,omitempty"` Sections []section `json:"sections,omitempty"` ThemeColor string `json:"themeColor,omitempty"` }
Payloads
type Teams ¶
type Teams struct { Config Config `json:"config"` IntegrationType string `json:"integration_type"` NotificationType string `json:"notification_type"` Filters reporters.FieldsFilters `json:"filters"` Message string `json:"message"` Resource string `json:"resource"` // contains filtered or unexported fields }
func (Teams) FormatMessage ¶
func (Teams) IsValidCredential ¶
func (Teams) SendNotification ¶
func (Teams) SendSummaryLink ¶
func (Teams) ValidateConfig ¶
Click to show internal directories.
Click to hide internal directories.