Documentation ¶
Index ¶
Constants ¶
View Source
const ( // HugePageSize is used when we want to query all data from dependent service HugePageSize = int64(10000) DontLoadRepoDetails = false // NoAccount constant NoAccount = "Individual - No Account" //OrgAssociated stating whether user has user association with another org OrgAssociated = "are already associated with other organization" )
constants
Variables ¶
View Source
var ( ErrProjectNotFound = errors.New("project not found") ErrCLAUserNotFound = errors.New("claUser not found") ErrNoLfUsername = errors.New("user has no LF username") //ErrProjectSigned returns error if project already signed ErrProjectSigned = errors.New("project already signed") //ErrLFXUserNotFound when user-service fails to find user ErrLFXUserNotFound = errors.New("lfx user not found") //ErrContributorConflict when user is already assigned contributor role ErrContributorConflict = errors.New("user already assigned contributor") //ErrRoleScopeConflict thrown if user already has role scope ErrRoleScopeConflict = errors.New("user is already contributor") //ErrClaGroupNotFound returns error if cla group not found ErrClaGroupNotFound = errors.New("cla group not found") //ErrClaGroupBadRequest returns error if cla group bad request ErrClaGroupBadRequest = errors.New("cla group bad request") )
errors
Functions ¶
func Configure ¶
func Configure(api *operations.EasyclaAPI, service Service, projectClaGroupRepo projects_cla_groups.Repository, LFXPortalURL, v1CorporateConsole string)
Configure sets up the middleware handlers
Types ¶
type ProjectRepo ¶
type ProjectRepo interface { GetCLAGroupByID(ctx context.Context, projectID string, loadRepoDetails bool) (*v1Models.ClaGroup, error) GetCLAGroupsByExternalID(ctx context.Context, params *v1ProjectParams.GetProjectsByExternalIDParams, loadRepoDetails bool) (*v1Models.ClaGroups, error) GetCLAGroupByName(ctx context.Context, projectName string) (*v1Models.ClaGroup, error) }
ProjectRepo contains project repo methods
type Service ¶
type Service interface { GetCompanyProjectCLAManagers(ctx context.Context, v1CompanyModel *models.Company, projectSFID string) (*models.CompanyClaManagers, error) GetCompanyProjectActiveCLAs(ctx context.Context, companyID string, projectSFID string) (*models.ActiveClaList, error) GetCompanyProjectContributors(ctx context.Context, params *v2Ops.GetCompanyProjectContributorsParams) (*models.CorporateContributorList, error) GetCompanyProjectCLA(ctx context.Context, authUser *auth.User, companySFID, projectSFID string, companyID *string) (*models.CompanyProjectClaList, error) CreateCompany(ctx context.Context, params *v2Ops.CreateCompanyParams) (*models.CompanyOutput, error) CreateCompanyFromSFModel(ctx context.Context, orgModel *orgModels.Organization, authUser *auth.User) (*models.CompanyOutput, error) GetCompanyByName(ctx context.Context, companyName string) (*models.Company, error) GetCompanyBySigningEntityName(ctx context.Context, signingEntityName string) (*models.Company, error) GetCompanyByID(ctx context.Context, companyID string) (*models.Company, error) GetCompanyBySFID(ctx context.Context, companySFID string) (*models.Company, error) DeleteCompanyByID(ctx context.Context, companyID string) error DeleteCompanyBySFID(ctx context.Context, companySFID string) error GetCompanyCLAGroupManagers(ctx context.Context, companyID, claGroupID string) (*models.CompanyClaManagers, error) AssociateContributor(ctx context.Context, companySFID, userEmail string) (*models.Contributor, error) AssociateContributorByGroup(ctx context.Context, companySFID, userEmail string, projectCLAGroups []*projects_cla_groups.ProjectClaGroup, ClaGroupID string) ([]*models.Contributor, string, error) GetCompanyAdmins(ctx context.Context, companyID string) (*models.CompanyAdminList, error) RequestCompanyAdmin(ctx context.Context, userID string, claManagerEmail string, claManagerName string, contributorName string, contributorEmail string, projectName string, companyName string, lFxPortalURL string) error // GetCompanyLookup uses the org service to lookup the value GetCompanyLookup(ctx context.Context, companyName string, websiteName string) (*models.Lookup, error) }
Service functions for company
func NewService ¶
func NewService(v1CompanyService v1Company.IService, sigRepo signatures.SignatureRepository, projectRepo ProjectRepo, usersRepo users.UserRepository, companyRepo company.IRepository, pcgRepo projects_cla_groups.Repository, evService events.Service) Service
NewService returns instance of company service
Click to show internal directories.
Click to hide internal directories.