Documentation ¶
Index ¶
- Constants
- type Advisory
- type Affected
- type Credit
- type DefaultVersionRange
- type Ecosystem
- type EcosystemSpecific
- type Entry
- type Import
- type MavenVersionRange
- type MockTransformer
- func (_m *MockTransformer) ApplyTransformAdvisoriesExpectation(e TransformerTransformAdvisoriesExpectation)
- func (_m *MockTransformer) ApplyTransformAdvisoriesExpectations(expectations []TransformerTransformAdvisoriesExpectation)
- func (_m *MockTransformer) TransformAdvisories(_a0 []Advisory, _a1 Entry) ([]Advisory, error)
- type MockVersionRange
- func (_m *MockVersionRange) ApplyContainsExpectation(e VersionRangeContainsExpectation)
- func (_m *MockVersionRange) ApplyContainsExpectations(expectations []VersionRangeContainsExpectation)
- func (_m *MockVersionRange) ApplySetFixedExpectation(e VersionRangeSetFixedExpectation)
- func (_m *MockVersionRange) ApplySetFixedExpectations(expectations []VersionRangeSetFixedExpectation)
- func (_m *MockVersionRange) ApplySetLastAffectedExpectation(e VersionRangeSetLastAffectedExpectation)
- func (_m *MockVersionRange) ApplySetLastAffectedExpectations(expectations []VersionRangeSetLastAffectedExpectation)
- func (_m *MockVersionRange) ApplyStringExpectation(e VersionRangeStringExpectation)
- func (_m *MockVersionRange) ApplyStringExpectations(expectations []VersionRangeStringExpectation)
- func (_m *MockVersionRange) Contains(ver string) (bool, error)
- func (_m *MockVersionRange) SetFixed(fixed string)
- func (_m *MockVersionRange) SetLastAffected(lastAffected string)
- func (_m *MockVersionRange) String() string
- type NpmVersionRange
- type OSV
- type Package
- type PyPIVersionRange
- type Range
- type RangeEvent
- type RangeType
- type Reference
- type ReferenceType
- type RubyGemsVersionRange
- type SemVerRange
- type Severity
- type Transformer
- type TransformerTransformAdvisoriesArgs
- type TransformerTransformAdvisoriesExpectation
- type TransformerTransformAdvisoriesReturns
- type VersionRange
- type VersionRangeContainsArgs
- type VersionRangeContainsExpectation
- type VersionRangeContainsReturns
- type VersionRangeSetFixedArgs
- type VersionRangeSetFixedExpectation
- type VersionRangeSetLastAffectedArgs
- type VersionRangeSetLastAffectedExpectation
- type VersionRangeStringExpectation
- type VersionRangeStringReturns
Constants ¶
View Source
const ( RangeTypeGit RangeType = "GIT" EcosystemGo Ecosystem = "Go" EcosystemNpm Ecosystem = "npm" EcosystemPyPI Ecosystem = "PyPI" EcosystemRubygems Ecosystem = "RubyGems" EcosystemCrates Ecosystem = "crates.io" EcosystemPackagist Ecosystem = "Packagist" EcosystemMaven Ecosystem = "Maven" EcosystemNuGet Ecosystem = "NuGet" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Advisory ¶
type Advisory struct { Ecosystem types.Ecosystem PkgName string VulnerabilityID string Aliases []string // Advisory detail VulnerableVersions []string PatchedVersions []string // Vulnerability detail Severity types.Severity Title string Description string References []string CVSSScoreV3 float64 CVSSVectorV3 string }
type Affected ¶
type Affected struct { Package Package `json:"package"` Severities []Severity `json:"severity,omitempty"` Ranges []Range `json:"ranges,omitempty"` Versions []string `json:"versions,omitempty"` EcosystemSpecific EcosystemSpecific `json:"ecosystem_specific"` }
type DefaultVersionRange ¶
type DefaultVersionRange struct {
// contains filtered or unexported fields
}
func (*DefaultVersionRange) Contains ¶
func (r *DefaultVersionRange) Contains(ver string) (bool, error)
func (DefaultVersionRange) SetLastAffected ¶
func (r DefaultVersionRange) SetLastAffected(lastAffected string)
type EcosystemSpecific ¶
type EcosystemSpecific struct {
Imports []Import `json:"imports,omitempty"`
}
type Entry ¶
type Entry struct { SchemaVersion string `json:"schema_version,omitempty"` ID string `json:"id"` Modified time.Time `json:"modified,omitempty"` Published time.Time `json:"published,omitempty"` Withdrawn *time.Time `json:"withdrawn,omitempty"` Aliases []string `json:"aliases,omitempty"` Summary string `json:"summary,omitempty"` Details string `json:"details"` Severities []Severity `json:"severity"` Affected []Affected `json:"affected"` References []Reference `json:"references,omitempty"` Credits []Credit `json:"credits,omitempty"` DatabaseSpecific json.RawMessage `json:"database_specific,omitempty"` }
type MavenVersionRange ¶
type MavenVersionRange struct {
// contains filtered or unexported fields
}
func (MavenVersionRange) SetLastAffected ¶
func (r MavenVersionRange) SetLastAffected(lastAffected string)
type MockTransformer ¶
MockTransformer is an autogenerated mock type for the Transformer type
func (*MockTransformer) ApplyTransformAdvisoriesExpectation ¶
func (_m *MockTransformer) ApplyTransformAdvisoriesExpectation(e TransformerTransformAdvisoriesExpectation)
func (*MockTransformer) ApplyTransformAdvisoriesExpectations ¶
func (_m *MockTransformer) ApplyTransformAdvisoriesExpectations(expectations []TransformerTransformAdvisoriesExpectation)
func (*MockTransformer) TransformAdvisories ¶
func (_m *MockTransformer) TransformAdvisories(_a0 []Advisory, _a1 Entry) ([]Advisory, error)
TransformAdvisories provides a mock function with given fields: _a0, _a1
type MockVersionRange ¶
MockVersionRange is an autogenerated mock type for the VersionRange type
func (*MockVersionRange) ApplyContainsExpectation ¶
func (_m *MockVersionRange) ApplyContainsExpectation(e VersionRangeContainsExpectation)
func (*MockVersionRange) ApplyContainsExpectations ¶
func (_m *MockVersionRange) ApplyContainsExpectations(expectations []VersionRangeContainsExpectation)
func (*MockVersionRange) ApplySetFixedExpectation ¶
func (_m *MockVersionRange) ApplySetFixedExpectation(e VersionRangeSetFixedExpectation)
func (*MockVersionRange) ApplySetFixedExpectations ¶
func (_m *MockVersionRange) ApplySetFixedExpectations(expectations []VersionRangeSetFixedExpectation)
func (*MockVersionRange) ApplySetLastAffectedExpectation ¶
func (_m *MockVersionRange) ApplySetLastAffectedExpectation(e VersionRangeSetLastAffectedExpectation)
func (*MockVersionRange) ApplySetLastAffectedExpectations ¶
func (_m *MockVersionRange) ApplySetLastAffectedExpectations(expectations []VersionRangeSetLastAffectedExpectation)
func (*MockVersionRange) ApplyStringExpectation ¶
func (_m *MockVersionRange) ApplyStringExpectation(e VersionRangeStringExpectation)
func (*MockVersionRange) ApplyStringExpectations ¶
func (_m *MockVersionRange) ApplyStringExpectations(expectations []VersionRangeStringExpectation)
func (*MockVersionRange) Contains ¶
func (_m *MockVersionRange) Contains(ver string) (bool, error)
Contains provides a mock function with given fields: ver
func (*MockVersionRange) SetFixed ¶
func (_m *MockVersionRange) SetFixed(fixed string)
SetFixed provides a mock function with given fields: fixed
func (*MockVersionRange) SetLastAffected ¶
func (_m *MockVersionRange) SetLastAffected(lastAffected string)
SetLastAffected provides a mock function with given fields: lastAffected
func (*MockVersionRange) String ¶
func (_m *MockVersionRange) String() string
String provides a mock function with given fields:
type NpmVersionRange ¶
type NpmVersionRange struct {
// contains filtered or unexported fields
}
func (NpmVersionRange) SetLastAffected ¶
func (r NpmVersionRange) SetLastAffected(lastAffected string)
type OSV ¶
type OSV struct {
// contains filtered or unexported fields
}
type PyPIVersionRange ¶
type PyPIVersionRange struct {
// contains filtered or unexported fields
}
func (PyPIVersionRange) SetLastAffected ¶
func (r PyPIVersionRange) SetLastAffected(lastAffected string)
type Range ¶
type Range struct { Type RangeType `json:"type"` Events []RangeEvent `json:"events"` }
type RangeEvent ¶
type Reference ¶
type Reference struct { Type ReferenceType `json:"type"` URL string `json:"url"` }
type ReferenceType ¶
type ReferenceType string
type RubyGemsVersionRange ¶
type RubyGemsVersionRange struct {
// contains filtered or unexported fields
}
func (*RubyGemsVersionRange) Contains ¶
func (r *RubyGemsVersionRange) Contains(ver string) (bool, error)
func (RubyGemsVersionRange) SetLastAffected ¶
func (r RubyGemsVersionRange) SetLastAffected(lastAffected string)
type SemVerRange ¶
type SemVerRange struct {
// contains filtered or unexported fields
}
func (SemVerRange) SetLastAffected ¶
func (r SemVerRange) SetLastAffected(lastAffected string)
type Transformer ¶
type TransformerTransformAdvisoriesArgs ¶
type TransformerTransformAdvisoriesArgs struct {
// contains filtered or unexported fields
}
type TransformerTransformAdvisoriesExpectation ¶
type TransformerTransformAdvisoriesExpectation struct { Args TransformerTransformAdvisoriesArgs Returns TransformerTransformAdvisoriesReturns }
type TransformerTransformAdvisoriesReturns ¶
type TransformerTransformAdvisoriesReturns struct {
// contains filtered or unexported fields
}
type VersionRange ¶
type VersionRange interface { Contains(ver string) (bool, error) String() string SetFixed(fixed string) SetLastAffected(lastAffected string) }
func NewVersionRange ¶
func NewVersionRange(ecosystem Ecosystem, from string) VersionRange
type VersionRangeContainsExpectation ¶
type VersionRangeContainsExpectation struct { Args VersionRangeContainsArgs Returns VersionRangeContainsReturns }
type VersionRangeContainsReturns ¶
type VersionRangeContainsReturns struct {
// contains filtered or unexported fields
}
type VersionRangeSetFixedExpectation ¶
type VersionRangeSetFixedExpectation struct {
Args VersionRangeSetFixedArgs
}
type VersionRangeSetLastAffectedExpectation ¶
type VersionRangeSetLastAffectedExpectation struct {
Args VersionRangeSetLastAffectedArgs
}
type VersionRangeStringExpectation ¶
type VersionRangeStringExpectation struct {
Returns VersionRangeStringReturns
}
type VersionRangeStringReturns ¶
type VersionRangeStringReturns struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.