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.UserRepository, ...) service
- type CclaWhitelistRequest
- type Repository
Constants ¶
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, signatureService signatures.SignatureService, eventsService events.Service)
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.UserRepository, companyRepo company.CompanyRepository, projectRepo project.ProjectRepository, 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 Repository ¶
type Repository interface {
AddCclaWhitelistRequest(company *models.Company, project *models.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.