analyze

package
v0.9.11 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package analyze can analyze things.

Index

Constants

View Source
const TEMP_DIR_PREFIX = "poutine-*"

Variables

This section is empty.

Functions

func AnalyzeLocalRepo

func AnalyzeLocalRepo(ctx context.Context, repoPath string, scmClient ScmClient, formatter Formatter) error

func AnalyzeOrg

func AnalyzeOrg(ctx context.Context, org string, scmClient ScmClient, numberOfGoroutines *int, formatter Formatter) error

func AnalyzeRepo

func AnalyzeRepo(ctx context.Context, repoString string, scmClient ScmClient, formatter Formatter) error

Types

type Formatter

type Formatter interface {
	Format(ctx context.Context, report *opa.FindingsResult, packages []*models.PackageInsights) error
}

type RepoBatch

type RepoBatch struct {
	TotalCount   int
	Repositories []Repository
	Err          error
}

type Repository

type Repository interface {
	GetProviderName() string
	GetRepoIdentifier() string
	BuildGitURL(baseURL string) string
}

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)
}

Jump to

Keyboard shortcuts

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