Work on squads, alerts on new user with empty or spy profile
Closes #1 Closes #2
This commit is contained in:
@@ -16,6 +16,7 @@ import (
|
||||
"lab.pztrn.name/fat0troll/i2_bot/lib/parsers/parsersinterface"
|
||||
"lab.pztrn.name/fat0troll/i2_bot/lib/router/routerinterface"
|
||||
"lab.pztrn.name/fat0troll/i2_bot/lib/talkers/talkersinterface"
|
||||
"lab.pztrn.name/fat0troll/i2_bot/lib/welcomer/welcomerinterface"
|
||||
)
|
||||
|
||||
// Context is an application context struct
|
||||
@@ -28,6 +29,7 @@ type Context struct {
|
||||
Db *sqlx.DB
|
||||
Talkers talkersinterface.TalkersInterface
|
||||
Getters gettersinterface.GettersInterface
|
||||
Welcomer welcomerinterface.WelcomerInterface
|
||||
}
|
||||
|
||||
// Init is a initialization function for context
|
||||
@@ -65,6 +67,11 @@ func (c *Context) RegisterGettersInterface(gi gettersinterface.GettersInterface)
|
||||
c.Getters = gi
|
||||
}
|
||||
|
||||
// RegisterWelcomerInterface registering welcomer interface in application
|
||||
func (c *Context) RegisterWelcomerInterface(wi welcomerinterface.WelcomerInterface) {
|
||||
c.Welcomer = wi
|
||||
}
|
||||
|
||||
// RunDatabaseMigrations applies migrations on bot's startup
|
||||
func (c *Context) RunDatabaseMigrations() {
|
||||
c.Migrations.SetDialect("mysql")
|
||||
|
Reference in New Issue
Block a user