Documentation ¶
Index ¶
- Constants
- type Application
- type Back
- type CompareRunner
- type Difference
- type DifferenceManager
- func (d *DifferenceManager) Delete(id string)
- func (dm *DifferenceManager) GenerateReport(d *Difference) string
- func (d *DifferenceManager) GetAllDiffsInProject(proj string) (*[]Difference, error)
- func (d *DifferenceManager) ShaCompare(repoName string, files []string, oldSha, newSha string) (*Difference, error)
- type FireAndForget
- type Project
- func (p *Project) GetAllRefs() ([]string, error)
- func (p *Project) GetAllRepositories() ([]*Repository, error)
- func (p *Project) GetRepository(repository string) (*Repository, error)
- func (p *Project) ScanBySha(sha string) (*types.Scan, bool, error)
- func (project *Project) ScansByRefInProject(ref string) (map[string]*types.Scan, error)
- type Repository
- type Retriever
- func (r *Retriever) GetAllProjectNamesUsingRepository(repo string) ([]string, error)
- func (r *Retriever) GetAllProjects() ([]*Project, error)
- func (r *Retriever) GetProjectById(id string) (*Project, error)
- func (r *Retriever) GetRepository(repository, projectId string) (*Repository, *Project, error)
- func (r *Retriever) ListRepositories() ([]string, error)
- func (r *Retriever) ScanByShaNameGen(repo *Repository, sha string) (*types.Scan, error)
- type SingleRunner
- type SingleRunnerRequest
- type Worker
Constants ¶
View Source
const DifferenceMapping = `` /* 323-byte string literal not displayed */
View Source
const DifferenceProjectField = "project_name"
View Source
const DifferenceType = `difference`
View Source
const ESMapping = ` { "mappings": { "` + RepositoryEntryType + `": ` + types.ScanMapping + `, "` + DifferenceType + `": ` + DifferenceMapping + `, "` + RepositoryType + `": ` + types.RepositoryMapping + `, "` + ProjectType + `": ` + types.ProjectMapping + ` } }`
View Source
const ProjectType = `project`
View Source
const RepositoryEntryType = `repository_entry`
View Source
const RepositoryType = `repository`
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application struct {
// contains filtered or unexported fields
}
func NewApplication ¶
func NewApplication(index elasticsearch.IIndex, singleLocation, compareLocation, templateLocation string, debugMode bool) *Application
func (*Application) StartInternals ¶
func (a *Application) StartInternals()
func (*Application) StartServer ¶
func (a *Application) StartServer() chan error
func (*Application) Stop ¶
func (a *Application) Stop()
type CompareRunner ¶
type CompareRunner struct {
// contains filtered or unexported fields
}
func NewCompareRunner ¶
func NewCompareRunner(app *Application) *CompareRunner
func (*CompareRunner) CompareRepositories ¶
func (cr *CompareRunner) CompareRepositories(actual, expected com.DependencyScans) (string, error)
func (*CompareRunner) CompareStrings ¶
func (cr *CompareRunner) CompareStrings(actual, expected string) (string, error)
type Difference ¶
type Difference struct { Id string `json:"id"` RepoName string `json:"repo_name"` ProjectName string `json:"project_name"` Ref string `json:"ref"` OldSha string `json:"old_sha"` NewSha string `json:"new_sha"` Removed []string `json:"removed"` Added []string `json:"added"` Timestamp time.Time `json:"time"` }
func (*Difference) SimpleString ¶
func (d *Difference) SimpleString() string
type DifferenceManager ¶
type DifferenceManager struct { CurrentDisplay string // contains filtered or unexported fields }
func NewDifferenceManager ¶
func NewDifferenceManager(app *Application) *DifferenceManager
func (*DifferenceManager) Delete ¶
func (d *DifferenceManager) Delete(id string)
func (*DifferenceManager) GenerateReport ¶
func (dm *DifferenceManager) GenerateReport(d *Difference) string
func (*DifferenceManager) GetAllDiffsInProject ¶
func (d *DifferenceManager) GetAllDiffsInProject(proj string) (*[]Difference, error)
func (*DifferenceManager) ShaCompare ¶
func (d *DifferenceManager) ShaCompare(repoName string, files []string, oldSha, newSha string) (*Difference, error)
type FireAndForget ¶
type FireAndForget struct {
// contains filtered or unexported fields
}
func NewFireAndForget ¶
func NewFireAndForget(app *Application) *FireAndForget
func (*FireAndForget) FireGit ¶
func (ff *FireAndForget) FireGit(git *s.GitWebhook)
func (*FireAndForget) FireRequest ¶
func (ff *FireAndForget) FireRequest(request *SingleRunnerRequest)
type Project ¶
func (*Project) GetAllRefs ¶
Test: TestGetRepositories
func (*Project) GetAllRepositories ¶
func (p *Project) GetAllRepositories() ([]*Repository, error)
Test: TestAddRepositories
func (*Project) GetRepository ¶
func (p *Project) GetRepository(repository string) (*Repository, error)
Test: TestGetRepositories
type Repository ¶
type Repository struct { *types.Repository // contains filtered or unexported fields }
func (*Repository) GetAllRefs ¶
func (r *Repository) GetAllRefs() ([]string, error)
Test: TestGetRepositories
func (*Repository) MapRefToShas ¶
func (r *Repository) MapRefToShas() (map[string][]string, int64, error)
Returns map of refs to shas of a repository in a project
type Retriever ¶
type Retriever struct {
// contains filtered or unexported fields
}
func NewRetriever ¶
func NewRetriever(app *Application) *Retriever
func (*Retriever) GetAllProjectNamesUsingRepository ¶
Test: TestAddRepositories
func (*Retriever) GetAllProjects ¶
Test: TestAddProjects
func (*Retriever) GetProjectById ¶
Test: TestAddProjects
func (*Retriever) GetRepository ¶
func (r *Retriever) GetRepository(repository, projectId string) (*Repository, *Project, error)
Test: TestAddRepositories
func (*Retriever) ListRepositories ¶
Test: TestGetRepositories
func (*Retriever) ScanByShaNameGen ¶
type SingleRunner ¶
type SingleRunner struct {
// contains filtered or unexported fields
}
func NewSingleRunner ¶
func NewSingleRunner(app *Application) *SingleRunner
func (*SingleRunner) RunAgainstSingle ¶
func (sr *SingleRunner) RunAgainstSingle(printHeader string, printLocation chan string, request *SingleRunnerRequest) *types.Scan
func (*SingleRunner) ScanWithSingle ¶
func (sr *SingleRunner) ScanWithSingle(fullName string) ([]string, error)
type SingleRunnerRequest ¶
type SingleRunnerRequest struct {
// contains filtered or unexported fields
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.