-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
48 lines (38 loc) · 1.44 KB
/
main.go
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/* Copyright © INFINI Ltd. All rights reserved.
* web: https://infinilabs.com
* mail: hello#infini.ltd */
package main
import (
"infini.sh/coco/config"
"infini.sh/coco/modules"
_ "infini.sh/coco/modules"
"infini.sh/framework"
"infini.sh/framework/core/module"
"infini.sh/framework/core/util"
"infini.sh/framework/modules/elastic"
"infini.sh/framework/modules/ui"
stats "infini.sh/framework/plugins/stats_statsd"
)
func main() {
terminalHeader := (" ___ ___ ___ ___ _ _____ \n")
terminalHeader += (" / __\\/___\\/ __\\/___\\ /_\\ \\_ \\\n")
terminalHeader += (" / / // // / // // //_\\\\ / /\\/\n")
terminalHeader += ("/ /__/ \\_// /__/ \\_// / _ \\/\\/ /_ \n")
terminalHeader += ("\\____|___/\\____|___/ \\_/ \\_/\\____/ \n\n")
terminalFooter := ("")
app := framework.NewApp("coco", "Coco AI - search, connect, collaborate – all in one place.",
util.TrimSpaces(config.Version), util.TrimSpaces(config.BuildNumber), util.TrimSpaces(config.LastCommitLog), util.TrimSpaces(config.BuildDate), util.TrimSpaces(config.EOLDate), terminalHeader, terminalFooter)
app.IgnoreMainConfigMissing()
app.Init(nil)
defer app.Shutdown()
if app.Setup(func() {
module.RegisterSystemModule(&ui.UIModule{})
module.RegisterSystemModule(&elastic.ElasticModule{})
module.RegisterUserPlugin(&stats.StatsDModule{})
module.RegisterUserPlugin(&modules.Coco{})
module.Start()
}, func() {
}, nil) {
app.Run()
}
}