diff --git a/cmd/project.go b/cmd/project.go index eebcafde..7a382ea0 100644 --- a/cmd/project.go +++ b/cmd/project.go @@ -21,6 +21,8 @@ var projectStorageCalc int var projectDevelopmentEnvironmentsLimit int var projectOpenshift int var projectDeploymentsDisabled int +var factsUi int +var problemsUi int func parseProjectFlags(flags pflag.FlagSet) api.ProjectPatch { configMap := make(map[string]interface{}) @@ -382,6 +384,9 @@ func init() { updateProjectCmd.Flags().IntVarP(&projectOpenshift, "openshift", "S", 0, "Reference to OpenShift Object this Project should be deployed to") updateProjectCmd.Flags().IntVarP(&projectDeploymentsDisabled, "deploymentsDisabled", "", 0, "Admin only flag for disabling deployments on a project, 1 to disable deployments, 0 to enable") + updateProjectCmd.Flags().IntVarP(&factsUi, "factsUi", "", 0, "Enables the Lagoon insights Facts tab in the UI. Set to 1 to enable, 0 to disable") + updateProjectCmd.Flags().IntVarP(&problemsUi, "problemsUi", "", 0, "Enables the Lagoon insights Problems tab in the UI. Set to 1 to enable, 0 to disable") + addProjectCmd.Flags().StringVarP(&jsonPatch, "json", "j", "", "JSON string to patch") addProjectCmd.Flags().StringVarP(&projectPatch.GitURL, "gitUrl", "g", "", "GitURL of the project") diff --git a/internal/mock/mock_importer.go b/internal/mock/mock_importer.go index 358b07bf..603e530c 100644 --- a/internal/mock/mock_importer.go +++ b/internal/mock/mock_importer.go @@ -6,105 +6,106 @@ package mock import ( context "context" + reflect "reflect" + gomock "github.com/golang/mock/gomock" schema "github.com/uselagoon/lagoon-cli/internal/schema" - reflect "reflect" ) -// MockImporter is a mock of Importer interface +// MockImporter is a mock of Importer interface. type MockImporter struct { ctrl *gomock.Controller recorder *MockImporterMockRecorder } -// MockImporterMockRecorder is the mock recorder for MockImporter +// MockImporterMockRecorder is the mock recorder for MockImporter. type MockImporterMockRecorder struct { mock *MockImporter } -// NewMockImporter creates a new mock instance +// NewMockImporter creates a new mock instance. func NewMockImporter(ctrl *gomock.Controller) *MockImporter { mock := &MockImporter{ctrl: ctrl} mock.recorder = &MockImporterMockRecorder{mock} return mock } -// EXPECT returns an object that allows the caller to indicate expected use +// EXPECT returns an object that allows the caller to indicate expected use. func (m *MockImporter) EXPECT() *MockImporterMockRecorder { return m.recorder } -// AddGroup mocks base method -func (m *MockImporter) AddGroup(arg0 context.Context, arg1 *schema.AddGroupInput, arg2 *schema.Group) error { +// AddEnvVariable mocks base method. +func (m *MockImporter) AddEnvVariable(arg0 context.Context, arg1 *schema.EnvVariableInput, arg2 *schema.EnvKeyValue) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AddGroup", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "AddEnvVariable", arg0, arg1, arg2) ret0, _ := ret[0].(error) return ret0 } -// AddGroup indicates an expected call of AddGroup -func (mr *MockImporterMockRecorder) AddGroup(arg0, arg1, arg2 interface{}) *gomock.Call { +// AddEnvVariable indicates an expected call of AddEnvVariable. +func (mr *MockImporterMockRecorder) AddEnvVariable(arg0, arg1, arg2 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddGroup", reflect.TypeOf((*MockImporter)(nil).AddGroup), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddEnvVariable", reflect.TypeOf((*MockImporter)(nil).AddEnvVariable), arg0, arg1, arg2) } -// AddUser mocks base method -func (m *MockImporter) AddUser(arg0 context.Context, arg1 *schema.AddUserInput, arg2 *schema.User) error { +// AddGroup mocks base method. +func (m *MockImporter) AddGroup(arg0 context.Context, arg1 *schema.AddGroupInput, arg2 *schema.Group) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AddUser", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "AddGroup", arg0, arg1, arg2) ret0, _ := ret[0].(error) return ret0 } -// AddUser indicates an expected call of AddUser -func (mr *MockImporterMockRecorder) AddUser(arg0, arg1, arg2 interface{}) *gomock.Call { +// AddGroup indicates an expected call of AddGroup. +func (mr *MockImporterMockRecorder) AddGroup(arg0, arg1, arg2 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddUser", reflect.TypeOf((*MockImporter)(nil).AddUser), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddGroup", reflect.TypeOf((*MockImporter)(nil).AddGroup), arg0, arg1, arg2) } -// AddSSHKey mocks base method -func (m *MockImporter) AddSSHKey(arg0 context.Context, arg1 *schema.AddSSHKeyInput, arg2 *schema.SSHKey) error { +// AddGroupsToProject mocks base method. +func (m *MockImporter) AddGroupsToProject(arg0 context.Context, arg1 *schema.ProjectGroupsInput, arg2 *schema.Project) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AddSSHKey", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "AddGroupsToProject", arg0, arg1, arg2) ret0, _ := ret[0].(error) return ret0 } -// AddSSHKey indicates an expected call of AddSSHKey -func (mr *MockImporterMockRecorder) AddSSHKey(arg0, arg1, arg2 interface{}) *gomock.Call { +// AddGroupsToProject indicates an expected call of AddGroupsToProject. +func (mr *MockImporterMockRecorder) AddGroupsToProject(arg0, arg1, arg2 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddSSHKey", reflect.TypeOf((*MockImporter)(nil).AddSSHKey), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddGroupsToProject", reflect.TypeOf((*MockImporter)(nil).AddGroupsToProject), arg0, arg1, arg2) } -// AddUserToGroup mocks base method -func (m *MockImporter) AddUserToGroup(arg0 context.Context, arg1 *schema.UserGroupRoleInput, arg2 *schema.Group) error { +// AddNotificationEmail mocks base method. +func (m *MockImporter) AddNotificationEmail(arg0 context.Context, arg1 *schema.AddNotificationEmailInput, arg2 *schema.NotificationEmail) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AddUserToGroup", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "AddNotificationEmail", arg0, arg1, arg2) ret0, _ := ret[0].(error) return ret0 } -// AddUserToGroup indicates an expected call of AddUserToGroup -func (mr *MockImporterMockRecorder) AddUserToGroup(arg0, arg1, arg2 interface{}) *gomock.Call { +// AddNotificationEmail indicates an expected call of AddNotificationEmail. +func (mr *MockImporterMockRecorder) AddNotificationEmail(arg0, arg1, arg2 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddUserToGroup", reflect.TypeOf((*MockImporter)(nil).AddUserToGroup), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddNotificationEmail", reflect.TypeOf((*MockImporter)(nil).AddNotificationEmail), arg0, arg1, arg2) } -// AddNotificationSlack mocks base method -func (m *MockImporter) AddNotificationSlack(arg0 context.Context, arg1 *schema.AddNotificationSlackInput, arg2 *schema.NotificationSlack) error { +// AddNotificationMicrosoftTeams mocks base method. +func (m *MockImporter) AddNotificationMicrosoftTeams(arg0 context.Context, arg1 *schema.AddNotificationMicrosoftTeamsInput, arg2 *schema.NotificationMicrosoftTeams) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AddNotificationSlack", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "AddNotificationMicrosoftTeams", arg0, arg1, arg2) ret0, _ := ret[0].(error) return ret0 } -// AddNotificationSlack indicates an expected call of AddNotificationSlack -func (mr *MockImporterMockRecorder) AddNotificationSlack(arg0, arg1, arg2 interface{}) *gomock.Call { +// AddNotificationMicrosoftTeams indicates an expected call of AddNotificationMicrosoftTeams. +func (mr *MockImporterMockRecorder) AddNotificationMicrosoftTeams(arg0, arg1, arg2 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddNotificationSlack", reflect.TypeOf((*MockImporter)(nil).AddNotificationSlack), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddNotificationMicrosoftTeams", reflect.TypeOf((*MockImporter)(nil).AddNotificationMicrosoftTeams), arg0, arg1, arg2) } -// AddNotificationRocketChat mocks base method +// AddNotificationRocketChat mocks base method. func (m *MockImporter) AddNotificationRocketChat(arg0 context.Context, arg1 *schema.AddNotificationRocketChatInput, arg2 *schema.NotificationRocketChat) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "AddNotificationRocketChat", arg0, arg1, arg2) @@ -112,134 +113,134 @@ func (m *MockImporter) AddNotificationRocketChat(arg0 context.Context, arg1 *sch return ret0 } -// AddNotificationRocketChat indicates an expected call of AddNotificationRocketChat +// AddNotificationRocketChat indicates an expected call of AddNotificationRocketChat. func (mr *MockImporterMockRecorder) AddNotificationRocketChat(arg0, arg1, arg2 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddNotificationRocketChat", reflect.TypeOf((*MockImporter)(nil).AddNotificationRocketChat), arg0, arg1, arg2) } -// AddNotificationEmail mocks base method -func (m *MockImporter) AddNotificationEmail(arg0 context.Context, arg1 *schema.AddNotificationEmailInput, arg2 *schema.NotificationEmail) error { +// AddNotificationSlack mocks base method. +func (m *MockImporter) AddNotificationSlack(arg0 context.Context, arg1 *schema.AddNotificationSlackInput, arg2 *schema.NotificationSlack) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AddNotificationEmail", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "AddNotificationSlack", arg0, arg1, arg2) ret0, _ := ret[0].(error) return ret0 } -// AddNotificationEmail indicates an expected call of AddNotificationEmail -func (mr *MockImporterMockRecorder) AddNotificationEmail(arg0, arg1, arg2 interface{}) *gomock.Call { +// AddNotificationSlack indicates an expected call of AddNotificationSlack. +func (mr *MockImporterMockRecorder) AddNotificationSlack(arg0, arg1, arg2 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddNotificationEmail", reflect.TypeOf((*MockImporter)(nil).AddNotificationEmail), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddNotificationSlack", reflect.TypeOf((*MockImporter)(nil).AddNotificationSlack), arg0, arg1, arg2) } -// AddNotificationMicrosoftTeams mocks base method -func (m *MockImporter) AddNotificationMicrosoftTeams(arg0 context.Context, arg1 *schema.AddNotificationMicrosoftTeamsInput, arg2 *schema.NotificationMicrosoftTeams) error { +// AddNotificationToProject mocks base method. +func (m *MockImporter) AddNotificationToProject(arg0 context.Context, arg1 *schema.AddNotificationToProjectInput, arg2 *schema.Project) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AddNotificationMicrosoftTeams", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "AddNotificationToProject", arg0, arg1, arg2) ret0, _ := ret[0].(error) return ret0 } -// AddNotificationMicrosoftTeams indicates an expected call of AddNotificationMicrosoftTeams -func (mr *MockImporterMockRecorder) AddNotificationMicrosoftTeams(arg0, arg1, arg2 interface{}) *gomock.Call { +// AddNotificationToProject indicates an expected call of AddNotificationToProject. +func (mr *MockImporterMockRecorder) AddNotificationToProject(arg0, arg1, arg2 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddNotificationMicrosoftTeams", reflect.TypeOf((*MockImporter)(nil).AddNotificationMicrosoftTeams), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddNotificationToProject", reflect.TypeOf((*MockImporter)(nil).AddNotificationToProject), arg0, arg1, arg2) } -// AddProject mocks base method -func (m *MockImporter) AddProject(arg0 context.Context, arg1 *schema.AddProjectInput, arg2 *schema.Project) error { +// AddOrUpdateEnvironment mocks base method. +func (m *MockImporter) AddOrUpdateEnvironment(arg0 context.Context, arg1 *schema.AddEnvironmentInput, arg2 *schema.Environment) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AddProject", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "AddOrUpdateEnvironment", arg0, arg1, arg2) ret0, _ := ret[0].(error) return ret0 } -// AddProject indicates an expected call of AddProject -func (mr *MockImporterMockRecorder) AddProject(arg0, arg1, arg2 interface{}) *gomock.Call { +// AddOrUpdateEnvironment indicates an expected call of AddOrUpdateEnvironment. +func (mr *MockImporterMockRecorder) AddOrUpdateEnvironment(arg0, arg1, arg2 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddProject", reflect.TypeOf((*MockImporter)(nil).AddProject), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddOrUpdateEnvironment", reflect.TypeOf((*MockImporter)(nil).AddOrUpdateEnvironment), arg0, arg1, arg2) } -// AddEnvVariable mocks base method -func (m *MockImporter) AddEnvVariable(arg0 context.Context, arg1 *schema.EnvVariableInput, arg2 *schema.EnvKeyValue) error { +// AddProject mocks base method. +func (m *MockImporter) AddProject(arg0 context.Context, arg1 *schema.AddProjectInput, arg2 *schema.Project) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AddEnvVariable", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "AddProject", arg0, arg1, arg2) ret0, _ := ret[0].(error) return ret0 } -// AddEnvVariable indicates an expected call of AddEnvVariable -func (mr *MockImporterMockRecorder) AddEnvVariable(arg0, arg1, arg2 interface{}) *gomock.Call { +// AddProject indicates an expected call of AddProject. +func (mr *MockImporterMockRecorder) AddProject(arg0, arg1, arg2 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddEnvVariable", reflect.TypeOf((*MockImporter)(nil).AddEnvVariable), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddProject", reflect.TypeOf((*MockImporter)(nil).AddProject), arg0, arg1, arg2) } -// ProjectByName mocks base method -func (m *MockImporter) ProjectByName(arg0 context.Context, arg1 string, arg2 *schema.Project) error { +// AddSSHKey mocks base method. +func (m *MockImporter) AddSSHKey(arg0 context.Context, arg1 *schema.AddSSHKeyInput, arg2 *schema.SSHKey) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ProjectByName", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "AddSSHKey", arg0, arg1, arg2) ret0, _ := ret[0].(error) return ret0 } -// ProjectByName indicates an expected call of ProjectByName -func (mr *MockImporterMockRecorder) ProjectByName(arg0, arg1, arg2 interface{}) *gomock.Call { +// AddSSHKey indicates an expected call of AddSSHKey. +func (mr *MockImporterMockRecorder) AddSSHKey(arg0, arg1, arg2 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProjectByName", reflect.TypeOf((*MockImporter)(nil).ProjectByName), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddSSHKey", reflect.TypeOf((*MockImporter)(nil).AddSSHKey), arg0, arg1, arg2) } -// AddOrUpdateEnvironment mocks base method -func (m *MockImporter) AddOrUpdateEnvironment(arg0 context.Context, arg1 *schema.AddEnvironmentInput, arg2 *schema.Environment) error { +// AddUser mocks base method. +func (m *MockImporter) AddUser(arg0 context.Context, arg1 *schema.AddUserInput, arg2 *schema.User) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AddOrUpdateEnvironment", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "AddUser", arg0, arg1, arg2) ret0, _ := ret[0].(error) return ret0 } -// AddOrUpdateEnvironment indicates an expected call of AddOrUpdateEnvironment -func (mr *MockImporterMockRecorder) AddOrUpdateEnvironment(arg0, arg1, arg2 interface{}) *gomock.Call { +// AddUser indicates an expected call of AddUser. +func (mr *MockImporterMockRecorder) AddUser(arg0, arg1, arg2 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddOrUpdateEnvironment", reflect.TypeOf((*MockImporter)(nil).AddOrUpdateEnvironment), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddUser", reflect.TypeOf((*MockImporter)(nil).AddUser), arg0, arg1, arg2) } -// EnvironmentByName mocks base method -func (m *MockImporter) EnvironmentByName(arg0 context.Context, arg1 string, arg2 uint, arg3 *schema.Environment) error { +// AddUserToGroup mocks base method. +func (m *MockImporter) AddUserToGroup(arg0 context.Context, arg1 *schema.UserGroupRoleInput, arg2 *schema.Group) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "EnvironmentByName", arg0, arg1, arg2, arg3) + ret := m.ctrl.Call(m, "AddUserToGroup", arg0, arg1, arg2) ret0, _ := ret[0].(error) return ret0 } -// EnvironmentByName indicates an expected call of EnvironmentByName -func (mr *MockImporterMockRecorder) EnvironmentByName(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { +// AddUserToGroup indicates an expected call of AddUserToGroup. +func (mr *MockImporterMockRecorder) AddUserToGroup(arg0, arg1, arg2 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnvironmentByName", reflect.TypeOf((*MockImporter)(nil).EnvironmentByName), arg0, arg1, arg2, arg3) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddUserToGroup", reflect.TypeOf((*MockImporter)(nil).AddUserToGroup), arg0, arg1, arg2) } -// AddGroupsToProject mocks base method -func (m *MockImporter) AddGroupsToProject(arg0 context.Context, arg1 *schema.ProjectGroupsInput, arg2 *schema.Project) error { +// EnvironmentByName mocks base method. +func (m *MockImporter) EnvironmentByName(arg0 context.Context, arg1 string, arg2 uint, arg3 *schema.Environment) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AddGroupsToProject", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "EnvironmentByName", arg0, arg1, arg2, arg3) ret0, _ := ret[0].(error) return ret0 } -// AddGroupsToProject indicates an expected call of AddGroupsToProject -func (mr *MockImporterMockRecorder) AddGroupsToProject(arg0, arg1, arg2 interface{}) *gomock.Call { +// EnvironmentByName indicates an expected call of EnvironmentByName. +func (mr *MockImporterMockRecorder) EnvironmentByName(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddGroupsToProject", reflect.TypeOf((*MockImporter)(nil).AddGroupsToProject), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnvironmentByName", reflect.TypeOf((*MockImporter)(nil).EnvironmentByName), arg0, arg1, arg2, arg3) } -// AddNotificationToProject mocks base method -func (m *MockImporter) AddNotificationToProject(arg0 context.Context, arg1 *schema.AddNotificationToProjectInput, arg2 *schema.Project) error { +// ProjectByName mocks base method. +func (m *MockImporter) ProjectByName(arg0 context.Context, arg1 string, arg2 *schema.Project) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AddNotificationToProject", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "ProjectByName", arg0, arg1, arg2) ret0, _ := ret[0].(error) return ret0 } -// AddNotificationToProject indicates an expected call of AddNotificationToProject -func (mr *MockImporterMockRecorder) AddNotificationToProject(arg0, arg1, arg2 interface{}) *gomock.Call { +// ProjectByName indicates an expected call of ProjectByName. +func (mr *MockImporterMockRecorder) ProjectByName(arg0, arg1, arg2 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddNotificationToProject", reflect.TypeOf((*MockImporter)(nil).AddNotificationToProject), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProjectByName", reflect.TypeOf((*MockImporter)(nil).ProjectByName), arg0, arg1, arg2) } diff --git a/internal/mock/mock_me.go b/internal/mock/mock_me.go index 2e09baa8..9d5479cf 100644 --- a/internal/mock/mock_me.go +++ b/internal/mock/mock_me.go @@ -6,35 +6,36 @@ package mock import ( context "context" + reflect "reflect" + gomock "github.com/golang/mock/gomock" schema "github.com/uselagoon/lagoon-cli/internal/schema" - reflect "reflect" ) -// MockMe is a mock of Me interface +// MockMe is a mock of Me interface. type MockMe struct { ctrl *gomock.Controller recorder *MockMeMockRecorder } -// MockMeMockRecorder is the mock recorder for MockMe +// MockMeMockRecorder is the mock recorder for MockMe. type MockMeMockRecorder struct { mock *MockMe } -// NewMockMe creates a new mock instance +// NewMockMe creates a new mock instance. func NewMockMe(ctrl *gomock.Controller) *MockMe { mock := &MockMe{ctrl: ctrl} mock.recorder = &MockMeMockRecorder{mock} return mock } -// EXPECT returns an object that allows the caller to indicate expected use +// EXPECT returns an object that allows the caller to indicate expected use. func (m *MockMe) EXPECT() *MockMeMockRecorder { return m.recorder } -// Me mocks base method +// Me mocks base method. func (m *MockMe) Me(ctx context.Context, user *schema.User) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Me", ctx, user) @@ -42,7 +43,7 @@ func (m *MockMe) Me(ctx context.Context, user *schema.User) error { return ret0 } -// Me indicates an expected call of Me +// Me indicates an expected call of Me. func (mr *MockMeMockRecorder) Me(ctx, user interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Me", reflect.TypeOf((*MockMe)(nil).Me), ctx, user) diff --git a/pkg/api/types.go b/pkg/api/types.go index beb10aa1..12d5cb22 100644 --- a/pkg/api/types.go +++ b/pkg/api/types.go @@ -268,6 +268,7 @@ type ProjectPatch struct { DevelopmentEnvironmentsLimit *int `json:"developmentEnvironmentsLimit,omitempty"` Openshift *int `json:"openshift,omitempty"` FactsUI *int `json:"factsUi,omitempty"` + ProblemsUI *int `json:"problemsUi,omitempty"` DeploymentsDisabled *int `json:"deploymentsDisabled,omitempty"` }