-
-
Notifications
You must be signed in to change notification settings - Fork 149
Expand file tree
/
Copy pathmain.go_example
More file actions
34 lines (28 loc) · 704 Bytes
/
main.go_example
File metadata and controls
34 lines (28 loc) · 704 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// This entrypoint will run the single-process all-in-one instance of Integram
package main
import (
"github.com/requilence/integram"
"github.com/integram-org/trello"
"github.com/integram-org/gitlab"
"github.com/kelseyhightower/envconfig"
)
func main() {
// You can fetch secrets from the ENV vars
var trelloConfig trello.Config
envconfig.MustProcess("TRELLO", &trelloConfig)
integram.Register(
trelloConfig,
trelloConfig.BotConfig.Token,
)
// or just specify them directly
integram.Register(
gitlab.Config{
OAuthProvider: integram.OAuthProvider{
ID: "GITLAB_APP_ID",
Secret: "GITLAB_APP_SECRET",
},
},
"BOT_TOKEN_PROVIDED_BY_@BOTFATHER",
)
integram.Run()
}