Documentation
¶
Index ¶
- func GenerateExcel() string
- func GenerateStandardJwt(jwtData *JwtData) string
- func GetNewCaptcha() (string, string, error)
- func ParseToken(token string) (string, error)
- func SendEmail(target string) string
- func VerifyCaptcha(id string, code string) bool
- func WriteXlsx(sheet string, records interface{}) *excelize.File
- type Data
- type JwtData
- type MailboxConf
- type Time
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateExcel ¶
func GenerateExcel() string
func GenerateStandardJwt ¶
func GetNewCaptcha ¶
func ParseToken ¶
func VerifyCaptcha ¶
Types ¶
type Data ¶
type Data struct {
Name string `gorm:"not null" json:"name" xlsx:"姓名"`
UpdatedAt time.Time `gorm:"not null" json:"-" xlsx:"更新时间"`
CreatedAt time.Time `gorm:"not null" json:"-" xlsx:"创建时间"`
StuID string `gorm:"primaryKey" json:"stu_id" xlsx:"学号"`
Gender string `gorm:"not null" json:"gender" xlsx:"性别"`
College string `gorm:"not null" json:"college" xlsx:"专业"`
Campus string `gorm:"not null" json:"campus" xlsx:"学院"`
Phone string `gorm:"not null" json:"phone" xlsx:"电话号"`
QQ string `gorm:"not null" json:"qq" xlsx:"QQ"`
Region string `gorm:"not null" json:"region" xlsx:"校区"`
Want1 string `gorm:"not null" json:"want1" xlsx:"第一志愿"`
Want2 string `gorm:"not null" json:"want2" xlsx:"第二志愿"`
Profile string `gorm:"not null" json:"profile" xlsx:"简介"`
Feedback string `gorm:"not null" json:"feedback" xlsx:"反馈"`
IsModified bool `gorm:"not null" json:"is_modified" xlsx:"是否修改"`
}
type JwtData ¶
type JwtData struct {
ID string `json:"id"`
jwt.StandardClaims
}
type MailboxConf ¶
type MailboxConf struct {
// 邮件标题
Title string
// 邮件内容
Body string
// 收件人列表
RecipientList []string
// 发件人账号
Sender string
// 发件人密码,QQ邮箱这里配置授权码
SPassword string
// SMTP 服务器地址, QQ邮箱是smtp.qq.com
SMTPAddr string
// SMTP端口 QQ邮箱是25
SMTPPort int
}
MailboxConf 邮箱配置
Click to show internal directories.
Click to hide internal directories.