Pokememes database saving. Now we're stable
This commit is contained in:
@@ -14,6 +14,7 @@ import (
|
||||
"../migrations/migrationsinterface"
|
||||
"../parsers/parsersinterface"
|
||||
"../router/routerinterface"
|
||||
"../talkers/talkersinterface"
|
||||
)
|
||||
|
||||
type Context struct {
|
||||
@@ -23,6 +24,7 @@ type Context struct {
|
||||
Router routerinterface.RouterInterface
|
||||
Parsers parsersinterface.ParsersInterface
|
||||
Db *sqlx.DB
|
||||
Talkers talkersinterface.TalkersInterface
|
||||
}
|
||||
|
||||
func (c *Context) Init() {
|
||||
@@ -46,6 +48,10 @@ func (c *Context) RegisterParsersInterface(pi parsersinterface.ParsersInterface)
|
||||
c.Parsers = pi
|
||||
}
|
||||
|
||||
func (c *Context) RegisterTalkersInterface(ti talkersinterface.TalkersInterface) {
|
||||
c.Talkers = ti
|
||||
}
|
||||
|
||||
func (c *Context) RunDatabaseMigrations() {
|
||||
c.Migrations.SetDialect("mysql")
|
||||
c.Migrations.Migrate()
|
||||
|
Reference in New Issue
Block a user