config

package
v0.0.0-...-45c4399 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2023 License: MIT Imports: 4 Imported by: 0

README

Config

This provides us a way to pass in config information by using a a file on the system that is running the server. I find this easier than using environment variables for everything.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// AccessSecret - secret used for signing jwts
	AccessSecret       string `json:"accessSecret"`
	PaypalClientID     string `json:"paypalClientID"`
	PaypalClientSecret string `json:"paypalClientSecret"`
	PaypalURL          string `json:"paypalURL"`
	MailgunURL         string `json:"mailgunURL"`
	MailgunKey         string `json:"mailgunKey"`
	MailgunFromAddress string `json:"mailgunFromAddress"`
	MailgunUser        string `json:"mailgunUser"`
	MailgunPassword    string `json:"mailgunPassword"`
	SlackAccessEvents  string `json:"slackhookAccessEvents"`
	MQTTUsername       string `json:"mqttUsername"`
	MQTTPassword       string `json:"mqttPassword"`
	MQTTBrokerAddress  string `json:"mqttBrokerAddress"`
	DBConnectionString string `json:"dbConnectionString"`
	// EnableInfoEmails sends notification by email to info@hackrva.org
	EnableInfoEmails bool `json:"enableInfoEmails"`
	// EnableNotificationEmailsToMembers sends notification to membership
	EnableNotificationEmailsToMembers bool `json:"enableNotificationEmailsToMembers"`
	// EmailOverrideAddress config can provide an email address to send to instead of
	//   the predefined addresses
	EmailOverrideAddress string `json:"emailOverrideAddress"`
	SlackToken           string `json:"slackToken"`
	AdminEmail           string `json:"adminEmail"`
	AlwaysAdmin          string `json:"alwaysAdmin"`
}

Config - values of our config

func Get

func Get() Config

Get gets the config and ignores errors

func Load

func Load() (Config, error)

Load in the config file to memory

you can create a config file or pass in Environment variables
the config file will take priority

Jump to

Keyboard shortcuts

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