ms-auth/internal/users/usecase.go

17 lines
593 B
Go
Raw Permalink Normal View History

2024-10-09 17:07:38 +00:00
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
}