Documentation ¶
Index ¶
- type Client
- func (x *Client) AssignRepoLabel(ctx *model.Context, repoID int, labelID int) error
- func (x *Client) AssignSeverity(ctx *model.Context, vulnID string, id int) error
- func (x *Client) Close() error
- func (x *Client) CreateRepo(ctx *model.Context, repo *ent.Repository) (*ent.Repository, error)
- func (x *Client) CreateRepoLabel(ctx *model.Context, req *model.RequestRepoLabel) (*ent.RepoLabel, error)
- func (x *Client) CreateSeverity(ctx *model.Context, req *model.RequestSeverity) (*ent.Severity, error)
- func (x *Client) DeleteRepoLabel(ctx *model.Context, id int) error
- func (x *Client) DeleteSession(ctx *model.Context, ssnID string) error
- func (x *Client) DeleteSeverity(ctx *model.Context, id int) error
- func (x *Client) GetLatestScan(ctx *model.Context, branch model.GitHubBranch) (*ent.Scan, error)
- func (x *Client) GetLatestScans(ctx *model.Context) ([]*ent.Scan, error)
- func (x *Client) GetLatestVulnerabilities(ctx *model.Context, offset int, limit int) ([]*ent.Vulnerability, error)
- func (x *Client) GetRepoLabels(ctx *model.Context) ([]*ent.RepoLabel, error)
- func (x *Client) GetRepositories(ctx *model.Context) ([]*ent.Repository, error)
- func (x *Client) GetRepositoriesWithVuln(ctx *model.Context, vulnID string) ([]*ent.Repository, error)
- func (x *Client) GetRepository(ctx *model.Context, repo *model.GitHubRepo) (*ent.Repository, error)
- func (x *Client) GetRepositoryScan(ctx *model.Context, req *model.GetRepoScanRequest) ([]*ent.Scan, error)
- func (x *Client) GetScan(ctx *model.Context, id string) (*ent.Scan, error)
- func (x *Client) GetSession(ctx *model.Context, ssnID string, now int64) (*ent.Session, error)
- func (x *Client) GetSeverities(ctx *model.Context) ([]*ent.Severity, error)
- func (x *Client) GetUser(ctx *model.Context, userID int) (*ent.User, error)
- func (x *Client) GetVulnStatus(ctx *model.Context, repo *model.GitHubRepo) ([]*ent.VulnStatus, error)
- func (x *Client) GetVulnerability(ctx *model.Context, id string) (*ent.Vulnerability, error)
- func (x *Client) GetVulnerabilityCount(ctx *model.Context) (int, error)
- func (x *Client) HasAuthState(ctx *model.Context, state string, now int64) (bool, error)
- func (x *Client) Open(dbType, dbConfig string) error
- func (x *Client) PutPackages(ctx *model.Context, packages []*ent.PackageRecord) ([]*ent.PackageRecord, error)
- func (x *Client) PutScan(ctx *model.Context, scan *ent.Scan, repo *ent.Repository, ...) (*ent.Scan, error)
- func (x *Client) PutSession(ctx *model.Context, ssn *ent.Session) error
- func (x *Client) PutUser(ctx *model.Context, user *ent.User) (int, error)
- func (x *Client) PutVulnStatus(ctx *model.Context, repo *ent.Repository, status *ent.VulnStatus, userID int) (*ent.VulnStatus, error)
- func (x *Client) PutVulnerabilities(ctx *model.Context, vulnerabilities []*ent.Vulnerability) error
- func (x *Client) SaveAuthState(ctx *model.Context, state string, expiresAt int64) error
- func (x *Client) UnassignRepoLabel(ctx *model.Context, repoID int, labelID int) error
- func (x *Client) UpdateRepoLabel(ctx *model.Context, id int, req *model.RequestRepoLabel) error
- func (x *Client) UpdateSeverity(ctx *model.Context, id int, req *model.RequestSeverity) error
- type Factory
- type Interface
- type ScanResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) AssignRepoLabel ¶ added in v0.1.4
func (*Client) AssignSeverity ¶ added in v0.1.1
func (*Client) CreateRepo ¶
func (x *Client) CreateRepo(ctx *model.Context, repo *ent.Repository) (*ent.Repository, error)
func (*Client) CreateRepoLabel ¶ added in v0.1.4
func (x *Client) CreateRepoLabel(ctx *model.Context, req *model.RequestRepoLabel) (*ent.RepoLabel, error)
Repository Label
func (*Client) CreateSeverity ¶ added in v0.1.1
func (x *Client) CreateSeverity(ctx *model.Context, req *model.RequestSeverity) (*ent.Severity, error)
Severity
func (*Client) DeleteRepoLabel ¶ added in v0.1.4
func (*Client) DeleteSession ¶
func (*Client) DeleteSeverity ¶ added in v0.1.1
func (*Client) GetLatestScan ¶
func (*Client) GetLatestScans ¶
func (*Client) GetLatestVulnerabilities ¶
func (*Client) GetRepoLabels ¶ added in v0.1.4
func (*Client) GetRepositories ¶
func (*Client) GetRepositoriesWithVuln ¶
func (*Client) GetRepository ¶ added in v0.1.4
func (x *Client) GetRepository(ctx *model.Context, repo *model.GitHubRepo) (*ent.Repository, error)
func (*Client) GetRepositoryScan ¶ added in v0.1.4
func (*Client) GetSession ¶
func (*Client) GetSeverities ¶ added in v0.1.1
func (*Client) GetVulnStatus ¶
func (x *Client) GetVulnStatus(ctx *model.Context, repo *model.GitHubRepo) ([]*ent.VulnStatus, error)
func (*Client) GetVulnerability ¶
func (*Client) GetVulnerabilityCount ¶
func (*Client) HasAuthState ¶
func (*Client) PutPackages ¶
func (x *Client) PutPackages(ctx *model.Context, packages []*ent.PackageRecord) ([]*ent.PackageRecord, error)
func (*Client) PutVulnStatus ¶
func (x *Client) PutVulnStatus(ctx *model.Context, repo *ent.Repository, status *ent.VulnStatus, userID int) (*ent.VulnStatus, error)
func (*Client) PutVulnerabilities ¶
func (*Client) SaveAuthState ¶
Auth
func (*Client) UnassignRepoLabel ¶ added in v0.1.4
func (*Client) UpdateRepoLabel ¶ added in v0.1.4
func (*Client) UpdateSeverity ¶ added in v0.1.1
type Interface ¶
type Interface interface { Open(dbType, dbConfig string) error Close() error CreateRepo(ctx *model.Context, repo *ent.Repository) (*ent.Repository, error) // Vulnerability PutVulnerabilities(ctx *model.Context, vulnerabilities []*ent.Vulnerability) error GetVulnerability(ctx *model.Context, id string) (*ent.Vulnerability, error) GetLatestVulnerabilities(ctx *model.Context, offset, limit int) ([]*ent.Vulnerability, error) GetVulnerabilityCount(ctx *model.Context) (int, error) // Severity CreateSeverity(ctx *model.Context, req *model.RequestSeverity) (*ent.Severity, error) DeleteSeverity(ctx *model.Context, id int) error GetSeverities(ctx *model.Context) ([]*ent.Severity, error) UpdateSeverity(ctx *model.Context, id int, req *model.RequestSeverity) error AssignSeverity(ctx *model.Context, vulnID string, id int) error PutPackages(ctx *model.Context, packages []*ent.PackageRecord) ([]*ent.PackageRecord, error) PutScan(ctx *model.Context, scan *ent.Scan, repo *ent.Repository, packages []*ent.PackageRecord) (*ent.Scan, error) PutVulnStatus(ctx *model.Context, repo *ent.Repository, status *ent.VulnStatus, userID int) (*ent.VulnStatus, error) GetVulnStatus(ctx *model.Context, repo *model.GitHubRepo) ([]*ent.VulnStatus, error) GetScan(ctx *model.Context, id string) (*ent.Scan, error) GetLatestScan(ctx *model.Context, branch model.GitHubBranch) (*ent.Scan, error) GetLatestScans(ctx *model.Context) ([]*ent.Scan, error) GetRepositories(ctx *model.Context) ([]*ent.Repository, error) GetRepositoriesWithVuln(ctx *model.Context, vulnID string) ([]*ent.Repository, error) GetRepository(ctx *model.Context, repo *model.GitHubRepo) (*ent.Repository, error) GetRepositoryScan(ctx *model.Context, req *model.GetRepoScanRequest) ([]*ent.Scan, error) // Repository Label CreateRepoLabel(ctx *model.Context, req *model.RequestRepoLabel) (*ent.RepoLabel, error) UpdateRepoLabel(ctx *model.Context, id int, req *model.RequestRepoLabel) error DeleteRepoLabel(ctx *model.Context, id int) error GetRepoLabels(ctx *model.Context) ([]*ent.RepoLabel, error) AssignRepoLabel(ctx *model.Context, repoID int, labelID int) error UnassignRepoLabel(ctx *model.Context, repoID int, labelID int) error // Auth SaveAuthState(ctx *model.Context, state string, expiresAt int64) error HasAuthState(ctx *model.Context, state string, now int64) (bool, error) GetUser(ctx *model.Context, userID int) (*ent.User, error) PutUser(ctx *model.Context, user *ent.User) (int, error) PutSession(ctx *model.Context, ssn *ent.Session) error GetSession(ctx *model.Context, ssnID string, now int64) (*ent.Session, error) DeleteSession(ctx *model.Context, ssnID string) error }
type ScanResult ¶
type ScanResult struct { Repo *ent.Repository Scan *ent.Scan Packages []*ent.PackageRecord Vulnerabilities []*ent.Vulnerability }
Click to show internal directories.
Click to hide internal directories.