service

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AreaDomainService

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

AreaDomainService 地区领域服务

func NewAreaDomainService

func NewAreaDomainService(areaRepo repository.AreaRepository) AreaDomainService

type MailDomainService

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

MailDomainService 邮件领域服务

func NewMailDomainService

func NewMailDomainService(mailRepo repository.MailRepository) MailDomainService

type SmsDomainService

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

SmsDomainService 短信领域服务

func NewSmsDomainService

func NewSmsDomainService(smsRepo repository.SmsRepository) SmsDomainService

type ValidCodeDomainService

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

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