2020-10-16 19:12:53 +02:00
|
|
|
package app
|
2020-10-16 16:21:42 +02:00
|
|
|
|
2020-10-16 16:36:08 +02:00
|
|
|
import (
|
2020-10-16 19:12:53 +02:00
|
|
|
"github.com/mattermost/mattermost-octo-tasks/server/services/config"
|
|
|
|
"github.com/mattermost/mattermost-octo-tasks/server/services/store"
|
2020-10-30 20:33:25 +02:00
|
|
|
"github.com/mattermost/mattermost-octo-tasks/server/services/webhook"
|
2020-10-16 19:12:53 +02:00
|
|
|
"github.com/mattermost/mattermost-octo-tasks/server/ws"
|
2020-10-16 20:16:52 +02:00
|
|
|
"github.com/mattermost/mattermost-server/v5/services/filesstore"
|
2020-10-16 16:36:08 +02:00
|
|
|
)
|
|
|
|
|
2020-10-16 16:21:42 +02:00
|
|
|
type App struct {
|
2020-10-16 20:16:52 +02:00
|
|
|
config *config.Configuration
|
|
|
|
store store.Store
|
2020-10-22 13:34:42 +02:00
|
|
|
wsServer *ws.Server
|
2020-10-16 20:16:52 +02:00
|
|
|
filesBackend filesstore.FileBackend
|
2020-10-29 22:42:43 +02:00
|
|
|
webhook *webhook.Client
|
2020-10-16 19:12:53 +02:00
|
|
|
}
|
|
|
|
|
2020-10-29 22:42:43 +02:00
|
|
|
func New(config *config.Configuration, store store.Store, wsServer *ws.Server, filesBackend filesstore.FileBackend, webhook *webhook.Client) *App {
|
2020-10-29 22:09:02 +02:00
|
|
|
return &App{config: config, store: store, wsServer: wsServer, filesBackend: filesBackend, webhook: webhook}
|
2020-10-16 16:21:42 +02:00
|
|
|
}
|