config

package
v0.0.0-...-84e4fc3 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	MongoConfig  MongoConfig  `yaml:"mongodb"`
	MinioConfig  MinioConfig  `yaml:"minio"`
	QcloudConfig QcloudConfig `yaml:"qcloud"`
	SiteConfig   SiteConfig   `yaml:"site"`
	SMTPConfig   SMTPConfig   `yaml:"smtp"`
}

Context 配置上下文

func GetContext

func GetContext() Context

GetContext 获取配置上下文

type MinioConfig

type MinioConfig struct {
	Enabled   bool
	Endpoint  string
	HTTPS     bool
	AccessKey string `yaml:"accessKey"`
	SecretKey string `yaml:"secretKey"`
}

MinioConfig 对象存储配置

type MongoConfig

type MongoConfig struct {
	URI      string
	Username string
	Password string
}

MongoConfig MongoDB配置文件

type QcloudConfig

type QcloudConfig struct {
	SecretID  string `yaml:"secretID"`
	SecretKey string `yaml:"secretKey"`
	EnableCDN bool   `yaml:"enableCDN"`
}

QcloudConfig Qcloud配置文件

type SMTPConfig

type SMTPConfig struct {
	Host     string
	Port     int
	SSL      bool `yaml:"ssl"`
	Account  string
	Password string
	Enabled  bool
}

SMTPConfig 邮箱配置

type SiteConfig

type SiteConfig struct {
	Domain string
}

SiteConfig 站点配置

Jump to

Keyboard shortcuts

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