Documentation ¶
Index ¶
- Constants
- func NewCommitRepository(db *gorm.DB) *commitRepository
- func NewDSN(username, password, dbName, hostname string, port int) string
- func NewFetchRepository(db *gorm.DB) *fetchRepository
- func NewRepositoryRepository(db *gorm.DB) *repositoryRepository
- type ActiveScan
- type Commit
- type CommitRepository
- type Credential
- type CredentialRepository
- type Fetch
- type FetchRepository
- type Model
- type PriorScan
- type PropertyMap
- type Repository
- 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 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 NewCredential ¶
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 PropertyMap ¶
type PropertyMap map[string]interface{}
PropertyMap is a type to use to store JSON http://coussej.github.io/2016/02/16/Handling-JSONB-in-Go-Structs/
func (*PropertyMap) Scan ¶
func (p *PropertyMap) Scan(src interface{}) error
type Repository ¶
type Repository struct { Model Cloned bool Name string Owner string Path string SSHURL string `gorm:"column:ssh_url"` Private bool DefaultBranch string RawJSON []byte `gorm:"column:raw_json"` FailedFetches int `gorm:"column:failed_fetches"` Disabled bool CredentialCounts PropertyMap `gorm:"default:'{}'"` }
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 RegisterFailedFetch(lager.Logger, *Repository) error UpdateCredentialCount(*Repository, map[string]uint) 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 |
Click to show internal directories.
Click to hide internal directories.