Documentation
¶
Overview ¶
Package analyze can analyze things.
Index ¶
Constants ¶
View Source
const TEMP_DIR_PREFIX = "poutine-*"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Analyzer ¶ added in v0.9.12
type Analyzer struct {
ScmClient ScmClient
GitClient GitClient
Formatter Formatter
Config *models.Config
}
func NewAnalyzer ¶ added in v0.9.12
func (*Analyzer) AnalyzeLocalRepo ¶ added in v0.9.12
func (*Analyzer) AnalyzeOrg ¶ added in v0.9.12
type Formatter ¶
type Formatter interface {
Format(ctx context.Context, report *opa.FindingsResult, packages []*models.PackageInsights) error
}
type GitClient ¶ added in v0.9.12
type GitClient interface {
Clone(ctx context.Context, clonePath string, url string, token string, ref string) error
CommitSHA(clonePath string) (string, error)
LastCommitDate(ctx context.Context, clonePath string) (time.Time, error)
GetRemoteOriginURL(ctx context.Context, repoPath string) (string, error)
GetRepoHeadBranchName(ctx context.Context, repoPath string) (string, error)
}
type RepoBatch ¶
type RepoBatch struct {
TotalCount int
Repositories []Repository
Err error
}
type Repository ¶
type ScmClient ¶
type ScmClient interface {
GetOrgRepos(ctx context.Context, org string) <-chan RepoBatch
GetRepo(ctx context.Context, org string, name string) (Repository, error)
GetToken() string
GetProviderName() string
GetProviderVersion(ctx context.Context) (string, error)
GetProviderBaseURL() string
ParseRepoAndOrg(string) (string, string, error)
}
Click to show internal directories.
Click to hide internal directories.