service

package
v0.0.0-...-7706d81 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2022 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct{ User }

Service structure.

func NewService

func NewService(repos *repository.Repository, client *client.Client, cfg *config.Config) *Service

Creating a new service.

type User

type User interface {
	// Create verify user email code.
	CreateVerifyEmailCode(ctx context.Context, email string) error
	// Verify user email code.
	VerifyEmailCode(ctx context.Context, email string, input uint64) (bool, error)
}

User code service interface.

type UserService

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

User code service structure.

func NewUserService

func NewUserService(repos redis.User, email v1.EmailUserServiceClient, cfg config.CodeConfig) *UserService

Creating a new user code service.

func (*UserService) CreateVerifyEmailCode

func (s *UserService) CreateVerifyEmailCode(ctx context.Context, email string) error

Create verify user email code.

func (*UserService) VerifyEmailCode

func (s *UserService) VerifyEmailCode(ctx context.Context, email string, input uint64) (bool, error)

Verify user email code.

Jump to

Keyboard shortcuts

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