const ProjectKind = "Project"
type Client interface {
SetCurrent(projectName string) error
Create(projectName string, wait bool) error
Delete(projectName string, wait bool) error
List() (ProjectList, error)
Exists(projectName string) (bool, error)
}
func NewClient(client kclient.ClientInterface) Client
MockClient is a mock of Client interface.
type MockClient struct {
// contains filtered or unexported fields
}
func NewMockClient(ctrl *gomock.Controller) *MockClient
NewMockClient creates a new mock instance.
func (m *MockClient) Create(projectName string, wait bool) error
Create mocks base method.
func (m *MockClient) Delete(projectName string, wait bool) error
Delete mocks base method.
func (m *MockClient) EXPECT() *MockClientMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockClient) Exists(projectName string) (bool, error)
Exists mocks base method.
func (m *MockClient) List() (ProjectList, error)
List mocks base method.
func (m *MockClient) SetCurrent(projectName string) error
SetCurrent mocks base method.
MockClientMockRecorder is the mock recorder for MockClient.
type MockClientMockRecorder struct {
// contains filtered or unexported fields
}
func (mr *MockClientMockRecorder) Create(projectName, wait interface{}) *gomock.Call
Create indicates an expected call of Create.
func (mr *MockClientMockRecorder) Delete(projectName, wait interface{}) *gomock.Call
Delete indicates an expected call of Delete.
func (mr *MockClientMockRecorder) Exists(projectName interface{}) *gomock.Call
Exists indicates an expected call of Exists.
func (mr *MockClientMockRecorder) List() *gomock.Call
List indicates an expected call of List.
func (mr *MockClientMockRecorder) SetCurrent(projectName interface{}) *gomock.Call
SetCurrent indicates an expected call of SetCurrent.
type Project struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Status Status `json:"status,omitempty"`
}
func NewProject(projectName string, isActive bool) Project
NewProject creates and returns a new project instance
type ProjectList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Project `json:"items"`
}
func NewProjectList(items []Project) ProjectList
NewProjectList returns an instance of a list containing the `items` projects
type Status struct {
Active bool `json:"active"`
}