config

package
v0.0.0-...-153da20 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2022 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseConfig

func ParseConfig(file string) error

Types

type Config

type Config struct {
	Host        string `yaml:"host"`
	Port        int    `yaml:"port"`
	Credentials struct {
		GoogleCloud string `yaml:"google_app_creds"`
	} `yaml:"credentials"`
	Database struct {
		Host   string `yaml:"host"`
		Port   int    `yaml:"port"`
		DbName string `yaml:"dbname"`
	} `yaml:"database"`
	Directory struct {
		UploadUsers   string `yaml:"import_users"`
		MailTemplates string `yaml:"mail_templates"`
	} `yaml:"directory"`
	Mail struct {
		EmaiFrom string `yaml:"from"`
		SmtpHost string `yaml:"smtp_host"`
		SmtpPort string `yaml:"smtp_port"`
		SmtpPass string `yaml:"smtp_user"`
		SmtpPwd  string `yaml:"smtp_pwd"`
	} `yaml:"mail"`
	Log struct {
		LogDir string `yaml:"log_dir"`
	} `yaml:"log"`
	FileStorage struct {
		Default     string `yaml:"default"`
		GoogleCloud struct {
			ProjectID  string `yaml:"project_id"`
			BucketName string `yaml:"bucket_name"`
			UploadPath string `yaml:"upload_path"`
		} `yaml:"google_cloud"`
	} `yaml:"file_storage"`
	Messaging struct {
		GoogleCloud struct {
			ProjectID string `yaml:"project_id"`
			TopicID   string `yaml:"topic_id"`
		} `yaml:"google_cloud"`
	} `yaml:"messaging"`
}

func GetConfig

func GetConfig() Config

func (Config) ApiUrl

func (c Config) ApiUrl() string

Jump to

Keyboard shortcuts

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