Documentation ¶
Index ¶
- type Executor
- type Filesystemer
- type Logger
- type MockBuilder
- type MockFilesystemer
- type MockProjectRepository
- type MockProjectSourceCodeFetchFactory
- type MockProjectSourceCodeFetcher
- type MockProjectSourceCodeUnpackFactory
- type MockProjectSourceCodeUnpacker
- type MockProjectUnpacker
- type MockTaskExecutor
- type MockTaskRepository
- func (m *MockTaskRepository) Find(id string) (*entity.Task, error)
- func (m *MockTaskRepository) FindAll() ([]*entity.Task, error)
- func (m *MockTaskRepository) Remove(id string) error
- func (m *MockTaskRepository) SafeStore(id string, task *entity.Task) error
- func (m *MockTaskRepository) Store(id string, task *entity.Task) error
- func (m *MockTaskRepository) Update(id string, task *entity.Task) error
- type MockWorkspace
- type ProjectRepository
- type SourceCodeFetchFactory
- type SourceCodeFetcher
- type SourceCodeUnpackFactory
- type SourceCodeUnpacker
- type TaskRepository
- type Unpacker
- type Workspacer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Filesystemer ¶
type Filesystemer interface { // MkdirAll creates a directory MkdirAll(path string, perm os.FileMode) error // RemoveAll removes a directory RemoveAll(path string) error // Stat returns the file information Stat(path string) (os.FileInfo, error) // TempDir creates a temporary directory TempDir(dir, prefix string) (name string, err error) }
Filesystemer interface to manage a filesystem
type Logger ¶
type Logger interface { Info(msg string, fields ...interface{}) Error(msg string, fields ...interface{}) Debug(msg string, fields ...interface{}) Warn(msg string, fields ...interface{}) }
Logger represents a logger
type MockBuilder ¶
type MockBuilder struct {
Workspace *MockWorkspace
}
MockBuilder represents a mock builder
func (*MockBuilder) Build ¶
func (m *MockBuilder) Build() service.Workspacer
Build creates a new mock workspace
func (*MockBuilder) WithTask ¶
func (m *MockBuilder) WithTask(task *entity.Task) service.WorkspaceBuilder
WithTask sets the task of the mock builder
type MockFilesystemer ¶
MockFilesystemer represents a mock filesystemer
func NewMockFilesystemer ¶
func NewMockFilesystemer() *MockFilesystemer
NewMockFilesystemer creates a new mock filesystemer
func (*MockFilesystemer) MkdirAll ¶
func (m *MockFilesystemer) MkdirAll(path string, perm os.FileMode) error
MkdirAll creates a directory
func (*MockFilesystemer) RemoveAll ¶
func (m *MockFilesystemer) RemoveAll(path string) error
RemoveAll removes a directory
type MockProjectRepository ¶
MockProjectRepository represents a mock object of the project repository
func NewMockProjectRepository ¶
func NewMockProjectRepository() *MockProjectRepository
NewMockProjectRepository creates a new mock project repository
type MockProjectSourceCodeFetchFactory ¶
MockProjectSourceCodeFetchFactory is a mock type for the SourceCodeFetchFactory
func (*MockProjectSourceCodeFetchFactory) Get ¶
func (m *MockProjectSourceCodeFetchFactory) Get(projectType string) SourceCodeFetcher
Get provides a mock function with given fields: projectType
type MockProjectSourceCodeFetcher ¶
MockProjectSourceCodeFetcher is a mock type for the SourceCodeFetcher
type MockProjectSourceCodeUnpackFactory ¶
MockProjectSourceCodeUnpackFactory is a mock type for the SouceCodeUnpackFactory
func (*MockProjectSourceCodeUnpackFactory) Get ¶
func (m *MockProjectSourceCodeUnpackFactory) Get(projectType string) SourceCodeUnpacker
Get provides a mock function with given fields: projectType
type MockProjectSourceCodeUnpacker ¶
MockProjectSourceCodeUnpacker is a mock type for the SourceCodeUnpacker
type MockProjectUnpacker ¶
MockProjectUnpacker is a mock type for the Unpacker
type MockTaskExecutor ¶
MockTaskExecutor struct for mocking executor
func NewMockTaskExecutor ¶
func NewMockTaskExecutor() *MockTaskExecutor
NewMockTaskExecutor returns a new MockTaskExecutor
type MockTaskRepository ¶
MockTaskRepository struct for mocking task repository
func NewMockTaskRepository ¶
func NewMockTaskRepository() *MockTaskRepository
NewMockTaskRepository returns a new MockTaskRepository
func (*MockTaskRepository) Find ¶
func (m *MockTaskRepository) Find(id string) (*entity.Task, error)
Find mocks the Find method
func (*MockTaskRepository) FindAll ¶
func (m *MockTaskRepository) FindAll() ([]*entity.Task, error)
FindAll mocks the FindAll method
func (*MockTaskRepository) Remove ¶
func (m *MockTaskRepository) Remove(id string) error
Remove mocks the Remove method
func (*MockTaskRepository) SafeStore ¶
func (m *MockTaskRepository) SafeStore(id string, task *entity.Task) error
SafeStore mocks the SafeStore method
type MockWorkspace ¶
MockWorkspace represents a mock workspace
func (*MockWorkspace) Cleanup ¶
func (m *MockWorkspace) Cleanup() error
Cleanup cleans up the mock workspace
func (*MockWorkspace) GetWorkingDir ¶
func (m *MockWorkspace) GetWorkingDir() (string, error)
GetWorkingDir gets the working directory of the mock workspace
func (*MockWorkspace) Prepare ¶
func (m *MockWorkspace) Prepare() error
Prepare prepares the mock workspace
type ProjectRepository ¶
type ProjectRepository interface { Find(id string) (*entity.Project, error) FindAll() ([]*entity.Project, error) }
ProjectRepository represents a repository to manage projects
type SourceCodeFetchFactory ¶
type SourceCodeFetchFactory interface {
Get(projectType string) SourceCodeFetcher
}
SourceCodeFetchFactory represents the component to create a SourceCodeFetcher
type SourceCodeFetcher ¶
SourceCodeFetcher represents the component to fetch a project from a repository
type SourceCodeUnpackFactory ¶
type SourceCodeUnpackFactory interface {
Get(projectType string) SourceCodeUnpacker
}
SourceCodeUnpackFactory represents the component to create a SourceCodeUnpacker
type SourceCodeUnpacker ¶
SourceCodeUnpacker represents the component to unpack a project
type TaskRepository ¶
type TaskRepository interface { Find(id string) (*entity.Task, error) FindAll() ([]*entity.Task, error) Remove(id string) error SafeStore(id string, task *entity.Task) error Store(id string, task *entity.Task) error Update(id string, task *entity.Task) error }
TaskRepository represents a repository to manage tasks
Source Files ¶
- logger.go
- project.go
- projectRepository_mock.go
- projectSourceCodeFetchFactory_mock.go
- projectSourceCodeFetcher_mock.go
- projectSourceCodeUnpackFactory_mock.go
- projectSourceCodeUnpacker_mock.go
- projectUnpacker_mock.go
- task.go
- taskExecutor_mock.go
- taskRepository_mock.go
- workspace.go
- workspaceBuilder_mock.go
- workspaceFilesystemer_mock.go
- workspace_mock.go