user

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewController

func NewController(
	authProvider network.AuthenticationProvider,
	authorizeProvider network.AuthorizationProvider,
	service Service,
) network.Controller

Types

type MockService

type MockService struct {
	mock.Mock
}

func (*MockService) CreateUser

func (m *MockService) CreateUser(user *model.User) (*model.User, error)

func (*MockService) DeleteUserByEmail

func (m *MockService) DeleteUserByEmail(email string) (bool, error)

func (*MockService) FindRoleByCode

func (m *MockService) FindRoleByCode(code model.RoleCode) (*model.Role, error)

func (*MockService) FindRoles

func (m *MockService) FindRoles(roleIds []primitive.ObjectID) ([]*model.Role, error)

func (*MockService) FindUserByEmail

func (m *MockService) FindUserByEmail(email string) (*model.User, error)

func (*MockService) FindUserById

func (m *MockService) FindUserById(id primitive.ObjectID) (*model.User, error)

func (*MockService) FindUserPrivateProfile

func (m *MockService) FindUserPrivateProfile(user *model.User) (*model.User, error)

func (*MockService) FindUserPublicProfile

func (m *MockService) FindUserPublicProfile(userId primitive.ObjectID) (*model.User, error)

func (*MockService) GetUserPrivateProfile

func (m *MockService) GetUserPrivateProfile(user *model.User) (*dto.InfoPrivateUser, error)

func (*MockService) GetUserPublicProfile

func (m *MockService) GetUserPublicProfile(userId primitive.ObjectID) (*dto.InfoPublicUser, error)

type Service

type Service interface {
	GetUserPrivateProfile(user *model.User) (*dto.InfoPrivateUser, error)
	GetUserPublicProfile(userId primitive.ObjectID) (*dto.InfoPublicUser, error)
	FindRoleByCode(code model.RoleCode) (*model.Role, error)
	FindRoles(roleIds []primitive.ObjectID) ([]*model.Role, error)
	FindUserById(id primitive.ObjectID) (*model.User, error)
	FindUserByEmail(email string) (*model.User, error)
	CreateUser(user *model.User) (*model.User, error)
	FindUserPrivateProfile(user *model.User) (*model.User, error)
	FindUserPublicProfile(userId primitive.ObjectID) (*model.User, error)
	DeleteUserByEmail(email string) (bool, error)
}

func NewService

func NewService(db mongo.Database) Service

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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