// Code generated by mockery v2.1.0. DO NOT EDIT. package user import ( context "context" models "github.com/goharbor/harbor/src/common/models" mock "github.com/stretchr/testify/mock" q "github.com/goharbor/harbor/src/lib/q" user "github.com/goharbor/harbor/src/controller/user" ) // Controller is an autogenerated mock type for the Controller type type Controller struct { mock.Mock } // Count provides a mock function with given fields: ctx, query func (_m *Controller) Count(ctx context.Context, query *q.Query) (int64, error) { ret := _m.Called(ctx, query) var r0 int64 if rf, ok := ret.Get(0).(func(context.Context, *q.Query) int64); ok { r0 = rf(ctx, query) } else { r0 = ret.Get(0).(int64) } var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { r1 = ret.Error(1) } return r0, r1 } // Create provides a mock function with given fields: ctx, u func (_m *Controller) Create(ctx context.Context, u *models.User) (int, error) { ret := _m.Called(ctx, u) var r0 int if rf, ok := ret.Get(0).(func(context.Context, *models.User) int); ok { r0 = rf(ctx, u) } else { r0 = ret.Get(0).(int) } var r1 error if rf, ok := ret.Get(1).(func(context.Context, *models.User) error); ok { r1 = rf(ctx, u) } else { r1 = ret.Error(1) } return r0, r1 } // Delete provides a mock function with given fields: ctx, id func (_m *Controller) Delete(ctx context.Context, id int) error { ret := _m.Called(ctx, id) var r0 error if rf, ok := ret.Get(0).(func(context.Context, int) error); ok { r0 = rf(ctx, id) } else { r0 = ret.Error(0) } return r0 } // Get provides a mock function with given fields: ctx, id, opt func (_m *Controller) Get(ctx context.Context, id int, opt *user.Option) (*models.User, error) { ret := _m.Called(ctx, id, opt) var r0 *models.User if rf, ok := ret.Get(0).(func(context.Context, int, *user.Option) *models.User); ok { r0 = rf(ctx, id, opt) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*models.User) } } var r1 error if rf, ok := ret.Get(1).(func(context.Context, int, *user.Option) error); ok { r1 = rf(ctx, id, opt) } else { r1 = ret.Error(1) } return r0, r1 } // GetByName provides a mock function with given fields: ctx, username func (_m *Controller) GetByName(ctx context.Context, username string) (*models.User, error) { ret := _m.Called(ctx, username) var r0 *models.User if rf, ok := ret.Get(0).(func(context.Context, string) *models.User); ok { r0 = rf(ctx, username) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*models.User) } } var r1 error if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { r1 = rf(ctx, username) } else { r1 = ret.Error(1) } return r0, r1 } // List provides a mock function with given fields: ctx, query func (_m *Controller) List(ctx context.Context, query *q.Query) ([]*models.User, error) { ret := _m.Called(ctx, query) var r0 []*models.User if rf, ok := ret.Get(0).(func(context.Context, *q.Query) []*models.User); ok { r0 = rf(ctx, query) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]*models.User) } } var r1 error if rf, ok := ret.Get(1).(func(context.Context, *q.Query) error); ok { r1 = rf(ctx, query) } else { r1 = ret.Error(1) } return r0, r1 } // SetCliSecret provides a mock function with given fields: ctx, id, secret func (_m *Controller) SetCliSecret(ctx context.Context, id int, secret string) error { ret := _m.Called(ctx, id, secret) var r0 error if rf, ok := ret.Get(0).(func(context.Context, int, string) error); ok { r0 = rf(ctx, id, secret) } else { r0 = ret.Error(0) } return r0 } // SetSysAdmin provides a mock function with given fields: ctx, id, adminFlag func (_m *Controller) SetSysAdmin(ctx context.Context, id int, adminFlag bool) error { ret := _m.Called(ctx, id, adminFlag) var r0 error if rf, ok := ret.Get(0).(func(context.Context, int, bool) error); ok { r0 = rf(ctx, id, adminFlag) } else { r0 = ret.Error(0) } return r0 } // UpdatePassword provides a mock function with given fields: ctx, id, password func (_m *Controller) UpdatePassword(ctx context.Context, id int, password string) error { ret := _m.Called(ctx, id, password) var r0 error if rf, ok := ret.Get(0).(func(context.Context, int, string) error); ok { r0 = rf(ctx, id, password) } else { r0 = ret.Error(0) } return r0 } // UpdateProfile provides a mock function with given fields: ctx, u func (_m *Controller) UpdateProfile(ctx context.Context, u *models.User) error { ret := _m.Called(ctx, u) var r0 error if rf, ok := ret.Get(0).(func(context.Context, *models.User) error); ok { r0 = rf(ctx, u) } else { r0 = ret.Error(0) } return r0 } // VerifyPassword provides a mock function with given fields: ctx, username, password func (_m *Controller) VerifyPassword(ctx context.Context, username string, password string) (bool, error) { ret := _m.Called(ctx, username, password) var r0 bool if rf, ok := ret.Get(0).(func(context.Context, string, string) bool); ok { r0 = rf(ctx, username, password) } else { r0 = ret.Get(0).(bool) } var r1 error if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok { r1 = rf(ctx, username, password) } else { r1 = ret.Error(1) } return r0, r1 }