revok

package
v62.0.0+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 14, 2017 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCloner

func NewCloner(
	logger lager.Logger,
	workdir string,
	workCh chan CloneMsg,
	gitClient gitclient.Client,
	repositoryRepository db.RepositoryRepository,
	notificationComposer NotificationComposer,
	emitter metrics.Emitter,
	scheduler RepoChangeScheduler,
) ifrit.Runner

func NewHeadCredentialCounter

func NewHeadCredentialCounter(
	logger lager.Logger,
	branchRepository db.BranchRepository,
	repositoryRepository db.RepositoryRepository,
	clock clock.Clock,
	interval time.Duration,
	gitClient gitclient.Client,
	sniffer sniff.Sniffer,
) ifrit.Runner

func NewRepoDiscoverer

func NewRepoDiscoverer(
	logger lager.Logger,
	workdir string,
	cloneMsgCh chan CloneMsg,
	ghClient GitHubClient,
	clock clock.Clock,
	interval time.Duration,
	repositoryRepository db.RepositoryRepository,
) ifrit.Runner

func NewRepoSet

func NewRepoSet(sizeHint int) *repoSet

func NewRescanner

func NewRescanner(
	logger lager.Logger,
	scanRepo db.ScanRepository,
	credRepo db.CredentialRepository,
	scanner Scanner,
	router notifications.Router,
	emitter metrics.Emitter,
) ifrit.Runner

func ObliviousHealthCheck

func ObliviousHealthCheck() http.Handler

Types

type ChangeFetcher

type ChangeFetcher interface {
	Fetch(logger lager.Logger, owner, name string, reenable bool) error
}

func NewChangeFetcher

func NewChangeFetcher(
	logger lager.Logger,
	gitClient gitclient.Client,
	notificationComposer NotificationComposer,
	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 ChangeFetcher) *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 CloneMsg

type CloneMsg struct {
	Repository string
	Owner      string
	URL        string
}

type Cloner

type Cloner struct {
	// contains filtered or unexported fields
}

func (*Cloner) Run

func (c *Cloner) Run(signals <-chan os.Signal, ready chan<- struct{}) error

type GitHubClient

type GitHubClient interface {
	ListRepositoriesByOrg(lager.Logger, string) ([]GitHubRepository, error)
	ListOrganizations(lager.Logger) ([]GitHubOrganization, error)
}

func NewGitHubClient

func NewGitHubClient(
	ghClient *github.Client,
) GitHubClient

type GitHubOrganization

type GitHubOrganization struct {
	Name string `json:"login"`
}

type GitHubRepository

type GitHubRepository struct {
	Name          string
	Owner         string
	SSHURL        string
	Private       bool
	DefaultBranch string
	RawJSON       []byte
}

type NotificationComposer

type NotificationComposer interface {
	ScanAndNotify(lager.Logger, string, string, map[string]struct{}, string, string, string) error
}

func NewNotificationComposer

func NewNotificationComposer(
	repositoryRepository db.RepositoryRepository,
	router notifications.Router,
	scanner Scanner,
) NotificationComposer

type RepoChangeScheduler

type RepoChangeScheduler interface {
	ScheduleRepo(lager.Logger, db.Repository)
}

type RepoDiscoverer

type RepoDiscoverer struct {
	// contains filtered or unexported fields
}

func (*RepoDiscoverer) Run

func (r *RepoDiscoverer) Run(signals <-chan os.Signal, ready chan<- struct{}) error

type Rescanner

type Rescanner struct {
	// contains filtered or unexported fields
}

func (*Rescanner) Run

func (r *Rescanner) Run(signals <-chan os.Signal, ready chan<- struct{}) error

type Scanner

type Scanner interface {
	Scan(lager.Logger, string, string, map[string]struct{}, string, string, string) ([]db.Credential, error)
}

func NewScanner

func NewScanner(
	gitClient gitclient.Client,
	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 Schedule

func Schedule(logger lager.Logger, cron string, work func()) *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 Scheduler

type Scheduler interface {
	ScheduleWork(string, func())
}

type Server

type Server interface {
	revokpb.RevokServer
}

func NewServer

func NewServer(
	logger lager.Logger,
	searcher search.Searcher,
	repositoryRepository db.RepositoryRepository,
	branchRepository db.BranchRepository,
) Server

type Sink

type Sink struct {
}

Sink is the type that represents the sink that will emit errors to Sentry.

func NewSentrySink

func NewSentrySink(dsn, env string) *Sink

NewSentrySink creates a new Sink for use with Lager.

func (*Sink) Log

func (s *Sink) Log(line lager.LogFormat)

Log will send any error log lines up to Sentry.

Directories

Path Synopsis
This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter
This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL