usecase

package
v0.0.0-...-0fad01b Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateUserInputDTO

type CreateUserInputDTO struct {
	Name      string `json:"name" validate:"required"`
	BirthDate string `json:"birth_date" validate:"required,datetime=2006-01-02"`
	Email     string `json:"email" validate:"required,email"`
	Password  string `json:"password" validate:"required"`
	Address   string `json:"address" validate:"required"`
}

func (*CreateUserInputDTO) Validate

func (user *CreateUserInputDTO) Validate() []error

type CreateUserOutputDTO

type CreateUserOutputDTO struct {
	ID string `json:"id"`
}

type CreateUserUseCase

type CreateUserUseCase struct {
	UserRepository interfaces.UserRepositoryInterface
}

func NewCreateUserUseCase

func NewCreateUserUseCase(userRepository interfaces.UserRepositoryInterface) *CreateUserUseCase

func (*CreateUserUseCase) Execute

type FindOneUserUseCase

type FindOneUserUseCase struct {
	UserRepository interfaces.UserRepositoryInterface
}

func NewFindOneUserUseCase

func NewFindOneUserUseCase(userRepository interfaces.UserRepositoryInterface) *FindOneUserUseCase

func (*FindOneUserUseCase) Execute

type FindOneUserUseCaseOutputDTO

type FindOneUserUseCaseOutputDTO struct {
	Name      string `json:"name"`
	BirthDate string `json:"birth_date"`
	Email     string `json:"email"`
	Address   string `json:"address"`
}

type UpdateUserInputDTO

type UpdateUserInputDTO struct {
	ID        string `json:"id"`
	Name      string `json:"name"`
	BirthDate string `json:"birth_date" validate:"datetime=2006-01-02"`
	Email     string `json:"email"`
	Password  string `json:"password"`
	Address   string `json:"address"`
}

func (*UpdateUserInputDTO) Validate

func (user *UpdateUserInputDTO) Validate() []error

type UpdateUserUseCase

type UpdateUserUseCase struct {
	UserRepository interfaces.UserRepositoryInterface
}

func NewUpdateUserUseCase

func NewUpdateUserUseCase(userRepository interfaces.UserRepositoryInterface) *UpdateUserUseCase

func (*UpdateUserUseCase) Execute

func (c *UpdateUserUseCase) Execute(input UpdateUserInputDTO) error

Jump to

Keyboard shortcuts

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