Documentation ¶
Index ¶
- type MockAuthRpcServiceClient
- func (m *MockAuthRpcServiceClient) GetProjectById(ctx context.Context, in *protos.GetProjectByIdRequest, opts ...grpc.CallOption) (*protos.GetProjectByIdResponse, error)
- func (m *MockAuthRpcServiceClient) GetUserById(ctx context.Context, in *protos.GetUserByIdRequest, opts ...grpc.CallOption) (*protos.GetUserByIdResponse, error)
- func (m *MockAuthRpcServiceClient) ValidateRequest(ctx context.Context, in *protos.ValidationRequest, opts ...grpc.CallOption) (*protos.ValidationResponse, error)
- type MockedApplicationService
- func (m *MockedApplicationService) AddMember(projectID string, member *entities.Member) error
- func (m *MockedApplicationService) CheckPasswordHash(hash, password string) error
- func (m *MockedApplicationService) CreateApiToken(user *entities.User, request entities.ApiTokenInput) (string, error)
- func (m *MockedApplicationService) CreateConfig(config authConfig.AuthConfig) error
- func (m *MockedApplicationService) CreateProject(project *entities.Project) error
- func (m *MockedApplicationService) CreateUser(user *entities.User) (*entities.User, error)
- func (m *MockedApplicationService) DeleteApiToken(token string) error
- func (m *MockedApplicationService) DeleteProject(projectID string) error
- func (m *MockedApplicationService) FindUserByUsername(username string) (*entities.User, error)
- func (m *MockedApplicationService) FindUsersByUID(uid []string) (*[]entities.User, error)
- func (m *MockedApplicationService) GetAggregateProjects(pipeline mongo.Pipeline, opts *options.AggregateOptions) (*mongo.Cursor, error)
- func (m *MockedApplicationService) GetApiTokensByUserID(userID string) ([]entities.ApiToken, error)
- func (m *MockedApplicationService) GetConfig(key string) (*authConfig.AuthConfig, error)
- func (m *MockedApplicationService) GetOwnerProjectIDs(ctx context.Context, userID string) ([]*entities.Project, error)
- func (m *MockedApplicationService) GetProjectByProjectID(projectID string) (*entities.Project, error)
- func (m *MockedApplicationService) GetProjectMembers(projectID, state string) ([]*entities.Member, error)
- func (m *MockedApplicationService) GetProjectOwners(projectID string) ([]*entities.Member, error)
- func (m *MockedApplicationService) GetProjectRole(projectID, userID string) (*entities.MemberRole, error)
- func (m *MockedApplicationService) GetProjectStats() ([]*entities.ProjectStats, error)
- func (m *MockedApplicationService) GetProjects(query bson.D) ([]*entities.Project, error)
- func (m *MockedApplicationService) GetProjectsByUserID(request *entities.ListProjectRequest) (*entities.ListProjectResponse, error)
- func (m *MockedApplicationService) GetSignedJWT(user *entities.User, jwtSecret string) (string, error)
- func (m *MockedApplicationService) GetUser(uid string) (*entities.User, error)
- func (m *MockedApplicationService) GetUsers() (*[]entities.User, error)
- func (m *MockedApplicationService) InviteUsers(invitedUsers []string) (*[]entities.User, error)
- func (m *MockedApplicationService) IsAdministrator(user *entities.User) error
- func (m *MockedApplicationService) ListCollection() ([]string, error)
- func (m *MockedApplicationService) ListDataBase() ([]string, error)
- func (m *MockedApplicationService) ListInvitations(userID string, invitationState entities.Invitation) ([]*entities.Project, error)
- func (m *MockedApplicationService) LoginUser(user *entities.User) (*entities.User, error)
- func (m *MockedApplicationService) RbacValidator(userID, resourceID string, rules []string, invitationStatus string) error
- func (m *MockedApplicationService) RemoveInvitation(projectID, userID string, invitation entities.Invitation) error
- func (m *MockedApplicationService) RevokeToken(tokenString string) error
- func (m *MockedApplicationService) UpdateConfig(ctx context.Context, key string, value interface{}) error
- func (m *MockedApplicationService) UpdateInvite(projectID, userID string, invitation entities.Invitation, ...) error
- func (m *MockedApplicationService) UpdateMemberRole(projectID, userID string, role *entities.MemberRole) error
- func (m *MockedApplicationService) UpdatePassword(userPassword *entities.UserPassword, isAdminBeingReset bool) error
- func (m *MockedApplicationService) UpdateProjectName(projectID, projectName string) error
- func (m *MockedApplicationService) UpdateProjectState(ctx context.Context, userID string, deactivateTime int64, isDeactivate bool) error
- func (m *MockedApplicationService) UpdateStateTransaction(userRequest entities.UpdateUserState) error
- func (m *MockedApplicationService) UpdateUser(user *entities.UserDetails) error
- func (m *MockedApplicationService) UpdateUserByQuery(filter bson.D, updateQuery bson.D) error
- func (m *MockedApplicationService) UpdateUserState(ctx context.Context, username string, isDeactivate bool, deactivateTime int64) error
- func (m *MockedApplicationService) ValidateToken(encodedToken string) (*jwt.Token, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockAuthRpcServiceClient ¶
ServerGrpc is a mock type for the ServerGrpc type
func (*MockAuthRpcServiceClient) GetProjectById ¶
func (m *MockAuthRpcServiceClient) GetProjectById(ctx context.Context, in *protos.GetProjectByIdRequest, opts ...grpc.CallOption) (*protos.GetProjectByIdResponse, error)
func (*MockAuthRpcServiceClient) GetUserById ¶
func (m *MockAuthRpcServiceClient) GetUserById(ctx context.Context, in *protos.GetUserByIdRequest, opts ...grpc.CallOption) (*protos.GetUserByIdResponse, error)
func (*MockAuthRpcServiceClient) ValidateRequest ¶
func (m *MockAuthRpcServiceClient) ValidateRequest(ctx context.Context, in *protos.ValidationRequest, opts ...grpc.CallOption) (*protos.ValidationResponse, error)
type MockedApplicationService ¶
func (*MockedApplicationService) AddMember ¶
func (m *MockedApplicationService) AddMember(projectID string, member *entities.Member) error
func (*MockedApplicationService) CheckPasswordHash ¶
func (m *MockedApplicationService) CheckPasswordHash(hash, password string) error
func (*MockedApplicationService) CreateApiToken ¶
func (m *MockedApplicationService) CreateApiToken(user *entities.User, request entities.ApiTokenInput) (string, error)
func (*MockedApplicationService) CreateConfig ¶
func (m *MockedApplicationService) CreateConfig(config authConfig.AuthConfig) error
func (*MockedApplicationService) CreateProject ¶
func (m *MockedApplicationService) CreateProject(project *entities.Project) error
func (*MockedApplicationService) CreateUser ¶
func (*MockedApplicationService) DeleteApiToken ¶
func (m *MockedApplicationService) DeleteApiToken(token string) error
func (*MockedApplicationService) DeleteProject ¶
func (m *MockedApplicationService) DeleteProject(projectID string) error
func (*MockedApplicationService) FindUserByUsername ¶
func (m *MockedApplicationService) FindUserByUsername(username string) (*entities.User, error)
func (*MockedApplicationService) FindUsersByUID ¶
func (m *MockedApplicationService) FindUsersByUID(uid []string) (*[]entities.User, error)
func (*MockedApplicationService) GetAggregateProjects ¶
func (m *MockedApplicationService) GetAggregateProjects(pipeline mongo.Pipeline, opts *options.AggregateOptions) (*mongo.Cursor, error)
func (*MockedApplicationService) GetApiTokensByUserID ¶
func (m *MockedApplicationService) GetApiTokensByUserID(userID string) ([]entities.ApiToken, error)
func (*MockedApplicationService) GetConfig ¶
func (m *MockedApplicationService) GetConfig(key string) (*authConfig.AuthConfig, error)
func (*MockedApplicationService) GetOwnerProjectIDs ¶
func (*MockedApplicationService) GetProjectByProjectID ¶
func (m *MockedApplicationService) GetProjectByProjectID(projectID string) (*entities.Project, error)
func (*MockedApplicationService) GetProjectMembers ¶
func (m *MockedApplicationService) GetProjectMembers(projectID, state string) ([]*entities.Member, error)
func (*MockedApplicationService) GetProjectOwners ¶
func (m *MockedApplicationService) GetProjectOwners(projectID string) ([]*entities.Member, error)
func (*MockedApplicationService) GetProjectRole ¶
func (m *MockedApplicationService) GetProjectRole(projectID, userID string) (*entities.MemberRole, error)
func (*MockedApplicationService) GetProjectStats ¶
func (m *MockedApplicationService) GetProjectStats() ([]*entities.ProjectStats, error)
func (*MockedApplicationService) GetProjects ¶
func (*MockedApplicationService) GetProjectsByUserID ¶
func (m *MockedApplicationService) GetProjectsByUserID(request *entities.ListProjectRequest) (*entities.ListProjectResponse, error)
func (*MockedApplicationService) GetSignedJWT ¶
func (*MockedApplicationService) GetUser ¶
func (m *MockedApplicationService) GetUser(uid string) (*entities.User, error)
func (*MockedApplicationService) GetUsers ¶
func (m *MockedApplicationService) GetUsers() (*[]entities.User, error)
func (*MockedApplicationService) InviteUsers ¶
func (m *MockedApplicationService) InviteUsers(invitedUsers []string) (*[]entities.User, error)
func (*MockedApplicationService) IsAdministrator ¶
func (m *MockedApplicationService) IsAdministrator(user *entities.User) error
func (*MockedApplicationService) ListCollection ¶
func (m *MockedApplicationService) ListCollection() ([]string, error)
func (*MockedApplicationService) ListDataBase ¶
func (m *MockedApplicationService) ListDataBase() ([]string, error)
func (*MockedApplicationService) ListInvitations ¶
func (m *MockedApplicationService) ListInvitations(userID string, invitationState entities.Invitation) ([]*entities.Project, error)
func (*MockedApplicationService) RbacValidator ¶
func (m *MockedApplicationService) RbacValidator(userID, resourceID string, rules []string, invitationStatus string) error
func (*MockedApplicationService) RemoveInvitation ¶
func (m *MockedApplicationService) RemoveInvitation(projectID, userID string, invitation entities.Invitation) error
func (*MockedApplicationService) RevokeToken ¶
func (m *MockedApplicationService) RevokeToken(tokenString string) error
func (*MockedApplicationService) UpdateConfig ¶
func (m *MockedApplicationService) UpdateConfig(ctx context.Context, key string, value interface{}) error
func (*MockedApplicationService) UpdateInvite ¶
func (m *MockedApplicationService) UpdateInvite(projectID, userID string, invitation entities.Invitation, role *entities.MemberRole) error
func (*MockedApplicationService) UpdateMemberRole ¶
func (m *MockedApplicationService) UpdateMemberRole(projectID, userID string, role *entities.MemberRole) error
func (*MockedApplicationService) UpdatePassword ¶
func (m *MockedApplicationService) UpdatePassword(userPassword *entities.UserPassword, isAdminBeingReset bool) error
func (*MockedApplicationService) UpdateProjectName ¶
func (m *MockedApplicationService) UpdateProjectName(projectID, projectName string) error
func (*MockedApplicationService) UpdateProjectState ¶
func (*MockedApplicationService) UpdateStateTransaction ¶
func (m *MockedApplicationService) UpdateStateTransaction(userRequest entities.UpdateUserState) error
func (*MockedApplicationService) UpdateUser ¶
func (m *MockedApplicationService) UpdateUser(user *entities.UserDetails) error
func (*MockedApplicationService) UpdateUserByQuery ¶
func (*MockedApplicationService) UpdateUserState ¶
func (*MockedApplicationService) ValidateToken ¶
func (m *MockedApplicationService) ValidateToken(encodedToken string) (*jwt.Token, error)
Click to show internal directories.
Click to hide internal directories.