logic

package
v0.86.1 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetActionType

func GetActionType(request proto.Message) int

Types

type AuthLogic

type AuthLogic struct {
	*dao.Dao
	code.VerifyCodeInterface
}

func NewAuthSignLogic

func NewAuthSignLogic(dao *dao.Dao, code2 *conf.SmsVerifyCodeConfig) *AuthLogic

func (*AuthLogic) DoAuthCancelCode

func (m *AuthLogic) DoAuthCancelCode(ctx context.Context, authKeyId int64, phoneNumber, phoneCodeHash string) error

auth.cancelCode

func (*AuthLogic) DoAuthReSendCode

func (m *AuthLogic) DoAuthReSendCode(ctx context.Context,
	authKeyId int64,
	phoneNumber, phoneCodeHash string,
	cb func(codeData *model.PhoneCodeTransaction) error) (codeData *model.PhoneCodeTransaction, err error)

auth.resendCode

func (*AuthLogic) DoAuthSendCode

func (m *AuthLogic) DoAuthSendCode(
	ctx context.Context,
	authKeyId int64,
	sessionId int64,
	phoneNumber string,
	phoneRegistered,
	allowFlashCall,
	currentNumber bool,
	apiId int32,
	apiHash string,
	cb func(codeData *model.PhoneCodeTransaction) error) (codeData *model.PhoneCodeTransaction, err error)

func (*AuthLogic) DoAuthSignIn

func (m *AuthLogic) DoAuthSignIn(ctx context.Context,
	authKeyId int64,
	phoneNumber,
	phoneCode,
	phoneCodeHash string,
	cb func(codeData *model.PhoneCodeTransaction) error) (codeData *model.PhoneCodeTransaction, err error)

func (*AuthLogic) DoAuthSignUp

func (m *AuthLogic) DoAuthSignUp(ctx context.Context, authKeyId int64, phoneNumber string, phoneCode *string, phoneCodeHash string) (codeData *model.PhoneCodeTransaction, err error)

TODO(@benqi): 合并DoSignUp和DoSignIn部分代码

Jump to

Keyboard shortcuts

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