interfaces

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BigQuery

type BigQuery interface {
	Insert(ctx context.Context, tableID types.BQTableID, schema bigquery.Schema, data any) error

	GetMetadata(ctx context.Context, table types.BQTableID) (*bigquery.TableMetadata, error)
	UpdateTable(ctx context.Context, table types.BQTableID, md bigquery.TableMetadataToUpdate, eTag string) error
	CreateTable(ctx context.Context, table types.BQTableID, md *bigquery.TableMetadata) error
}

type GetArchiveURLInput

type GetArchiveURLInput struct {
	Owner     string
	Repo      string
	CommitID  string
	InstallID types.GitHubAppInstallID
}

type GitHub

type GitHub interface {
	GetArchiveURL(ctx context.Context, input *GetArchiveURLInput) (*url.URL, error)
	CreateIssueComment(ctx context.Context, repo *model.GitHubRepo, id types.GitHubAppInstallID, prID int, body string) error
	ListIssueComments(ctx context.Context, repo *model.GitHubRepo, id types.GitHubAppInstallID, prID int) ([]*model.GitHubIssueComment, error)
	MinimizeComment(ctx context.Context, repo *model.GitHubRepo, id types.GitHubAppInstallID, subjectID string) error
	CreateCheckRun(ctx context.Context, id types.GitHubAppInstallID, repo *model.GitHubRepo, commit string) (int64, error)
	UpdateCheckRun(ctx context.Context, id types.GitHubAppInstallID, repo *model.GitHubRepo, checkID int64, opt *github.UpdateCheckRunOptions) error
}

type Policy

type Policy interface {
	Query(ctx context.Context, query string, input, output any, options ...opac.QueryOption) error
}

type Storage

type Storage interface {
	Put(ctx context.Context, key string, r io.ReadCloser) error
	Get(ctx context.Context, key string) (io.ReadCloser, error)
}

type UseCase

type UseCase interface {
	InsertScanResult(ctx context.Context, meta model.GitHubMetadata, report trivy.Report, cfg model.Config) error
	ScanGitHubRepo(ctx context.Context, input *model.ScanGitHubRepoInput) error
}

Jump to

Keyboard shortcuts

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