authmethod

package
v1.0.11 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthMethod

type AuthMethod struct {
	ID        int64
	Method    string
	Config    string
	Enabled   bool
	CreatedAt time.Time
	UpdatedAt time.Time
}

AuthMethod 认证方法

type AuthMethodRepo

type AuthMethodRepo interface {
	FindByMethod(ctx context.Context, method string) (*AuthMethod, error)
	Update(ctx context.Context, auth *AuthMethod) (*AuthMethod, error)
	FindAll(ctx context.Context) ([]*AuthMethod, error)
}

AuthMethodRepo 认证方法仓储接口

type AuthMethodUsecase

type AuthMethodUsecase struct {
	// contains filtered or unexported fields
}

AuthMethodUsecase 认证方法用例

func NewAuthMethodUsecase

func NewAuthMethodUsecase(repo AuthMethodRepo, logger log.Logger) *AuthMethodUsecase

NewAuthMethodUsecase 创建认证方法用例

func (*AuthMethodUsecase) GetAuthMethodConfig

func (uc *AuthMethodUsecase) GetAuthMethodConfig(ctx context.Context, method string) (*AuthMethod, error)

GetAuthMethodConfig 获取认证方法配置 对应原项目 getAuthMethodConfigLogic.go 第30-46行

func (*AuthMethodUsecase) GetAuthMethodList

func (uc *AuthMethodUsecase) GetAuthMethodList(ctx context.Context) ([]*AuthMethod, error)

GetAuthMethodList 获取认证方法列表 对应原项目 getAuthMethodListLogic.go 第30-49行

func (*AuthMethodUsecase) GetEmailPlatforms

func (uc *AuthMethodUsecase) GetEmailPlatforms(ctx context.Context) []types.PlatformInfo

GetEmailPlatforms 获取邮件平台列表 对应原项目 getEmailPlatformLogic.go 第28-32行

func (*AuthMethodUsecase) GetSmsPlatforms

func (uc *AuthMethodUsecase) GetSmsPlatforms(ctx context.Context) []types.PlatformInfo

GetSmsPlatforms 获取短信平台列表 对应原项目 getSmsPlatformLogic.go 第28-32行

func (*AuthMethodUsecase) TestEmailSend

func (uc *AuthMethodUsecase) TestEmailSend(ctx context.Context, emailAddr string) (bool, string, error)

TestEmailSend 测试邮件发送 对应原项目 testEmailSendLogic.go 第30-41行

func (*AuthMethodUsecase) TestSmsSend

func (uc *AuthMethodUsecase) TestSmsSend(ctx context.Context, mobile string) (bool, string, error)

TestSmsSend 测试短信发送 对应原项目 testSmsSendLogic.go 第30-42行

func (*AuthMethodUsecase) TestSmsSendWithAreaCode

func (uc *AuthMethodUsecase) TestSmsSendWithAreaCode(ctx context.Context, areaCode, telephone string) (bool, string, error)

func (*AuthMethodUsecase) UpdateAuthMethodConfig

func (uc *AuthMethodUsecase) UpdateAuthMethodConfig(ctx context.Context, req *UpdateAuthMethodRequest) (*AuthMethod, error)

UpdateAuthMethodConfig 更新认证方法配置 完全对应原项目 updateAuthMethodConfigLogic.go 第34-86行

func (*AuthMethodUsecase) UpdateGlobal

func (uc *AuthMethodUsecase) UpdateGlobal(ctx context.Context, method string)

UpdateGlobal 更新全局配置 对应原项目第88-95行

type UpdateAuthMethodRequest

type UpdateAuthMethodRequest struct {
	ID      int64
	Method  string
	Config  interface{}
	Enabled *bool
}

UpdateAuthMethodRequest 更新认证方法请求

Jump to

Keyboard shortcuts

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