Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UserService ¶
type UserService interface { FindAllUsers() ([]domain.UserResponse, error) FindUserByID() (domain.UserResponse, error) UpdateUserByID() (domain.UserResponse, error) DeleteUserByID() ([]byte, error) }
type UserServiceCRUD ¶
type UserServiceCRUD struct {
// contains filtered or unexported fields
}
func NewUserService ¶
func NewUserService(repo domain.UserRepository) *UserServiceCRUD
NewUserService creates a new instance of UserServiceCRUD.
It takes a domain.UserRepository as a parameter and returns a pointer to UserServiceCRUD.
func (*UserServiceCRUD) DeleteUserByID ¶
func (service *UserServiceCRUD) DeleteUserByID() ([]byte, error)
DeleteUserByID deletes a user by their ID.
This function does not take any parameters. It returns a byte slice and an error.
func (*UserServiceCRUD) FindAllUsers ¶
func (service *UserServiceCRUD) FindAllUsers() ([]domain.UserResponse, error)
FindAllUsers returns a list of all users and any error encountered.
It does not take any parameters. It returns a slice of domain.UserResponse and an error.
func (*UserServiceCRUD) FindUserByID ¶
func (service *UserServiceCRUD) FindUserByID() (domain.UserResponse, error)
FindUserByID retrieves a user by their ID.
It returns a domain.UserResponse and an error.
func (*UserServiceCRUD) UpdateUserByID ¶
func (service *UserServiceCRUD) UpdateUserByID() (domain.UserResponse, error)
UpdateUserByID updates a user by their ID.
It returns a domain.UserResponse and an error.
Click to show internal directories.
Click to hide internal directories.