Documentation
¶
Index ¶
Constants ¶
View Source
const ( // CLARepositoryTable is name of repositories table in database CLARepositoryTable = "cla.repositories" // CLAGroupsTable is name of cla_groups table in database CLAGroupsTable = "cla.cla_groups" )
Variables ¶
View Source
var (
ErrInvalidClgGroupAndProjectID = errors.New("given cla_group is not present for given project")
)
Errors
Functions ¶
func Configure ¶
func Configure(api *operations.ClaAPI, service Service)
Configure setups handlers on api with service
Types ¶
type CreatedEventData ¶
type CreatedEventData struct { Input *models.CreateRepositoriesInput `json:"input"` CreatedRepositories *models.RepositoryList `json:"created_repositories"` }
CreatedEventData is data for repositories_created event
type DeletedEventData ¶
type DeletedEventData struct {
Input *models.DeleteRepositoriesInput `json:"input"`
}
DeletedEventData is data for repositories_deleted event
type Repository ¶
type Repository interface { CreateRepositories(in *models.CreateRepositoriesInput) (*models.RepositoryList, error) DeleteRepositories(in *models.DeleteRepositoriesInput) error ListRepositories(in *params.ListRepositoriesParams) (*models.RepositoryList, error) }
Repository interface defines methods of repository service
func NewRepository ¶
func NewRepository(dbConn *sqlx.DB) Repository
NewRepository creates new instance of audit event repository
type RepositoryType ¶
type RepositoryType string
RepositoryType is the type of repository
const ( RepositoryTypeGithub RepositoryType = "github" RepositoryTypeGitlab RepositoryType = "gitlab" RepositoryTypeGerrit RepositoryType = "gerrit" )
valid values of RepositoryType
type SQLRepository ¶
type SQLRepository struct { ID sql.NullString `db:"id"` RepositoryType sql.NullString `db:"repository_type"` Name sql.NullString `db:"name"` ExternalID sql.NullString `db:"external_id"` OrganizationName sql.NullString `db:"organization_name"` URL sql.NullString `db:"url"` Enabled sql.NullBool `db:"enabled"` ProjectID sql.NullString `db:"project_id"` ClaGroupID sql.NullString `db:"cla_group_id"` CreatedAt sql.NullInt64 `db:"created_at"` }
SQLRepository represents row of sql.repositories table
type Service ¶
type Service interface { CreateRepositories(user *auth.User, in *params.CreateRepositoriesParams) (*models.RepositoryList, error) DeleteRepositories(user *auth.User, in *params.DeleteRepositoriesParams) error ListRepositories(in *params.ListRepositoriesParams) (*models.RepositoryList, error) }
Service interface defines methods of repository service
func NewService ¶
func NewService(repo Repository, eventService events.Service) Service
NewService creates new instance of repository service
Click to show internal directories.
Click to hide internal directories.