configapp

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const RULESDIR = "rules"

Variables

This section is empty.

Functions

This section is empty.

Types

type AppConfig

type AppConfig struct {
	RulesDir              string            `yaml:"rulesdir"`
	ImagesToIgnore        []string          `yaml:"imagesToIgnore"`
	ContainerNameToIgnore []string          `yaml:"containerNameToIgnore"`
	SmtpConfig            smtpConfig        `yaml:"smtp"`
	MailgunConfig         MailGunConfig     `yaml:"mailgun"`
	MailConfig            MailConfiguration `yaml:"mailconfiguration"`
	AwsRegion             string            `yaml:"aws_region"`
	LogGroup              string            `yaml:"loggroup"`
	DebugLevel            string            `yaml:"debuglevel"`
}

func ReadYamlCnxFile

func ReadYamlCnxFile(filename string) (AppConfig, error)

func (*AppConfig) GetRulesDir

func (cfg *AppConfig) GetRulesDir() (string, error)

Return path of rules If empty, return the path of the binary/rules

func (*AppConfig) IsMailGunConfigured

func (a *AppConfig) IsMailGunConfigured() bool

func (*AppConfig) IsSmtpConfigured

func (a *AppConfig) IsSmtpConfigured() bool

type MailConfiguration

type MailConfiguration struct {
	FromEmail string `yaml:"from_email"`
	// realname: Production
	Sendto  string `yaml:"sendto"`
	Subject string `yaml:"subject"`
}

type MailGunConfig

type MailGunConfig struct {
	Domain string `yaml:"domain"`
	ApiKey string `yaml:"apikey"`
}

Jump to

Keyboard shortcuts

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