This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@startuml | |
actor User as u | |
node "Design & Analysis" as da | |
node "Planning" as plan | |
node "Development" as dev | |
node "Deployment to test environment" as test | |
node "Demo and UAT" as demo | |
node "Performance testing" as perf | |
node "Deployment to production" as prod |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: This is a hello-world example | |
hosts: all | |
tasks: | |
- name: Create a file called '/tmp/testfile.txt' with the content 'hello world'. | |
copy: | |
content: hello-world | |
dest: /tmp/testfilprovisioning |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_metadata: | |
major_version: 1 | |
minor_version: 1 | |
display_information: | |
name: Test Socketmode | |
features: | |
app_home: | |
home_tab_enabled: true | |
messages_tab_enabled: true | |
messages_tab_read_only_enabled: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func main() { | |
// read bot token from .env file | |
err := godotenv.Load("./test_slack.env") | |
if err != nil { | |
log.Fatal().Msg("Error loading .env file") | |
} | |
// Instantiate slack socket mode client | |
client, err := drivers.ConnectToSlackViaSocketmode() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func AppHomeCreateStickieNote(note StickieNote) slack.HomeTabViewRequest { | |
// Base elements | |
str, err := appHomeAssets.ReadFile("appHomeViewsAssets/AppHomeView.json") | |
if err != nil { | |
log.Printf("Unable to read view `AppHomeView`: %v", err) | |
} | |
view := slack.HomeTabViewRequest{} | |
json.Unmarshal(str, &view) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func CreateStickieNoteModal() slack.ModalViewRequest { | |
str, err := appHomeAssets.ReadFile("appHomeViewsAssets/CreateStickieNoteModal.json") | |
if err != nil { | |
log.Printf("Unable to read view `CreateStickieNoteModal`: %v", err) | |
} | |
view := slack.ModalViewRequest{} | |
json.Unmarshal([]byte(str), &view) | |
return view |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func AppHomeTabView() slack.HomeTabViewRequest { | |
str, err := appHomeAssets.ReadFile("appHomeViewsAssets/AppHomeView.json") | |
if err != nil { | |
log.Printf("Unable to read view `AppHomeView`: %v", err) | |
} | |
view := slack.HomeTabViewRequest{} | |
json.Unmarshal([]byte(str), &view) | |
return view |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package views | |
import ( | |
"bytes" | |
"embed" | |
"html/template" | |
"io/ioutil" | |
"log" | |
"encoding/json" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func (c *AppHomeController) createStickieNote(evt *socketmode.Event, clt *socketmode.Client) { | |
// we need to cast our socketmode.Event into slack.InteractionCallback | |
view_submission := evt.Data.(slack.InteractionCallback) | |
// Make sure to respond to the server to avoid an error | |
clt.Ack(*evt.Request) | |
// Create the model | |
note := views.StickieNote{ | |
Description: view_submission.View.State.Values[views.ModalDescriptionBlockID][views.ModalDescriptionActionID].Value, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func NewAppHomeController(eventhandler *socketmode.SocketmodeHandler) AppHomeController { | |
c := AppHomeController{ | |
EventHandler: eventhandler, | |
} | |
// App Home (2) | |
c.EventHandler.HandleEventsAPI( | |
slackevents.AppHomeOpened, | |
c.publishHomeTabView, | |
) |
NewerOlder