This repository has been archived on 2022-11-04. You can view files and clone it, but cannot push or open issues/pull-requests.
2018-12-04 08:32:11 +04:00
|
|
|
// Fantasy World Zookeeper Helper Bot
|
|
|
|
// Copyright (c) 2018 Vladimir "fat0troll" Hodakov
|
|
|
|
|
|
|
|
package context
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/rs/zerolog"
|
2018-12-22 18:03:53 +04:00
|
|
|
"lab.wtfteam.pro/fat0troll/fw_zookeeper_helper/local/config"
|
2018-12-04 08:32:11 +04:00
|
|
|
)
|
|
|
|
|
|
|
|
// VERSION is the current bot's version
|
2019-01-08 04:18:13 +04:00
|
|
|
const VERSION = "0.0.2"
|
2018-12-04 08:32:11 +04:00
|
|
|
|
|
|
|
// Context is the main application context.
|
|
|
|
type Context struct {
|
2019-01-09 03:24:12 +04:00
|
|
|
Config *config.Struct
|
|
|
|
Logger zerolog.Logger
|
|
|
|
ShutdownDone chan bool
|
2018-12-04 08:32:11 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
// NewContext is an initialization function for Context
|
|
|
|
func NewContext() *Context {
|
|
|
|
c := &Context{}
|
2019-01-09 03:24:12 +04:00
|
|
|
c.ShutdownDone = make(chan bool, 1)
|
2018-12-04 08:32:11 +04:00
|
|
|
return c
|
|
|
|
}
|