service

package
v0.0.0-...-44ea421 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

  • @Author: youlingdada youlingdada@163.com
  • @Date: 2022-07-07 17:18:50
  • @LastEditors: youlingdada cxyyxd1224721
  • @LastEditTime: 2022-07-24 16:22:47
  • @FilePath: \street-stall\service\email.go
  • @Description:
  • QQ:3367758294
  • Copyright (c) 2022 by Youlingdada, All Rights Reserved.

Package service /*

Index

Constants

This section is empty.

Variables

View Source
var BoothService boothService
View Source
var BoothTypeService boothTypeService
View Source
var FileService fileService
View Source
var UserService userService
View Source
var WaresService waresService

Functions

func GetExpByTag

func GetExpByTag(tag string) int

func GetUserByEmail

func GetUserByEmail(email string) (*model.User, error)

*

  • @description: 根据emai获取用户信息
  • @param {string} email
  • @return {*}

func GetUserById

func GetUserById(userId uint64) (*model.User, error)

*

  • @description: 根据用户id 获取用户信息
  • @param {int64} userId 用户id
  • @return {*} 用户信息

func GetUserByPhone

func GetUserByPhone(phone string) (*model.User, error)

*

  • @description: 根据phone 获取用户信息
  • @param {string} phone
  • @return {*}

func GetUserByUsername

func GetUserByUsername(username string) (*model.User, error)

*

  • @description: 根据用户名获取用户信息
  • @param {string} username 用户名
  • @return {*} 用户信息

func SendEmailCode

func SendEmailCode(email utils.Email, tag string) error

*

  • @description: 发送邮箱验证码
  • @param {utils.Email} email 邮件信息
  • @param {string} tag
  • @return {*}

func UserCheckOnlyEmail

func UserCheckOnlyEmail(email string) error

*

  • @description: 检查邮箱的唯一性
  • @param {string} email
  • @return {*}

func UserCheckOnlyPhone

func UserCheckOnlyPhone(phone string) error

*

  • @description: 检查电话的唯一性
  • @param {string} phone
  • @return {*}

func UserCheckOnlyUsername

func UserCheckOnlyUsername(username string) error

*

  • @description: 检查用户名的唯一性
  • @param {string} username
  • @return {*}

func UserUpdateEmail

func UserUpdateEmail(user model.User, code string) error

func UserUpdatePhone

func UserUpdatePhone(user model.User, code string) error

func VerifyEmailCode

func VerifyEmailCode(email string, code, tag string) error

*

  • @description: 验证邮验证码
  • @param {string} email 邮箱
  • @param {string} code 验证码
  • @param {string} tag 唯一标识,用于表示邮箱验证码的作用
  • @return {*} 是否验证成功

Types

This section is empty.

Jump to

Keyboard shortcuts

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