Documentation
¶
Index ¶
- Constants
- Variables
- func Configure(api *operations.ClaAPI, service service, sessionStore *dynastore.Store)
- func NewRepository(awsSession *session.Session, stage string) repository
- func NewService(repo Repository, userRepo users.Repository, ...) service
- type CclaWhitelistRequest
- type CclaWhitelistRequestAddedData
- type CclaWhitelistRequestDeletedData
- type Repository
Constants ¶
View Source
const ( CclaWhitelistRequestAdded = "ccla_whitelist_request_added" CclaWhitelistRequestDeleted = "ccla_whitelist_request_deleted" )
events
View Source
const ( // Version is version of CclaWhitelistRequest Version = "v1" // StatusPending is status of CclaWhitelistRequest StatusPending = "pending" )
Variables ¶
View Source
var (
ErrCclaWhitelistRequestAlreadyExists = errors.New("CCLA whiltelist request already exist")
)
errors
Functions ¶
func Configure ¶
func Configure(api *operations.ClaAPI, service service, sessionStore *dynastore.Store)
Configure setups handlers on api with service
func NewRepository ¶
NewRepository creates a new instance of the whitelist service
func NewService ¶
func NewService(repo Repository, userRepo users.Repository, companyRepo company.RepositoryService, projectRepo project.DynamoRepository, eventsService events.Service, httpClient *http.Client) service
NewService creates a new whitelist service
Types ¶
type CclaWhitelistRequest ¶ added in v1.0.4
type CclaWhitelistRequest struct {
RequestID string `dynamodbav:"request_id"`
RequestStatus string `dynamodbav:"request_status"`
CompanyID string `dynamodbav:"company_id"`
CompanyName string `dynamodbav:"company_name"`
ProjectID string `dynamodbav:"project_id"`
ProjectName string `dynamodbav:"project_name"`
UserID string `dynamodbav:"user_id"`
UserEmails []string `dynamodbav:"user_emails"`
UserName string `dynamodbav:"user_name"`
UserGithubID string `dynamodbav:"user_github_id"`
UserGithubUsername string `dynamodbav:"user_github_username"`
DateCreated string `dynamodbav:"date_created"`
DateModified string `dynamodbav:"date_modified"`
Version string `dynamodbav:"version"`
}
CclaWhitelistRequest data model
type CclaWhitelistRequestAddedData ¶ added in v1.0.4
type CclaWhitelistRequestAddedData struct {
CompanyID string `json:"company_id"`
ProjectID string `json:"project_id"`
UserID string `json:"user_id"`
RequestID string `json:"request_id"`
}
CclaWhitelistRequestAddedData is event data for event ccla_whitelist_request_added
type CclaWhitelistRequestDeletedData ¶ added in v1.0.4
type CclaWhitelistRequestDeletedData struct {
CompanyID string `json:"company_id"`
ProjectID string `json:"project_id"`
RequestID string `json:"request_id"`
}
CclaWhitelistRequestDeletedData is event data for event ccla_whitelist_request_deleted
type Repository ¶
type Repository interface {
DeleteGithubOrganizationFromWhitelist(claGroupID, githubOrganizationID string) error
AddGithubOrganizationToWhitelist(claGroupID, githubOrganizationID string) error
GetGithubOrganizationsFromWhitelist(claGroupID string) ([]models.GithubOrg, error)
AddCclaWhitelistRequest(company company.Company, project *project.Project, user *models.User) (string, error)
DeleteCclaWhitelistRequest(requestID string) error
ListCclaWhitelistRequest(companyID string, projectID *string, userID *string) (*models.CclaWhitelistRequestList, error)
}
Repository interface defines the functions for the whitelist service
Click to show internal directories.
Click to hide internal directories.