Documentation ¶
Index ¶
Constants ¶
View Source
const ( // config APP_CONFIG = "config.env" APPROVAL_CONFIG = "approvals.yaml" // server SRV_HOST = "" SRV_PORT = "18652" POLL_INTERVAL = 30 // email templates TEMPLATE_FOLDER = "templates" // tls configuration TLS_FOLDER = "certs" TLS_ORG = "Spoon Boy" TLS_VALID_FOR = 365 * 24 * time.Hour )
Variables ¶
View Source
var ( ERR_FAILED_READ_CONFIG = errors.New("Failed to read application configuration file") ERR_NO_API_HOST = errors.New("No Morpheus API Host found") ERR_NO_API_TOKEN = errors.New("No Morpheus API Token found") ERR_POLL_INTERVAL_NOT_INT = errors.New("Poll interval not integer") ERR_NO_SMTP_SERVER = errors.New("No SMTP server found") ERR_NO_SMTP_PORT = errors.New("No SMTP Port found") ERR_NO_SMTP_USER = errors.New("No SMTP User found") ERR_NO_SMTP_PASSWORD = errors.New("No SMTP Password found") )
View Source
var DefaultTemplate string = `Template here TODO`
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct { Logger *koan.Logger Ctx context.Context Config struct { MorpheusHost string MorpheusToken string PollInterval int SmtpServer string SmtpPort int SmtpUser string SmtpPassword string } State *state.State }
App is provides a wrapper for passing the Config, Context, Logger & State around as dependencies
func (*App) LoadConfig ¶
LoadConfig loads the application configuration file
func (*App) ValidateConfig ¶
ValidateConfig checks that we have configuration we can use in the application
Click to show internal directories.
Click to hide internal directories.