model

package
v0.0.0-...-277eb20 Latest Latest
Warning

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

Go to latest
Published: May 28, 2024 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ISO8601LocalTime = "2006-01-02T15:04:05"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CommitResponse

type CommitResponse struct {
	CommitVulnerabilities `json:"commit"`
}

type CommitVulnerabilities

type CommitVulnerabilities struct {
	CommitID               string                `json:"commit_id"`
	VulnerabilityHistogram []SeverityCount       `json:"vulnerability_histogram"`
	Sources                []SourceVulnerability `json:"Sources"`
	TypeName               *string               `json:"__typename,omitempty"`
	Message                *string               `json:"message,omitempty"`
}

type Organization

type Organization struct {
	ID          strfmt.UUID `json:"organization_id"`
	DisplayName string      `json:"display_name"`
	URLName     string      `json:"url_name"`
}

type ProjectResponse

type ProjectResponse struct {
	ProjectVulnerabilities `json:"project"`
}

type ProjectVulnerabilities

type ProjectVulnerabilities struct {
	TypeName string                 `json:"__typename"`
	Name     string                 `json:"name,omitempty"`
	Commit   *CommitVulnerabilities `json:"commit,omitempty"`
	Message  *string                `json:"message,omitempty"`
}

type Severity

type Severity int
const (
	Critical Severity = iota
	High
	Moderate
	Medium
	Low
	Unknown
)

func ParseSeverityIndex

func ParseSeverityIndex(severity string) Severity

type SeverityCount

type SeverityCount struct {
	Severity string `json:"severity"`
	Count    int    `json:"count"`
}

type SourceVulnerability

type SourceVulnerability struct {
	Name            string          `json:"name"`
	Version         string          `json:"version"`
	Vulnerabilities []Vulnerability `json:"vulnerabilities"`
}

type SupportedLanguage

type SupportedLanguage struct {
	Name           string `json:"name"`
	DefaultVersion string `json:"default_version"`
}

type SupportedLanguagesResponse

type SupportedLanguagesResponse struct {
	Languages []SupportedLanguage `json:"unstableSupportedLanguages"`
}

SupportedLanguagesResponse is a struct for the payload of the supported languages mediator endpoint

type Time

type Time struct {
	time.Time
}

func (*Time) MarshalJSON

func (t *Time) MarshalJSON() ([]byte, error)

func (*Time) UnmarshalJSON

func (t *Time) UnmarshalJSON(data []byte) error

type Vulnerability

type Vulnerability struct {
	Severity string   `json:"severity"`
	CveID    string   `json:"cve_id"`
	AltIds   []string `json:"alt_ids"`
}

Jump to

Keyboard shortcuts

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