Documentation ¶
Overview ¶
Copyright © 2023 Ted van Riel
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Index ¶
- func Execute()
- func NewDiscordReporter(config *Configuration, geo *app.Geo) (*app.DiscordReporter, error)
- func NewGeo(config *Configuration) (*app.Geo, error)
- func Serivces(config *Configuration, geo *app.Geo, reporter *app.DiscordReporter) ([]app.Proxy, error)
- type ConfigReport
- type ConfigService
- type ConfigServiceRule
- type Configuration
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Execute ¶
func Execute()
Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.
func NewDiscordReporter ¶
func NewDiscordReporter(config *Configuration, geo *app.Geo) (*app.DiscordReporter, error)
func Serivces ¶
func Serivces(config *Configuration, geo *app.Geo, reporter *app.DiscordReporter) ([]app.Proxy, error)
Types ¶
type ConfigReport ¶
type ConfigService ¶
type ConfigService struct { Name string `mapstructure:"name"` Listen string `mapstructure:"listen"` Upstream string `mapstructure:"upstream"` StandardAction string `mapstructure:"standard_action"` Rules []ConfigServiceRule `mapstructure:"rules"` }
type ConfigServiceRule ¶
type Configuration ¶
type Configuration struct { Db string `mapstructure:"db"` Report ConfigReport `mapstructure:"report"` Services []ConfigService `mapstructure:"services"` }
func NewConfiguration ¶
func NewConfiguration() (*Configuration, error)