repomock

package
v0.6.8 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RoleGroupRepository

type RoleGroupRepository struct {
	mock.Mock
}

RoleGroupRepository is an autogenerated mock type for the RoleGroupRepository type

func NewRoleGroupRepository

func NewRoleGroupRepository(t mockConstructorTestingTNewRoleGroupRepository) *RoleGroupRepository

NewRoleGroupRepository creates a new instance of RoleGroupRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*RoleGroupRepository) CreateRoleGroup

func (_m *RoleGroupRepository) CreateRoleGroup(model *repository.RoleGroup, tx *pg.Tx) (*repository.RoleGroup, error)

CreateRoleGroup provides a mock function with given fields: model, tx

func (*RoleGroupRepository) CreateRoleGroupRoleMapping

func (_m *RoleGroupRepository) CreateRoleGroupRoleMapping(model *repository.RoleGroupRoleMapping, tx *pg.Tx) (*repository.RoleGroupRoleMapping, error)

CreateRoleGroupRoleMapping provides a mock function with given fields: model, tx

func (*RoleGroupRepository) DeleteRoleGroupRoleMapping

func (_m *RoleGroupRepository) DeleteRoleGroupRoleMapping(model *repository.RoleGroupRoleMapping, tx *pg.Tx) (bool, error)

DeleteRoleGroupRoleMapping provides a mock function with given fields: model, tx

func (*RoleGroupRepository) DeleteRoleGroupRoleMappingByRoleId

func (_m *RoleGroupRepository) DeleteRoleGroupRoleMappingByRoleId(roleId int, tx *pg.Tx) error

DeleteRoleGroupRoleMappingByRoleId provides a mock function with given fields: roleId, tx

func (*RoleGroupRepository) GetAllRoleGroup

func (_m *RoleGroupRepository) GetAllRoleGroup() ([]*repository.RoleGroup, error)

GetAllRoleGroup provides a mock function with given fields:

func (*RoleGroupRepository) GetConnection

func (_m *RoleGroupRepository) GetConnection() *pg.DB

GetConnection provides a mock function with given fields:

func (*RoleGroupRepository) GetRoleGroupById

func (_m *RoleGroupRepository) GetRoleGroupById(id int32) (*repository.RoleGroup, error)

GetRoleGroupById provides a mock function with given fields: id

func (*RoleGroupRepository) GetRoleGroupByName

func (_m *RoleGroupRepository) GetRoleGroupByName(name string) (*repository.RoleGroup, error)

GetRoleGroupByName provides a mock function with given fields: name

func (*RoleGroupRepository) GetRoleGroupListByCasbinNames

func (_m *RoleGroupRepository) GetRoleGroupListByCasbinNames(name []string) ([]*repository.RoleGroup, error)

GetRoleGroupListByCasbinNames provides a mock function with given fields: name

func (*RoleGroupRepository) GetRoleGroupListByName

func (_m *RoleGroupRepository) GetRoleGroupListByName(name string) ([]*repository.RoleGroup, error)

GetRoleGroupListByName provides a mock function with given fields: name

func (*RoleGroupRepository) GetRoleGroupListByNames

func (_m *RoleGroupRepository) GetRoleGroupListByNames(groupNames []string) ([]*repository.RoleGroup, error)

GetRoleGroupListByNames provides a mock function with given fields: groupNames

func (*RoleGroupRepository) GetRoleGroupRoleMapping

func (_m *RoleGroupRepository) GetRoleGroupRoleMapping(model int32) (*repository.RoleGroupRoleMapping, error)

GetRoleGroupRoleMapping provides a mock function with given fields: model

func (*RoleGroupRepository) GetRoleGroupRoleMappingByRoleGroupId

func (_m *RoleGroupRepository) GetRoleGroupRoleMappingByRoleGroupId(roleGroupId int32) ([]*repository.RoleGroupRoleMapping, error)

GetRoleGroupRoleMappingByRoleGroupId provides a mock function with given fields: roleGroupId

func (*RoleGroupRepository) GetRoleGroupRoleMappingByRoleGroupIds

func (_m *RoleGroupRepository) GetRoleGroupRoleMappingByRoleGroupIds(roleGroupIds []int32) ([]*repository.RoleModel, error)

GetRoleGroupRoleMappingByRoleGroupIds provides a mock function with given fields: roleGroupIds

func (*RoleGroupRepository) GetRolesByGroupCasbinName

func (_m *RoleGroupRepository) GetRolesByGroupCasbinName(groupName string) ([]*repository.RoleModel, error)

GetRolesByGroupCasbinName provides a mock function with given fields: groupName

func (*RoleGroupRepository) GetRolesByGroupNames

func (_m *RoleGroupRepository) GetRolesByGroupNames(groupNames []string) ([]*repository.RoleModel, error)

GetRolesByGroupNames provides a mock function with given fields: groupNames

func (*RoleGroupRepository) UpdateRoleGroup

func (_m *RoleGroupRepository) UpdateRoleGroup(model *repository.RoleGroup, tx *pg.Tx) (*repository.RoleGroup, error)

UpdateRoleGroup provides a mock function with given fields: model, tx

type UserAuthRepository

type UserAuthRepository struct {
	mock.Mock
}

UserAuthRepository is an autogenerated mock type for the UserAuthRepository type

func NewUserAuthRepository

func NewUserAuthRepository(t mockConstructorTestingTNewUserAuthRepository) *UserAuthRepository

NewUserAuthRepository creates a new instance of UserAuthRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*UserAuthRepository) CreateDefaultHelmPolicies

func (_m *UserAuthRepository) CreateDefaultHelmPolicies(team string, entityName string, env string, tx *pg.Tx) (bool, error)

CreateDefaultHelmPolicies provides a mock function with given fields: team, entityName, env, tx

func (*UserAuthRepository) CreateDefaultPolicies

func (_m *UserAuthRepository) CreateDefaultPolicies(team string, entityName string, env string, tx *pg.Tx) (bool, error)

CreateDefaultPolicies provides a mock function with given fields: team, entityName, env, tx

func (*UserAuthRepository) CreateDefaultPoliciesForGlobalEntity

func (_m *UserAuthRepository) CreateDefaultPoliciesForGlobalEntity(entity string, entityName string, action string, tx *pg.Tx) (bool, error)

CreateDefaultPoliciesForGlobalEntity provides a mock function with given fields: entity, entityName, action, tx

func (*UserAuthRepository) CreateRole

func (_m *UserAuthRepository) CreateRole(userModel *repository.RoleModel, tx *pg.Tx) (*repository.RoleModel, error)

CreateRole provides a mock function with given fields: userModel, tx

func (*UserAuthRepository) CreateRoleForSuperAdminIfNotExists

func (_m *UserAuthRepository) CreateRoleForSuperAdminIfNotExists(tx *pg.Tx) (bool, error)

CreateRoleForSuperAdminIfNotExists provides a mock function with given fields: tx

func (*UserAuthRepository) CreateUserRoleMapping

func (_m *UserAuthRepository) CreateUserRoleMapping(userRoleModel *repository.UserRoleModel, tx *pg.Tx) (*repository.UserRoleModel, error)

CreateUserRoleMapping provides a mock function with given fields: userRoleModel, tx

func (*UserAuthRepository) DeleteRole

func (_m *UserAuthRepository) DeleteRole(role *repository.RoleModel, tx *pg.Tx) error

DeleteRole provides a mock function with given fields: role, tx

func (*UserAuthRepository) DeleteUserRoleByRoleId

func (_m *UserAuthRepository) DeleteUserRoleByRoleId(roleId int, tx *pg.Tx) error

DeleteUserRoleByRoleId provides a mock function with given fields: roleId, tx

func (*UserAuthRepository) DeleteUserRoleMapping

func (_m *UserAuthRepository) DeleteUserRoleMapping(userRoleModel *repository.UserRoleModel, tx *pg.Tx) (bool, error)

DeleteUserRoleMapping provides a mock function with given fields: userRoleModel, tx

func (*UserAuthRepository) GetAllRole

func (_m *UserAuthRepository) GetAllRole() ([]repository.RoleModel, error)

GetAllRole provides a mock function with given fields:

func (*UserAuthRepository) GetRoleByFilter

func (_m *UserAuthRepository) GetRoleByFilter(entity string, team string, app string, env string, act string, accessType string) (repository.RoleModel, error)

GetRoleByFilter provides a mock function with given fields: entity, team, app, env, act, accessType

func (*UserAuthRepository) GetRoleById

func (_m *UserAuthRepository) GetRoleById(id int) (*repository.RoleModel, error)

GetRoleById provides a mock function with given fields: id

func (*UserAuthRepository) GetRoleByRoles

func (_m *UserAuthRepository) GetRoleByRoles(roles []string) ([]repository.RoleModel, error)

GetRoleByRoles provides a mock function with given fields: roles

func (*UserAuthRepository) GetRolesByActionAndAccessType

func (_m *UserAuthRepository) GetRolesByActionAndAccessType(action string, accessType string) ([]repository.RoleModel, error)

GetRolesByActionAndAccessType provides a mock function with given fields: action, accessType

func (*UserAuthRepository) GetRolesByGroupId

func (_m *UserAuthRepository) GetRolesByGroupId(userId int32) ([]*repository.RoleModel, error)

GetRolesByGroupId provides a mock function with given fields: userId

func (*UserAuthRepository) GetRolesByUserId

func (_m *UserAuthRepository) GetRolesByUserId(userId int32) ([]repository.RoleModel, error)

GetRolesByUserId provides a mock function with given fields: userId

func (*UserAuthRepository) GetRolesForApp

func (_m *UserAuthRepository) GetRolesForApp(appName string) ([]*repository.RoleModel, error)

GetRolesForApp provides a mock function with given fields: appName

func (*UserAuthRepository) GetRolesForChartGroup

func (_m *UserAuthRepository) GetRolesForChartGroup(chartGroupName string) ([]*repository.RoleModel, error)

GetRolesForChartGroup provides a mock function with given fields: chartGroupName

func (*UserAuthRepository) GetRolesForEnvironment

func (_m *UserAuthRepository) GetRolesForEnvironment(envName string, envIdentifier string) ([]*repository.RoleModel, error)

GetRolesForEnvironment provides a mock function with given fields: envName, envIdentifier

func (*UserAuthRepository) GetRolesForProject

func (_m *UserAuthRepository) GetRolesForProject(teamName string) ([]*repository.RoleModel, error)

GetRolesForProject provides a mock function with given fields: teamName

func (*UserAuthRepository) GetUserRoleMappingByUserId

func (_m *UserAuthRepository) GetUserRoleMappingByUserId(userId int32) ([]*repository.UserRoleModel, error)

GetUserRoleMappingByUserId provides a mock function with given fields: userId

func (*UserAuthRepository) SyncOrchestratorToCasbin

func (_m *UserAuthRepository) SyncOrchestratorToCasbin(team string, entityName string, env string, tx *pg.Tx) (bool, error)

SyncOrchestratorToCasbin provides a mock function with given fields: team, entityName, env, tx

func (*UserAuthRepository) UpdateTriggerPolicyForTerminalAccess

func (_m *UserAuthRepository) UpdateTriggerPolicyForTerminalAccess() error

UpdateTriggerPolicyForTerminalAccess provides a mock function with given fields:

type UserRepository

type UserRepository struct {
	mock.Mock
}

UserRepository is an autogenerated mock type for the UserRepository type

func NewUserRepository

func NewUserRepository(t mockConstructorTestingTNewUserRepository) *UserRepository

NewUserRepository creates a new instance of UserRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*UserRepository) CreateUser

func (_m *UserRepository) CreateUser(userModel *repository.UserModel, tx *pg.Tx) (*repository.UserModel, error)

CreateUser provides a mock function with given fields: userModel, tx

func (*UserRepository) FetchActiveOrDeletedUserByEmail

func (_m *UserRepository) FetchActiveOrDeletedUserByEmail(email string) (*repository.UserModel, error)

FetchActiveOrDeletedUserByEmail provides a mock function with given fields: email

func (*UserRepository) FetchActiveUserByEmail

func (_m *UserRepository) FetchActiveUserByEmail(email string) (bean.UserInfo, error)

FetchActiveUserByEmail provides a mock function with given fields: email

func (*UserRepository) FetchUserDetailByEmail

func (_m *UserRepository) FetchUserDetailByEmail(email string) (bean.UserInfo, error)

FetchUserDetailByEmail provides a mock function with given fields: email

func (*UserRepository) FetchUserMatchesByEmailIdExcludingApiTokenUser

func (_m *UserRepository) FetchUserMatchesByEmailIdExcludingApiTokenUser(email string) ([]repository.UserModel, error)

FetchUserMatchesByEmailIdExcludingApiTokenUser provides a mock function with given fields: email

func (*UserRepository) GetAllExcludingApiTokenUser

func (_m *UserRepository) GetAllExcludingApiTokenUser() ([]repository.UserModel, error)

GetAllExcludingApiTokenUser provides a mock function with given fields:

func (*UserRepository) GetById

func (_m *UserRepository) GetById(id int32) (*repository.UserModel, error)

GetById provides a mock function with given fields: id

func (*UserRepository) GetByIdIncludeDeleted

func (_m *UserRepository) GetByIdIncludeDeleted(id int32) (*repository.UserModel, error)

GetByIdIncludeDeleted provides a mock function with given fields: id

func (*UserRepository) GetByIds

func (_m *UserRepository) GetByIds(ids []int32) ([]repository.UserModel, error)

GetByIds provides a mock function with given fields: ids

func (*UserRepository) GetConnection

func (_m *UserRepository) GetConnection() *pg.DB

GetConnection provides a mock function with given fields:

func (*UserRepository) UpdateUser

func (_m *UserRepository) UpdateUser(userModel *repository.UserModel, tx *pg.Tx) (*repository.UserModel, error)

UpdateUser provides a mock function with given fields: userModel, tx

Jump to

Keyboard shortcuts

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