config

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2020 License: MIT Imports: 20 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Root         = os.Getenv("GOPATH") + "/src/github.com/qorpress/qorpress"
	Mailer       *mailer.Mailer
	Render       = render.New()
	RedirectBack = redirect_back.New(&redirect_back.Config{
		SessionManager:  manager.SessionManager,
		IgnoredPrefixes: []string{"/auth"},
	})
	QorPlugins *plug.QorPlugin
)
View Source
var Config = struct {
	App struct {
		Port     uint   `default:"7000" env:"QORPRESS_PORT"`
		SiteName string `default:"QorPress Demo" env:"QORPRESS_SITENAME"`
		HTTPS    struct {
			Enabled bool   `default:"false" env:"QORPRESS_HTTPS"`
			Local   bool   `default:"false" env:"QORPRESS_HTTPS_LOCAL"`
			Email   string `env:"QORPRESS_HTTPS_EMAIL"`
			Domains string `env:"QORPRESS_HTTPS_DOMAINS"`
		}
		Location struct {
			BaiduAPI  string `env:"QORPRESS_BAIDU_API"`
			GoogleAPI string `env:"QORPRESS_GOOGLE_MAP_API"`
		}
		Theme  string `json:"theme" yaml:"theme"`
		Plugin struct {
			Filter bool   `json:"filter" yaml:"filter"`
			Dir    string `json:"dir" yaml:"dir"`
		}
		Cors struct {
			AccessControlAllowOrigin string `default:"*" json:"access-control-allow-origin" yaml:"access-control-allow-origin"`
		} `json:"cors" yaml:"cors"`
	}

	DB struct {
		Name     string `env:"QORPRESS_DB_NAME" default:"qor_example"`
		Adapter  string `env:"QORPRESS_DB_ADAPTER" default:"mysql"`
		Host     string `env:"QORPRESS_DB_HOST" default:"localhost"`
		Port     string `env:"QORPRESS_DB_PORT" default:"3306"`
		User     string `env:"QORPRESS_DB_USER"`
		Password string `env:"QORPRESS_DB_PASSWORD"`
	}

	Cloud struct {
		AWS struct {
			S3 struct {
				AccessKeyID     string `env:"AWS_ACCESS_KEY_ID"`
				SecretAccessKey string `env:"AWS_SECRET_ACCESS_KEY"`
				Region          string `env:"AWS_REGION"`
				S3Bucket        string `env:"AWS_BUCKET"`
			}
		}
	}

	Oauth struct {
		Github   github.Config
		Google   google.Config
		Facebook facebook.Config
		Twitter  twitter.Config
	}

	SMTP SMTPConfig
}{}

Functions

This section is empty.

Types

type SMTPConfig

type SMTPConfig struct {
	Host     string
	Port     string
	User     string
	Password string
}

Directories

Path Synopsis
db

Jump to

Keyboard shortcuts

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