Archived
1

Some work on ordering. Special user behaviour

See #10
This commit is contained in:
2017-11-26 15:28:55 +04:00
parent 8368a3c60b
commit 53a99b0ff3
20 changed files with 466 additions and 16 deletions

View File

@@ -13,6 +13,7 @@ import (
"lab.pztrn.name/fat0troll/i2_bot/lib/connections"
"lab.pztrn.name/fat0troll/i2_bot/lib/forwarder/forwarderinterface"
"lab.pztrn.name/fat0troll/i2_bot/lib/migrations/migrationsinterface"
"lab.pztrn.name/fat0troll/i2_bot/lib/orders/ordersinterface"
"lab.pztrn.name/fat0troll/i2_bot/lib/pinner/pinnerinterface"
"lab.pztrn.name/fat0troll/i2_bot/lib/pokedexer/pokedexerinterface"
"lab.pztrn.name/fat0troll/i2_bot/lib/router/routerinterface"
@@ -46,6 +47,7 @@ type Context struct {
Squader squaderinterface.SquaderInterface
Users usersinterface.UsersInterface
Statistics statisticsinterface.StatisticsInterface
Orders ordersinterface.OrdersInterface
}
// Init is a initialization function for context
@@ -153,6 +155,12 @@ func (c *Context) RegisterSquaderInterface(si squaderinterface.SquaderInterface)
c.Squader.Init()
}
// RegisterOrdersInterface registers orders interface in application
func (c *Context) RegisterOrdersInterface(oi ordersinterface.OrdersInterface) {
c.Orders = oi
c.Orders.Init()
}
// RegisterUsersInterface registers users interface in application
func (c *Context) RegisterUsersInterface(ui usersinterface.UsersInterface) {
c.Users = ui