Documentation ¶
Overview ¶
Package models provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version 2.4.1 DO NOT EDIT.
Index ¶
Constants ¶
const ( NPMPackageNameMetadataKey = "npm_package_name" NPMPackageVersionMetadataKey = "npm_package_version" )
Variables ¶
var CompactMetadata = true
Functions ¶
This section is empty.
Types ¶
type FilterParsingError ¶
type FilterParsingError struct {
// contains filtered or unexported fields
}
func (*FilterParsingError) Error ¶
func (e *FilterParsingError) Error() string
type Problem ¶
type Problem struct { Detail string `json:"detail"` Title string `json:"title"` Type string `json:"type"` }
Problem defines model for Problem.
type Verdict ¶
type Verdict struct { Categories []externalRef1.Category `` /* 130-byte string literal not displayed */ Code externalRef3.Code `` /* 135-byte string literal not displayed */ CreatedAt *time.Time `ch:"created_at" human:"the moment the verdict was created" json:"created_at,omitempty" validate:"mandatory"` Digest string `ch:"digest" human:"the package digest" json:"digest" validate:"mandatory"` Ecosystem externalRef0.Ecosystem `ch:"ecosystem" human:"the ecosystem the target package belongs to" json:"ecosystem" validate:"is_ecosystem"` ExpiresAt *time.Time `ch:"expires_at" json:"expires_at"` File string `ch:"file" human:"the result file identifying the analysis type" json:"file" validate:"mandatory,is_resultsfile"` Fingerprint string `ch:"fingerprint" human:"a string uniquely identifying this verdict instance" json:"fingerprint,omitempty"` Message string `ch:"message" human:"the verdict message" json:"message,omitempty" validate:"omitempty,gt=1"` Metadata map[string]interface{} `ch:"metadata" json:"metadata,omitempty"` Org string `ch:"org" human:"the organization name" json:"org,omitempty" validate:"omitempty"` Pkg string `ch:"pkg" human:"the package name" json:"pkg" validate:"mandatory"` Severity externalRef2.Severity `ch:"severity" human:"the verdict severity" json:"severity,omitempty" validate:"required_with=Message,isdefault|is_severity"` Version string `ch:"version" human:"the package version" json:"version" validate:"mandatory,semver"` }
Verdict defines model for Verdict.
func NewEmptyVerdict ¶
func (*Verdict) HasExpired ¶
func (Verdict) MarshalJSON ¶
func (*Verdict) UnmarshalJSON ¶
type Verdicts ¶
type Verdicts []Verdict
func (*Verdicts) Filter ¶
Filter applies a JSONPath expression to the receiving Verdicts and returns the result.
See the JSONPath expressions documentation for more information about the syntax: https://goessner.net/articles/JsonPath/index.html#e2.
The result is returned as raw (interface{} or interface{} slice) and as a Verdicts instance. Notice that, depending on the JSONPath input, the result may have a different structure than the Verdicts one: in this case this function returns the raw result, a nil Verdicts, and an error due to the conversion failure.
Directories ¶
Path | Synopsis |
---|---|
Package category provides primitives to interact with the openapi HTTP API.
|
Package category provides primitives to interact with the openapi HTTP API. |
Package severity provides primitives to interact with the openapi HTTP API.
|
Package severity provides primitives to interact with the openapi HTTP API. |