Documentation ¶
Index ¶
- func NewController(authProvider network.AuthenticationProvider, ...) network.Controller
- type MockService
- func (m *MockService) CreateUser(user *model.User) (*model.User, error)
- func (m *MockService) DeleteUserByEmail(email string) (bool, error)
- func (m *MockService) FindRoleByCode(code model.RoleCode) (*model.Role, error)
- func (m *MockService) FindRoles(roleIds []primitive.ObjectID) ([]*model.Role, error)
- func (m *MockService) FindUserByEmail(email string) (*model.User, error)
- func (m *MockService) FindUserById(id primitive.ObjectID) (*model.User, error)
- func (m *MockService) FindUserPrivateProfile(user *model.User) (*model.User, error)
- func (m *MockService) FindUserPublicProfile(userId primitive.ObjectID) (*model.User, error)
- func (m *MockService) GetUserPrivateProfile(user *model.User) (*dto.InfoPrivateUser, error)
- func (m *MockService) GetUserPublicProfile(userId primitive.ObjectID) (*dto.InfoPublicUser, error)
- type Service
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 ¶
func (*MockService) CreateUser ¶
func (*MockService) DeleteUserByEmail ¶
func (m *MockService) DeleteUserByEmail(email string) (bool, error)
func (*MockService) FindRoleByCode ¶
func (*MockService) FindUserByEmail ¶
func (m *MockService) FindUserByEmail(email string) (*model.User, error)
func (*MockService) FindUserById ¶
func (*MockService) FindUserPrivateProfile ¶
func (*MockService) FindUserPublicProfile ¶
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 ¶
Click to show internal directories.
Click to hide internal directories.