service

package
v0.0.0-...-2fa74ab Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2024 License: MIT Imports: 6 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 {
	// GetAll retrieves all users
	GetAllUsers(ctx context.Context) ([]model.User, error)
	// GetUserByID retrieves a user by ID and verifies the password
	GetUserByID(ctx context.Context, id string) (*model.User, error)
	// CreateUser hashes the user's password and stores the user in the repository
	CreateUser(ctx context.Context, user *model.User) error
	// UpdateUser hashes the new password if it's provided, then updates the user
	UpdateUser(ctx context.Context, user *model.User) error
	// DeleteUser removes a user by ID
	DeleteUser(ctx context.Context, id string) error
}

func NewUserService

func NewUserService(repo repository.UserRepository) UserService

Jump to

Keyboard shortcuts

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