Documentation ¶
Index ¶
- func NewRepoSet(sizeHint int) *repoSet
- type ChangeFetcher
- type ChangeFetcherNotificationComposer
- type ChangeScheduler
- type CloneMsg
- type Cloner
- type ClonerNotificationComposer
- type GitBranchCloneClient
- type GitBranchCredentialsCounterClient
- type GitFetchClient
- type GitGCClient
- type GitGCRunner
- type GitGetParentsDiffClient
- type GitHubClient
- func (c *GitHubClient) GetRepo(logger lager.Logger, owner, repoName string) (*GitHubRepository, error)
- func (c *GitHubClient) ListRepositoriesByOrg(logger lager.Logger, orgName string) ([]GitHubRepository, error)
- func (c *GitHubClient) ListRepositoriesByUser(logger lager.Logger, userName string) ([]GitHubRepository, error)
- type GitHubOrganization
- type GitHubRepository
- type GithubRepositoryService
- type GithubService
- type HeadCredentialCounter
- type NotificationComposer
- type NotificationComposerScanner
- type ObliviousHealthCheck
- type RepoChangeScheduler
- type RepoDiscoverer
- type RepoDiscovererGitHubClient
- type Rescanner
- type RescannerScanner
- type Scanner
- type ScheduleRunner
- type Scheduler
- type SchedulerChangeFetcher
- type Sink
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRepoSet ¶
func NewRepoSet(sizeHint int) *repoSet
Types ¶
type ChangeFetcher ¶
type ChangeFetcher struct {
// contains filtered or unexported fields
}
func NewChangeFetcher ¶
func NewChangeFetcher( logger lager.Logger, gitClient GitFetchClient, ghClient GithubService, notificationComposer ChangeFetcherNotificationComposer, repositoryRepository db.RepositoryRepository, fetchRepository db.FetchRepository, emitter metrics.Emitter, ) *ChangeFetcher
type ChangeScheduler ¶
type ChangeScheduler struct {
// contains filtered or unexported fields
}
func NewChangeScheduler ¶
func NewChangeScheduler(logger lager.Logger, repoRepo db.RepositoryRepository, scheduler Scheduler, fetcher SchedulerChangeFetcher) *ChangeScheduler
func (*ChangeScheduler) Run ¶
func (s *ChangeScheduler) Run(signals <-chan os.Signal, ready chan<- struct{}) error
func (*ChangeScheduler) ScheduleActiveRepos ¶
func (s *ChangeScheduler) ScheduleActiveRepos(logger lager.Logger) error
func (*ChangeScheduler) ScheduleRepo ¶
func (s *ChangeScheduler) ScheduleRepo(logger lager.Logger, repo db.Repository)
type Cloner ¶
type Cloner struct {
// contains filtered or unexported fields
}
func NewCloner ¶
func NewCloner( logger lager.Logger, workdir string, workCh chan CloneMsg, gitClient GitBranchCloneClient, repositoryRepository db.RepositoryRepository, notificationComposer ClonerNotificationComposer, emitter metrics.Emitter, scheduler RepoChangeScheduler, ) *Cloner
type GitBranchCloneClient ¶
type GitGCClient ¶
type GitGCRunner ¶
type GitGCRunner struct {
// contains filtered or unexported fields
}
func NewGitGCRunner ¶
func NewGitGCRunner( logger lager.Logger, clock clock.Clock, repoRepo db.RepositoryRepository, gitClient GitGCClient, retryInterval time.Duration, ) *GitGCRunner
type GitGetParentsDiffClient ¶
type GitHubClient ¶
type GitHubClient struct {
// contains filtered or unexported fields
}
func NewGitHubClient ¶
func NewGitHubClient( ghRepositoryService GithubRepositoryService, ) *GitHubClient
func (*GitHubClient) GetRepo ¶
func (c *GitHubClient) GetRepo(logger lager.Logger, owner, repoName string) (*GitHubRepository, error)
func (*GitHubClient) ListRepositoriesByOrg ¶
func (c *GitHubClient) ListRepositoriesByOrg(logger lager.Logger, orgName string) ([]GitHubRepository, error)
func (*GitHubClient) ListRepositoriesByUser ¶
func (c *GitHubClient) ListRepositoriesByUser(logger lager.Logger, userName string) ([]GitHubRepository, error)
type GitHubOrganization ¶
type GitHubOrganization struct {
Name string `json:"login"`
}
type GitHubRepository ¶
type GithubRepositoryService ¶
type GithubRepositoryService interface { ListByOrg(ctx context.Context, org string, opt *github.RepositoryListByOrgOptions) ([]*github.Repository, *github.Response, error) List(ctx context.Context, user string, opt *github.RepositoryListOptions) ([]*github.Repository, *github.Response, error) Get(ctx context.Context, owner, repo string) (*github.Repository, *github.Response, error) }
type GithubService ¶
type GithubService interface { ListRepositoriesByOrg(logger lager.Logger, orgName string) ([]GitHubRepository, error) ListRepositoriesByUser(logger lager.Logger, userName string) ([]GitHubRepository, error) GetRepo(logger lager.Logger, owner, repoName string) (*GitHubRepository, error) }
type HeadCredentialCounter ¶
type HeadCredentialCounter struct {
// contains filtered or unexported fields
}
func NewHeadCredentialCounter ¶
func NewHeadCredentialCounter( logger lager.Logger, branchRepository db.BranchRepository, repositoryRepository db.RepositoryRepository, clock clock.Clock, interval time.Duration, gitClient GitBranchCredentialsCounterClient, sniffer sniff.Sniffer, ) *HeadCredentialCounter
type NotificationComposer ¶
type NotificationComposer struct {
// contains filtered or unexported fields
}
func NewNotificationComposer ¶
func NewNotificationComposer( repositoryRepository db.RepositoryRepository, router notifications.Router, scanner NotificationComposerScanner, ) *NotificationComposer
type ObliviousHealthCheck ¶
type ObliviousHealthCheck struct{}
func NewObliviousHealthCheck ¶
func NewObliviousHealthCheck() *ObliviousHealthCheck
func (*ObliviousHealthCheck) ServeHTTP ¶
func (hc *ObliviousHealthCheck) ServeHTTP(w http.ResponseWriter, r *http.Request)
type RepoChangeScheduler ¶
type RepoChangeScheduler interface {
ScheduleRepo(lager.Logger, db.Repository)
}
type RepoDiscoverer ¶
type RepoDiscoverer struct {
// contains filtered or unexported fields
}
func NewRepoDiscoverer ¶
func NewRepoDiscoverer( logger lager.Logger, workdir string, cloneMsgCh chan CloneMsg, ghClient RepoDiscovererGitHubClient, clock clock.Clock, interval time.Duration, orgs []string, users []string, repositoryRepository db.RepositoryRepository, ) *RepoDiscoverer
type RepoDiscovererGitHubClient ¶
type RepoDiscovererGitHubClient interface { ListRepositoriesByOrg(lager.Logger, string) ([]GitHubRepository, error) ListRepositoriesByUser(lager.Logger, string) ([]GitHubRepository, error) }
type Rescanner ¶
type Rescanner struct {
// contains filtered or unexported fields
}
func NewRescanner ¶
func NewRescanner( logger lager.Logger, scanRepo db.ScanRepository, credRepo db.CredentialRepository, scanner RescannerScanner, router notifications.Router, emitter metrics.Emitter, ) *Rescanner
type RescannerScanner ¶
type Scanner ¶
type Scanner struct {
// contains filtered or unexported fields
}
func NewScanner ¶
func NewScanner( gitClient GitGetParentsDiffClient, repositoryRepository db.RepositoryRepository, scanRepository db.ScanRepository, credentialRepository db.CredentialRepository, sniffer sniff.Sniffer, ) *Scanner
type ScheduleRunner ¶
type ScheduleRunner struct {
// contains filtered or unexported fields
}
func NewScheduleRunner ¶
func NewScheduleRunner(logger lager.Logger) *ScheduleRunner
func (*ScheduleRunner) Run ¶
func (s *ScheduleRunner) Run(signals <-chan os.Signal, ready chan<- struct{}) error
func (*ScheduleRunner) ScheduleWork ¶
func (s *ScheduleRunner) ScheduleWork(cron string, work func())
type SchedulerChangeFetcher ¶
type Sink ¶
type Sink struct { }
Sink is the type that represents the sink that will emit errors to Sentry.
func NewSentrySink ¶
NewSentrySink creates a new Sink for use with Lager.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.