config

package
v1.0.13 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	zrpc.RpcServerConf
	DatabaseConf config.DatabaseConf
	RedisConf    redis.RedisConf
	EmailConf    EmailConf
	SmsConf      smssdk.SmsConf
}

type EmailConf

type EmailConf struct {
	AuthType  string `json:",default=plain,options=[plain,CRAMMD5],env=EMAIL_AUTH_TYPE"`
	EmailAddr string `json:",env=EMAIL_ADDR"`
	Password  string `json:",optional,env=EMAIL_PASSWORD"`
	HostName  string `json:",env=EMAIL_HOST_NAME"`
	Identify  string `json:",optional,env=EMAIL_IDENTIFY"`
	Secret    string `json:",optional,env=EMAIL_SECRET"`
	Port      int    `json:",optional,default=25,env=EMAIL_PORT"`
	TLS       bool   `json:",default=false,env=EMAIL_TLS"`
}

func (EmailConf) NewAuth

func (e EmailConf) NewAuth() *smtp.Auth

NewAuth creates the auth from config

func (EmailConf) NewClient

func (e EmailConf) NewClient(auth *smtp.Auth) *smtp.Client

Jump to

Keyboard shortcuts

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