settings

package
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: May 27, 2019 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NAME = "staffio"
)

Variables

This section is empty.

Functions

func IsDevelop added in v0.6.5

func IsDevelop() bool

func Version added in v0.6.5

func Version() string

Types

type Config added in v0.10.0

type Config struct {
	HTTPListen string `envconfig:"HTTP_LISTEN" default:"localhost:3030"`
	BaseURL    string `envconfig:"BASEURL" default:"http://localhost:3030"`
	PwdSecret  string `envconfig:"PASSWORD_SECRET"`
	BackendDSN string `envconfig:"BACKEND_DSN"`
	SentryDSN  string `envconfig:"SENTRY_DSN"`

	Root  string `default:"./"`
	Debug bool

	TokenGenKey string `envconfig:"tokengen_key"`

	EmailDomain string `envconfig:"EMAIL_DOMAIN"`
	EmailCheck  bool   `envconfig:"EMAIL_CHECK"`

	SMTPEnabled        bool   `envconfig:"SMTP_ENABLED"`
	SMTPHost           string `envconfig:"SMTP_HOST"`
	SMTPPort           int    `envconfig:"SMTP_PORT" default:"465"`
	SMTPSenderName     string `envconfig:"SMTP_SENDER_NAME"`
	SMTPSenderEmail    string `envconfig:"SMTP_SENDER_EMAIL"`
	SMTPSenderPassword string `envconfig:"SMTP_SENDER_PASSWORD"`

	WechatCorpID        string `envconfig:"wechat_corpid"`
	WechatContactSecret string `envconfig:"wechat_contact_secret"`
	WechatPortalSecret  string `envconfig:"wechat_portal_secret"`
	WechatPortalAgentID int    `envconfig:"wechat_portal_agentid"`

	InDevelop bool   `envconfig:"-"`
	Version   string `envconfig:"-"`
}

Config config from env

var Current *Config

Jump to

Keyboard shortcuts

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