interfaces

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

type Database interface {
	GetVulnRecords(ctx *model.Context, repoID model.GitHubRepoID) (model.VulnRecords, error)
	PutVulnRecords(ctx *model.Context, vulns []model.VulnRecord) error
}

type GitHubApp

type GitHubApp interface {
	CreateIssue(ctx *model.Context, issue *model.GitHubIssue) (*github.Issue, error)
	CloseIssue(ctx *model.Context, repo *model.GitHubRepo, issueNo int) error
	ValidateEventPayload(r *http.Request) ([]byte, error)
}

type Policy

type Policy interface {
	Query(ctx *model.Context, query string, input any, output any) error
}

type UseCase

type UseCase interface {
	ValidateGitHubEvent(r *http.Request) ([]byte, error)
	ValidateGitHubIDToken(ctx *model.Context, token string) (*model.GitHubRepo, error)
	HandleIssueEvent(ctx *model.Context, event *github.IssueEvent) error
	HandleSarif(ctx *model.Context, report *sarif.Report) error
	HandleTrivy(ctx *model.Context, report *types.Report) error
}

Jump to

Keyboard shortcuts

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