Documentation ¶
Index ¶
- Constants
- type Config
- 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 string, extras map[string]interface{}) error
- func (t Teams) Sender(in chan *Payload, 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 Config ¶
type Config struct {
WebhookURL string `json:"webhook_url" validate:"required,url" required:"true"`
}
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) ValidateConfig ¶
Click to show internal directories.
Click to hide internal directories.