server

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2021 License: MIT Imports: 6 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 {
	Serve *ServeConfig
	Db    *DbConfig
	Log   *LogConfig
	Zoom  *ZoomConfig
	Mail  *MailConfig
}

type DB

type DB struct {
	DbHandler *gorm.DB
	// contains filtered or unexported fields
}

func NewDatabase

func NewDatabase(cfg *DbConfig) *DB

func (*DB) Close

func (db *DB) Close()

func (*DB) Open

func (db *DB) Open() error

type DbConfig

type DbConfig struct {
	Unix            string
	Host            string
	Port            int
	Charset         string
	User            string
	Pass            string
	DbName          string
	Prefix          string
	MaxIdleConns    int
	MaxOpenConns    int
	ConnMaxLifeTime int
}

type LogConfig

type LogConfig struct {
	Path string
}

type MailConfig

type MailConfig struct {
	Enable int
	Smtp   string
	Port   int
	User   string
	Pass   string
}

type SendMail

type SendMail struct {
	Enable int
	Smtp   string
	Port   int
	User   string
	Pass   string
	// contains filtered or unexported fields
}

func NewSendMail

func NewSendMail(mail *SendMail) *SendMail

func (*SendMail) AsyncSend

func (mail *SendMail) AsyncSend(msg *SendMailMessage)

func (*SendMail) Send

func (mail *SendMail) Send(msg *SendMailMessage)

type SendMailMessage

type SendMailMessage struct {
	From    string
	To      []string
	Cc      []string
	Subject string
	Body    string
	Attach  string
	// contains filtered or unexported fields
}

func (*SendMailMessage) NewMessage

func (m *SendMailMessage) NewMessage() *gomail.Message

type ServeConfig

type ServeConfig struct {
	Addr         string
	ReadTimeout  int
	WriteTimeout int
	IdleTimeout  int
}

type ZoomConfig

type ZoomConfig struct {
	LocalSpace  string
	RemoteSpace string
	Cipher      string
	AppHost     string
	AppName     string
}

Directories

Path Synopsis
module
router

Jump to

Keyboard shortcuts

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