common

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: May 22, 2025 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type AreaDomainService

type AreaDomainService interface {
	ProvinceByAreaId(ctx context.Context, areaId string) (*commonDo.Area, error)
	ProvinceByAreaName(ctx context.Context, areaName string) (*commonDo.Area, error)
	CityByAreaId(ctx context.Context, areaId string) (*commonDo.Area, error)
	CityByAreaName(ctx context.Context, areaName string) (*commonDo.Area, error)
	CountyByAreaId(ctx context.Context, areaId string) (*commonDo.Area, error)
	CountyByAreaName(ctx context.Context, areaName string) (*commonDo.Area, error)
	CascadeArea(ctx context.Context, provinceAreaId string, cityAreaId string, countyAreaId string) (*commonDo.CascadeArea, error)
	Area(ctx context.Context, areaType string, parentAreaId string) ([]commonDo.Area, error)
}

AreaDomainService 地区领域服务

func InitAreaDomainService

func InitAreaDomainService() AreaDomainService

func NewAreaDomainService

func NewAreaDomainService(areaDao commonDao.AreaDao) AreaDomainService

type MailDomainService

type MailDomainService interface {
	Config(ctx context.Context) (*commonDo.MailConfig, error)
	SaveMailConfig(ctx context.Context, config commonDo.MailConfig) error
	SendMail(ctx context.Context, email []string, subject, template string, templateParams map[string]string) error
}

MailDomainService 邮件领域服务

func InitMailDomainService

func InitMailDomainService() MailDomainService

func NewMailDomainService

func NewMailDomainService(mailDao commonDao.MailDao) MailDomainService

type SmsDomainService

type SmsDomainService interface {
	Config(ctx context.Context) (*commonDo.SmsConfig, error)
	SaveSmsConfig(ctx context.Context, config commonDo.SmsConfig) error
	SendSms(ctx context.Context, telephone, template string, templateParams map[string]string) error
	Template(ctx context.Context, template string) (*commonDo.SmsTemplate, error)
}

SmsDomainService 短信领域服务

func InitSmsDomainService

func InitSmsDomainService() SmsDomainService

func NewSmsDomainService

func NewSmsDomainService(smsDao commonDao.SmsDao) SmsDomainService

type ValidCodeDomainService

type ValidCodeDomainService interface {
	SendValidCode(ctx context.Context, sender commonDo.SenderType, bizType, account string) error
	VerifyValidCode(ctx context.Context, sender commonDo.SenderType, bizType, account, code string) error
}

ValidCodeDomainService 验证码领域服务

func InitValidCodeDomainService

func InitValidCodeDomainService() ValidCodeDomainService

func NewValidCodeDomainService

func NewValidCodeDomainService(smsDomainService SmsDomainService, mailDomainService MailDomainService) ValidCodeDomainService

Jump to

Keyboard shortcuts

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