Documentation ¶
Index ¶
- Variables
- func GenerateDefaultSourceName(remoteURL string) (string, error)
- type ProjectManager
- func (m *ProjectManager) BuildProjectFilterAndSortOptions(ctx context.Context, query *url.Values) (*entity.ProjectFilter, *entity.SortOptions, error)
- func (m *ProjectManager) CreateProject(ctx context.Context, requestPayload request.CreateProjectRequest) (*entity.Project, error)
- func (m *ProjectManager) DeleteProjectByID(ctx context.Context, id uint) error
- func (m *ProjectManager) GetProjectByID(ctx context.Context, id uint) (*entity.Project, error)
- func (m *ProjectManager) ListProjects(ctx context.Context, filter *entity.ProjectFilter, ...) (*entity.ProjectListResult, error)
- func (m *ProjectManager) UpdateProjectByID(ctx context.Context, id uint, requestPayload request.UpdateProjectRequest) (*entity.Project, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrGettingNonExistingProject = errors.New("the project does not exist") ErrUpdatingNonExistingProject = errors.New("the project to update does not exist") ErrSourceNotFound = errors.New("the specified source does not exist") ErrOrgNotFound = errors.New("the specified org does not exist") ErrDefaultSourceRemoteInvalid = errors.New("the default source remote url is invalid") )
Functions ¶
func GenerateDefaultSourceName ¶ added in v0.14.0
GenerateDefaultSourceName generates a default source name based on the remote URL
Types ¶
type ProjectManager ¶
type ProjectManager struct {
// contains filtered or unexported fields
}
func NewProjectManager ¶
func NewProjectManager(projectRepo repository.ProjectRepository, organizationRepo repository.OrganizationRepository, sourceRepo repository.SourceRepository, defaultSource entity.Source, ) *ProjectManager
func (*ProjectManager) BuildProjectFilterAndSortOptions ¶ added in v0.14.0
func (m *ProjectManager) BuildProjectFilterAndSortOptions(ctx context.Context, query *url.Values) (*entity.ProjectFilter, *entity.SortOptions, error)
func (*ProjectManager) CreateProject ¶
func (m *ProjectManager) CreateProject(ctx context.Context, requestPayload request.CreateProjectRequest) (*entity.Project, error)
func (*ProjectManager) DeleteProjectByID ¶
func (m *ProjectManager) DeleteProjectByID(ctx context.Context, id uint) error
func (*ProjectManager) GetProjectByID ¶
func (*ProjectManager) ListProjects ¶
func (m *ProjectManager) ListProjects(ctx context.Context, filter *entity.ProjectFilter, sortOptions *entity.SortOptions) (*entity.ProjectListResult, error)
func (*ProjectManager) UpdateProjectByID ¶
func (m *ProjectManager) UpdateProjectByID(ctx context.Context, id uint, requestPayload request.UpdateProjectRequest) (*entity.Project, error)
Click to show internal directories.
Click to hide internal directories.