Documentation ¶
Overview ¶
config holds all application configuration primitives
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CafeConfig ¶
type CafeConfig struct { FirstOrderTime CafeTime `json:"first_order_time"` LastOrderTime CafeTime `json:"last_order_time"` TimeLocation *CafeLocation `json:"time_location"` TimeSlotIntervalMin int `json:"time_slot_interval_min"` // OrderChan is a public channel name in a form of @channelname // or a private channel id. See how to get private channel id: // https://github.com/python-telegram-bot/python-telegram-bot/issues/538 OrderChan string `json:"orders_channel"` Menu Menu `json:"menu"` }
type CafeLocation ¶
func (*CafeLocation) UnmarshalJSON ¶
func (l *CafeLocation) UnmarshalJSON(data []byte) error
type CafeTime ¶
CafeTime exists only because we need to unmarshal string of type HH:MM into time.Time. It is possible only by having custom named type with its own json.Unmarshaler implementation
func (*CafeTime) UnmarshalJSON ¶
type Config ¶
type Config struct { Port string `short:"p" long:"port" description:"port to listen on" default:"8080"` TgAPIToken string `long:"tg-api-token" description:"telegram bot api token" env:"TG_API_TOKEN"` LogLevel string `long:"log-level" description:"log level for all subsystems {trace, debug, info, error, critical}" default:"info"` CafeConfigFile string `long:"cafe-config" description:"cafe config file path" default:"cafe.json"` Cafe CafeConfig }
Config holds all application configuration data
type Meal ¶
func (*Meal) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.