Documentation ¶
Index ¶
- Constants
- Variables
- func NewDiscovery(conf *conf.Registry) registry.Discovery
- func NewEmailRepo(data *Data, logger log.Logger) biz.EmailRepo
- func NewMysqlCmd(conf *conf.Bootstrap, logger log.Logger) *gorm.DB
- func NewRedisCmd(conf *conf.Data, logger log.Logger) *redis.Client
- func NewRegistrar(conf *conf.Registry) registry.Registrar
- func NewSmsRepo(data *Data, logger log.Logger) biz.SmsRepo
- type BaseFields
- type Data
- type EmailEntity
- type EmailRepo
- type SmsEntity
- type SmsRepo
Constants ¶
View Source
const ( SendEmailWait = iota SendEmailSuccess SendEmailFail )
View Source
const ( SendSmsWait = iota SendSmsSuccess SendSmsFail )
View Source
const AsyncSendEmail = 2 // 异步
View Source
const AsyncSendSms = 2 // 异步
View Source
const SyncSendEmail = 1 // 同步
View Source
const SyncSendSms = 1 // 同步
Variables ¶
View Source
var ProviderSet = wire.NewSet( NewData, NewDiscovery, NewRegistrar, NewMysqlCmd, NewRedisCmd, NewSmsRepo, NewEmailRepo, )
ProviderSet is data providers.
Functions ¶
Types ¶
type BaseFields ¶
type BaseFields struct {
Id int64 `gorm:"primarykey;autoIncrement;type:int;comment:主键id"`
}
type EmailEntity ¶
type EmailEntity struct { BaseFields UserID uint `gorm:"not null;type:int(10) unsigned;comment:'用户id'"` Address string `gorm:"not null;type:varchar(255);comment:'邮箱地址'"` Subject string `gorm:"not null;type:varchar(255);comment:'主题'"` Content string `gorm:"not null;type:text;comment:'内容'"` Type uint8 `gorm:"not null;default:1;type:tinyint(1) unsigned;comment:'1 同步 2 异步'"` Status uint8 `gorm:"not null;default:0;type:tinyint(1) unsigned;comment:'状态0 未发送 1 成功 2 失败'"` }
func (EmailEntity) TableName ¶
func (EmailEntity) TableName() string
Click to show internal directories.
Click to hide internal directories.