refactoring
This commit is contained in:
parent
685bf8d69c
commit
a8093dc0ad
@ -1,26 +1,28 @@
|
||||
package application
|
||||
|
||||
import (
|
||||
"sirlab.de/go/knyt/user"
|
||||
"sirlab.de/go/knyt/users"
|
||||
)
|
||||
|
||||
type Application struct {
|
||||
Config ApplicationConfig
|
||||
config ApplicationConfig
|
||||
users users.Users
|
||||
}
|
||||
|
||||
func NewApplication(config ApplicationConfig) *Application {
|
||||
app := Application{
|
||||
Config: config,
|
||||
users: users.NewUsers(),
|
||||
config: config,
|
||||
}
|
||||
|
||||
app.users.AddUser(user.NewUser("120", "Settel", user.ROLE_ADMIN))
|
||||
app.users = users.NewUsers()
|
||||
|
||||
return &app
|
||||
}
|
||||
|
||||
func (app *Application) GetConfig() *ApplicationConfig {
|
||||
return &app.config
|
||||
}
|
||||
|
||||
func (app *Application) GetUsers() *users.Users {
|
||||
return &app.users
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user