user

package
v0.1.38 Latest Latest
Warning

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

Go to latest
Published: May 3, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package user provides application services for user management.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service is a struct that implements the UserManageUsecase interface.

func New

func New(
	userUsecase userport.UserUsecase,
	roleUsecase userport.RoleUsecase,
	roleBindingPersistencePort userport.RoleBindingPersistencePort,
	rbacEnforcerPort userport.RBACEnforcerPort,
	logger *slog.Logger,
) *Service

New creates a new instance of the Service struct.

func (*Service) CreateUser

func (s *Service) CreateUser(ctx context.Context, apiUser *v1.User) (*v1.User, error)

CreateUser implements applicationport.UserManageUsecase.

func (*Service) DeleteUser

func (s *Service) DeleteUser(ctx context.Context, uid uuid.UUID) error

DeleteUser implements applicationport.UserManageUsecase.

func (*Service) GetMyProfile added in v0.1.38

func (s *Service) GetMyProfile(ctx context.Context, email string) (*v1.UserProfileResponse, error)

GetMyProfile implements applicationport.UserManageUsecase. Returns the user's profile together with all roles and the binding that granted each role.

func (*Service) GetUser

func (s *Service) GetUser(ctx context.Context, uid uuid.UUID) (*v1.User, error)

GetUser implements applicationport.UserManageUsecase.

func (*Service) GetUserByEmail

func (s *Service) GetUserByEmail(ctx context.Context, email string) (*v1.User, error)

GetUserByEmail implements applicationport.UserManageUsecase.

func (*Service) ListUsers

func (s *Service) ListUsers(
	ctx context.Context,
	options *model.ListOptions,
) (*v1.ListResponse[v1.User], error)

ListUsers implements applicationport.UserManageUsecase.

Jump to

Keyboard shortcuts

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