config

package
v0.6.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 30, 2021 License: MIT Imports: 2 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Configurations

type Configurations struct {
	Targets       []TargetConfigurations
	Notifications NotificationConfigurations
}

Configurations - struct

func LoadConfig

func LoadConfig(configPath string) Configurations

LoadConfig - Function to load configuration

type EmailConfig

type EmailConfig struct {
	SmtpConfigsMap map[string]SmtpConfiguration
	Smtp           []SmtpConfiguration
}

EmailConfig - Email configuration

type EmailNotificationConfig

type EmailNotificationConfig struct {
	Via      string
	To       string
	From     string
	Template string
	Subject  string
}

EmailNotificationConfig - Email notfication configuration

type EmailRecipientConfiguration

type EmailRecipientConfiguration struct {
	To      string
	Subject string
}

EmailRecipientConfiguration - Smtp email recipient configuration

type NotificationConfigurations

type NotificationConfigurations struct {
	Telegram TelegramConfigurations
	Slack    SlackConfigurations
	Webhook  []WebHookConfigurations
	Email    EmailConfig
}

NotificationConfigurations - Notification configuration

type NotificationStrategyConfig

type NotificationStrategyConfig struct{ Via string }

NotificationStrategyConfig - Struct to choose notification strategy with

type PortConfigurations

type PortConfigurations struct {
	Port   uint64
	Notify []interface{}
}

PortConfigurations - Port configuration

type RuleConfiguration

type RuleConfiguration struct {
	Failures string
	Notify   []interface{}
}

RuleConfiguration - Rule configuration

type SlackAppConfiguration

type SlackAppConfiguration struct {
	Name  string
	Token string
}

SlackAppConfiguration - Slack App configuration

type SlackChannelConfiguration

type SlackChannelConfiguration struct {
	Name      string
	ChannelId string
}

SlackChannelConfiguration - Slack Channel configuration

type SlackConfigurations

type SlackConfigurations struct {
	Apps             []SlackAppConfiguration
	Channels         []SlackChannelConfiguration
	SlackAppsMap     map[string]SlackAppConfiguration
	SlackChannelsMap map[string]SlackChannelConfiguration
}

SlackConfigurations - Slack configuration

type SlackNotificationConfig

type SlackNotificationConfig struct {
	Via      string
	Channel  string
	From     string
	Template string
}

SlackNotificationConfig - Slack notification configuration

type SmtpAuthConfiguration

type SmtpAuthConfiguration struct {
	Username string
	Password string
}

SmtpAuthConfiguration - Smtp authentication configuration

type SmtpConfiguration

type SmtpConfiguration struct {
	Name   string
	Sender string
	Auth   SmtpAuthConfiguration
	Server string
	Port   uint64
}

SmtpConfiguration - Smtp configuration

type TargetConfigurations

type TargetConfigurations struct {
	Name     string
	Ip       string
	Cron     string
	Ports    []PortConfigurations
	Https    bool
	Strategy string
	Rules    []RuleConfiguration
}

TargetConfigurations - Each Target configuration

type TelegramBotConfiguration

type TelegramBotConfiguration struct {
	Name  string
	Token string
}

TelegramBotConfiguration - Telegram Bot configuration

type TelegramChatConfiguration

type TelegramChatConfiguration struct {
	Name   string
	ChatId int64
}

TelegramChatConfiguration - Telegram Chat configuration

type TelegramConfigurations

type TelegramConfigurations struct {
	Bots             []TelegramBotConfiguration
	Chats            []TelegramChatConfiguration
	TelegramBotsMap  map[string]TelegramBotConfiguration
	TelegramChatsMap map[string]TelegramChatConfiguration
}

TelegramConfigurations - Telegram configuration

type TelegramNotificationConfig

type TelegramNotificationConfig struct {
	Via      string
	Chat     string
	From     string
	Template string
}

TelegramNotificationConfig - Telegram notification configuration

type WebHookAuthConfigurations

type WebHookAuthConfigurations struct {
	Endpoint string
	Email    string
	Password string
	Field    string
}

WebHookAuthConfigurations - Webhook authentication configuration

type WebHookConfigurations

type WebHookConfigurations struct {
	Endpoint string
	Name     string
	Auth     WebHookAuthConfigurations
}

WebHookConfigurations - Webhook configuration

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL