Documentation ¶
Index ¶
- type ProjectService
- func (s ProjectService) CreateCLAGroup(ctx context.Context, claGroupModel *models.ClaGroup) (*models.ClaGroup, error)
- func (s ProjectService) DeleteCLAGroup(ctx context.Context, claGroupID string) error
- func (s ProjectService) FillRepoInfo(ctx context.Context, project *models.ClaGroup)
- func (s ProjectService) GetCLAGroupByID(ctx context.Context, claGroupID string) (*models.ClaGroup, error)
- func (s ProjectService) GetCLAGroupByName(ctx context.Context, projectName string) (*models.ClaGroup, error)
- func (s ProjectService) GetCLAGroupCurrentCCLATemplateURLByID(ctx context.Context, claGroupID string) (string, error)
- func (s ProjectService) GetCLAGroupCurrentICLATemplateURLByID(ctx context.Context, claGroupID string) (string, error)
- func (s ProjectService) GetCLAGroups(ctx context.Context, params *project.GetProjectsParams) (*models.ClaGroups, error)
- func (s ProjectService) GetCLAGroupsByExternalID(ctx context.Context, params *project.GetProjectsByExternalIDParams) (*models.ClaGroups, error)
- func (s ProjectService) GetCLAGroupsByExternalSFID(ctx context.Context, projectSFID string) (*models.ClaGroups, error)
- func (s ProjectService) GetCLAManagers(ctx context.Context, claGroupID string) ([]*models.ClaManagerUser, error)
- func (s ProjectService) GetClaGroupByProjectSFID(ctx context.Context, projectSFID string, loadRepoDetails bool) (*models.ClaGroup, error)
- func (s ProjectService) GetClaGroupsByFoundationSFID(ctx context.Context, foundationSFID string, loadRepoDetails bool) (*models.ClaGroups, error)
- func (s ProjectService) SignedAtFoundationLevel(ctx context.Context, foundationSFID string) (bool, error)
- func (s ProjectService) UpdateCLAGroup(ctx context.Context, claGroupModel *models.ClaGroup) (*models.ClaGroup, error)
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ProjectService ¶
type ProjectService struct {
// contains filtered or unexported fields
}
ProjectService project service data model
func (ProjectService) CreateCLAGroup ¶
func (s ProjectService) CreateCLAGroup(ctx context.Context, claGroupModel *models.ClaGroup) (*models.ClaGroup, error)
CreateCLAGroup service method
func (ProjectService) DeleteCLAGroup ¶
func (s ProjectService) DeleteCLAGroup(ctx context.Context, claGroupID string) error
DeleteCLAGroup service method
func (ProjectService) FillRepoInfo ¶
func (s ProjectService) FillRepoInfo(ctx context.Context, project *models.ClaGroup)
FillRepoInfo helper function to fill the repository info
func (ProjectService) GetCLAGroupByID ¶
func (s ProjectService) GetCLAGroupByID(ctx context.Context, claGroupID string) (*models.ClaGroup, error)
GetCLAGroupByID service method
func (ProjectService) GetCLAGroupByName ¶
func (s ProjectService) GetCLAGroupByName(ctx context.Context, projectName string) (*models.ClaGroup, error)
GetCLAGroupByName service method
func (ProjectService) GetCLAGroupCurrentCCLATemplateURLByID ¶
func (ProjectService) GetCLAGroupCurrentICLATemplateURLByID ¶
func (ProjectService) GetCLAGroups ¶
func (s ProjectService) GetCLAGroups(ctx context.Context, params *project.GetProjectsParams) (*models.ClaGroups, error)
GetCLAGroups service method
func (ProjectService) GetCLAGroupsByExternalID ¶
func (s ProjectService) GetCLAGroupsByExternalID(ctx context.Context, params *project.GetProjectsByExternalIDParams) (*models.ClaGroups, error)
GetCLAGroupsByExternalID returns a list of projects based on the external ID parameters
func (ProjectService) GetCLAGroupsByExternalSFID ¶
func (s ProjectService) GetCLAGroupsByExternalSFID(ctx context.Context, projectSFID string) (*models.ClaGroups, error)
GetCLAGroupsByExternalSFID returns a list of projects based on the external SFID parameter
func (ProjectService) GetCLAManagers ¶
func (s ProjectService) GetCLAManagers(ctx context.Context, claGroupID string) ([]*models.ClaManagerUser, error)
GetCLAManagers retrieves a list of managers for the give claGroupID
func (ProjectService) GetClaGroupByProjectSFID ¶
func (s ProjectService) GetClaGroupByProjectSFID(ctx context.Context, projectSFID string, loadRepoDetails bool) (*models.ClaGroup, error)
GetClaGroupByProjectSFID service method
func (ProjectService) GetClaGroupsByFoundationSFID ¶
func (s ProjectService) GetClaGroupsByFoundationSFID(ctx context.Context, foundationSFID string, loadRepoDetails bool) (*models.ClaGroups, error)
GetClaGroupsByFoundationSFID service method
func (ProjectService) SignedAtFoundationLevel ¶
func (s ProjectService) SignedAtFoundationLevel(ctx context.Context, foundationSFID string) (bool, error)
SignedAtFoundationLevel returns true if the specified foundation has a CLA Group at the foundation level, returns false otherwise.
func (ProjectService) UpdateCLAGroup ¶
func (s ProjectService) UpdateCLAGroup(ctx context.Context, claGroupModel *models.ClaGroup) (*models.ClaGroup, error)
UpdateCLAGroup service method
type Service ¶
type Service interface { CreateCLAGroup(ctx context.Context, project *models.ClaGroup) (*models.ClaGroup, error) GetCLAGroups(ctx context.Context, params *project.GetProjectsParams) (*models.ClaGroups, error) GetCLAGroupByID(ctx context.Context, claGroupID string) (*models.ClaGroup, error) GetCLAGroupsByExternalSFID(ctx context.Context, projectSFID string) (*models.ClaGroups, error) GetCLAGroupsByExternalID(ctx context.Context, params *project.GetProjectsByExternalIDParams) (*models.ClaGroups, error) GetCLAGroupByName(ctx context.Context, projectName string) (*models.ClaGroup, error) GetCLAGroupCurrentICLATemplateURLByID(ctx context.Context, claGroupID string) (string, error) GetCLAGroupCurrentCCLATemplateURLByID(ctx context.Context, claGroupID string) (string, error) DeleteCLAGroup(ctx context.Context, claGroupID string) error UpdateCLAGroup(ctx context.Context, claGroupModel *models.ClaGroup) (*models.ClaGroup, error) GetClaGroupsByFoundationSFID(ctx context.Context, foundationSFID string, loadRepoDetails bool) (*models.ClaGroups, error) GetClaGroupByProjectSFID(ctx context.Context, projectSFID string, loadRepoDetails bool) (*models.ClaGroup, error) SignedAtFoundationLevel(ctx context.Context, foundationSFID string) (bool, error) GetCLAManagers(ctx context.Context, claGroupID string) ([]*models.ClaManagerUser, error) }
Service interface defines the project service methods/functions
func NewService ¶
func NewService(projectRepo repository.ProjectRepository, repositoriesRepo repositories.RepositoryInterface, gerritRepo gerrits.Repository, projectCLAGroupRepo projects_cla_groups.Repository, usersRepo users.UserRepository) Service
NewService returns an instance of the project service