mocks

package
v0.0.0-...-839d650 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockAuthRpcServiceClient

type MockAuthRpcServiceClient struct {
	mock.Mock
}

ServerGrpc is a mock type for the ServerGrpc type

func (*MockAuthRpcServiceClient) GetProjectById

func (*MockAuthRpcServiceClient) GetUserById

func (*MockAuthRpcServiceClient) ValidateRequest

type MockedApplicationService

type MockedApplicationService struct {
	mock.Mock
}

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 (m *MockedApplicationService) CreateUser(user *entities.User) (*entities.User, error)

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 (*MockedApplicationService) GetOwnerProjectIDs

func (m *MockedApplicationService) GetOwnerProjectIDs(ctx context.Context, userID string) ([]*entities.Project, error)

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 (m *MockedApplicationService) GetProjects(query bson.D) ([]*entities.Project, error)

func (*MockedApplicationService) GetProjectsByUserID

func (*MockedApplicationService) GetSignedJWT

func (m *MockedApplicationService) GetSignedJWT(user *entities.User, jwtSecret string) (string, error)

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) LoginUser

func (m *MockedApplicationService) LoginUser(user *entities.User) (*entities.User, 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 (m *MockedApplicationService) UpdateProjectState(ctx context.Context, userID string, deactivateTime int64, isDeactivate bool) error

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 (m *MockedApplicationService) UpdateUserByQuery(filter bson.D, updateQuery bson.D) error

func (*MockedApplicationService) UpdateUserState

func (m *MockedApplicationService) UpdateUserState(ctx context.Context, username string, isDeactivate bool, deactivateTime int64) error

func (*MockedApplicationService) ValidateToken

func (m *MockedApplicationService) ValidateToken(encodedToken string) (*jwt.Token, error)

Jump to

Keyboard shortcuts

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