userservice

package
v0.0.0-...-e8a9512 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UpdateUserProfileRequest

type UpdateUserProfileRequest struct {
	Email       string
	FirstName   string
	LastName    string
	PhoneNumber string
}

type UserInfo

type UserInfo struct {
	UserName string
	UserID   uint64
}

type UserLogin

type UserLogin struct {
	Email    string
	Password string
}

type UserProfile

type UserProfile struct {
	UserID      uint64
	FirstName   string
	LastName    string
	Email       string
	PhoneNumber string
	DisplayName string
}

type UserRegistrationRequest

type UserRegistrationRequest struct {
	Email       string
	PhoneNumber string
	FirstName   string
	LastName    string
	Password    string
	RePassword  string
}

type UserRegistrationResponse

type UserRegistrationResponse struct {
	NextAction  string
	Session     string
	PhoneNumber string
	Email       string
	// WaitingResendOTPSeconds uint64
	Message string
}

type UserService

type UserService interface {
	RegisterUser(ctx context.Context, req *UserRegistrationRequest) (*UserRegistrationResponse, error)
	UserLogin(ctx context.Context, login UserLogin) (*UserInfo, error)
	GetUserInfo(ctx context.Context, userID uint64) (*UserProfile, error)
	UpdateUserProfile(ctx context.Context, userID uint64, req *UpdateUserProfileRequest) error
}

func NewUserService

func NewUserService(cfg *config.Config, repo repository.UserRepository) UserService

Jump to

Keyboard shortcuts

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