application

package
v0.0.0-...-4ac0cf4 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2023 License: MIT Imports: 3 Imported by: 0

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.

Jump to

Keyboard shortcuts

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