2021-12-17 08:42:14 +00:00
|
|
|
package app
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/spf13/viper"
|
2021-12-18 17:37:44 +00:00
|
|
|
"kumoly.io/kumoly/app/attribute"
|
2021-12-17 08:42:14 +00:00
|
|
|
"kumoly.io/kumoly/app/auth"
|
2021-12-24 08:56:16 +00:00
|
|
|
"kumoly.io/kumoly/app/calendar"
|
2021-12-17 08:42:14 +00:00
|
|
|
"kumoly.io/kumoly/app/control"
|
|
|
|
"kumoly.io/kumoly/app/email"
|
|
|
|
"kumoly.io/kumoly/app/history"
|
|
|
|
"kumoly.io/kumoly/app/server"
|
|
|
|
"kumoly.io/kumoly/app/store"
|
|
|
|
"kumoly.io/kumoly/app/system"
|
|
|
|
"kumoly.io/kumoly/app/task"
|
|
|
|
)
|
|
|
|
|
|
|
|
func Default() *system.System {
|
2021-12-20 02:23:08 +00:00
|
|
|
system.Setup()
|
2021-12-17 08:42:14 +00:00
|
|
|
store.Setup()
|
|
|
|
sys := system.New()
|
|
|
|
server := server.New(viper.GetString("name"))
|
|
|
|
|
|
|
|
auth.Setup()
|
|
|
|
auth.SetDB(store.DB)
|
|
|
|
|
|
|
|
sys.Inject(auth.Injector(server.API))
|
2021-12-20 02:23:08 +00:00
|
|
|
sys.Append(server, auth.New(),
|
2022-01-08 21:26:56 +00:00
|
|
|
&attribute.Service{},
|
2021-12-17 08:42:14 +00:00
|
|
|
&task.Service{},
|
|
|
|
&history.Service{},
|
|
|
|
&email.Service{},
|
|
|
|
&control.Service{},
|
2021-12-24 08:56:16 +00:00
|
|
|
&calendar.Service{},
|
2021-12-17 08:42:14 +00:00
|
|
|
)
|
|
|
|
return sys
|
|
|
|
}
|