knowyt/server/src/application/application.go

29 lines
437 B
Go
Raw Normal View History

2021-08-01 17:06:33 +00:00
package application
import (
"sirlab.de/go/knyt/users"
)
type Application struct {
2021-08-01 17:11:21 +00:00
config ApplicationConfig
2021-08-01 17:06:33 +00:00
users users.Users
}
func NewApplication(config ApplicationConfig) *Application {
app := Application{
2021-08-01 17:11:21 +00:00
config: config,
2021-08-01 17:06:33 +00:00
}
2021-08-01 17:11:21 +00:00
app.users = users.NewUsers()
2021-08-01 17:06:33 +00:00
return &app
}
2021-08-01 17:11:21 +00:00
func (app *Application) GetConfig() *ApplicationConfig {
return &app.config
}
2021-08-01 17:06:33 +00:00
func (app *Application) GetUsers() *users.Users {
return &app.users
}