github.com/pafomin-at-avito/mattermost-server@v5.11.1+incompatible/wsapi/api.go (about) 1 // Copyright (c) 2017-present Mattermost, Inc. All Rights Reserved. 2 // See License.txt for license information. 3 4 package wsapi 5 6 import ( 7 "github.com/mattermost/mattermost-server/app" 8 ) 9 10 type API struct { 11 App *app.App 12 Router *app.WebSocketRouter 13 } 14 15 func Init(a *app.App, router *app.WebSocketRouter) { 16 api := &API{ 17 App: a, 18 Router: router, 19 } 20 21 api.InitUser() 22 api.InitSystem() 23 api.InitStatus() 24 25 a.HubStart() 26 }