Documentation ¶
Index ¶
- Constants
- func NewCommitRepository(db *gorm.DB) *commitRepository
- func NewDSN(username, password, dbName, hostname string, port int, serverName string, ...) string
- func NewFetchRepository(db *gorm.DB) *fetchRepository
- func NewRepositoryRepository(db *gorm.DB) *repositoryRepository
- type ActiveScan
- type Branch
- type BranchCredentialCount
- type BranchRepository
- type Commit
- type CommitRepository
- type Credential
- type CredentialRepository
- type Fetch
- type FetchRepository
- type Model
- type OwnerCredentialCount
- type PriorScan
- type Repository
- type RepositoryCredentialCount
- type RepositoryRepository
- type Scan
- type ScanRepository
- type StatsRepository
Constants ¶
View Source
const FailedFetchThreshold = 3
Variables ¶
This section is empty.
Functions ¶
func NewCommitRepository ¶
func NewFetchRepository ¶
func NewRepositoryRepository ¶
Types ¶
type ActiveScan ¶
type ActiveScan interface { RecordCredential(Credential) Finish() error }
type BranchCredentialCount ¶
type BranchRepository ¶
type BranchRepository interface { GetBranches(repository Repository) ([]Branch, error) UpdateBranches(repository Repository, branches []Branch) error GetCredentialCountByOwner() ([]OwnerCredentialCount, error) GetCredentialCountForOwner(owner string) ([]RepositoryCredentialCount, error) GetCredentialCountForRepo(owner string, repo string) ([]BranchCredentialCount, error) }
func NewBranchRepository ¶
func NewBranchRepository(db *gorm.DB) BranchRepository
type CommitRepository ¶
type Credential ¶
type Credential struct { Model Scan Scan ScanID uint Owner string Repository string SHA string Path string LineNumber int MatchStart int MatchEnd int Private bool }
func (*Credential) Hash ¶
func (c *Credential) Hash() string
type CredentialRepository ¶
type CredentialRepository interface { ForScanWithID(int) ([]Credential, error) UniqueSHAsForRepoAndRulesVersion(Repository, int) ([]string, error) }
func NewCredentialRepository ¶
func NewCredentialRepository(db *gorm.DB) CredentialRepository
type Fetch ¶
type Fetch struct { Model Repository *Repository RepositoryID uint Path string Changes []byte }
type OwnerCredentialCount ¶
type Repository ¶
type RepositoryRepository ¶
type RepositoryRepository interface { Create(*Repository) error Find(owner string, name string) (Repository, bool, error) MustFind(owner string, name string) (Repository, error) All() ([]Repository, error) Active() ([]Repository, error) AllForOrganization(string) ([]Repository, error) NotScannedWithVersion(int) ([]Repository, error) MarkAsCloned(string, string, string) error Reenable(string, string) error RegisterFailedFetch(lager.Logger, *Repository) error }
type ScanRepository ¶
type ScanRepository interface { Start(lager.Logger, string, string, string, string, *Repository, *Fetch) ActiveScan ScansNotYetRunWithVersion(lager.Logger, int) ([]PriorScan, error) }
func NewScanRepository ¶
func NewScanRepository(db *gorm.DB, clock clock.Clock) ScanRepository
type StatsRepository ¶
type StatsRepository interface { RepositoryCount() (int, error) DisabledRepositoryCount() (int, error) UnclonedRepositoryCount() (int, error) CredentialCount() (int, error) FetchCount() (int, error) }
func NewStatsRepository ¶
func NewStatsRepository(db *gorm.DB) StatsRepository
Source Files ¶
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 This file was generated by counterfeiter This file was generated by counterfeiter |
Click to show internal directories.
Click to hide internal directories.