Documentation ¶
Index ¶
- type RoleGroupRepository
- func (_m *RoleGroupRepository) CreateRoleGroup(model *repository2.RoleGroup, tx *pg.Tx) (*repository2.RoleGroup, error)
- func (_m *RoleGroupRepository) CreateRoleGroupRoleMapping(model *repository2.RoleGroupRoleMapping, tx *pg.Tx) (*repository2.RoleGroupRoleMapping, error)
- func (_m *RoleGroupRepository) DeleteRoleGroupRoleMapping(model *repository2.RoleGroupRoleMapping, tx *pg.Tx) (bool, error)
- func (_m *RoleGroupRepository) DeleteRoleGroupRoleMappingByRoleId(roleId int, tx *pg.Tx) error
- func (_m *RoleGroupRepository) GetAllRoleGroup() ([]*repository2.RoleGroup, error)
- func (_m *RoleGroupRepository) GetConnection() *pg.DB
- func (_m *RoleGroupRepository) GetRoleGroupById(id int32) (*repository2.RoleGroup, error)
- func (_m *RoleGroupRepository) GetRoleGroupByName(name string) (*repository2.RoleGroup, error)
- func (_m *RoleGroupRepository) GetRoleGroupListByCasbinNames(name []string) ([]*repository2.RoleGroup, error)
- func (_m *RoleGroupRepository) GetRoleGroupListByName(name string) ([]*repository2.RoleGroup, error)
- func (_m *RoleGroupRepository) GetRoleGroupListByNames(groupNames []string) ([]*repository2.RoleGroup, error)
- func (_m *RoleGroupRepository) GetRoleGroupRoleMapping(model int32) (*repository2.RoleGroupRoleMapping, error)
- func (_m *RoleGroupRepository) GetRoleGroupRoleMappingByRoleGroupId(roleGroupId int32) ([]*repository2.RoleGroupRoleMapping, error)
- func (_m *RoleGroupRepository) GetRoleGroupRoleMappingByRoleGroupIds(roleGroupIds []int32) ([]*repository2.RoleModel, error)
- func (_m *RoleGroupRepository) GetRolesByGroupCasbinName(groupName string) ([]*repository2.RoleModel, error)
- func (_m *RoleGroupRepository) GetRolesByGroupNames(groupNames []string) ([]*repository2.RoleModel, error)
- func (_m *RoleGroupRepository) UpdateRoleGroup(model *repository2.RoleGroup, tx *pg.Tx) (*repository2.RoleGroup, error)
- type UserAuthRepository
- func (_m *UserAuthRepository) CreateDefaultHelmPolicies(team string, entityName string, env string, tx *pg.Tx) (bool, error)
- func (_m *UserAuthRepository) CreateDefaultPolicies(team string, entityName string, env string, tx *pg.Tx) (bool, error)
- func (_m *UserAuthRepository) CreateDefaultPoliciesForGlobalEntity(entity string, entityName string, action string, tx *pg.Tx) (bool, error)
- func (_m *UserAuthRepository) CreateRole(userModel *repository2.RoleModel, tx *pg.Tx) (*repository2.RoleModel, error)
- func (_m *UserAuthRepository) CreateRoleForSuperAdminIfNotExists(tx *pg.Tx) (bool, error)
- func (_m *UserAuthRepository) CreateUserRoleMapping(userRoleModel *repository2.UserRoleModel, tx *pg.Tx) (*repository2.UserRoleModel, error)
- func (_m *UserAuthRepository) DeleteRole(role *repository2.RoleModel, tx *pg.Tx) error
- func (_m *UserAuthRepository) DeleteUserRoleByRoleId(roleId int, tx *pg.Tx) error
- func (_m *UserAuthRepository) DeleteUserRoleMapping(userRoleModel *repository2.UserRoleModel, tx *pg.Tx) (bool, error)
- func (_m *UserAuthRepository) GetAllRole() ([]repository2.RoleModel, error)
- func (_m *UserAuthRepository) GetRoleByFilter(entity string, team string, app string, env string, act string, ...) (repository2.RoleModel, error)
- func (_m *UserAuthRepository) GetRoleById(id int) (*repository2.RoleModel, error)
- func (_m *UserAuthRepository) GetRoleByRoles(roles []string) ([]repository2.RoleModel, error)
- func (_m *UserAuthRepository) GetRolesByActionAndAccessType(action string, accessType string) ([]repository2.RoleModel, error)
- func (_m *UserAuthRepository) GetRolesByGroupId(userId int32) ([]*repository2.RoleModel, error)
- func (_m *UserAuthRepository) GetRolesByUserId(userId int32) ([]repository2.RoleModel, error)
- func (_m *UserAuthRepository) GetRolesForApp(appName string) ([]*repository2.RoleModel, error)
- func (_m *UserAuthRepository) GetRolesForChartGroup(chartGroupName string) ([]*repository2.RoleModel, error)
- func (_m *UserAuthRepository) GetRolesForEnvironment(envName string, envIdentifier string) ([]*repository2.RoleModel, error)
- func (_m *UserAuthRepository) GetRolesForProject(teamName string) ([]*repository2.RoleModel, error)
- func (_m *UserAuthRepository) GetUserRoleMappingByUserId(userId int32) ([]*repository2.UserRoleModel, error)
- func (_m *UserAuthRepository) SyncOrchestratorToCasbin(team string, entityName string, env string, tx *pg.Tx) (bool, error)
- func (_m *UserAuthRepository) UpdateTriggerPolicyForTerminalAccess() error
- type UserRepository
- func (_m *UserRepository) CreateUser(userModel *repository.UserModel, tx *pg.Tx) (*repository.UserModel, error)
- func (_m *UserRepository) FetchActiveOrDeletedUserByEmail(email string) (*repository.UserModel, error)
- func (_m *UserRepository) FetchActiveUserByEmail(email string) (bean.UserInfo, error)
- func (_m *UserRepository) FetchUserDetailByEmail(email string) (bean.UserInfo, error)
- func (_m *UserRepository) FetchUserMatchesByEmailIdExcludingApiTokenUser(email string) ([]repository.UserModel, error)
- func (_m *UserRepository) GetAllExcludingApiTokenUser() ([]repository.UserModel, error)
- func (_m *UserRepository) GetById(id int32) (*repository.UserModel, error)
- func (_m *UserRepository) GetByIdIncludeDeleted(id int32) (*repository.UserModel, error)
- func (_m *UserRepository) GetByIds(ids []int32) ([]repository.UserModel, error)
- func (_m *UserRepository) GetConnection() *pg.DB
- func (_m *UserRepository) UpdateUser(userModel *repository.UserModel, tx *pg.Tx) (*repository.UserModel, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RoleGroupRepository ¶
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 *repository2.RoleGroup, tx *pg.Tx) (*repository2.RoleGroup, error)
CreateRoleGroup provides a mock function with given fields: model, tx
func (*RoleGroupRepository) CreateRoleGroupRoleMapping ¶
func (_m *RoleGroupRepository) CreateRoleGroupRoleMapping(model *repository2.RoleGroupRoleMapping, tx *pg.Tx) (*repository2.RoleGroupRoleMapping, error)
CreateRoleGroupRoleMapping provides a mock function with given fields: model, tx
func (*RoleGroupRepository) DeleteRoleGroupRoleMapping ¶
func (_m *RoleGroupRepository) DeleteRoleGroupRoleMapping(model *repository2.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() ([]*repository2.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) (*repository2.RoleGroup, error)
GetRoleGroupById provides a mock function with given fields: id
func (*RoleGroupRepository) GetRoleGroupByName ¶
func (_m *RoleGroupRepository) GetRoleGroupByName(name string) (*repository2.RoleGroup, error)
GetRoleGroupByName provides a mock function with given fields: name
func (*RoleGroupRepository) GetRoleGroupListByCasbinNames ¶
func (_m *RoleGroupRepository) GetRoleGroupListByCasbinNames(name []string) ([]*repository2.RoleGroup, error)
GetRoleGroupListByCasbinNames provides a mock function with given fields: name
func (*RoleGroupRepository) GetRoleGroupListByName ¶
func (_m *RoleGroupRepository) GetRoleGroupListByName(name string) ([]*repository2.RoleGroup, error)
GetRoleGroupListByName provides a mock function with given fields: name
func (*RoleGroupRepository) GetRoleGroupListByNames ¶
func (_m *RoleGroupRepository) GetRoleGroupListByNames(groupNames []string) ([]*repository2.RoleGroup, error)
GetRoleGroupListByNames provides a mock function with given fields: groupNames
func (*RoleGroupRepository) GetRoleGroupRoleMapping ¶
func (_m *RoleGroupRepository) GetRoleGroupRoleMapping(model int32) (*repository2.RoleGroupRoleMapping, error)
GetRoleGroupRoleMapping provides a mock function with given fields: model
func (*RoleGroupRepository) GetRoleGroupRoleMappingByRoleGroupId ¶
func (_m *RoleGroupRepository) GetRoleGroupRoleMappingByRoleGroupId(roleGroupId int32) ([]*repository2.RoleGroupRoleMapping, error)
GetRoleGroupRoleMappingByRoleGroupId provides a mock function with given fields: roleGroupId
func (*RoleGroupRepository) GetRoleGroupRoleMappingByRoleGroupIds ¶
func (_m *RoleGroupRepository) GetRoleGroupRoleMappingByRoleGroupIds(roleGroupIds []int32) ([]*repository2.RoleModel, error)
GetRoleGroupRoleMappingByRoleGroupIds provides a mock function with given fields: roleGroupIds
func (*RoleGroupRepository) GetRolesByGroupCasbinName ¶
func (_m *RoleGroupRepository) GetRolesByGroupCasbinName(groupName string) ([]*repository2.RoleModel, error)
GetRolesByGroupCasbinName provides a mock function with given fields: groupName
func (*RoleGroupRepository) GetRolesByGroupNames ¶
func (_m *RoleGroupRepository) GetRolesByGroupNames(groupNames []string) ([]*repository2.RoleModel, error)
GetRolesByGroupNames provides a mock function with given fields: groupNames
func (*RoleGroupRepository) UpdateRoleGroup ¶
func (_m *RoleGroupRepository) UpdateRoleGroup(model *repository2.RoleGroup, tx *pg.Tx) (*repository2.RoleGroup, error)
UpdateRoleGroup provides a mock function with given fields: model, tx
type UserAuthRepository ¶
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 *repository2.RoleModel, tx *pg.Tx) (*repository2.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 *repository2.UserRoleModel, tx *pg.Tx) (*repository2.UserRoleModel, error)
CreateUserRoleMapping provides a mock function with given fields: userRoleModel, tx
func (*UserAuthRepository) DeleteRole ¶
func (_m *UserAuthRepository) DeleteRole(role *repository2.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 *repository2.UserRoleModel, tx *pg.Tx) (bool, error)
DeleteUserRoleMapping provides a mock function with given fields: userRoleModel, tx
func (*UserAuthRepository) GetAllRole ¶
func (_m *UserAuthRepository) GetAllRole() ([]repository2.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) (repository2.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) (*repository2.RoleModel, error)
GetRoleById provides a mock function with given fields: id
func (*UserAuthRepository) GetRoleByRoles ¶
func (_m *UserAuthRepository) GetRoleByRoles(roles []string) ([]repository2.RoleModel, error)
GetRoleByRoles provides a mock function with given fields: roles
func (*UserAuthRepository) GetRolesByActionAndAccessType ¶
func (_m *UserAuthRepository) GetRolesByActionAndAccessType(action string, accessType string) ([]repository2.RoleModel, error)
GetRolesByActionAndAccessType provides a mock function with given fields: action, accessType
func (*UserAuthRepository) GetRolesByGroupId ¶
func (_m *UserAuthRepository) GetRolesByGroupId(userId int32) ([]*repository2.RoleModel, error)
GetRolesByGroupId provides a mock function with given fields: userId
func (*UserAuthRepository) GetRolesByUserId ¶
func (_m *UserAuthRepository) GetRolesByUserId(userId int32) ([]repository2.RoleModel, error)
GetRolesByUserId provides a mock function with given fields: userId
func (*UserAuthRepository) GetRolesForApp ¶
func (_m *UserAuthRepository) GetRolesForApp(appName string) ([]*repository2.RoleModel, error)
GetRolesForApp provides a mock function with given fields: appName
func (*UserAuthRepository) GetRolesForChartGroup ¶
func (_m *UserAuthRepository) GetRolesForChartGroup(chartGroupName string) ([]*repository2.RoleModel, error)
GetRolesForChartGroup provides a mock function with given fields: chartGroupName
func (*UserAuthRepository) GetRolesForEnvironment ¶
func (_m *UserAuthRepository) GetRolesForEnvironment(envName string, envIdentifier string) ([]*repository2.RoleModel, error)
GetRolesForEnvironment provides a mock function with given fields: envName, envIdentifier
func (*UserAuthRepository) GetRolesForProject ¶
func (_m *UserAuthRepository) GetRolesForProject(teamName string) ([]*repository2.RoleModel, error)
GetRolesForProject provides a mock function with given fields: teamName
func (*UserAuthRepository) GetUserRoleMappingByUserId ¶
func (_m *UserAuthRepository) GetUserRoleMappingByUserId(userId int32) ([]*repository2.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 ¶
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