usecase

package
v0.0.0-...-ec85eee Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2019 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAuthUsecase

func NewAuthUsecase(tempUserRepo repository.TempUserRepository, userRepo repository.UserRepository, smsMessenger sms.SMSMessenger) *authUsecase

NewAuthUsecase returns authUsecase

func NewHealthcheckUsecase

func NewHealthcheckUsecase(healthcheckRepo repository.HealthcheckRepository) *healthcheckUsecase

NewHealthcheckUsecase returns healthcheckUsecase

func NewUserUsecase

func NewUserUsecase(userRepo repository.UserRepository) *userUsecase

NewUserUsecase returns userUsecase

Types

type AuthUsecase

type AuthUsecase interface {
	TempSignUp(ctx *custom_context.Context) (*output.TempUserOutput, error)
	ConfirmTempUser(ctx *custom_context.Context) (*output.AuthTokenOutput, error)
	SignUp(ctx *custom_context.Context) (*output.CurrentUserOutput, error)
	SignIn(ctx *custom_context.Context) (*output.CurrentUserOutput, error)
	UpdateUnconfirmedPhoneNumber(ctx *custom_context.Context) (*output.SMSReconfirmationOutput, error)
	ConfirmPhoneNumber(ctx *custom_context.Context) (*output.CurrentUserOutput, error)
}

AuthUsecase is an interface for Auth related usecase

type HealthcheckUsecase

type HealthcheckUsecase interface {
	CheckReadiness(ctx *custom_context.Context) error
}

type Usecase

type Usecase struct {
	HealthCheckUsecase HealthcheckUsecase
	AuthUsecase        AuthUsecase
	UserUsecase        UserUsecase
}

Usecase manage all usecases

func NewUsecase

func NewUsecase(repo *repository.Repository, smsMessenger sms.SMSMessenger) *Usecase

NewUsecase returns Usecase

type UserUsecase

type UserUsecase interface {
	GetProfile(ctx *custom_context.Context) (*output.CurrentUserOutput, error)
	UpdateProfile(ctx *custom_context.Context) (*output.CurrentUserOutput, error)
	UpdateEmail(ctx *custom_context.Context) (*output.CurrentUserOutput, error)
}

UserUsecase is an interface for User related usecase

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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