Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Configure ¶
func Configure(api *operations.ClaAPI, service SignatureService, sessionStore *dynastore.Store, eventsService events.Service)
Configure setups handlers on api with service
Types ¶
type DBManagersModel ¶ added in v1.0.11
type DBManagersModel struct {
SignatureID string `json:"signature_id"`
SignatureACL []string `json:"signature_acl"`
}
DBManagersModel is a database model for only the ACL/Manager column
type DBSignatureUsersModel ¶ added in v1.0.13
type DBSignatureUsersModel struct {
SignatureID string `json:"signature_id"`
UserID string `json:"signature_reference_id"`
}
DBSignatureUsersModel is a database model for only the signature ID and signature_reference_id fields
type ItemSignature ¶ added in v1.0.8
type ItemSignature struct {
SignatureID string `json:"signature_id"`
DateCreated string `json:"date_created"`
DateModified string `json:"date_modified"`
SignatureApproved bool `json:"signature_approved"`
SignatureSigned bool `json:"signature_signed"`
SignatureDocumentMajorVersion string `json:"signature_document_major_version"`
SignatureDocumentMinorVersion string `json:"signature_document_minor_version"`
SignatureReferenceID string `json:"signature_reference_id"`
SignatureReferenceName string `json:"signature_reference_name"`
SignatureReferenceNameLower string `json:"signature_reference_name_lower"`
SignatureProjectID string `json:"signature_project_id"`
SignatureReferenceType string `json:"signature_reference_type"`
SignatureType string `json:"signature_type"`
SignatureUserCompanyID string `json:"signature_user_ccla_company_id"`
EmailWhitelist []string `json:"email_whitelist"`
DomainWhitelist []string `json:"domain_whitelist"`
GitHubWhitelist []string `json:"github_whitelist"`
GitHubOrgWhitelist []string `json:"github_org_whitelist"`
SignatureACL []string `json:"signature_acl"`
}
ItemSignature database model
type SignatureRepository ¶
type SignatureRepository interface {
GetMetrics() (*models.SignatureMetrics, error)
GetGithubOrganizationsFromWhitelist(signatureID string) ([]models.GithubOrg, error)
AddGithubOrganizationToWhitelist(signatureID, githubOrganizationID string) ([]models.GithubOrg, error)
DeleteGithubOrganizationFromWhitelist(signatureID, githubOrganizationID string) ([]models.GithubOrg, error)
InvalidateProjectRecord(signatureID string, projectName string) error
GetSignature(signatureID string) (*models.Signature, error)
GetProjectSignatures(params signatures.GetProjectSignaturesParams, pageSize int64) (*models.Signatures, error)
GetProjectCompanySignatures(params signatures.GetProjectCompanySignaturesParams, pageSize int64) (*models.Signatures, error)
GetProjectCompanyEmployeeSignatures(params signatures.GetProjectCompanyEmployeeSignaturesParams, pageSize int64) (*models.Signatures, error)
GetCompanySignatures(params signatures.GetCompanySignaturesParams, pageSize int64) (*models.Signatures, error)
GetUserSignatures(params signatures.GetUserSignaturesParams, pageSize int64) (*models.Signatures, error)
ProjectSignatures(projectID string) (*models.Signatures, error)
// contains filtered or unexported methods
}
SignatureRepository interface defines the functions for the github whitelist service
func NewRepository ¶
func NewRepository(awsSession *session.Session, stage string, companyRepo company.CompanyRepository, usersRepo users.Service) SignatureRepository
NewRepository creates a new instance of the whitelist service
type SignatureService ¶
type SignatureService interface {
GetMetrics() (*models.SignatureMetrics, error)
GetSignature(signatureID string) (*models.Signature, error)
GetProjectSignatures(params signatures.GetProjectSignaturesParams) (*models.Signatures, error)
GetProjectCompanySignatures(params signatures.GetProjectCompanySignaturesParams) (*models.Signatures, error)
GetProjectCompanyEmployeeSignatures(params signatures.GetProjectCompanyEmployeeSignaturesParams) (*models.Signatures, error)
GetCompanySignatures(params signatures.GetCompanySignaturesParams) (*models.Signatures, error)
GetUserSignatures(params signatures.GetUserSignaturesParams) (*models.Signatures, error)
InvalidateProjectRecords(projectID string, projectName string) error
GetGithubOrganizationsFromWhitelist(signatureID string, githubAccessToken string) ([]models.GithubOrg, error)
AddGithubOrganizationToWhitelist(signatureID string, whiteListParams models.GhOrgWhitelist, githubAccessToken string) ([]models.GithubOrg, error)
DeleteGithubOrganizationFromWhitelist(signatureID string, whiteListParams models.GhOrgWhitelist, githubAccessToken string) ([]models.GithubOrg, error)
}
SignatureService interface
func NewService ¶
func NewService(repo SignatureRepository, githubOrgValidation bool) SignatureService
NewService creates a new whitelist service
Click to show internal directories.
Click to hide internal directories.