service

package
v0.0.0-...-ff5c026 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DbConfig

type DbConfig struct {
	Name             string `json:"name" yaml:"name" mapstructure:"name"`
	EncryptKey       string `json:"encryptKey" yaml:"encryptKey" mapstructure:"encryptKey"`
	RotationDuration int    `json:"rotationDuration" yaml:"rotationDuration" mapstructure:"rotationDuration"`
	DbDir            string `json:"dbDir" yaml:"dbDir" mapstructure:"dbDir"`
	DeletePrevious   bool   `json:"deletePrevious" yaml:"deletePrevious" mapstructure:"deletePrevious"`
}

type MailConfig

type MailConfig struct {
	SenderName     string     `json:"senderName,omitempty" yaml:"senderName"`
	SenderMail     string     `json:"senderMail,omitempty" yaml:"senderMail"`
	ProductName    string     `json:"productName,omitempty" yaml:"productName"`
	LogoUrl        string     `json:"logoUrl,omitempty" yaml:"logoUrl"`
	Copyright      string     `json:"copyright,omitempty" yaml:"copyright"`
	TroubleContact string     `json:"troubleContact,omitempty" yaml:"troubleContact"`
	Sendgrid       Sendgrid   `json:"sendgrid,omitempty" yaml:"sendgrid"`
	Smtp           SmtpConfig `json:"smtp,omitempty" yaml:"smtp"`
}

func (*MailConfig) Validate

func (m *MailConfig) Validate() error

type Sendgrid

type Sendgrid struct {
	ApiKey string `json:"apiKey,omitempty" yaml:"apiKey,omitempty"`
}

type SmtpConfig

type SmtpConfig struct {
	Host     string `json:"host,omitempty" yaml:"host,omitempty"`
	Port     int    `json:"port,omitempty" yaml:"port,omitempty"`
	Email    string `json:"email,omitempty" yaml:"email,omitempty"`
	Password string `json:"password,omitempty" yaml:"password,omitempty"`
}

type SysCoreConfig

type SysCoreConfig struct {
	SysCoreConfig commonCfg.Config `yaml:"sysCoreConfig" mapstructure:"sysCoreConfig"`
	MailConfig    MailConfig       `yaml:"mailConfig" mapstructure:"mailConfig"`
}

func NewConfig

func NewConfig(filepath string) (*SysCoreConfig, error)

func (*SysCoreConfig) Validate

func (s *SysCoreConfig) Validate() error

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

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