ms-auth/internal/users/usecase.go
Vyacheslav1557 93eaf89d78 refactor:
2024-10-09 22:07:38 +05:00

17 lines
593 B
Go

package users
import (
"context"
"git.sch9.ru/new_gate/ms-auth/internal/models"
)
type UseCase interface {
CreateUser(ctx context.Context, user *models.User) (int32, error)
ReadUserBySessionToken(ctx context.Context, token string) (*models.User, error)
ReadUser(ctx context.Context, id int32) (*models.User, error)
ReadUserByEmail(ctx context.Context, email string) (*models.User, error)
ReadUserByUsername(ctx context.Context, username string) (*models.User, error)
UpdateUser(ctx context.Context, modifiedUser *models.User) error
DeleteUser(ctx context.Context, id int32) error
}