Documentation
¶
Index ¶
- Constants
- Variables
- type AuditLog
- type BaseEntity
- type Claims
- type Container
- type DecisionMakerAdapter
- type DecisionMakerPod
- type DeleteIntentsRequest
- type EncryptedPassword
- type IntentState
- type K8SAdapter
- type LabelSelector
- type MockDecisionMakerAdapter
- func (_mock *MockDecisionMakerAdapter) DeleteSchedulingIntents(ctx context.Context, decisionMaker *DecisionMakerPod, ...) error
- func (_m *MockDecisionMakerAdapter) EXPECT() *MockDecisionMakerAdapter_Expecter
- func (_mock *MockDecisionMakerAdapter) GetIntentMerkleRoot(ctx context.Context, decisionMaker *DecisionMakerPod) (string, error)
- func (_mock *MockDecisionMakerAdapter) GetPodPIDMapping(ctx context.Context, decisionMaker *DecisionMakerPod) (*PodPIDMappingResponse, error)
- func (_mock *MockDecisionMakerAdapter) SendSchedulingIntent(ctx context.Context, decisionMaker *DecisionMakerPod, ...) error
- type MockDecisionMakerAdapter_DeleteSchedulingIntents_Call
- func (_c *MockDecisionMakerAdapter_DeleteSchedulingIntents_Call) Return(err error) *MockDecisionMakerAdapter_DeleteSchedulingIntents_Call
- func (_c *MockDecisionMakerAdapter_DeleteSchedulingIntents_Call) Run(run func(ctx context.Context, decisionMaker *DecisionMakerPod, ...)) *MockDecisionMakerAdapter_DeleteSchedulingIntents_Call
- func (_c *MockDecisionMakerAdapter_DeleteSchedulingIntents_Call) RunAndReturn(run func(ctx context.Context, decisionMaker *DecisionMakerPod, ...) error) *MockDecisionMakerAdapter_DeleteSchedulingIntents_Call
- type MockDecisionMakerAdapter_Expecter
- func (_e *MockDecisionMakerAdapter_Expecter) DeleteSchedulingIntents(ctx interface{}, decisionMaker interface{}, req interface{}) *MockDecisionMakerAdapter_DeleteSchedulingIntents_Call
- func (_e *MockDecisionMakerAdapter_Expecter) GetIntentMerkleRoot(ctx interface{}, decisionMaker interface{}) *MockDecisionMakerAdapter_GetIntentMerkleRoot_Call
- func (_e *MockDecisionMakerAdapter_Expecter) GetPodPIDMapping(ctx interface{}, decisionMaker interface{}) *MockDecisionMakerAdapter_GetPodPIDMapping_Call
- func (_e *MockDecisionMakerAdapter_Expecter) SendSchedulingIntent(ctx interface{}, decisionMaker interface{}, intents interface{}) *MockDecisionMakerAdapter_SendSchedulingIntent_Call
- type MockDecisionMakerAdapter_GetIntentMerkleRoot_Call
- func (_c *MockDecisionMakerAdapter_GetIntentMerkleRoot_Call) Return(s string, err error) *MockDecisionMakerAdapter_GetIntentMerkleRoot_Call
- func (_c *MockDecisionMakerAdapter_GetIntentMerkleRoot_Call) Run(run func(ctx context.Context, decisionMaker *DecisionMakerPod)) *MockDecisionMakerAdapter_GetIntentMerkleRoot_Call
- func (_c *MockDecisionMakerAdapter_GetIntentMerkleRoot_Call) RunAndReturn(run func(ctx context.Context, decisionMaker *DecisionMakerPod) (string, error)) *MockDecisionMakerAdapter_GetIntentMerkleRoot_Call
- type MockDecisionMakerAdapter_GetPodPIDMapping_Call
- func (_c *MockDecisionMakerAdapter_GetPodPIDMapping_Call) Return(podPIDMappingResponse *PodPIDMappingResponse, err error) *MockDecisionMakerAdapter_GetPodPIDMapping_Call
- func (_c *MockDecisionMakerAdapter_GetPodPIDMapping_Call) Run(run func(ctx context.Context, decisionMaker *DecisionMakerPod)) *MockDecisionMakerAdapter_GetPodPIDMapping_Call
- func (_c *MockDecisionMakerAdapter_GetPodPIDMapping_Call) RunAndReturn(...) *MockDecisionMakerAdapter_GetPodPIDMapping_Call
- type MockDecisionMakerAdapter_SendSchedulingIntent_Call
- func (_c *MockDecisionMakerAdapter_SendSchedulingIntent_Call) Return(err error) *MockDecisionMakerAdapter_SendSchedulingIntent_Call
- func (_c *MockDecisionMakerAdapter_SendSchedulingIntent_Call) Run(run func(ctx context.Context, decisionMaker *DecisionMakerPod, ...)) *MockDecisionMakerAdapter_SendSchedulingIntent_Call
- func (_c *MockDecisionMakerAdapter_SendSchedulingIntent_Call) RunAndReturn(run func(ctx context.Context, decisionMaker *DecisionMakerPod, ...) error) *MockDecisionMakerAdapter_SendSchedulingIntent_Call
- type MockK8SAdapter
- func (_m *MockK8SAdapter) EXPECT() *MockK8SAdapter_Expecter
- func (_mock *MockK8SAdapter) ListNodes(ctx context.Context) ([]*Node, error)
- func (_mock *MockK8SAdapter) QueryDecisionMakerPods(ctx context.Context, opt *QueryDecisionMakerPodsOptions) ([]*DecisionMakerPod, error)
- func (_mock *MockK8SAdapter) QueryPods(ctx context.Context, opt *QueryPodsOptions) ([]*Pod, error)
- type MockK8SAdapter_Expecter
- func (_e *MockK8SAdapter_Expecter) ListNodes(ctx interface{}) *MockK8SAdapter_ListNodes_Call
- func (_e *MockK8SAdapter_Expecter) QueryDecisionMakerPods(ctx interface{}, opt interface{}) *MockK8SAdapter_QueryDecisionMakerPods_Call
- func (_e *MockK8SAdapter_Expecter) QueryPods(ctx interface{}, opt interface{}) *MockK8SAdapter_QueryPods_Call
- type MockK8SAdapter_ListNodes_Call
- func (_c *MockK8SAdapter_ListNodes_Call) Return(nodes []*Node, err error) *MockK8SAdapter_ListNodes_Call
- func (_c *MockK8SAdapter_ListNodes_Call) Run(run func(ctx context.Context)) *MockK8SAdapter_ListNodes_Call
- func (_c *MockK8SAdapter_ListNodes_Call) RunAndReturn(run func(ctx context.Context) ([]*Node, error)) *MockK8SAdapter_ListNodes_Call
- type MockK8SAdapter_QueryDecisionMakerPods_Call
- func (_c *MockK8SAdapter_QueryDecisionMakerPods_Call) Return(decisionMakerPods []*DecisionMakerPod, err error) *MockK8SAdapter_QueryDecisionMakerPods_Call
- func (_c *MockK8SAdapter_QueryDecisionMakerPods_Call) Run(run func(ctx context.Context, opt *QueryDecisionMakerPodsOptions)) *MockK8SAdapter_QueryDecisionMakerPods_Call
- func (_c *MockK8SAdapter_QueryDecisionMakerPods_Call) RunAndReturn(...) *MockK8SAdapter_QueryDecisionMakerPods_Call
- type MockK8SAdapter_QueryPods_Call
- func (_c *MockK8SAdapter_QueryPods_Call) Return(pods []*Pod, err error) *MockK8SAdapter_QueryPods_Call
- func (_c *MockK8SAdapter_QueryPods_Call) Run(run func(ctx context.Context, opt *QueryPodsOptions)) *MockK8SAdapter_QueryPods_Call
- func (_c *MockK8SAdapter_QueryPods_Call) RunAndReturn(run func(ctx context.Context, opt *QueryPodsOptions) ([]*Pod, error)) *MockK8SAdapter_QueryPods_Call
- type MockRepository
- func (_mock *MockRepository) BatchUpdateIntentsState(ctx context.Context, intentIDs []bson.ObjectID, newState IntentState) error
- func (_mock *MockRepository) CreateAuditLog(ctx context.Context, log *AuditLog) error
- func (_mock *MockRepository) CreatePermission(ctx context.Context, permission *Permission) error
- func (_mock *MockRepository) CreateRole(ctx context.Context, role *Role) error
- func (_mock *MockRepository) CreateUser(ctx context.Context, user *User) error
- func (_mock *MockRepository) DeleteIntents(ctx context.Context, intentIDs []bson.ObjectID) error
- func (_mock *MockRepository) DeleteIntentsByStrategyID(ctx context.Context, strategyID bson.ObjectID) error
- func (_mock *MockRepository) DeleteStrategy(ctx context.Context, strategyID bson.ObjectID) error
- func (_m *MockRepository) EXPECT() *MockRepository_Expecter
- func (_mock *MockRepository) InsertIntents(ctx context.Context, intents []*ScheduleIntent) error
- func (_mock *MockRepository) InsertStrategyAndIntents(ctx context.Context, strategy *ScheduleStrategy, intents []*ScheduleIntent) error
- func (_mock *MockRepository) QueryAuditLogs(ctx context.Context, opt *QueryAuditLogOptions) error
- func (_mock *MockRepository) QueryIntents(ctx context.Context, opt *QueryIntentOptions) error
- func (_mock *MockRepository) QueryPermissions(ctx context.Context, opt *QueryPermissionOptions) error
- func (_mock *MockRepository) QueryRoles(ctx context.Context, opt *QueryRoleOptions) error
- func (_mock *MockRepository) QueryStrategies(ctx context.Context, opt *QueryStrategyOptions) error
- func (_mock *MockRepository) QueryUsers(ctx context.Context, opt *QueryUserOptions) error
- func (_mock *MockRepository) UpdatePermission(ctx context.Context, permission *Permission) error
- func (_mock *MockRepository) UpdateRole(ctx context.Context, role *Role) error
- func (_mock *MockRepository) UpdateUser(ctx context.Context, user *User) error
- type MockRepository_BatchUpdateIntentsState_Call
- func (_c *MockRepository_BatchUpdateIntentsState_Call) Return(err error) *MockRepository_BatchUpdateIntentsState_Call
- func (_c *MockRepository_BatchUpdateIntentsState_Call) Run(run func(ctx context.Context, intentIDs []bson.ObjectID, newState IntentState)) *MockRepository_BatchUpdateIntentsState_Call
- func (_c *MockRepository_BatchUpdateIntentsState_Call) RunAndReturn(...) *MockRepository_BatchUpdateIntentsState_Call
- type MockRepository_CreateAuditLog_Call
- func (_c *MockRepository_CreateAuditLog_Call) Return(err error) *MockRepository_CreateAuditLog_Call
- func (_c *MockRepository_CreateAuditLog_Call) Run(run func(ctx context.Context, log *AuditLog)) *MockRepository_CreateAuditLog_Call
- func (_c *MockRepository_CreateAuditLog_Call) RunAndReturn(run func(ctx context.Context, log *AuditLog) error) *MockRepository_CreateAuditLog_Call
- type MockRepository_CreatePermission_Call
- func (_c *MockRepository_CreatePermission_Call) Return(err error) *MockRepository_CreatePermission_Call
- func (_c *MockRepository_CreatePermission_Call) Run(run func(ctx context.Context, permission *Permission)) *MockRepository_CreatePermission_Call
- func (_c *MockRepository_CreatePermission_Call) RunAndReturn(run func(ctx context.Context, permission *Permission) error) *MockRepository_CreatePermission_Call
- type MockRepository_CreateRole_Call
- func (_c *MockRepository_CreateRole_Call) Return(err error) *MockRepository_CreateRole_Call
- func (_c *MockRepository_CreateRole_Call) Run(run func(ctx context.Context, role *Role)) *MockRepository_CreateRole_Call
- func (_c *MockRepository_CreateRole_Call) RunAndReturn(run func(ctx context.Context, role *Role) error) *MockRepository_CreateRole_Call
- type MockRepository_CreateUser_Call
- func (_c *MockRepository_CreateUser_Call) Return(err error) *MockRepository_CreateUser_Call
- func (_c *MockRepository_CreateUser_Call) Run(run func(ctx context.Context, user *User)) *MockRepository_CreateUser_Call
- func (_c *MockRepository_CreateUser_Call) RunAndReturn(run func(ctx context.Context, user *User) error) *MockRepository_CreateUser_Call
- type MockRepository_DeleteIntentsByStrategyID_Call
- func (_c *MockRepository_DeleteIntentsByStrategyID_Call) Return(err error) *MockRepository_DeleteIntentsByStrategyID_Call
- func (_c *MockRepository_DeleteIntentsByStrategyID_Call) Run(run func(ctx context.Context, strategyID bson.ObjectID)) *MockRepository_DeleteIntentsByStrategyID_Call
- func (_c *MockRepository_DeleteIntentsByStrategyID_Call) RunAndReturn(run func(ctx context.Context, strategyID bson.ObjectID) error) *MockRepository_DeleteIntentsByStrategyID_Call
- type MockRepository_DeleteIntents_Call
- func (_c *MockRepository_DeleteIntents_Call) Return(err error) *MockRepository_DeleteIntents_Call
- func (_c *MockRepository_DeleteIntents_Call) Run(run func(ctx context.Context, intentIDs []bson.ObjectID)) *MockRepository_DeleteIntents_Call
- func (_c *MockRepository_DeleteIntents_Call) RunAndReturn(run func(ctx context.Context, intentIDs []bson.ObjectID) error) *MockRepository_DeleteIntents_Call
- type MockRepository_DeleteStrategy_Call
- func (_c *MockRepository_DeleteStrategy_Call) Return(err error) *MockRepository_DeleteStrategy_Call
- func (_c *MockRepository_DeleteStrategy_Call) Run(run func(ctx context.Context, strategyID bson.ObjectID)) *MockRepository_DeleteStrategy_Call
- func (_c *MockRepository_DeleteStrategy_Call) RunAndReturn(run func(ctx context.Context, strategyID bson.ObjectID) error) *MockRepository_DeleteStrategy_Call
- type MockRepository_Expecter
- func (_e *MockRepository_Expecter) BatchUpdateIntentsState(ctx interface{}, intentIDs interface{}, newState interface{}) *MockRepository_BatchUpdateIntentsState_Call
- func (_e *MockRepository_Expecter) CreateAuditLog(ctx interface{}, log interface{}) *MockRepository_CreateAuditLog_Call
- func (_e *MockRepository_Expecter) CreatePermission(ctx interface{}, permission interface{}) *MockRepository_CreatePermission_Call
- func (_e *MockRepository_Expecter) CreateRole(ctx interface{}, role interface{}) *MockRepository_CreateRole_Call
- func (_e *MockRepository_Expecter) CreateUser(ctx interface{}, user interface{}) *MockRepository_CreateUser_Call
- func (_e *MockRepository_Expecter) DeleteIntents(ctx interface{}, intentIDs interface{}) *MockRepository_DeleteIntents_Call
- func (_e *MockRepository_Expecter) DeleteIntentsByStrategyID(ctx interface{}, strategyID interface{}) *MockRepository_DeleteIntentsByStrategyID_Call
- func (_e *MockRepository_Expecter) DeleteStrategy(ctx interface{}, strategyID interface{}) *MockRepository_DeleteStrategy_Call
- func (_e *MockRepository_Expecter) InsertIntents(ctx interface{}, intents interface{}) *MockRepository_InsertIntents_Call
- func (_e *MockRepository_Expecter) InsertStrategyAndIntents(ctx interface{}, strategy interface{}, intents interface{}) *MockRepository_InsertStrategyAndIntents_Call
- func (_e *MockRepository_Expecter) QueryAuditLogs(ctx interface{}, opt interface{}) *MockRepository_QueryAuditLogs_Call
- func (_e *MockRepository_Expecter) QueryIntents(ctx interface{}, opt interface{}) *MockRepository_QueryIntents_Call
- func (_e *MockRepository_Expecter) QueryPermissions(ctx interface{}, opt interface{}) *MockRepository_QueryPermissions_Call
- func (_e *MockRepository_Expecter) QueryRoles(ctx interface{}, opt interface{}) *MockRepository_QueryRoles_Call
- func (_e *MockRepository_Expecter) QueryStrategies(ctx interface{}, opt interface{}) *MockRepository_QueryStrategies_Call
- func (_e *MockRepository_Expecter) QueryUsers(ctx interface{}, opt interface{}) *MockRepository_QueryUsers_Call
- func (_e *MockRepository_Expecter) UpdatePermission(ctx interface{}, permission interface{}) *MockRepository_UpdatePermission_Call
- func (_e *MockRepository_Expecter) UpdateRole(ctx interface{}, role interface{}) *MockRepository_UpdateRole_Call
- func (_e *MockRepository_Expecter) UpdateUser(ctx interface{}, user interface{}) *MockRepository_UpdateUser_Call
- type MockRepository_InsertIntents_Call
- func (_c *MockRepository_InsertIntents_Call) Return(err error) *MockRepository_InsertIntents_Call
- func (_c *MockRepository_InsertIntents_Call) Run(run func(ctx context.Context, intents []*ScheduleIntent)) *MockRepository_InsertIntents_Call
- func (_c *MockRepository_InsertIntents_Call) RunAndReturn(run func(ctx context.Context, intents []*ScheduleIntent) error) *MockRepository_InsertIntents_Call
- type MockRepository_InsertStrategyAndIntents_Call
- func (_c *MockRepository_InsertStrategyAndIntents_Call) Return(err error) *MockRepository_InsertStrategyAndIntents_Call
- func (_c *MockRepository_InsertStrategyAndIntents_Call) Run(...) *MockRepository_InsertStrategyAndIntents_Call
- func (_c *MockRepository_InsertStrategyAndIntents_Call) RunAndReturn(...) *MockRepository_InsertStrategyAndIntents_Call
- type MockRepository_QueryAuditLogs_Call
- func (_c *MockRepository_QueryAuditLogs_Call) Return(err error) *MockRepository_QueryAuditLogs_Call
- func (_c *MockRepository_QueryAuditLogs_Call) Run(run func(ctx context.Context, opt *QueryAuditLogOptions)) *MockRepository_QueryAuditLogs_Call
- func (_c *MockRepository_QueryAuditLogs_Call) RunAndReturn(run func(ctx context.Context, opt *QueryAuditLogOptions) error) *MockRepository_QueryAuditLogs_Call
- type MockRepository_QueryIntents_Call
- func (_c *MockRepository_QueryIntents_Call) Return(err error) *MockRepository_QueryIntents_Call
- func (_c *MockRepository_QueryIntents_Call) Run(run func(ctx context.Context, opt *QueryIntentOptions)) *MockRepository_QueryIntents_Call
- func (_c *MockRepository_QueryIntents_Call) RunAndReturn(run func(ctx context.Context, opt *QueryIntentOptions) error) *MockRepository_QueryIntents_Call
- type MockRepository_QueryPermissions_Call
- func (_c *MockRepository_QueryPermissions_Call) Return(err error) *MockRepository_QueryPermissions_Call
- func (_c *MockRepository_QueryPermissions_Call) Run(run func(ctx context.Context, opt *QueryPermissionOptions)) *MockRepository_QueryPermissions_Call
- func (_c *MockRepository_QueryPermissions_Call) RunAndReturn(run func(ctx context.Context, opt *QueryPermissionOptions) error) *MockRepository_QueryPermissions_Call
- type MockRepository_QueryRoles_Call
- func (_c *MockRepository_QueryRoles_Call) Return(err error) *MockRepository_QueryRoles_Call
- func (_c *MockRepository_QueryRoles_Call) Run(run func(ctx context.Context, opt *QueryRoleOptions)) *MockRepository_QueryRoles_Call
- func (_c *MockRepository_QueryRoles_Call) RunAndReturn(run func(ctx context.Context, opt *QueryRoleOptions) error) *MockRepository_QueryRoles_Call
- type MockRepository_QueryStrategies_Call
- func (_c *MockRepository_QueryStrategies_Call) Return(err error) *MockRepository_QueryStrategies_Call
- func (_c *MockRepository_QueryStrategies_Call) Run(run func(ctx context.Context, opt *QueryStrategyOptions)) *MockRepository_QueryStrategies_Call
- func (_c *MockRepository_QueryStrategies_Call) RunAndReturn(run func(ctx context.Context, opt *QueryStrategyOptions) error) *MockRepository_QueryStrategies_Call
- type MockRepository_QueryUsers_Call
- func (_c *MockRepository_QueryUsers_Call) Return(err error) *MockRepository_QueryUsers_Call
- func (_c *MockRepository_QueryUsers_Call) Run(run func(ctx context.Context, opt *QueryUserOptions)) *MockRepository_QueryUsers_Call
- func (_c *MockRepository_QueryUsers_Call) RunAndReturn(run func(ctx context.Context, opt *QueryUserOptions) error) *MockRepository_QueryUsers_Call
- type MockRepository_UpdatePermission_Call
- func (_c *MockRepository_UpdatePermission_Call) Return(err error) *MockRepository_UpdatePermission_Call
- func (_c *MockRepository_UpdatePermission_Call) Run(run func(ctx context.Context, permission *Permission)) *MockRepository_UpdatePermission_Call
- func (_c *MockRepository_UpdatePermission_Call) RunAndReturn(run func(ctx context.Context, permission *Permission) error) *MockRepository_UpdatePermission_Call
- type MockRepository_UpdateRole_Call
- func (_c *MockRepository_UpdateRole_Call) Return(err error) *MockRepository_UpdateRole_Call
- func (_c *MockRepository_UpdateRole_Call) Run(run func(ctx context.Context, role *Role)) *MockRepository_UpdateRole_Call
- func (_c *MockRepository_UpdateRole_Call) RunAndReturn(run func(ctx context.Context, role *Role) error) *MockRepository_UpdateRole_Call
- type MockRepository_UpdateUser_Call
- func (_c *MockRepository_UpdateUser_Call) Return(err error) *MockRepository_UpdateUser_Call
- func (_c *MockRepository_UpdateUser_Call) Run(run func(ctx context.Context, user *User)) *MockRepository_UpdateUser_Call
- func (_c *MockRepository_UpdateUser_Call) RunAndReturn(run func(ctx context.Context, user *User) error) *MockRepository_UpdateUser_Call
- type MockService
- func (_mock *MockService) ChangePassword(ctx context.Context, user *Claims, oldPassword string, newPassword string) error
- func (_mock *MockService) CreateAdminUserIfNotExists(ctx context.Context, username string, password string) error
- func (_mock *MockService) CreateNewUser(ctx context.Context, operator *Claims, username string, password string) error
- func (_mock *MockService) CreateRole(ctx context.Context, operator *Claims, role *Role) error
- func (_mock *MockService) CreateScheduleStrategy(ctx context.Context, operator *Claims, strategy *ScheduleStrategy) error
- func (_mock *MockService) DeleteRole(ctx context.Context, operator *Claims, roleID string) error
- func (_mock *MockService) DeleteScheduleIntents(ctx context.Context, operator *Claims, intentIDs []string) error
- func (_mock *MockService) DeleteScheduleStrategy(ctx context.Context, operator *Claims, strategyID string) error
- func (_m *MockService) EXPECT() *MockService_Expecter
- func (_mock *MockService) GetPodPIDMapping(ctx context.Context, nodeID string) (*PodPIDMappingResponse, error)
- func (_mock *MockService) ListNodes(ctx context.Context) ([]*Node, error)
- func (_mock *MockService) ListScheduleIntents(ctx context.Context, filterOpts *QueryIntentOptions) error
- func (_mock *MockService) ListScheduleStrategies(ctx context.Context, filterOpts *QueryStrategyOptions) error
- func (_mock *MockService) Login(ctx context.Context, email string, password string) (string, error)
- func (_mock *MockService) QueryPermissions(ctx context.Context, opt *QueryPermissionOptions) error
- func (_mock *MockService) QueryRoles(ctx context.Context, opt *QueryRoleOptions) error
- func (_mock *MockService) QueryUsers(ctx context.Context, opt *QueryUserOptions) error
- func (_mock *MockService) ReconcileIntents(ctx context.Context) error
- func (_mock *MockService) ResetPassword(ctx context.Context, operator *Claims, id string, newPassword string) error
- func (_mock *MockService) UpdateRole(ctx context.Context, operator *Claims, roleID string, opt UpdateRoleOptions) error
- func (_mock *MockService) UpdateUserPermissions(ctx context.Context, operator *Claims, id string, ...) error
- func (_mock *MockService) VerifyJWTToken(ctx context.Context, tokenString string, permissionKey PermissionKey) (Claims, RolePolicy, error)
- type MockService_ChangePassword_Call
- type MockService_CreateAdminUserIfNotExists_Call
- func (_c *MockService_CreateAdminUserIfNotExists_Call) Return(err error) *MockService_CreateAdminUserIfNotExists_Call
- func (_c *MockService_CreateAdminUserIfNotExists_Call) Run(run func(ctx context.Context, username string, password string)) *MockService_CreateAdminUserIfNotExists_Call
- func (_c *MockService_CreateAdminUserIfNotExists_Call) RunAndReturn(run func(ctx context.Context, username string, password string) error) *MockService_CreateAdminUserIfNotExists_Call
- type MockService_CreateNewUser_Call
- type MockService_CreateRole_Call
- func (_c *MockService_CreateRole_Call) Return(err error) *MockService_CreateRole_Call
- func (_c *MockService_CreateRole_Call) Run(run func(ctx context.Context, operator *Claims, role *Role)) *MockService_CreateRole_Call
- func (_c *MockService_CreateRole_Call) RunAndReturn(run func(ctx context.Context, operator *Claims, role *Role) error) *MockService_CreateRole_Call
- type MockService_CreateScheduleStrategy_Call
- func (_c *MockService_CreateScheduleStrategy_Call) Return(err error) *MockService_CreateScheduleStrategy_Call
- func (_c *MockService_CreateScheduleStrategy_Call) Run(run func(ctx context.Context, operator *Claims, strategy *ScheduleStrategy)) *MockService_CreateScheduleStrategy_Call
- func (_c *MockService_CreateScheduleStrategy_Call) RunAndReturn(...) *MockService_CreateScheduleStrategy_Call
- type MockService_DeleteRole_Call
- func (_c *MockService_DeleteRole_Call) Return(err error) *MockService_DeleteRole_Call
- func (_c *MockService_DeleteRole_Call) Run(run func(ctx context.Context, operator *Claims, roleID string)) *MockService_DeleteRole_Call
- func (_c *MockService_DeleteRole_Call) RunAndReturn(run func(ctx context.Context, operator *Claims, roleID string) error) *MockService_DeleteRole_Call
- type MockService_DeleteScheduleIntents_Call
- func (_c *MockService_DeleteScheduleIntents_Call) Return(err error) *MockService_DeleteScheduleIntents_Call
- func (_c *MockService_DeleteScheduleIntents_Call) Run(run func(ctx context.Context, operator *Claims, intentIDs []string)) *MockService_DeleteScheduleIntents_Call
- func (_c *MockService_DeleteScheduleIntents_Call) RunAndReturn(run func(ctx context.Context, operator *Claims, intentIDs []string) error) *MockService_DeleteScheduleIntents_Call
- type MockService_DeleteScheduleStrategy_Call
- func (_c *MockService_DeleteScheduleStrategy_Call) Return(err error) *MockService_DeleteScheduleStrategy_Call
- func (_c *MockService_DeleteScheduleStrategy_Call) Run(run func(ctx context.Context, operator *Claims, strategyID string)) *MockService_DeleteScheduleStrategy_Call
- func (_c *MockService_DeleteScheduleStrategy_Call) RunAndReturn(run func(ctx context.Context, operator *Claims, strategyID string) error) *MockService_DeleteScheduleStrategy_Call
- type MockService_Expecter
- func (_e *MockService_Expecter) ChangePassword(ctx interface{}, user interface{}, oldPassword interface{}, ...) *MockService_ChangePassword_Call
- func (_e *MockService_Expecter) CreateAdminUserIfNotExists(ctx interface{}, username interface{}, password interface{}) *MockService_CreateAdminUserIfNotExists_Call
- func (_e *MockService_Expecter) CreateNewUser(ctx interface{}, operator interface{}, username interface{}, ...) *MockService_CreateNewUser_Call
- func (_e *MockService_Expecter) CreateRole(ctx interface{}, operator interface{}, role interface{}) *MockService_CreateRole_Call
- func (_e *MockService_Expecter) CreateScheduleStrategy(ctx interface{}, operator interface{}, strategy interface{}) *MockService_CreateScheduleStrategy_Call
- func (_e *MockService_Expecter) DeleteRole(ctx interface{}, operator interface{}, roleID interface{}) *MockService_DeleteRole_Call
- func (_e *MockService_Expecter) DeleteScheduleIntents(ctx interface{}, operator interface{}, intentIDs interface{}) *MockService_DeleteScheduleIntents_Call
- func (_e *MockService_Expecter) DeleteScheduleStrategy(ctx interface{}, operator interface{}, strategyID interface{}) *MockService_DeleteScheduleStrategy_Call
- func (_e *MockService_Expecter) GetPodPIDMapping(ctx interface{}, nodeID interface{}) *MockService_GetPodPIDMapping_Call
- func (_e *MockService_Expecter) ListNodes(ctx interface{}) *MockService_ListNodes_Call
- func (_e *MockService_Expecter) ListScheduleIntents(ctx interface{}, filterOpts interface{}) *MockService_ListScheduleIntents_Call
- func (_e *MockService_Expecter) ListScheduleStrategies(ctx interface{}, filterOpts interface{}) *MockService_ListScheduleStrategies_Call
- func (_e *MockService_Expecter) Login(ctx interface{}, email interface{}, password interface{}) *MockService_Login_Call
- func (_e *MockService_Expecter) QueryPermissions(ctx interface{}, opt interface{}) *MockService_QueryPermissions_Call
- func (_e *MockService_Expecter) QueryRoles(ctx interface{}, opt interface{}) *MockService_QueryRoles_Call
- func (_e *MockService_Expecter) QueryUsers(ctx interface{}, opt interface{}) *MockService_QueryUsers_Call
- func (_e *MockService_Expecter) ReconcileIntents(ctx interface{}) *MockService_ReconcileIntents_Call
- func (_e *MockService_Expecter) ResetPassword(ctx interface{}, operator interface{}, id interface{}, newPassword interface{}) *MockService_ResetPassword_Call
- func (_e *MockService_Expecter) UpdateRole(ctx interface{}, operator interface{}, roleID interface{}, opt interface{}) *MockService_UpdateRole_Call
- func (_e *MockService_Expecter) UpdateUserPermissions(ctx interface{}, operator interface{}, id interface{}, opt interface{}) *MockService_UpdateUserPermissions_Call
- func (_e *MockService_Expecter) VerifyJWTToken(ctx interface{}, tokenString interface{}, permissionKey interface{}) *MockService_VerifyJWTToken_Call
- type MockService_GetPodPIDMapping_Call
- func (_c *MockService_GetPodPIDMapping_Call) Return(podPIDMappingResponse *PodPIDMappingResponse, err error) *MockService_GetPodPIDMapping_Call
- func (_c *MockService_GetPodPIDMapping_Call) Run(run func(ctx context.Context, nodeID string)) *MockService_GetPodPIDMapping_Call
- func (_c *MockService_GetPodPIDMapping_Call) RunAndReturn(run func(ctx context.Context, nodeID string) (*PodPIDMappingResponse, error)) *MockService_GetPodPIDMapping_Call
- type MockService_ListNodes_Call
- func (_c *MockService_ListNodes_Call) Return(nodes []*Node, err error) *MockService_ListNodes_Call
- func (_c *MockService_ListNodes_Call) Run(run func(ctx context.Context)) *MockService_ListNodes_Call
- func (_c *MockService_ListNodes_Call) RunAndReturn(run func(ctx context.Context) ([]*Node, error)) *MockService_ListNodes_Call
- type MockService_ListScheduleIntents_Call
- func (_c *MockService_ListScheduleIntents_Call) Return(err error) *MockService_ListScheduleIntents_Call
- func (_c *MockService_ListScheduleIntents_Call) Run(run func(ctx context.Context, filterOpts *QueryIntentOptions)) *MockService_ListScheduleIntents_Call
- func (_c *MockService_ListScheduleIntents_Call) RunAndReturn(run func(ctx context.Context, filterOpts *QueryIntentOptions) error) *MockService_ListScheduleIntents_Call
- type MockService_ListScheduleStrategies_Call
- func (_c *MockService_ListScheduleStrategies_Call) Return(err error) *MockService_ListScheduleStrategies_Call
- func (_c *MockService_ListScheduleStrategies_Call) Run(run func(ctx context.Context, filterOpts *QueryStrategyOptions)) *MockService_ListScheduleStrategies_Call
- func (_c *MockService_ListScheduleStrategies_Call) RunAndReturn(run func(ctx context.Context, filterOpts *QueryStrategyOptions) error) *MockService_ListScheduleStrategies_Call
- type MockService_Login_Call
- func (_c *MockService_Login_Call) Return(token string, err error) *MockService_Login_Call
- func (_c *MockService_Login_Call) Run(run func(ctx context.Context, email string, password string)) *MockService_Login_Call
- func (_c *MockService_Login_Call) RunAndReturn(run func(ctx context.Context, email string, password string) (string, error)) *MockService_Login_Call
- type MockService_QueryPermissions_Call
- func (_c *MockService_QueryPermissions_Call) Return(err error) *MockService_QueryPermissions_Call
- func (_c *MockService_QueryPermissions_Call) Run(run func(ctx context.Context, opt *QueryPermissionOptions)) *MockService_QueryPermissions_Call
- func (_c *MockService_QueryPermissions_Call) RunAndReturn(run func(ctx context.Context, opt *QueryPermissionOptions) error) *MockService_QueryPermissions_Call
- type MockService_QueryRoles_Call
- func (_c *MockService_QueryRoles_Call) Return(err error) *MockService_QueryRoles_Call
- func (_c *MockService_QueryRoles_Call) Run(run func(ctx context.Context, opt *QueryRoleOptions)) *MockService_QueryRoles_Call
- func (_c *MockService_QueryRoles_Call) RunAndReturn(run func(ctx context.Context, opt *QueryRoleOptions) error) *MockService_QueryRoles_Call
- type MockService_QueryUsers_Call
- func (_c *MockService_QueryUsers_Call) Return(err error) *MockService_QueryUsers_Call
- func (_c *MockService_QueryUsers_Call) Run(run func(ctx context.Context, opt *QueryUserOptions)) *MockService_QueryUsers_Call
- func (_c *MockService_QueryUsers_Call) RunAndReturn(run func(ctx context.Context, opt *QueryUserOptions) error) *MockService_QueryUsers_Call
- type MockService_ReconcileIntents_Call
- func (_c *MockService_ReconcileIntents_Call) Return(err error) *MockService_ReconcileIntents_Call
- func (_c *MockService_ReconcileIntents_Call) Run(run func(ctx context.Context)) *MockService_ReconcileIntents_Call
- func (_c *MockService_ReconcileIntents_Call) RunAndReturn(run func(ctx context.Context) error) *MockService_ReconcileIntents_Call
- type MockService_ResetPassword_Call
- func (_c *MockService_ResetPassword_Call) Return(err error) *MockService_ResetPassword_Call
- func (_c *MockService_ResetPassword_Call) Run(run func(ctx context.Context, operator *Claims, id string, newPassword string)) *MockService_ResetPassword_Call
- func (_c *MockService_ResetPassword_Call) RunAndReturn(...) *MockService_ResetPassword_Call
- type MockService_UpdateRole_Call
- type MockService_UpdateUserPermissions_Call
- func (_c *MockService_UpdateUserPermissions_Call) Return(err error) *MockService_UpdateUserPermissions_Call
- func (_c *MockService_UpdateUserPermissions_Call) Run(run func(ctx context.Context, operator *Claims, id string, ...)) *MockService_UpdateUserPermissions_Call
- func (_c *MockService_UpdateUserPermissions_Call) RunAndReturn(run func(ctx context.Context, operator *Claims, id string, ...) error) *MockService_UpdateUserPermissions_Call
- type MockService_VerifyJWTToken_Call
- func (_c *MockService_VerifyJWTToken_Call) Return(claims Claims, rolePolicy RolePolicy, err error) *MockService_VerifyJWTToken_Call
- func (_c *MockService_VerifyJWTToken_Call) Run(run func(ctx context.Context, tokenString string, permissionKey PermissionKey)) *MockService_VerifyJWTToken_Call
- func (_c *MockService_VerifyJWTToken_Call) RunAndReturn(...) *MockService_VerifyJWTToken_Call
- type Node
- type NodeState
- type Permission
- type PermissionAction
- type PermissionKey
- type Pod
- type PodPIDInfo
- type PodPIDMappingResponse
- type PodProcess
- type QueryAuditLogOptions
- type QueryDecisionMakerPodsOptions
- type QueryIntentOptions
- type QueryPermissionOptions
- type QueryPodsOptions
- type QueryRoleOptions
- type QueryStrategyOptions
- type QueryUserOptions
- type Repository
- type Role
- type RolePolicy
- type ScheduleIntent
- type ScheduleStrategy
- type Service
- type UpdateRoleOptions
- type UpdateUserPermissionsOptions
- type User
- type UserStatus
Constants ¶
const (
AdminRole = "admin"
)
Variables ¶
Functions ¶
This section is empty.
Types ¶
type BaseEntity ¶
type BaseEntity struct {
ID bson.ObjectID `bson:"_id,omitempty"`
CreatedTime int64 `bson:"createdTime,omitempty"`
UpdatedTime int64 `bson:"updatedTime,omitempty"`
DeletedTime int64 `bson:"deletedTime,omitempty"`
CreatorID bson.ObjectID `bson:"creatorID,omitempty"`
UpdaterID bson.ObjectID `bson:"updaterID,omitempty"`
}
func NewBaseEntity ¶
func NewBaseEntity(creatorID, updaterID *bson.ObjectID) BaseEntity
type Claims ¶
type Claims struct {
UID string `json:"uid"`
NeedChangePassword bool `json:"needChangePassword"`
jwt.RegisteredClaims
}
Claims represents JWT token claims
type DecisionMakerAdapter ¶
type DecisionMakerAdapter interface {
SendSchedulingIntent(ctx context.Context, decisionMaker *DecisionMakerPod, intents []*ScheduleIntent) error
GetIntentMerkleRoot(ctx context.Context, decisionMaker *DecisionMakerPod) (string, error)
DeleteSchedulingIntents(ctx context.Context, decisionMaker *DecisionMakerPod, req *DeleteIntentsRequest) error
GetPodPIDMapping(ctx context.Context, decisionMaker *DecisionMakerPod) (*PodPIDMappingResponse, error)
}
type DecisionMakerPod ¶
func (*DecisionMakerPod) String ¶
func (d *DecisionMakerPod) String() string
type DeleteIntentsRequest ¶ added in v1.1.0
type EncryptedPassword ¶
type EncryptedPassword string
func (EncryptedPassword) MarshalBSONValue ¶
func (value EncryptedPassword) MarshalBSONValue() (typ byte, data []byte, err error)
func (EncryptedPassword) String ¶
func (value EncryptedPassword) String() string
func (*EncryptedPassword) UnmarshalBSONValue ¶
func (value *EncryptedPassword) UnmarshalBSONValue(typ byte, data []byte) error
type IntentState ¶
type IntentState int8
const ( IntentStateUnknown IntentState = iota IntentStateInitialized IntentStateSent )
type K8SAdapter ¶
type K8SAdapter interface {
QueryPods(ctx context.Context, opt *QueryPodsOptions) ([]*Pod, error)
QueryDecisionMakerPods(ctx context.Context, opt *QueryDecisionMakerPodsOptions) ([]*DecisionMakerPod, error)
ListNodes(ctx context.Context) ([]*Node, error)
}
type LabelSelector ¶
type MockDecisionMakerAdapter ¶
MockDecisionMakerAdapter is an autogenerated mock type for the DecisionMakerAdapter type
func NewMockDecisionMakerAdapter ¶
func NewMockDecisionMakerAdapter(t interface {
mock.TestingT
Cleanup(func())
}) *MockDecisionMakerAdapter
NewMockDecisionMakerAdapter creates a new instance of MockDecisionMakerAdapter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockDecisionMakerAdapter) DeleteSchedulingIntents ¶ added in v1.1.0
func (_mock *MockDecisionMakerAdapter) DeleteSchedulingIntents(ctx context.Context, decisionMaker *DecisionMakerPod, req *DeleteIntentsRequest) error
DeleteSchedulingIntents provides a mock function for the type MockDecisionMakerAdapter
func (*MockDecisionMakerAdapter) EXPECT ¶
func (_m *MockDecisionMakerAdapter) EXPECT() *MockDecisionMakerAdapter_Expecter
func (*MockDecisionMakerAdapter) GetIntentMerkleRoot ¶ added in v1.2.0
func (_mock *MockDecisionMakerAdapter) GetIntentMerkleRoot(ctx context.Context, decisionMaker *DecisionMakerPod) (string, error)
GetIntentMerkleRoot provides a mock function for the type MockDecisionMakerAdapter
func (*MockDecisionMakerAdapter) GetPodPIDMapping ¶ added in v1.2.0
func (_mock *MockDecisionMakerAdapter) GetPodPIDMapping(ctx context.Context, decisionMaker *DecisionMakerPod) (*PodPIDMappingResponse, error)
GetPodPIDMapping provides a mock function for the type MockDecisionMakerAdapter
func (*MockDecisionMakerAdapter) SendSchedulingIntent ¶
func (_mock *MockDecisionMakerAdapter) SendSchedulingIntent(ctx context.Context, decisionMaker *DecisionMakerPod, intents []*ScheduleIntent) error
SendSchedulingIntent provides a mock function for the type MockDecisionMakerAdapter
type MockDecisionMakerAdapter_DeleteSchedulingIntents_Call ¶ added in v1.1.0
MockDecisionMakerAdapter_DeleteSchedulingIntents_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteSchedulingIntents'
func (*MockDecisionMakerAdapter_DeleteSchedulingIntents_Call) Run ¶ added in v1.1.0
func (_c *MockDecisionMakerAdapter_DeleteSchedulingIntents_Call) Run(run func(ctx context.Context, decisionMaker *DecisionMakerPod, req *DeleteIntentsRequest)) *MockDecisionMakerAdapter_DeleteSchedulingIntents_Call
func (*MockDecisionMakerAdapter_DeleteSchedulingIntents_Call) RunAndReturn ¶ added in v1.1.0
func (_c *MockDecisionMakerAdapter_DeleteSchedulingIntents_Call) RunAndReturn(run func(ctx context.Context, decisionMaker *DecisionMakerPod, req *DeleteIntentsRequest) error) *MockDecisionMakerAdapter_DeleteSchedulingIntents_Call
type MockDecisionMakerAdapter_Expecter ¶
type MockDecisionMakerAdapter_Expecter struct {
// contains filtered or unexported fields
}
func (*MockDecisionMakerAdapter_Expecter) DeleteSchedulingIntents ¶ added in v1.1.0
func (_e *MockDecisionMakerAdapter_Expecter) DeleteSchedulingIntents(ctx interface{}, decisionMaker interface{}, req interface{}) *MockDecisionMakerAdapter_DeleteSchedulingIntents_Call
DeleteSchedulingIntents is a helper method to define mock.On call
- ctx context.Context
- decisionMaker *DecisionMakerPod
- req *DeleteIntentsRequest
func (*MockDecisionMakerAdapter_Expecter) GetIntentMerkleRoot ¶ added in v1.2.0
func (_e *MockDecisionMakerAdapter_Expecter) GetIntentMerkleRoot(ctx interface{}, decisionMaker interface{}) *MockDecisionMakerAdapter_GetIntentMerkleRoot_Call
GetIntentMerkleRoot is a helper method to define mock.On call
- ctx context.Context
- decisionMaker *DecisionMakerPod
func (*MockDecisionMakerAdapter_Expecter) GetPodPIDMapping ¶ added in v1.2.0
func (_e *MockDecisionMakerAdapter_Expecter) GetPodPIDMapping(ctx interface{}, decisionMaker interface{}) *MockDecisionMakerAdapter_GetPodPIDMapping_Call
GetPodPIDMapping is a helper method to define mock.On call
- ctx context.Context
- decisionMaker *DecisionMakerPod
func (*MockDecisionMakerAdapter_Expecter) SendSchedulingIntent ¶
func (_e *MockDecisionMakerAdapter_Expecter) SendSchedulingIntent(ctx interface{}, decisionMaker interface{}, intents interface{}) *MockDecisionMakerAdapter_SendSchedulingIntent_Call
SendSchedulingIntent is a helper method to define mock.On call
- ctx context.Context
- decisionMaker *DecisionMakerPod
- intents []*ScheduleIntent
type MockDecisionMakerAdapter_GetIntentMerkleRoot_Call ¶ added in v1.2.0
MockDecisionMakerAdapter_GetIntentMerkleRoot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetIntentMerkleRoot'
func (*MockDecisionMakerAdapter_GetIntentMerkleRoot_Call) Return ¶ added in v1.2.0
func (_c *MockDecisionMakerAdapter_GetIntentMerkleRoot_Call) Return(s string, err error) *MockDecisionMakerAdapter_GetIntentMerkleRoot_Call
func (*MockDecisionMakerAdapter_GetIntentMerkleRoot_Call) Run ¶ added in v1.2.0
func (_c *MockDecisionMakerAdapter_GetIntentMerkleRoot_Call) Run(run func(ctx context.Context, decisionMaker *DecisionMakerPod)) *MockDecisionMakerAdapter_GetIntentMerkleRoot_Call
func (*MockDecisionMakerAdapter_GetIntentMerkleRoot_Call) RunAndReturn ¶ added in v1.2.0
func (_c *MockDecisionMakerAdapter_GetIntentMerkleRoot_Call) RunAndReturn(run func(ctx context.Context, decisionMaker *DecisionMakerPod) (string, error)) *MockDecisionMakerAdapter_GetIntentMerkleRoot_Call
type MockDecisionMakerAdapter_GetPodPIDMapping_Call ¶ added in v1.2.0
MockDecisionMakerAdapter_GetPodPIDMapping_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPodPIDMapping'
func (*MockDecisionMakerAdapter_GetPodPIDMapping_Call) Return ¶ added in v1.2.0
func (_c *MockDecisionMakerAdapter_GetPodPIDMapping_Call) Return(podPIDMappingResponse *PodPIDMappingResponse, err error) *MockDecisionMakerAdapter_GetPodPIDMapping_Call
func (*MockDecisionMakerAdapter_GetPodPIDMapping_Call) Run ¶ added in v1.2.0
func (_c *MockDecisionMakerAdapter_GetPodPIDMapping_Call) Run(run func(ctx context.Context, decisionMaker *DecisionMakerPod)) *MockDecisionMakerAdapter_GetPodPIDMapping_Call
func (*MockDecisionMakerAdapter_GetPodPIDMapping_Call) RunAndReturn ¶ added in v1.2.0
func (_c *MockDecisionMakerAdapter_GetPodPIDMapping_Call) RunAndReturn(run func(ctx context.Context, decisionMaker *DecisionMakerPod) (*PodPIDMappingResponse, error)) *MockDecisionMakerAdapter_GetPodPIDMapping_Call
type MockDecisionMakerAdapter_SendSchedulingIntent_Call ¶
MockDecisionMakerAdapter_SendSchedulingIntent_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SendSchedulingIntent'
func (*MockDecisionMakerAdapter_SendSchedulingIntent_Call) Run ¶
func (_c *MockDecisionMakerAdapter_SendSchedulingIntent_Call) Run(run func(ctx context.Context, decisionMaker *DecisionMakerPod, intents []*ScheduleIntent)) *MockDecisionMakerAdapter_SendSchedulingIntent_Call
func (*MockDecisionMakerAdapter_SendSchedulingIntent_Call) RunAndReturn ¶
func (_c *MockDecisionMakerAdapter_SendSchedulingIntent_Call) RunAndReturn(run func(ctx context.Context, decisionMaker *DecisionMakerPod, intents []*ScheduleIntent) error) *MockDecisionMakerAdapter_SendSchedulingIntent_Call
type MockK8SAdapter ¶
MockK8SAdapter is an autogenerated mock type for the K8SAdapter type
func NewMockK8SAdapter ¶
func NewMockK8SAdapter(t interface {
mock.TestingT
Cleanup(func())
}) *MockK8SAdapter
NewMockK8SAdapter creates a new instance of MockK8SAdapter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockK8SAdapter) EXPECT ¶
func (_m *MockK8SAdapter) EXPECT() *MockK8SAdapter_Expecter
func (*MockK8SAdapter) ListNodes ¶ added in v1.2.0
func (_mock *MockK8SAdapter) ListNodes(ctx context.Context) ([]*Node, error)
ListNodes provides a mock function for the type MockK8SAdapter
func (*MockK8SAdapter) QueryDecisionMakerPods ¶
func (_mock *MockK8SAdapter) QueryDecisionMakerPods(ctx context.Context, opt *QueryDecisionMakerPodsOptions) ([]*DecisionMakerPod, error)
QueryDecisionMakerPods provides a mock function for the type MockK8SAdapter
func (*MockK8SAdapter) QueryPods ¶
func (_mock *MockK8SAdapter) QueryPods(ctx context.Context, opt *QueryPodsOptions) ([]*Pod, error)
QueryPods provides a mock function for the type MockK8SAdapter
type MockK8SAdapter_Expecter ¶
type MockK8SAdapter_Expecter struct {
// contains filtered or unexported fields
}
func (*MockK8SAdapter_Expecter) ListNodes ¶ added in v1.2.0
func (_e *MockK8SAdapter_Expecter) ListNodes(ctx interface{}) *MockK8SAdapter_ListNodes_Call
ListNodes is a helper method to define mock.On call
- ctx context.Context
func (*MockK8SAdapter_Expecter) QueryDecisionMakerPods ¶
func (_e *MockK8SAdapter_Expecter) QueryDecisionMakerPods(ctx interface{}, opt interface{}) *MockK8SAdapter_QueryDecisionMakerPods_Call
QueryDecisionMakerPods is a helper method to define mock.On call
- ctx context.Context
- opt *QueryDecisionMakerPodsOptions
func (*MockK8SAdapter_Expecter) QueryPods ¶
func (_e *MockK8SAdapter_Expecter) QueryPods(ctx interface{}, opt interface{}) *MockK8SAdapter_QueryPods_Call
QueryPods is a helper method to define mock.On call
- ctx context.Context
- opt *QueryPodsOptions
type MockK8SAdapter_ListNodes_Call ¶ added in v1.2.0
MockK8SAdapter_ListNodes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListNodes'
func (*MockK8SAdapter_ListNodes_Call) Return ¶ added in v1.2.0
func (_c *MockK8SAdapter_ListNodes_Call) Return(nodes []*Node, err error) *MockK8SAdapter_ListNodes_Call
func (*MockK8SAdapter_ListNodes_Call) Run ¶ added in v1.2.0
func (_c *MockK8SAdapter_ListNodes_Call) Run(run func(ctx context.Context)) *MockK8SAdapter_ListNodes_Call
func (*MockK8SAdapter_ListNodes_Call) RunAndReturn ¶ added in v1.2.0
func (_c *MockK8SAdapter_ListNodes_Call) RunAndReturn(run func(ctx context.Context) ([]*Node, error)) *MockK8SAdapter_ListNodes_Call
type MockK8SAdapter_QueryDecisionMakerPods_Call ¶
MockK8SAdapter_QueryDecisionMakerPods_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'QueryDecisionMakerPods'
func (*MockK8SAdapter_QueryDecisionMakerPods_Call) Return ¶
func (_c *MockK8SAdapter_QueryDecisionMakerPods_Call) Return(decisionMakerPods []*DecisionMakerPod, err error) *MockK8SAdapter_QueryDecisionMakerPods_Call
func (*MockK8SAdapter_QueryDecisionMakerPods_Call) Run ¶
func (_c *MockK8SAdapter_QueryDecisionMakerPods_Call) Run(run func(ctx context.Context, opt *QueryDecisionMakerPodsOptions)) *MockK8SAdapter_QueryDecisionMakerPods_Call
func (*MockK8SAdapter_QueryDecisionMakerPods_Call) RunAndReturn ¶
func (_c *MockK8SAdapter_QueryDecisionMakerPods_Call) RunAndReturn(run func(ctx context.Context, opt *QueryDecisionMakerPodsOptions) ([]*DecisionMakerPod, error)) *MockK8SAdapter_QueryDecisionMakerPods_Call
type MockK8SAdapter_QueryPods_Call ¶
MockK8SAdapter_QueryPods_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'QueryPods'
func (*MockK8SAdapter_QueryPods_Call) Return ¶
func (_c *MockK8SAdapter_QueryPods_Call) Return(pods []*Pod, err error) *MockK8SAdapter_QueryPods_Call
func (*MockK8SAdapter_QueryPods_Call) Run ¶
func (_c *MockK8SAdapter_QueryPods_Call) Run(run func(ctx context.Context, opt *QueryPodsOptions)) *MockK8SAdapter_QueryPods_Call
func (*MockK8SAdapter_QueryPods_Call) RunAndReturn ¶
func (_c *MockK8SAdapter_QueryPods_Call) RunAndReturn(run func(ctx context.Context, opt *QueryPodsOptions) ([]*Pod, error)) *MockK8SAdapter_QueryPods_Call
type MockRepository ¶
MockRepository is an autogenerated mock type for the Repository type
func NewMockRepository ¶
func NewMockRepository(t interface {
mock.TestingT
Cleanup(func())
}) *MockRepository
NewMockRepository creates a new instance of MockRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockRepository) BatchUpdateIntentsState ¶
func (_mock *MockRepository) BatchUpdateIntentsState(ctx context.Context, intentIDs []bson.ObjectID, newState IntentState) error
BatchUpdateIntentsState provides a mock function for the type MockRepository
func (*MockRepository) CreateAuditLog ¶
func (_mock *MockRepository) CreateAuditLog(ctx context.Context, log *AuditLog) error
CreateAuditLog provides a mock function for the type MockRepository
func (*MockRepository) CreatePermission ¶
func (_mock *MockRepository) CreatePermission(ctx context.Context, permission *Permission) error
CreatePermission provides a mock function for the type MockRepository
func (*MockRepository) CreateRole ¶
func (_mock *MockRepository) CreateRole(ctx context.Context, role *Role) error
CreateRole provides a mock function for the type MockRepository
func (*MockRepository) CreateUser ¶
func (_mock *MockRepository) CreateUser(ctx context.Context, user *User) error
CreateUser provides a mock function for the type MockRepository
func (*MockRepository) DeleteIntents ¶ added in v1.2.0
DeleteIntents provides a mock function for the type MockRepository
func (*MockRepository) DeleteIntentsByStrategyID ¶ added in v1.2.0
func (_mock *MockRepository) DeleteIntentsByStrategyID(ctx context.Context, strategyID bson.ObjectID) error
DeleteIntentsByStrategyID provides a mock function for the type MockRepository
func (*MockRepository) DeleteStrategy ¶ added in v1.2.0
DeleteStrategy provides a mock function for the type MockRepository
func (*MockRepository) EXPECT ¶
func (_m *MockRepository) EXPECT() *MockRepository_Expecter
func (*MockRepository) InsertIntents ¶ added in v1.2.1
func (_mock *MockRepository) InsertIntents(ctx context.Context, intents []*ScheduleIntent) error
InsertIntents provides a mock function for the type MockRepository
func (*MockRepository) InsertStrategyAndIntents ¶
func (_mock *MockRepository) InsertStrategyAndIntents(ctx context.Context, strategy *ScheduleStrategy, intents []*ScheduleIntent) error
InsertStrategyAndIntents provides a mock function for the type MockRepository
func (*MockRepository) QueryAuditLogs ¶
func (_mock *MockRepository) QueryAuditLogs(ctx context.Context, opt *QueryAuditLogOptions) error
QueryAuditLogs provides a mock function for the type MockRepository
func (*MockRepository) QueryIntents ¶
func (_mock *MockRepository) QueryIntents(ctx context.Context, opt *QueryIntentOptions) error
QueryIntents provides a mock function for the type MockRepository
func (*MockRepository) QueryPermissions ¶
func (_mock *MockRepository) QueryPermissions(ctx context.Context, opt *QueryPermissionOptions) error
QueryPermissions provides a mock function for the type MockRepository
func (*MockRepository) QueryRoles ¶
func (_mock *MockRepository) QueryRoles(ctx context.Context, opt *QueryRoleOptions) error
QueryRoles provides a mock function for the type MockRepository
func (*MockRepository) QueryStrategies ¶
func (_mock *MockRepository) QueryStrategies(ctx context.Context, opt *QueryStrategyOptions) error
QueryStrategies provides a mock function for the type MockRepository
func (*MockRepository) QueryUsers ¶
func (_mock *MockRepository) QueryUsers(ctx context.Context, opt *QueryUserOptions) error
QueryUsers provides a mock function for the type MockRepository
func (*MockRepository) UpdatePermission ¶
func (_mock *MockRepository) UpdatePermission(ctx context.Context, permission *Permission) error
UpdatePermission provides a mock function for the type MockRepository
func (*MockRepository) UpdateRole ¶
func (_mock *MockRepository) UpdateRole(ctx context.Context, role *Role) error
UpdateRole provides a mock function for the type MockRepository
func (*MockRepository) UpdateUser ¶
func (_mock *MockRepository) UpdateUser(ctx context.Context, user *User) error
UpdateUser provides a mock function for the type MockRepository
type MockRepository_BatchUpdateIntentsState_Call ¶
MockRepository_BatchUpdateIntentsState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BatchUpdateIntentsState'
func (*MockRepository_BatchUpdateIntentsState_Call) Return ¶
func (_c *MockRepository_BatchUpdateIntentsState_Call) Return(err error) *MockRepository_BatchUpdateIntentsState_Call
func (*MockRepository_BatchUpdateIntentsState_Call) Run ¶
func (_c *MockRepository_BatchUpdateIntentsState_Call) Run(run func(ctx context.Context, intentIDs []bson.ObjectID, newState IntentState)) *MockRepository_BatchUpdateIntentsState_Call
func (*MockRepository_BatchUpdateIntentsState_Call) RunAndReturn ¶
func (_c *MockRepository_BatchUpdateIntentsState_Call) RunAndReturn(run func(ctx context.Context, intentIDs []bson.ObjectID, newState IntentState) error) *MockRepository_BatchUpdateIntentsState_Call
type MockRepository_CreateAuditLog_Call ¶
MockRepository_CreateAuditLog_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateAuditLog'
func (*MockRepository_CreateAuditLog_Call) Return ¶
func (_c *MockRepository_CreateAuditLog_Call) Return(err error) *MockRepository_CreateAuditLog_Call
func (*MockRepository_CreateAuditLog_Call) Run ¶
func (_c *MockRepository_CreateAuditLog_Call) Run(run func(ctx context.Context, log *AuditLog)) *MockRepository_CreateAuditLog_Call
func (*MockRepository_CreateAuditLog_Call) RunAndReturn ¶
func (_c *MockRepository_CreateAuditLog_Call) RunAndReturn(run func(ctx context.Context, log *AuditLog) error) *MockRepository_CreateAuditLog_Call
type MockRepository_CreatePermission_Call ¶
MockRepository_CreatePermission_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreatePermission'
func (*MockRepository_CreatePermission_Call) Return ¶
func (_c *MockRepository_CreatePermission_Call) Return(err error) *MockRepository_CreatePermission_Call
func (*MockRepository_CreatePermission_Call) Run ¶
func (_c *MockRepository_CreatePermission_Call) Run(run func(ctx context.Context, permission *Permission)) *MockRepository_CreatePermission_Call
func (*MockRepository_CreatePermission_Call) RunAndReturn ¶
func (_c *MockRepository_CreatePermission_Call) RunAndReturn(run func(ctx context.Context, permission *Permission) error) *MockRepository_CreatePermission_Call
type MockRepository_CreateRole_Call ¶
MockRepository_CreateRole_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateRole'
func (*MockRepository_CreateRole_Call) Return ¶
func (_c *MockRepository_CreateRole_Call) Return(err error) *MockRepository_CreateRole_Call
func (*MockRepository_CreateRole_Call) Run ¶
func (_c *MockRepository_CreateRole_Call) Run(run func(ctx context.Context, role *Role)) *MockRepository_CreateRole_Call
func (*MockRepository_CreateRole_Call) RunAndReturn ¶
func (_c *MockRepository_CreateRole_Call) RunAndReturn(run func(ctx context.Context, role *Role) error) *MockRepository_CreateRole_Call
type MockRepository_CreateUser_Call ¶
MockRepository_CreateUser_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateUser'
func (*MockRepository_CreateUser_Call) Return ¶
func (_c *MockRepository_CreateUser_Call) Return(err error) *MockRepository_CreateUser_Call
func (*MockRepository_CreateUser_Call) Run ¶
func (_c *MockRepository_CreateUser_Call) Run(run func(ctx context.Context, user *User)) *MockRepository_CreateUser_Call
func (*MockRepository_CreateUser_Call) RunAndReturn ¶
func (_c *MockRepository_CreateUser_Call) RunAndReturn(run func(ctx context.Context, user *User) error) *MockRepository_CreateUser_Call
type MockRepository_DeleteIntentsByStrategyID_Call ¶ added in v1.2.0
MockRepository_DeleteIntentsByStrategyID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteIntentsByStrategyID'
func (*MockRepository_DeleteIntentsByStrategyID_Call) Return ¶ added in v1.2.0
func (_c *MockRepository_DeleteIntentsByStrategyID_Call) Return(err error) *MockRepository_DeleteIntentsByStrategyID_Call
func (*MockRepository_DeleteIntentsByStrategyID_Call) Run ¶ added in v1.2.0
func (_c *MockRepository_DeleteIntentsByStrategyID_Call) Run(run func(ctx context.Context, strategyID bson.ObjectID)) *MockRepository_DeleteIntentsByStrategyID_Call
func (*MockRepository_DeleteIntentsByStrategyID_Call) RunAndReturn ¶ added in v1.2.0
func (_c *MockRepository_DeleteIntentsByStrategyID_Call) RunAndReturn(run func(ctx context.Context, strategyID bson.ObjectID) error) *MockRepository_DeleteIntentsByStrategyID_Call
type MockRepository_DeleteIntents_Call ¶ added in v1.2.0
MockRepository_DeleteIntents_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteIntents'
func (*MockRepository_DeleteIntents_Call) Return ¶ added in v1.2.0
func (_c *MockRepository_DeleteIntents_Call) Return(err error) *MockRepository_DeleteIntents_Call
func (*MockRepository_DeleteIntents_Call) Run ¶ added in v1.2.0
func (_c *MockRepository_DeleteIntents_Call) Run(run func(ctx context.Context, intentIDs []bson.ObjectID)) *MockRepository_DeleteIntents_Call
func (*MockRepository_DeleteIntents_Call) RunAndReturn ¶ added in v1.2.0
func (_c *MockRepository_DeleteIntents_Call) RunAndReturn(run func(ctx context.Context, intentIDs []bson.ObjectID) error) *MockRepository_DeleteIntents_Call
type MockRepository_DeleteStrategy_Call ¶ added in v1.2.0
MockRepository_DeleteStrategy_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteStrategy'
func (*MockRepository_DeleteStrategy_Call) Return ¶ added in v1.2.0
func (_c *MockRepository_DeleteStrategy_Call) Return(err error) *MockRepository_DeleteStrategy_Call
func (*MockRepository_DeleteStrategy_Call) Run ¶ added in v1.2.0
func (_c *MockRepository_DeleteStrategy_Call) Run(run func(ctx context.Context, strategyID bson.ObjectID)) *MockRepository_DeleteStrategy_Call
func (*MockRepository_DeleteStrategy_Call) RunAndReturn ¶ added in v1.2.0
func (_c *MockRepository_DeleteStrategy_Call) RunAndReturn(run func(ctx context.Context, strategyID bson.ObjectID) error) *MockRepository_DeleteStrategy_Call
type MockRepository_Expecter ¶
type MockRepository_Expecter struct {
// contains filtered or unexported fields
}
func (*MockRepository_Expecter) BatchUpdateIntentsState ¶
func (_e *MockRepository_Expecter) BatchUpdateIntentsState(ctx interface{}, intentIDs interface{}, newState interface{}) *MockRepository_BatchUpdateIntentsState_Call
BatchUpdateIntentsState is a helper method to define mock.On call
- ctx context.Context
- intentIDs []bson.ObjectID
- newState IntentState
func (*MockRepository_Expecter) CreateAuditLog ¶
func (_e *MockRepository_Expecter) CreateAuditLog(ctx interface{}, log interface{}) *MockRepository_CreateAuditLog_Call
CreateAuditLog is a helper method to define mock.On call
- ctx context.Context
- log *AuditLog
func (*MockRepository_Expecter) CreatePermission ¶
func (_e *MockRepository_Expecter) CreatePermission(ctx interface{}, permission interface{}) *MockRepository_CreatePermission_Call
CreatePermission is a helper method to define mock.On call
- ctx context.Context
- permission *Permission
func (*MockRepository_Expecter) CreateRole ¶
func (_e *MockRepository_Expecter) CreateRole(ctx interface{}, role interface{}) *MockRepository_CreateRole_Call
CreateRole is a helper method to define mock.On call
- ctx context.Context
- role *Role
func (*MockRepository_Expecter) CreateUser ¶
func (_e *MockRepository_Expecter) CreateUser(ctx interface{}, user interface{}) *MockRepository_CreateUser_Call
CreateUser is a helper method to define mock.On call
- ctx context.Context
- user *User
func (*MockRepository_Expecter) DeleteIntents ¶ added in v1.2.0
func (_e *MockRepository_Expecter) DeleteIntents(ctx interface{}, intentIDs interface{}) *MockRepository_DeleteIntents_Call
DeleteIntents is a helper method to define mock.On call
- ctx context.Context
- intentIDs []bson.ObjectID
func (*MockRepository_Expecter) DeleteIntentsByStrategyID ¶ added in v1.2.0
func (_e *MockRepository_Expecter) DeleteIntentsByStrategyID(ctx interface{}, strategyID interface{}) *MockRepository_DeleteIntentsByStrategyID_Call
DeleteIntentsByStrategyID is a helper method to define mock.On call
- ctx context.Context
- strategyID bson.ObjectID
func (*MockRepository_Expecter) DeleteStrategy ¶ added in v1.2.0
func (_e *MockRepository_Expecter) DeleteStrategy(ctx interface{}, strategyID interface{}) *MockRepository_DeleteStrategy_Call
DeleteStrategy is a helper method to define mock.On call
- ctx context.Context
- strategyID bson.ObjectID
func (*MockRepository_Expecter) InsertIntents ¶ added in v1.2.1
func (_e *MockRepository_Expecter) InsertIntents(ctx interface{}, intents interface{}) *MockRepository_InsertIntents_Call
InsertIntents is a helper method to define mock.On call
- ctx context.Context
- intents []*ScheduleIntent
func (*MockRepository_Expecter) InsertStrategyAndIntents ¶
func (_e *MockRepository_Expecter) InsertStrategyAndIntents(ctx interface{}, strategy interface{}, intents interface{}) *MockRepository_InsertStrategyAndIntents_Call
InsertStrategyAndIntents is a helper method to define mock.On call
- ctx context.Context
- strategy *ScheduleStrategy
- intents []*ScheduleIntent
func (*MockRepository_Expecter) QueryAuditLogs ¶
func (_e *MockRepository_Expecter) QueryAuditLogs(ctx interface{}, opt interface{}) *MockRepository_QueryAuditLogs_Call
QueryAuditLogs is a helper method to define mock.On call
- ctx context.Context
- opt *QueryAuditLogOptions
func (*MockRepository_Expecter) QueryIntents ¶
func (_e *MockRepository_Expecter) QueryIntents(ctx interface{}, opt interface{}) *MockRepository_QueryIntents_Call
QueryIntents is a helper method to define mock.On call
- ctx context.Context
- opt *QueryIntentOptions
func (*MockRepository_Expecter) QueryPermissions ¶
func (_e *MockRepository_Expecter) QueryPermissions(ctx interface{}, opt interface{}) *MockRepository_QueryPermissions_Call
QueryPermissions is a helper method to define mock.On call
- ctx context.Context
- opt *QueryPermissionOptions
func (*MockRepository_Expecter) QueryRoles ¶
func (_e *MockRepository_Expecter) QueryRoles(ctx interface{}, opt interface{}) *MockRepository_QueryRoles_Call
QueryRoles is a helper method to define mock.On call
- ctx context.Context
- opt *QueryRoleOptions
func (*MockRepository_Expecter) QueryStrategies ¶
func (_e *MockRepository_Expecter) QueryStrategies(ctx interface{}, opt interface{}) *MockRepository_QueryStrategies_Call
QueryStrategies is a helper method to define mock.On call
- ctx context.Context
- opt *QueryStrategyOptions
func (*MockRepository_Expecter) QueryUsers ¶
func (_e *MockRepository_Expecter) QueryUsers(ctx interface{}, opt interface{}) *MockRepository_QueryUsers_Call
QueryUsers is a helper method to define mock.On call
- ctx context.Context
- opt *QueryUserOptions
func (*MockRepository_Expecter) UpdatePermission ¶
func (_e *MockRepository_Expecter) UpdatePermission(ctx interface{}, permission interface{}) *MockRepository_UpdatePermission_Call
UpdatePermission is a helper method to define mock.On call
- ctx context.Context
- permission *Permission
func (*MockRepository_Expecter) UpdateRole ¶
func (_e *MockRepository_Expecter) UpdateRole(ctx interface{}, role interface{}) *MockRepository_UpdateRole_Call
UpdateRole is a helper method to define mock.On call
- ctx context.Context
- role *Role
func (*MockRepository_Expecter) UpdateUser ¶
func (_e *MockRepository_Expecter) UpdateUser(ctx interface{}, user interface{}) *MockRepository_UpdateUser_Call
UpdateUser is a helper method to define mock.On call
- ctx context.Context
- user *User
type MockRepository_InsertIntents_Call ¶ added in v1.2.1
MockRepository_InsertIntents_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InsertIntents'
func (*MockRepository_InsertIntents_Call) Return ¶ added in v1.2.1
func (_c *MockRepository_InsertIntents_Call) Return(err error) *MockRepository_InsertIntents_Call
func (*MockRepository_InsertIntents_Call) Run ¶ added in v1.2.1
func (_c *MockRepository_InsertIntents_Call) Run(run func(ctx context.Context, intents []*ScheduleIntent)) *MockRepository_InsertIntents_Call
func (*MockRepository_InsertIntents_Call) RunAndReturn ¶ added in v1.2.1
func (_c *MockRepository_InsertIntents_Call) RunAndReturn(run func(ctx context.Context, intents []*ScheduleIntent) error) *MockRepository_InsertIntents_Call
type MockRepository_InsertStrategyAndIntents_Call ¶
MockRepository_InsertStrategyAndIntents_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InsertStrategyAndIntents'
func (*MockRepository_InsertStrategyAndIntents_Call) Return ¶
func (_c *MockRepository_InsertStrategyAndIntents_Call) Return(err error) *MockRepository_InsertStrategyAndIntents_Call
func (*MockRepository_InsertStrategyAndIntents_Call) Run ¶
func (_c *MockRepository_InsertStrategyAndIntents_Call) Run(run func(ctx context.Context, strategy *ScheduleStrategy, intents []*ScheduleIntent)) *MockRepository_InsertStrategyAndIntents_Call
func (*MockRepository_InsertStrategyAndIntents_Call) RunAndReturn ¶
func (_c *MockRepository_InsertStrategyAndIntents_Call) RunAndReturn(run func(ctx context.Context, strategy *ScheduleStrategy, intents []*ScheduleIntent) error) *MockRepository_InsertStrategyAndIntents_Call
type MockRepository_QueryAuditLogs_Call ¶
MockRepository_QueryAuditLogs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'QueryAuditLogs'
func (*MockRepository_QueryAuditLogs_Call) Return ¶
func (_c *MockRepository_QueryAuditLogs_Call) Return(err error) *MockRepository_QueryAuditLogs_Call
func (*MockRepository_QueryAuditLogs_Call) Run ¶
func (_c *MockRepository_QueryAuditLogs_Call) Run(run func(ctx context.Context, opt *QueryAuditLogOptions)) *MockRepository_QueryAuditLogs_Call
func (*MockRepository_QueryAuditLogs_Call) RunAndReturn ¶
func (_c *MockRepository_QueryAuditLogs_Call) RunAndReturn(run func(ctx context.Context, opt *QueryAuditLogOptions) error) *MockRepository_QueryAuditLogs_Call
type MockRepository_QueryIntents_Call ¶
MockRepository_QueryIntents_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'QueryIntents'
func (*MockRepository_QueryIntents_Call) Return ¶
func (_c *MockRepository_QueryIntents_Call) Return(err error) *MockRepository_QueryIntents_Call
func (*MockRepository_QueryIntents_Call) Run ¶
func (_c *MockRepository_QueryIntents_Call) Run(run func(ctx context.Context, opt *QueryIntentOptions)) *MockRepository_QueryIntents_Call
func (*MockRepository_QueryIntents_Call) RunAndReturn ¶
func (_c *MockRepository_QueryIntents_Call) RunAndReturn(run func(ctx context.Context, opt *QueryIntentOptions) error) *MockRepository_QueryIntents_Call
type MockRepository_QueryPermissions_Call ¶
MockRepository_QueryPermissions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'QueryPermissions'
func (*MockRepository_QueryPermissions_Call) Return ¶
func (_c *MockRepository_QueryPermissions_Call) Return(err error) *MockRepository_QueryPermissions_Call
func (*MockRepository_QueryPermissions_Call) Run ¶
func (_c *MockRepository_QueryPermissions_Call) Run(run func(ctx context.Context, opt *QueryPermissionOptions)) *MockRepository_QueryPermissions_Call
func (*MockRepository_QueryPermissions_Call) RunAndReturn ¶
func (_c *MockRepository_QueryPermissions_Call) RunAndReturn(run func(ctx context.Context, opt *QueryPermissionOptions) error) *MockRepository_QueryPermissions_Call
type MockRepository_QueryRoles_Call ¶
MockRepository_QueryRoles_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'QueryRoles'
func (*MockRepository_QueryRoles_Call) Return ¶
func (_c *MockRepository_QueryRoles_Call) Return(err error) *MockRepository_QueryRoles_Call
func (*MockRepository_QueryRoles_Call) Run ¶
func (_c *MockRepository_QueryRoles_Call) Run(run func(ctx context.Context, opt *QueryRoleOptions)) *MockRepository_QueryRoles_Call
func (*MockRepository_QueryRoles_Call) RunAndReturn ¶
func (_c *MockRepository_QueryRoles_Call) RunAndReturn(run func(ctx context.Context, opt *QueryRoleOptions) error) *MockRepository_QueryRoles_Call
type MockRepository_QueryStrategies_Call ¶
MockRepository_QueryStrategies_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'QueryStrategies'
func (*MockRepository_QueryStrategies_Call) Return ¶
func (_c *MockRepository_QueryStrategies_Call) Return(err error) *MockRepository_QueryStrategies_Call
func (*MockRepository_QueryStrategies_Call) Run ¶
func (_c *MockRepository_QueryStrategies_Call) Run(run func(ctx context.Context, opt *QueryStrategyOptions)) *MockRepository_QueryStrategies_Call
func (*MockRepository_QueryStrategies_Call) RunAndReturn ¶
func (_c *MockRepository_QueryStrategies_Call) RunAndReturn(run func(ctx context.Context, opt *QueryStrategyOptions) error) *MockRepository_QueryStrategies_Call
type MockRepository_QueryUsers_Call ¶
MockRepository_QueryUsers_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'QueryUsers'
func (*MockRepository_QueryUsers_Call) Return ¶
func (_c *MockRepository_QueryUsers_Call) Return(err error) *MockRepository_QueryUsers_Call
func (*MockRepository_QueryUsers_Call) Run ¶
func (_c *MockRepository_QueryUsers_Call) Run(run func(ctx context.Context, opt *QueryUserOptions)) *MockRepository_QueryUsers_Call
func (*MockRepository_QueryUsers_Call) RunAndReturn ¶
func (_c *MockRepository_QueryUsers_Call) RunAndReturn(run func(ctx context.Context, opt *QueryUserOptions) error) *MockRepository_QueryUsers_Call
type MockRepository_UpdatePermission_Call ¶
MockRepository_UpdatePermission_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdatePermission'
func (*MockRepository_UpdatePermission_Call) Return ¶
func (_c *MockRepository_UpdatePermission_Call) Return(err error) *MockRepository_UpdatePermission_Call
func (*MockRepository_UpdatePermission_Call) Run ¶
func (_c *MockRepository_UpdatePermission_Call) Run(run func(ctx context.Context, permission *Permission)) *MockRepository_UpdatePermission_Call
func (*MockRepository_UpdatePermission_Call) RunAndReturn ¶
func (_c *MockRepository_UpdatePermission_Call) RunAndReturn(run func(ctx context.Context, permission *Permission) error) *MockRepository_UpdatePermission_Call
type MockRepository_UpdateRole_Call ¶
MockRepository_UpdateRole_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateRole'
func (*MockRepository_UpdateRole_Call) Return ¶
func (_c *MockRepository_UpdateRole_Call) Return(err error) *MockRepository_UpdateRole_Call
func (*MockRepository_UpdateRole_Call) Run ¶
func (_c *MockRepository_UpdateRole_Call) Run(run func(ctx context.Context, role *Role)) *MockRepository_UpdateRole_Call
func (*MockRepository_UpdateRole_Call) RunAndReturn ¶
func (_c *MockRepository_UpdateRole_Call) RunAndReturn(run func(ctx context.Context, role *Role) error) *MockRepository_UpdateRole_Call
type MockRepository_UpdateUser_Call ¶
MockRepository_UpdateUser_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateUser'
func (*MockRepository_UpdateUser_Call) Return ¶
func (_c *MockRepository_UpdateUser_Call) Return(err error) *MockRepository_UpdateUser_Call
func (*MockRepository_UpdateUser_Call) Run ¶
func (_c *MockRepository_UpdateUser_Call) Run(run func(ctx context.Context, user *User)) *MockRepository_UpdateUser_Call
func (*MockRepository_UpdateUser_Call) RunAndReturn ¶
func (_c *MockRepository_UpdateUser_Call) RunAndReturn(run func(ctx context.Context, user *User) error) *MockRepository_UpdateUser_Call
type MockService ¶
MockService is an autogenerated mock type for the Service type
func NewMockService ¶
func NewMockService(t interface {
mock.TestingT
Cleanup(func())
}) *MockService
NewMockService creates a new instance of MockService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockService) ChangePassword ¶
func (_mock *MockService) ChangePassword(ctx context.Context, user *Claims, oldPassword string, newPassword string) error
ChangePassword provides a mock function for the type MockService
func (*MockService) CreateAdminUserIfNotExists ¶
func (_mock *MockService) CreateAdminUserIfNotExists(ctx context.Context, username string, password string) error
CreateAdminUserIfNotExists provides a mock function for the type MockService
func (*MockService) CreateNewUser ¶
func (_mock *MockService) CreateNewUser(ctx context.Context, operator *Claims, username string, password string) error
CreateNewUser provides a mock function for the type MockService
func (*MockService) CreateRole ¶
CreateRole provides a mock function for the type MockService
func (*MockService) CreateScheduleStrategy ¶
func (_mock *MockService) CreateScheduleStrategy(ctx context.Context, operator *Claims, strategy *ScheduleStrategy) error
CreateScheduleStrategy provides a mock function for the type MockService
func (*MockService) DeleteRole ¶
DeleteRole provides a mock function for the type MockService
func (*MockService) DeleteScheduleIntents ¶ added in v1.2.0
func (_mock *MockService) DeleteScheduleIntents(ctx context.Context, operator *Claims, intentIDs []string) error
DeleteScheduleIntents provides a mock function for the type MockService
func (*MockService) DeleteScheduleStrategy ¶ added in v1.2.0
func (_mock *MockService) DeleteScheduleStrategy(ctx context.Context, operator *Claims, strategyID string) error
DeleteScheduleStrategy provides a mock function for the type MockService
func (*MockService) EXPECT ¶
func (_m *MockService) EXPECT() *MockService_Expecter
func (*MockService) GetPodPIDMapping ¶ added in v1.2.0
func (_mock *MockService) GetPodPIDMapping(ctx context.Context, nodeID string) (*PodPIDMappingResponse, error)
GetPodPIDMapping provides a mock function for the type MockService
func (*MockService) ListNodes ¶ added in v1.2.0
func (_mock *MockService) ListNodes(ctx context.Context) ([]*Node, error)
ListNodes provides a mock function for the type MockService
func (*MockService) ListScheduleIntents ¶
func (_mock *MockService) ListScheduleIntents(ctx context.Context, filterOpts *QueryIntentOptions) error
ListScheduleIntents provides a mock function for the type MockService
func (*MockService) ListScheduleStrategies ¶
func (_mock *MockService) ListScheduleStrategies(ctx context.Context, filterOpts *QueryStrategyOptions) error
ListScheduleStrategies provides a mock function for the type MockService
func (*MockService) QueryPermissions ¶
func (_mock *MockService) QueryPermissions(ctx context.Context, opt *QueryPermissionOptions) error
QueryPermissions provides a mock function for the type MockService
func (*MockService) QueryRoles ¶
func (_mock *MockService) QueryRoles(ctx context.Context, opt *QueryRoleOptions) error
QueryRoles provides a mock function for the type MockService
func (*MockService) QueryUsers ¶
func (_mock *MockService) QueryUsers(ctx context.Context, opt *QueryUserOptions) error
QueryUsers provides a mock function for the type MockService
func (*MockService) ReconcileIntents ¶ added in v1.2.1
func (_mock *MockService) ReconcileIntents(ctx context.Context) error
ReconcileIntents provides a mock function for the type MockService
func (*MockService) ResetPassword ¶
func (_mock *MockService) ResetPassword(ctx context.Context, operator *Claims, id string, newPassword string) error
ResetPassword provides a mock function for the type MockService
func (*MockService) UpdateRole ¶
func (_mock *MockService) UpdateRole(ctx context.Context, operator *Claims, roleID string, opt UpdateRoleOptions) error
UpdateRole provides a mock function for the type MockService
func (*MockService) UpdateUserPermissions ¶
func (_mock *MockService) UpdateUserPermissions(ctx context.Context, operator *Claims, id string, opt UpdateUserPermissionsOptions) error
UpdateUserPermissions provides a mock function for the type MockService
func (*MockService) VerifyJWTToken ¶
func (_mock *MockService) VerifyJWTToken(ctx context.Context, tokenString string, permissionKey PermissionKey) (Claims, RolePolicy, error)
VerifyJWTToken provides a mock function for the type MockService
type MockService_ChangePassword_Call ¶
MockService_ChangePassword_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ChangePassword'
func (*MockService_ChangePassword_Call) Return ¶
func (_c *MockService_ChangePassword_Call) Return(err error) *MockService_ChangePassword_Call
func (*MockService_ChangePassword_Call) Run ¶
func (_c *MockService_ChangePassword_Call) Run(run func(ctx context.Context, user *Claims, oldPassword string, newPassword string)) *MockService_ChangePassword_Call
func (*MockService_ChangePassword_Call) RunAndReturn ¶
func (_c *MockService_ChangePassword_Call) RunAndReturn(run func(ctx context.Context, user *Claims, oldPassword string, newPassword string) error) *MockService_ChangePassword_Call
type MockService_CreateAdminUserIfNotExists_Call ¶
MockService_CreateAdminUserIfNotExists_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateAdminUserIfNotExists'
func (*MockService_CreateAdminUserIfNotExists_Call) Return ¶
func (_c *MockService_CreateAdminUserIfNotExists_Call) Return(err error) *MockService_CreateAdminUserIfNotExists_Call
func (*MockService_CreateAdminUserIfNotExists_Call) Run ¶
func (_c *MockService_CreateAdminUserIfNotExists_Call) Run(run func(ctx context.Context, username string, password string)) *MockService_CreateAdminUserIfNotExists_Call
func (*MockService_CreateAdminUserIfNotExists_Call) RunAndReturn ¶
func (_c *MockService_CreateAdminUserIfNotExists_Call) RunAndReturn(run func(ctx context.Context, username string, password string) error) *MockService_CreateAdminUserIfNotExists_Call
type MockService_CreateNewUser_Call ¶
MockService_CreateNewUser_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateNewUser'
func (*MockService_CreateNewUser_Call) Return ¶
func (_c *MockService_CreateNewUser_Call) Return(err error) *MockService_CreateNewUser_Call
func (*MockService_CreateNewUser_Call) Run ¶
func (_c *MockService_CreateNewUser_Call) Run(run func(ctx context.Context, operator *Claims, username string, password string)) *MockService_CreateNewUser_Call
func (*MockService_CreateNewUser_Call) RunAndReturn ¶
func (_c *MockService_CreateNewUser_Call) RunAndReturn(run func(ctx context.Context, operator *Claims, username string, password string) error) *MockService_CreateNewUser_Call
type MockService_CreateRole_Call ¶
MockService_CreateRole_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateRole'
func (*MockService_CreateRole_Call) Return ¶
func (_c *MockService_CreateRole_Call) Return(err error) *MockService_CreateRole_Call
func (*MockService_CreateRole_Call) Run ¶
func (_c *MockService_CreateRole_Call) Run(run func(ctx context.Context, operator *Claims, role *Role)) *MockService_CreateRole_Call
func (*MockService_CreateRole_Call) RunAndReturn ¶
func (_c *MockService_CreateRole_Call) RunAndReturn(run func(ctx context.Context, operator *Claims, role *Role) error) *MockService_CreateRole_Call
type MockService_CreateScheduleStrategy_Call ¶
MockService_CreateScheduleStrategy_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateScheduleStrategy'
func (*MockService_CreateScheduleStrategy_Call) Return ¶
func (_c *MockService_CreateScheduleStrategy_Call) Return(err error) *MockService_CreateScheduleStrategy_Call
func (*MockService_CreateScheduleStrategy_Call) Run ¶
func (_c *MockService_CreateScheduleStrategy_Call) Run(run func(ctx context.Context, operator *Claims, strategy *ScheduleStrategy)) *MockService_CreateScheduleStrategy_Call
func (*MockService_CreateScheduleStrategy_Call) RunAndReturn ¶
func (_c *MockService_CreateScheduleStrategy_Call) RunAndReturn(run func(ctx context.Context, operator *Claims, strategy *ScheduleStrategy) error) *MockService_CreateScheduleStrategy_Call
type MockService_DeleteRole_Call ¶
MockService_DeleteRole_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteRole'
func (*MockService_DeleteRole_Call) Return ¶
func (_c *MockService_DeleteRole_Call) Return(err error) *MockService_DeleteRole_Call
func (*MockService_DeleteRole_Call) Run ¶
func (_c *MockService_DeleteRole_Call) Run(run func(ctx context.Context, operator *Claims, roleID string)) *MockService_DeleteRole_Call
func (*MockService_DeleteRole_Call) RunAndReturn ¶
func (_c *MockService_DeleteRole_Call) RunAndReturn(run func(ctx context.Context, operator *Claims, roleID string) error) *MockService_DeleteRole_Call
type MockService_DeleteScheduleIntents_Call ¶ added in v1.2.0
MockService_DeleteScheduleIntents_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteScheduleIntents'
func (*MockService_DeleteScheduleIntents_Call) Return ¶ added in v1.2.0
func (_c *MockService_DeleteScheduleIntents_Call) Return(err error) *MockService_DeleteScheduleIntents_Call
func (*MockService_DeleteScheduleIntents_Call) Run ¶ added in v1.2.0
func (_c *MockService_DeleteScheduleIntents_Call) Run(run func(ctx context.Context, operator *Claims, intentIDs []string)) *MockService_DeleteScheduleIntents_Call
func (*MockService_DeleteScheduleIntents_Call) RunAndReturn ¶ added in v1.2.0
func (_c *MockService_DeleteScheduleIntents_Call) RunAndReturn(run func(ctx context.Context, operator *Claims, intentIDs []string) error) *MockService_DeleteScheduleIntents_Call
type MockService_DeleteScheduleStrategy_Call ¶ added in v1.2.0
MockService_DeleteScheduleStrategy_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteScheduleStrategy'
func (*MockService_DeleteScheduleStrategy_Call) Return ¶ added in v1.2.0
func (_c *MockService_DeleteScheduleStrategy_Call) Return(err error) *MockService_DeleteScheduleStrategy_Call
func (*MockService_DeleteScheduleStrategy_Call) Run ¶ added in v1.2.0
func (_c *MockService_DeleteScheduleStrategy_Call) Run(run func(ctx context.Context, operator *Claims, strategyID string)) *MockService_DeleteScheduleStrategy_Call
func (*MockService_DeleteScheduleStrategy_Call) RunAndReturn ¶ added in v1.2.0
func (_c *MockService_DeleteScheduleStrategy_Call) RunAndReturn(run func(ctx context.Context, operator *Claims, strategyID string) error) *MockService_DeleteScheduleStrategy_Call
type MockService_Expecter ¶
type MockService_Expecter struct {
// contains filtered or unexported fields
}
func (*MockService_Expecter) ChangePassword ¶
func (_e *MockService_Expecter) ChangePassword(ctx interface{}, user interface{}, oldPassword interface{}, newPassword interface{}) *MockService_ChangePassword_Call
ChangePassword is a helper method to define mock.On call
- ctx context.Context
- user *Claims
- oldPassword string
- newPassword string
func (*MockService_Expecter) CreateAdminUserIfNotExists ¶
func (_e *MockService_Expecter) CreateAdminUserIfNotExists(ctx interface{}, username interface{}, password interface{}) *MockService_CreateAdminUserIfNotExists_Call
CreateAdminUserIfNotExists is a helper method to define mock.On call
- ctx context.Context
- username string
- password string
func (*MockService_Expecter) CreateNewUser ¶
func (_e *MockService_Expecter) CreateNewUser(ctx interface{}, operator interface{}, username interface{}, password interface{}) *MockService_CreateNewUser_Call
CreateNewUser is a helper method to define mock.On call
- ctx context.Context
- operator *Claims
- username string
- password string
func (*MockService_Expecter) CreateRole ¶
func (_e *MockService_Expecter) CreateRole(ctx interface{}, operator interface{}, role interface{}) *MockService_CreateRole_Call
CreateRole is a helper method to define mock.On call
- ctx context.Context
- operator *Claims
- role *Role
func (*MockService_Expecter) CreateScheduleStrategy ¶
func (_e *MockService_Expecter) CreateScheduleStrategy(ctx interface{}, operator interface{}, strategy interface{}) *MockService_CreateScheduleStrategy_Call
CreateScheduleStrategy is a helper method to define mock.On call
- ctx context.Context
- operator *Claims
- strategy *ScheduleStrategy
func (*MockService_Expecter) DeleteRole ¶
func (_e *MockService_Expecter) DeleteRole(ctx interface{}, operator interface{}, roleID interface{}) *MockService_DeleteRole_Call
DeleteRole is a helper method to define mock.On call
- ctx context.Context
- operator *Claims
- roleID string
func (*MockService_Expecter) DeleteScheduleIntents ¶ added in v1.2.0
func (_e *MockService_Expecter) DeleteScheduleIntents(ctx interface{}, operator interface{}, intentIDs interface{}) *MockService_DeleteScheduleIntents_Call
DeleteScheduleIntents is a helper method to define mock.On call
- ctx context.Context
- operator *Claims
- intentIDs []string
func (*MockService_Expecter) DeleteScheduleStrategy ¶ added in v1.2.0
func (_e *MockService_Expecter) DeleteScheduleStrategy(ctx interface{}, operator interface{}, strategyID interface{}) *MockService_DeleteScheduleStrategy_Call
DeleteScheduleStrategy is a helper method to define mock.On call
- ctx context.Context
- operator *Claims
- strategyID string
func (*MockService_Expecter) GetPodPIDMapping ¶ added in v1.2.0
func (_e *MockService_Expecter) GetPodPIDMapping(ctx interface{}, nodeID interface{}) *MockService_GetPodPIDMapping_Call
GetPodPIDMapping is a helper method to define mock.On call
- ctx context.Context
- nodeID string
func (*MockService_Expecter) ListNodes ¶ added in v1.2.0
func (_e *MockService_Expecter) ListNodes(ctx interface{}) *MockService_ListNodes_Call
ListNodes is a helper method to define mock.On call
- ctx context.Context
func (*MockService_Expecter) ListScheduleIntents ¶
func (_e *MockService_Expecter) ListScheduleIntents(ctx interface{}, filterOpts interface{}) *MockService_ListScheduleIntents_Call
ListScheduleIntents is a helper method to define mock.On call
- ctx context.Context
- filterOpts *QueryIntentOptions
func (*MockService_Expecter) ListScheduleStrategies ¶
func (_e *MockService_Expecter) ListScheduleStrategies(ctx interface{}, filterOpts interface{}) *MockService_ListScheduleStrategies_Call
ListScheduleStrategies is a helper method to define mock.On call
- ctx context.Context
- filterOpts *QueryStrategyOptions
func (*MockService_Expecter) Login ¶
func (_e *MockService_Expecter) Login(ctx interface{}, email interface{}, password interface{}) *MockService_Login_Call
Login is a helper method to define mock.On call
- ctx context.Context
- email string
- password string
func (*MockService_Expecter) QueryPermissions ¶
func (_e *MockService_Expecter) QueryPermissions(ctx interface{}, opt interface{}) *MockService_QueryPermissions_Call
QueryPermissions is a helper method to define mock.On call
- ctx context.Context
- opt *QueryPermissionOptions
func (*MockService_Expecter) QueryRoles ¶
func (_e *MockService_Expecter) QueryRoles(ctx interface{}, opt interface{}) *MockService_QueryRoles_Call
QueryRoles is a helper method to define mock.On call
- ctx context.Context
- opt *QueryRoleOptions
func (*MockService_Expecter) QueryUsers ¶
func (_e *MockService_Expecter) QueryUsers(ctx interface{}, opt interface{}) *MockService_QueryUsers_Call
QueryUsers is a helper method to define mock.On call
- ctx context.Context
- opt *QueryUserOptions
func (*MockService_Expecter) ReconcileIntents ¶ added in v1.2.1
func (_e *MockService_Expecter) ReconcileIntents(ctx interface{}) *MockService_ReconcileIntents_Call
ReconcileIntents is a helper method to define mock.On call
- ctx context.Context
func (*MockService_Expecter) ResetPassword ¶
func (_e *MockService_Expecter) ResetPassword(ctx interface{}, operator interface{}, id interface{}, newPassword interface{}) *MockService_ResetPassword_Call
ResetPassword is a helper method to define mock.On call
- ctx context.Context
- operator *Claims
- id string
- newPassword string
func (*MockService_Expecter) UpdateRole ¶
func (_e *MockService_Expecter) UpdateRole(ctx interface{}, operator interface{}, roleID interface{}, opt interface{}) *MockService_UpdateRole_Call
UpdateRole is a helper method to define mock.On call
- ctx context.Context
- operator *Claims
- roleID string
- opt UpdateRoleOptions
func (*MockService_Expecter) UpdateUserPermissions ¶
func (_e *MockService_Expecter) UpdateUserPermissions(ctx interface{}, operator interface{}, id interface{}, opt interface{}) *MockService_UpdateUserPermissions_Call
UpdateUserPermissions is a helper method to define mock.On call
- ctx context.Context
- operator *Claims
- id string
- opt UpdateUserPermissionsOptions
func (*MockService_Expecter) VerifyJWTToken ¶
func (_e *MockService_Expecter) VerifyJWTToken(ctx interface{}, tokenString interface{}, permissionKey interface{}) *MockService_VerifyJWTToken_Call
VerifyJWTToken is a helper method to define mock.On call
- ctx context.Context
- tokenString string
- permissionKey PermissionKey
type MockService_GetPodPIDMapping_Call ¶ added in v1.2.0
MockService_GetPodPIDMapping_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPodPIDMapping'
func (*MockService_GetPodPIDMapping_Call) Return ¶ added in v1.2.0
func (_c *MockService_GetPodPIDMapping_Call) Return(podPIDMappingResponse *PodPIDMappingResponse, err error) *MockService_GetPodPIDMapping_Call
func (*MockService_GetPodPIDMapping_Call) Run ¶ added in v1.2.0
func (_c *MockService_GetPodPIDMapping_Call) Run(run func(ctx context.Context, nodeID string)) *MockService_GetPodPIDMapping_Call
func (*MockService_GetPodPIDMapping_Call) RunAndReturn ¶ added in v1.2.0
func (_c *MockService_GetPodPIDMapping_Call) RunAndReturn(run func(ctx context.Context, nodeID string) (*PodPIDMappingResponse, error)) *MockService_GetPodPIDMapping_Call
type MockService_ListNodes_Call ¶ added in v1.2.0
MockService_ListNodes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListNodes'
func (*MockService_ListNodes_Call) Return ¶ added in v1.2.0
func (_c *MockService_ListNodes_Call) Return(nodes []*Node, err error) *MockService_ListNodes_Call
func (*MockService_ListNodes_Call) Run ¶ added in v1.2.0
func (_c *MockService_ListNodes_Call) Run(run func(ctx context.Context)) *MockService_ListNodes_Call
func (*MockService_ListNodes_Call) RunAndReturn ¶ added in v1.2.0
func (_c *MockService_ListNodes_Call) RunAndReturn(run func(ctx context.Context) ([]*Node, error)) *MockService_ListNodes_Call
type MockService_ListScheduleIntents_Call ¶
MockService_ListScheduleIntents_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListScheduleIntents'
func (*MockService_ListScheduleIntents_Call) Return ¶
func (_c *MockService_ListScheduleIntents_Call) Return(err error) *MockService_ListScheduleIntents_Call
func (*MockService_ListScheduleIntents_Call) Run ¶
func (_c *MockService_ListScheduleIntents_Call) Run(run func(ctx context.Context, filterOpts *QueryIntentOptions)) *MockService_ListScheduleIntents_Call
func (*MockService_ListScheduleIntents_Call) RunAndReturn ¶
func (_c *MockService_ListScheduleIntents_Call) RunAndReturn(run func(ctx context.Context, filterOpts *QueryIntentOptions) error) *MockService_ListScheduleIntents_Call
type MockService_ListScheduleStrategies_Call ¶
MockService_ListScheduleStrategies_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListScheduleStrategies'
func (*MockService_ListScheduleStrategies_Call) Return ¶
func (_c *MockService_ListScheduleStrategies_Call) Return(err error) *MockService_ListScheduleStrategies_Call
func (*MockService_ListScheduleStrategies_Call) Run ¶
func (_c *MockService_ListScheduleStrategies_Call) Run(run func(ctx context.Context, filterOpts *QueryStrategyOptions)) *MockService_ListScheduleStrategies_Call
func (*MockService_ListScheduleStrategies_Call) RunAndReturn ¶
func (_c *MockService_ListScheduleStrategies_Call) RunAndReturn(run func(ctx context.Context, filterOpts *QueryStrategyOptions) error) *MockService_ListScheduleStrategies_Call
type MockService_Login_Call ¶
MockService_Login_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Login'
func (*MockService_Login_Call) Return ¶
func (_c *MockService_Login_Call) Return(token string, err error) *MockService_Login_Call
func (*MockService_Login_Call) Run ¶
func (_c *MockService_Login_Call) Run(run func(ctx context.Context, email string, password string)) *MockService_Login_Call
func (*MockService_Login_Call) RunAndReturn ¶
func (_c *MockService_Login_Call) RunAndReturn(run func(ctx context.Context, email string, password string) (string, error)) *MockService_Login_Call
type MockService_QueryPermissions_Call ¶
MockService_QueryPermissions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'QueryPermissions'
func (*MockService_QueryPermissions_Call) Return ¶
func (_c *MockService_QueryPermissions_Call) Return(err error) *MockService_QueryPermissions_Call
func (*MockService_QueryPermissions_Call) Run ¶
func (_c *MockService_QueryPermissions_Call) Run(run func(ctx context.Context, opt *QueryPermissionOptions)) *MockService_QueryPermissions_Call
func (*MockService_QueryPermissions_Call) RunAndReturn ¶
func (_c *MockService_QueryPermissions_Call) RunAndReturn(run func(ctx context.Context, opt *QueryPermissionOptions) error) *MockService_QueryPermissions_Call
type MockService_QueryRoles_Call ¶
MockService_QueryRoles_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'QueryRoles'
func (*MockService_QueryRoles_Call) Return ¶
func (_c *MockService_QueryRoles_Call) Return(err error) *MockService_QueryRoles_Call
func (*MockService_QueryRoles_Call) Run ¶
func (_c *MockService_QueryRoles_Call) Run(run func(ctx context.Context, opt *QueryRoleOptions)) *MockService_QueryRoles_Call
func (*MockService_QueryRoles_Call) RunAndReturn ¶
func (_c *MockService_QueryRoles_Call) RunAndReturn(run func(ctx context.Context, opt *QueryRoleOptions) error) *MockService_QueryRoles_Call
type MockService_QueryUsers_Call ¶
MockService_QueryUsers_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'QueryUsers'
func (*MockService_QueryUsers_Call) Return ¶
func (_c *MockService_QueryUsers_Call) Return(err error) *MockService_QueryUsers_Call
func (*MockService_QueryUsers_Call) Run ¶
func (_c *MockService_QueryUsers_Call) Run(run func(ctx context.Context, opt *QueryUserOptions)) *MockService_QueryUsers_Call
func (*MockService_QueryUsers_Call) RunAndReturn ¶
func (_c *MockService_QueryUsers_Call) RunAndReturn(run func(ctx context.Context, opt *QueryUserOptions) error) *MockService_QueryUsers_Call
type MockService_ReconcileIntents_Call ¶ added in v1.2.1
MockService_ReconcileIntents_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReconcileIntents'
func (*MockService_ReconcileIntents_Call) Return ¶ added in v1.2.1
func (_c *MockService_ReconcileIntents_Call) Return(err error) *MockService_ReconcileIntents_Call
func (*MockService_ReconcileIntents_Call) Run ¶ added in v1.2.1
func (_c *MockService_ReconcileIntents_Call) Run(run func(ctx context.Context)) *MockService_ReconcileIntents_Call
func (*MockService_ReconcileIntents_Call) RunAndReturn ¶ added in v1.2.1
func (_c *MockService_ReconcileIntents_Call) RunAndReturn(run func(ctx context.Context) error) *MockService_ReconcileIntents_Call
type MockService_ResetPassword_Call ¶
MockService_ResetPassword_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ResetPassword'
func (*MockService_ResetPassword_Call) Return ¶
func (_c *MockService_ResetPassword_Call) Return(err error) *MockService_ResetPassword_Call
func (*MockService_ResetPassword_Call) Run ¶
func (_c *MockService_ResetPassword_Call) Run(run func(ctx context.Context, operator *Claims, id string, newPassword string)) *MockService_ResetPassword_Call
func (*MockService_ResetPassword_Call) RunAndReturn ¶
func (_c *MockService_ResetPassword_Call) RunAndReturn(run func(ctx context.Context, operator *Claims, id string, newPassword string) error) *MockService_ResetPassword_Call
type MockService_UpdateRole_Call ¶
MockService_UpdateRole_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateRole'
func (*MockService_UpdateRole_Call) Return ¶
func (_c *MockService_UpdateRole_Call) Return(err error) *MockService_UpdateRole_Call
func (*MockService_UpdateRole_Call) Run ¶
func (_c *MockService_UpdateRole_Call) Run(run func(ctx context.Context, operator *Claims, roleID string, opt UpdateRoleOptions)) *MockService_UpdateRole_Call
func (*MockService_UpdateRole_Call) RunAndReturn ¶
func (_c *MockService_UpdateRole_Call) RunAndReturn(run func(ctx context.Context, operator *Claims, roleID string, opt UpdateRoleOptions) error) *MockService_UpdateRole_Call
type MockService_UpdateUserPermissions_Call ¶
MockService_UpdateUserPermissions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateUserPermissions'
func (*MockService_UpdateUserPermissions_Call) Return ¶
func (_c *MockService_UpdateUserPermissions_Call) Return(err error) *MockService_UpdateUserPermissions_Call
func (*MockService_UpdateUserPermissions_Call) Run ¶
func (_c *MockService_UpdateUserPermissions_Call) Run(run func(ctx context.Context, operator *Claims, id string, opt UpdateUserPermissionsOptions)) *MockService_UpdateUserPermissions_Call
func (*MockService_UpdateUserPermissions_Call) RunAndReturn ¶
func (_c *MockService_UpdateUserPermissions_Call) RunAndReturn(run func(ctx context.Context, operator *Claims, id string, opt UpdateUserPermissionsOptions) error) *MockService_UpdateUserPermissions_Call
type MockService_VerifyJWTToken_Call ¶
MockService_VerifyJWTToken_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'VerifyJWTToken'
func (*MockService_VerifyJWTToken_Call) Return ¶
func (_c *MockService_VerifyJWTToken_Call) Return(claims Claims, rolePolicy RolePolicy, err error) *MockService_VerifyJWTToken_Call
func (*MockService_VerifyJWTToken_Call) Run ¶
func (_c *MockService_VerifyJWTToken_Call) Run(run func(ctx context.Context, tokenString string, permissionKey PermissionKey)) *MockService_VerifyJWTToken_Call
func (*MockService_VerifyJWTToken_Call) RunAndReturn ¶
func (_c *MockService_VerifyJWTToken_Call) RunAndReturn(run func(ctx context.Context, tokenString string, permissionKey PermissionKey) (Claims, RolePolicy, error)) *MockService_VerifyJWTToken_Call
type Node ¶ added in v1.2.0
type Node struct {
Name string `json:"name"`
Labels map[string]string `json:"labels,omitempty"`
Status string `json:"status"`
}
Node represents a Kubernetes node
type Permission ¶
type Permission struct {
ID bson.ObjectID `bson:"_id,omitempty"`
Key PermissionKey `bson:"key,omitempty"`
Description string `bson:"description,omitempty"`
Resource string `bson:"resource,omitempty"`
Action PermissionAction `bson:"action,omitempty"`
}
type PermissionAction ¶
type PermissionAction string
var ( PermissionActionCreate PermissionAction = "create" PermissionActionRead PermissionAction = "read" PermissionActionUpdate PermissionAction = "update" PermissionActionDelete PermissionAction = "delete" )
type PermissionKey ¶
type PermissionKey string
const ( CreateUser PermissionKey = "user.create" UserRead PermissionKey = "user.read" ChangeUserPermission PermissionKey = "user.permission.update" ResetUserPassword PermissionKey = "user.password.reset" RoleCrete PermissionKey = "role.create" RoleRead PermissionKey = "role.read" RoleUpdate PermissionKey = "role.update" RoleDelete PermissionKey = "role.delete" PermissionRead PermissionKey = "permission.read" ScheduleStrategyCreate PermissionKey = "schedule_strategy.create" ScheduleStrategyRead PermissionKey = "schedule_strategy.read" ScheduleStrategyDelete PermissionKey = "schedule_strategy.delete" ScheduleIntentRead PermissionKey = "schedule_intent.read" ScheduleIntentDelete PermissionKey = "schedule_intent.delete" PodPIDMappingRead PermissionKey = "pod_pid_mapping.read" )
type Pod ¶
type Pod struct {
Name string
K8SNamespace string
Labels map[string]string
PodID string
NodeID string
Containers []Container
}
func (*Pod) LabelsToSelectors ¶
func (p *Pod) LabelsToSelectors() []LabelSelector
type PodPIDInfo ¶ added in v1.2.0
type PodPIDInfo struct {
PodUID string `json:"pod_uid"`
PodID string `json:"pod_id,omitempty"`
Processes []PodProcess `json:"processes"`
}
PodPIDInfo represents pod information with associated processes
type PodPIDMappingResponse ¶ added in v1.2.0
type PodPIDMappingResponse struct {
Pods []PodPIDInfo `json:"pods"`
Timestamp string `json:"timestamp"`
NodeName string `json:"node_name"`
NodeID string `json:"node_id,omitempty"`
}
PodPIDMappingResponse represents the response from Decision Maker's Pod-PID mapping API
type PodProcess ¶ added in v1.2.0
type PodProcess struct {
PID int `json:"pid"`
Command string `json:"command"`
PPID int `json:"ppid,omitempty"`
ContainerID string `json:"container_id,omitempty"`
}
PodProcess represents a process information within a pod
type QueryAuditLogOptions ¶
type QueryDecisionMakerPodsOptions ¶
type QueryDecisionMakerPodsOptions struct {
K8SNamespace []string
NodeIDs []string
DecisionMakerLabel LabelSelector
}
type QueryIntentOptions ¶
type QueryIntentOptions struct {
IDs []bson.ObjectID
K8SNamespaces []string
StrategyIDs []bson.ObjectID
States []IntentState
PodIDs []string
Result []*ScheduleIntent
CreatorIDs []bson.ObjectID
}
type QueryPermissionOptions ¶
type QueryPermissionOptions struct {
IDs []bson.ObjectID
Keys []string
Resources []string
Result []*Permission
}
type QueryPodsOptions ¶
type QueryPodsOptions struct {
K8SNamespace []string
LabelSelectors []LabelSelector
CommandRegex string
}
type QueryRoleOptions ¶
type QueryStrategyOptions ¶
type QueryUserOptions ¶
type Repository ¶
type Repository interface {
CreateUser(ctx context.Context, user *User) error
UpdateUser(ctx context.Context, user *User) error
QueryUsers(ctx context.Context, opt *QueryUserOptions) error
CreateRole(ctx context.Context, role *Role) error
UpdateRole(ctx context.Context, role *Role) error
QueryRoles(ctx context.Context, opt *QueryRoleOptions) error
CreatePermission(ctx context.Context, permission *Permission) error
UpdatePermission(ctx context.Context, permission *Permission) error
QueryPermissions(ctx context.Context, opt *QueryPermissionOptions) error
CreateAuditLog(ctx context.Context, log *AuditLog) error
QueryAuditLogs(ctx context.Context, opt *QueryAuditLogOptions) error
InsertStrategyAndIntents(ctx context.Context, strategy *ScheduleStrategy, intents []*ScheduleIntent) error
InsertIntents(ctx context.Context, intents []*ScheduleIntent) error
BatchUpdateIntentsState(ctx context.Context, intentIDs []bson.ObjectID, newState IntentState) error
QueryStrategies(ctx context.Context, opt *QueryStrategyOptions) error
QueryIntents(ctx context.Context, opt *QueryIntentOptions) error
DeleteStrategy(ctx context.Context, strategyID bson.ObjectID) error
DeleteIntents(ctx context.Context, intentIDs []bson.ObjectID) error
DeleteIntentsByStrategyID(ctx context.Context, strategyID bson.ObjectID) error
}
type Role ¶
type Role struct {
BaseEntity `bson:",inline"`
Name string `bson:"name,omitempty"`
Description string `bson:"description,omitempty"`
Policies []RolePolicy `bson:"policies,omitempty"`
}
type RolePolicy ¶
type RolePolicy struct {
PermissionKey PermissionKey `bson:"permissionKey,omitempty"`
Self bool `bson:"self,omitempty"`
K8SNamespace string `bson:"k8sNamespace,omitempty"`
PolicyNamespace string `bson:"policeNamespace,omitempty"`
}
type ScheduleIntent ¶
type ScheduleIntent struct {
BaseEntity `bson:",inline"`
StrategyID bson.ObjectID `bson:"strategyID,omitempty"`
PodID string `bson:"podID,omitempty"`
PodName string `bson:"podName,omitempty"`
NodeID string `bson:"nodeID,omitempty"`
K8sNamespace string `bson:"k8sNamespace,omitempty"`
CommandRegex string `bson:"commandRegex,omitempty"`
Priority int `bson:"priority,omitempty"`
ExecutionTime int64 `bson:"executionTime,omitempty"`
PodLabels map[string]string `bson:"podLabels,omitempty"`
State IntentState `bson:"state,omitempty"`
}
func NewScheduleIntent ¶
func NewScheduleIntent(strategy *ScheduleStrategy, pod *Pod) ScheduleIntent
type ScheduleStrategy ¶
type ScheduleStrategy struct {
BaseEntity `bson:",inline"`
StrategyNamespace string `bson:"strategyNamespace,omitempty"`
LabelSelectors []LabelSelector `bson:"labelSelectors,omitempty"`
K8sNamespace []string `bson:"k8sNamespace,omitempty"`
CommandRegex string `bson:"commandRegex,omitempty"`
Priority int `bson:"priority,omitempty"`
ExecutionTime int64 `bson:"executionTime,omitempty"`
}
type Service ¶
type Service interface {
CreateNewUser(ctx context.Context, operator *Claims, username, password string) error
CreateAdminUserIfNotExists(ctx context.Context, username, password string) error
Login(ctx context.Context, email, password string) (token string, err error)
ChangePassword(ctx context.Context, user *Claims, oldPassword, newPassword string) error
ResetPassword(ctx context.Context, operator *Claims, id, newPassword string) error
UpdateUserPermissions(ctx context.Context, operator *Claims, id string, opt UpdateUserPermissionsOptions) error
VerifyJWTToken(ctx context.Context, tokenString string, permissionKey PermissionKey) (Claims, RolePolicy, error)
QueryUsers(ctx context.Context, opt *QueryUserOptions) error
CreateRole(ctx context.Context, operator *Claims, role *Role) error
UpdateRole(ctx context.Context, operator *Claims, roleID string, opt UpdateRoleOptions) error
DeleteRole(ctx context.Context, operator *Claims, roleID string) error
QueryRoles(ctx context.Context, opt *QueryRoleOptions) error
QueryPermissions(ctx context.Context, opt *QueryPermissionOptions) error
CreateScheduleStrategy(ctx context.Context, operator *Claims, strategy *ScheduleStrategy) error
ListScheduleStrategies(ctx context.Context, filterOpts *QueryStrategyOptions) error
ListScheduleIntents(ctx context.Context, filterOpts *QueryIntentOptions) error
DeleteScheduleStrategy(ctx context.Context, operator *Claims, strategyID string) error
DeleteScheduleIntents(ctx context.Context, operator *Claims, intentIDs []string) error
GetPodPIDMapping(ctx context.Context, nodeID string) (*PodPIDMappingResponse, error)
ListNodes(ctx context.Context) ([]*Node, error)
ReconcileIntents(ctx context.Context) error
}
type UpdateRoleOptions ¶
type UpdateRoleOptions struct {
Name *string `bson:"name,omitempty"`
Description *string `bson:"description,omitempty"`
Policies *[]RolePolicy `bson:"policies,omitempty"`
}
type UpdateUserPermissionsOptions ¶
type UpdateUserPermissionsOptions struct {
Roles *[]string
Status *UserStatus
}
type User ¶
type User struct {
BaseEntity `bson:",inline"`
UserName string `bson:"username,omitempty"`
Password EncryptedPassword `bson:"password,omitempty"`
Status UserStatus `bson:"status,omitempty"`
Roles []string `bson:"roles,omitempty"`
PermissionKeys []string `bson:"permissionKeys,omitempty"`
}
type UserStatus ¶
type UserStatus int8
const ( UserStatusActive UserStatus = 1 UserStatusInactive UserStatus = 2 UserStatusWaitChangePassword UserStatus = 3 )