Skip to content

skpr/slack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Slack

A library for posting consistent Slack messages across the Skpr platform.

Usage

client, err := slack.NewClient([]string{
    "https://hooks.slack.com/services/xxxxxxxxx/yyyyyyyyy/zzzzzzzzz",
})
if err != nil {
    panic(err)
}

params := slack.PostMessageParams{
    Icon: "https://raw.githubusercontent.com/skpr/slack/main/icons/application_drupal.png",
    Context: map[string]string{
        "Account":    "123456789",
        "Anomaly ID": "xxxxxx-yyyyyy-zzzzzz",
    },
    Description: "This is the description field",
    Reason:      "This is the reason field.",
    Dashboard:   "https://skpr.com.au",
}

err = client.PostMessage(params)
if err != nil {
    panic(err)
}

About

Library to interacting with Slack

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages