app

package
v1.3.1 Latest Latest
Warning

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

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

Documentation

Overview

Package app provides the app's configuration. The first configuration file is app.json found adjacent to the executable.

Index

Constants

This section is empty.

Variables

View Source
var (
	Calendar  models.Calendar
	Config    ConfigFile
	Scheduler *gocron.Scheduler
)

Functions

func Init added in v1.3.0

func Init()

Init initializes the application by reading the config file and starting chron jobs.

Types

type ConfigEmail

type ConfigEmail struct {
	From           string `json:"from"`
	MaxNumberUsers int    `json:"maxNumberUsers"`
	SendGridAPIKey string `json:"sendGridAPIKey"`
}

ConfigEmail holds email configuration variables.

type ConfigFile

type ConfigFile struct {
	Email ConfigEmail `json:"email"`
	Port  int         `json:"port"`
	URL   string      `json:"url"`
}

ConfigFile holds the contents of config.json.

func (*ConfigFile) Valid added in v1.3.0

func (c *ConfigFile) Valid() (bool, error)

Valid verifies whether the configuration is correct.

Jump to

Keyboard shortcuts

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