config

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultHost = func() string { return viper.GetString("host_default") }
	RootDomain  = func() string { return viper.GetString("root_domain") }
	ListenHTTP  = func() string { return viper.GetString("listen_http") }
	ListenHTTPS = func() string { return viper.GetString("listen_https") }

	LogLevel        = func() string { return viper.GetString("log_level") }
	LogFormat       = func() string { return viper.GetString("log_format") }
	LogOutput       = func() string { return viper.GetString("log_output") }
	LogPretty       = func() bool { return viper.GetBool("log_pretty") }
	LogBackups      = func() int { return viper.GetInt("log_backups") }
	AccessLogOutput = func() string { return viper.GetString("log_access_output") }

	GoogleRecaptchaSecret = func() string { return viper.GetString("google_recaptcha_secret") }

	ConsoleProxyURL = func() string { return viper.GetString("console_proxy_url") }
)

define main configs.

Functions

func Help

func Help() string

Help get help messages.

func Load

func Load() error

Load all configs.

func Mailer

func Mailer() mail.Mailer

Mailer returns the mail client.

func MySQL

func MySQL() *gorm.DB

MySQL returns the mysql client instance.

func Redis

func Redis() *redis.Client

Redis returns the redis client instance.

Types

This section is empty.

Jump to

Keyboard shortcuts

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