conf

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2016 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	SiteURL string `mapstructure:"site_url" json:"site_url"`

	JWT struct {
		Secret string `mapstructure:"" json:"secret"`
	} `mapstructure:"jwt" json:"jwt"`

	DB struct {
		Driver  string `mapstructure:"driver" json:"driver"`
		ConnURL string `mapstructure:"url" json:"url"`
	}

	API struct {
		Host string `mapstructure:"host" json:"host"`
		Port int    `mapstructure:"port" json:"port"`
	} `mapstructure:"api" json:"api"`

	Mailer struct {
		Host           string `mapstructure:"host" json:"host"`
		Port           int    `mapstructure:"port" json:"port"`
		User           string `mapstructure:"user" json:"user"`
		Pass           string `mapstructure:"pass" json:"pass"`
		TemplateFolder string `mapstructure:"template_folder" json:"template_folder"`
		AdminEmail     string `mapstructure:"admin_email" json:"admin_email"`
		MailSubjects   struct {
			OrderConfirmationMail string `mapstructure:"confirmation" json:"confirmation"`
		} `mapstructure:"mail_subjects" json:"mail_subjects"`
	} `mapstructure:"mailer" json:"mailer"`

	Payment struct {
		Stripe struct {
			SecretKey string `mapstructure:"secret_key" json:"secret_key"`
		} `mapstructure:"stripe" json:"stripe"`
		Paypal struct {
		} `mapstructure:"paypal" json:"paypal"`
	} `mapstructure:"payment" json:"payment"`
}

Configuration holds all the confiruation for authlify

func Load

func Load(configFile string) (*Configuration, error)

Load will construct the config from the file `config.json`

Jump to

Keyboard shortcuts

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