Flexible Joe configuration
Goal
To have an ability configure Joe for multiple communication channels
TODO / How to implement
Plan:
- create a config.yml, get rid of most flags
- create map configuration channelID -> DBLab Instance
...
connections:
slack:
- name: WORKSPACE
credentials:
accessToken: access_token
signingSecret: secret_signing
channels:
- channelID: channelID1
dblab: prod1
- channelID: channelID2
dblab: dev02
webui:
...
discord:
- name: ...
...
dblabs:
prod1:
url: "https://127.0.0.1:3000"
token: "secret_token"
dbname: postgres
sslmode: disable
dev02:
url: "dev2.local:8000"
Config structs
type MessengerConfig struct {
Slack SlackConfig
Discord DiscordConfig
}
type SlackConfig struct {
Workspaces []Workspace
}
type Workspace struct {
Name string
Channels []SlackChannel
}
type SlackChannel struct {
ChannelID string
DBLab config.DBLabInstance
}
type DiscordConfig struct {
}
Acceptance criteria
As a user I can configure different communication channels to work with Joe assistant.
Edited by Artyom Kartasov