alma

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2023 License: Apache-2.0 Imports: 14 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Alma

type Alma struct {
	db.Operation
}

Alma implements the DB interface

func (*Alma) Get

func (a *Alma) Get(release, pkgName string) ([]types.Advisory, error)

func (*Alma) Put

func (a *Alma) Put(tx *bolt.Tx, input PutInput) error

type DB

type DB interface {
	db.Operation
	Put(*bolt.Tx, PutInput) error
	Get(release, pkgName string) ([]types.Advisory, error)
}

type DBBatchUpdateArgs

type DBBatchUpdateArgs struct {
	Fn         func(*bbolt.Tx) error
	FnAnything bool
}

type DBBatchUpdateExpectation

type DBBatchUpdateExpectation struct {
	Args    DBBatchUpdateArgs
	Returns DBBatchUpdateReturns
}

type DBBatchUpdateReturns

type DBBatchUpdateReturns struct {
	Err error
}

type DBDeleteAdvisoryDetailBucketExpectation

type DBDeleteAdvisoryDetailBucketExpectation struct {
	Returns DBDeleteAdvisoryDetailBucketReturns
}

type DBDeleteAdvisoryDetailBucketReturns

type DBDeleteAdvisoryDetailBucketReturns struct {
	// contains filtered or unexported fields
}

type DBDeleteVulnerabilityDetailBucketExpectation

type DBDeleteVulnerabilityDetailBucketExpectation struct {
	Returns DBDeleteVulnerabilityDetailBucketReturns
}

type DBDeleteVulnerabilityDetailBucketReturns

type DBDeleteVulnerabilityDetailBucketReturns struct {
	Err error
}

type DBForEachAdvisoryArgs

type DBForEachAdvisoryArgs struct {
	Sources         []string
	SourcesAnything bool
	PkgName         string
	PkgNameAnything bool
}

type DBForEachAdvisoryExpectation

type DBForEachAdvisoryExpectation struct {
	Args    DBForEachAdvisoryArgs
	Returns DBForEachAdvisoryReturns
}

type DBForEachAdvisoryReturns

type DBForEachAdvisoryReturns struct {
	Value map[string]db.Value
	Err   error
}

type DBForEachVulnerabilityIDArgs

type DBForEachVulnerabilityIDArgs struct {
	Fn         func(*bbolt.Tx, string) error
	FnAnything bool
}

type DBForEachVulnerabilityIDExpectation

type DBForEachVulnerabilityIDExpectation struct {
	Args    DBForEachVulnerabilityIDArgs
	Returns DBForEachVulnerabilityIDReturns
}

type DBForEachVulnerabilityIDReturns

type DBForEachVulnerabilityIDReturns struct {
	Err error
}

type DBGetAdvisoriesArgs

type DBGetAdvisoriesArgs struct {
	Source          string
	SourceAnything  bool
	PkgName         string
	PkgNameAnything bool
}

type DBGetAdvisoriesExpectation

type DBGetAdvisoriesExpectation struct {
	Args    DBGetAdvisoriesArgs
	Returns DBGetAdvisoriesReturns
}

type DBGetAdvisoriesReturns

type DBGetAdvisoriesReturns struct {
	Advisories []types.Advisory
	Err        error
}

type DBGetArgs

type DBGetArgs struct {
	Release         string
	ReleaseAnything bool
	PkgName         string
	PkgNameAnything bool
}

type DBGetExpectation

type DBGetExpectation struct {
	Args    DBGetArgs
	Returns DBGetReturns
}

type DBGetReturns

type DBGetReturns struct {
	// contains filtered or unexported fields
}

type DBGetVulnerabilityArgs

type DBGetVulnerabilityArgs struct {
	VulnerabilityID         string
	VulnerabilityIDAnything bool
}

type DBGetVulnerabilityDetailArgs

type DBGetVulnerabilityDetailArgs struct {
	CveID         string
	CveIDAnything bool
}

type DBGetVulnerabilityDetailExpectation

type DBGetVulnerabilityDetailExpectation struct {
	Args    DBGetVulnerabilityDetailArgs
	Returns DBGetVulnerabilityDetailReturns
}

type DBGetVulnerabilityDetailReturns

type DBGetVulnerabilityDetailReturns struct {
	Detail map[types.SourceID]types.VulnerabilityDetail
	Err    error
}

type DBGetVulnerabilityExpectation

type DBGetVulnerabilityExpectation struct {
	Args    DBGetVulnerabilityArgs
	Returns DBGetVulnerabilityReturns
}

type DBGetVulnerabilityReturns

type DBGetVulnerabilityReturns struct {
	Vulnerability types.Vulnerability
	Err           error
}

type DBPutAdvisoryDetailArgs

type DBPutAdvisoryDetailArgs struct {
	Tx                      *bbolt.Tx
	TxAnything              bool
	VulnerabilityID         string
	VulnerabilityIDAnything bool
	PkgName                 string
	PkgNameAnything         bool
	NestedBktNames          []string
	NestedBktNamesAnything  bool
	Advisory                interface{}
	AdvisoryAnything        bool
}

type DBPutAdvisoryDetailExpectation

type DBPutAdvisoryDetailExpectation struct {
	Args    DBPutAdvisoryDetailArgs
	Returns DBPutAdvisoryDetailReturns
}

type DBPutAdvisoryDetailReturns

type DBPutAdvisoryDetailReturns struct {
	Err error
}

type DBPutArgs

type DBPutArgs struct {
	// contains filtered or unexported fields
}

type DBPutDataSourceArgs

type DBPutDataSourceArgs struct {
	Tx              *bbolt.Tx
	TxAnything      bool
	BktName         string
	BktNameAnything bool
	Source          types.DataSource
	SourceAnything  bool
}

type DBPutDataSourceExpectation

type DBPutDataSourceExpectation struct {
	Args    DBPutDataSourceArgs
	Returns DBPutDataSourceReturns
}

type DBPutDataSourceReturns

type DBPutDataSourceReturns struct {
	Err error
}

type DBPutExpectation

type DBPutExpectation struct {
	Args    DBPutArgs
	Returns DBPutReturns
}

type DBPutRedHatCPEsArgs

type DBPutRedHatCPEsArgs struct {
	Tx               *bbolt.Tx
	TxAnything       bool
	CpeIndex         int
	CpeIndexAnything bool
	Cpe              string
	CpeAnything      bool
}

type DBPutRedHatCPEsExpectation

type DBPutRedHatCPEsExpectation struct {
	Args    DBPutRedHatCPEsArgs
	Returns DBPutRedHatCPEsReturns
}

type DBPutRedHatCPEsReturns

type DBPutRedHatCPEsReturns struct {
	Err error
}

type DBPutRedHatNVRsArgs

type DBPutRedHatNVRsArgs struct {
	Tx                 *bbolt.Tx
	TxAnything         bool
	Nvr                string
	NvrAnything        bool
	CpeIndices         []int
	CpeIndicesAnything bool
}

type DBPutRedHatNVRsExpectation

type DBPutRedHatNVRsExpectation struct {
	Args    DBPutRedHatNVRsArgs
	Returns DBPutRedHatNVRsReturns
}

type DBPutRedHatNVRsReturns

type DBPutRedHatNVRsReturns struct {
	Err error
}

type DBPutRedHatRepositoriesArgs

type DBPutRedHatRepositoriesArgs struct {
	Tx                 *bbolt.Tx
	TxAnything         bool
	Repository         string
	RepositoryAnything bool
	CpeIndices         []int
	CpeIndicesAnything bool
}

type DBPutRedHatRepositoriesExpectation

type DBPutRedHatRepositoriesExpectation struct {
	Args    DBPutRedHatRepositoriesArgs
	Returns DBPutRedHatRepositoriesReturns
}

type DBPutRedHatRepositoriesReturns

type DBPutRedHatRepositoriesReturns struct {
	Err error
}

type DBPutReturns

type DBPutReturns struct {
	// contains filtered or unexported fields
}

type DBPutVulnerabilityArgs

type DBPutVulnerabilityArgs struct {
	Tx                      *bbolt.Tx
	TxAnything              bool
	VulnerabilityID         string
	VulnerabilityIDAnything bool
	Vulnerability           types.Vulnerability
	VulnerabilityAnything   bool
}

type DBPutVulnerabilityDetailArgs

type DBPutVulnerabilityDetailArgs struct {
	Tx                      *bbolt.Tx
	TxAnything              bool
	VulnerabilityID         string
	VulnerabilityIDAnything bool
	Source                  types.SourceID
	SourceAnything          bool
	Vulnerability           types.VulnerabilityDetail
	VulnerabilityAnything   bool
}

type DBPutVulnerabilityDetailExpectation

type DBPutVulnerabilityDetailExpectation struct {
	Args    DBPutVulnerabilityDetailArgs
	Returns DBPutVulnerabilityDetailReturns
}

type DBPutVulnerabilityDetailReturns

type DBPutVulnerabilityDetailReturns struct {
	Err error
}

type DBPutVulnerabilityExpectation

type DBPutVulnerabilityExpectation struct {
	Args    DBPutVulnerabilityArgs
	Returns DBPutVulnerabilityReturns
}

type DBPutVulnerabilityIDArgs

type DBPutVulnerabilityIDArgs struct {
	Tx                      *bbolt.Tx
	TxAnything              bool
	VulnerabilityID         string
	VulnerabilityIDAnything bool
}

type DBPutVulnerabilityIDExpectation

type DBPutVulnerabilityIDExpectation struct {
	Args    DBPutVulnerabilityIDArgs
	Returns DBPutVulnerabilityIDReturns
}

type DBPutVulnerabilityIDReturns

type DBPutVulnerabilityIDReturns struct {
	Err error
}

type DBPutVulnerabilityReturns

type DBPutVulnerabilityReturns struct {
	Err error
}

type DBRedHatNVRToCPEsArgs

type DBRedHatNVRToCPEsArgs struct {
	Nvr         string
	NvrAnything bool
}

type DBRedHatNVRToCPEsExpectation

type DBRedHatNVRToCPEsExpectation struct {
	Args    DBRedHatNVRToCPEsArgs
	Returns DBRedHatNVRToCPEsReturns
}

type DBRedHatNVRToCPEsReturns

type DBRedHatNVRToCPEsReturns struct {
	CpeIndices []int
	Err        error
}

type DBRedHatRepoToCPEsArgs

type DBRedHatRepoToCPEsArgs struct {
	Repository         string
	RepositoryAnything bool
}

type DBRedHatRepoToCPEsExpectation

type DBRedHatRepoToCPEsExpectation struct {
	Args    DBRedHatRepoToCPEsArgs
	Returns DBRedHatRepoToCPEsReturns
}

type DBRedHatRepoToCPEsReturns

type DBRedHatRepoToCPEsReturns struct {
	CpeIndices []int
	Err        error
}

type DBSaveAdvisoryDetailsArgs

type DBSaveAdvisoryDetailsArgs struct {
	Tx            *bbolt.Tx
	TxAnything    bool
	CveID         string
	CveIDAnything bool
}

type DBSaveAdvisoryDetailsExpectation

type DBSaveAdvisoryDetailsExpectation struct {
	Args    DBSaveAdvisoryDetailsArgs
	Returns DBSaveAdvisoryDetailsReturns
}

type DBSaveAdvisoryDetailsReturns

type DBSaveAdvisoryDetailsReturns struct {
	Err error
}

type Date

type Date struct {
	Date int64 `json:"$date"`
}

type Erratum

type Erratum struct {
	ID           OID         `json:"_id"`
	BsRepoID     OID         `json:"bs_repo_id"`
	UpdateinfoID string      `json:"updateinfo_id"`
	Description  string      `json:"description"`
	Fromstr      string      `json:"fromstr"`
	IssuedDate   Date        `json:"issued_date"`
	Pkglist      Pkglist     `json:"pkglist"`
	Pushcount    string      `json:"pushcount"`
	References   []Reference `json:"references"`
	Release      string      `json:"release"`
	Rights       string      `json:"rights"`
	Severity     string      `json:"severity"`
	Solution     string      `json:"solution"`
	Status       string      `json:"status"`
	Summary      string      `json:"summary"`
	Title        string      `json:"title"`
	Type         string      `json:"type"`
	UpdatedDate  Date        `json:"updated_date"`
	Version      string      `json:"version"`
}

type MockDB

type MockDB struct {
	mock.Mock
}

MockDB is an autogenerated mock type for the DB type

func (*MockDB) ApplyBatchUpdateExpectation

func (_m *MockDB) ApplyBatchUpdateExpectation(e DBBatchUpdateExpectation)

func (*MockDB) ApplyBatchUpdateExpectations

func (_m *MockDB) ApplyBatchUpdateExpectations(expectations []DBBatchUpdateExpectation)

func (*MockDB) ApplyDeleteAdvisoryDetailBucketExpectation

func (_m *MockDB) ApplyDeleteAdvisoryDetailBucketExpectation(e DBDeleteAdvisoryDetailBucketExpectation)

func (*MockDB) ApplyDeleteAdvisoryDetailBucketExpectations

func (_m *MockDB) ApplyDeleteAdvisoryDetailBucketExpectations(expectations []DBDeleteAdvisoryDetailBucketExpectation)

func (*MockDB) ApplyDeleteVulnerabilityDetailBucketExpectation

func (_m *MockDB) ApplyDeleteVulnerabilityDetailBucketExpectation(e DBDeleteVulnerabilityDetailBucketExpectation)

func (*MockDB) ApplyDeleteVulnerabilityDetailBucketExpectations

func (_m *MockDB) ApplyDeleteVulnerabilityDetailBucketExpectations(expectations []DBDeleteVulnerabilityDetailBucketExpectation)

func (*MockDB) ApplyForEachAdvisoryExpectation

func (_m *MockDB) ApplyForEachAdvisoryExpectation(e DBForEachAdvisoryExpectation)

func (*MockDB) ApplyForEachAdvisoryExpectations

func (_m *MockDB) ApplyForEachAdvisoryExpectations(expectations []DBForEachAdvisoryExpectation)

func (*MockDB) ApplyForEachVulnerabilityIDExpectation

func (_m *MockDB) ApplyForEachVulnerabilityIDExpectation(e DBForEachVulnerabilityIDExpectation)

func (*MockDB) ApplyForEachVulnerabilityIDExpectations

func (_m *MockDB) ApplyForEachVulnerabilityIDExpectations(expectations []DBForEachVulnerabilityIDExpectation)

func (*MockDB) ApplyGetAdvisoriesExpectation

func (_m *MockDB) ApplyGetAdvisoriesExpectation(e DBGetAdvisoriesExpectation)

func (*MockDB) ApplyGetAdvisoriesExpectations

func (_m *MockDB) ApplyGetAdvisoriesExpectations(expectations []DBGetAdvisoriesExpectation)

func (*MockDB) ApplyGetExpectation

func (_m *MockDB) ApplyGetExpectation(e DBGetExpectation)

func (*MockDB) ApplyGetExpectations

func (_m *MockDB) ApplyGetExpectations(expectations []DBGetExpectation)

func (*MockDB) ApplyGetVulnerabilityDetailExpectation

func (_m *MockDB) ApplyGetVulnerabilityDetailExpectation(e DBGetVulnerabilityDetailExpectation)

func (*MockDB) ApplyGetVulnerabilityDetailExpectations

func (_m *MockDB) ApplyGetVulnerabilityDetailExpectations(expectations []DBGetVulnerabilityDetailExpectation)

func (*MockDB) ApplyGetVulnerabilityExpectation

func (_m *MockDB) ApplyGetVulnerabilityExpectation(e DBGetVulnerabilityExpectation)

func (*MockDB) ApplyGetVulnerabilityExpectations

func (_m *MockDB) ApplyGetVulnerabilityExpectations(expectations []DBGetVulnerabilityExpectation)

func (*MockDB) ApplyPutAdvisoryDetailExpectation

func (_m *MockDB) ApplyPutAdvisoryDetailExpectation(e DBPutAdvisoryDetailExpectation)

func (*MockDB) ApplyPutAdvisoryDetailExpectations

func (_m *MockDB) ApplyPutAdvisoryDetailExpectations(expectations []DBPutAdvisoryDetailExpectation)

func (*MockDB) ApplyPutDataSourceExpectation

func (_m *MockDB) ApplyPutDataSourceExpectation(e DBPutDataSourceExpectation)

func (*MockDB) ApplyPutDataSourceExpectations

func (_m *MockDB) ApplyPutDataSourceExpectations(expectations []DBPutDataSourceExpectation)

func (*MockDB) ApplyPutExpectation

func (_m *MockDB) ApplyPutExpectation(e DBPutExpectation)

func (*MockDB) ApplyPutExpectations

func (_m *MockDB) ApplyPutExpectations(expectations []DBPutExpectation)

func (*MockDB) ApplyPutRedHatCPEsExpectation

func (_m *MockDB) ApplyPutRedHatCPEsExpectation(e DBPutRedHatCPEsExpectation)

func (*MockDB) ApplyPutRedHatCPEsExpectations

func (_m *MockDB) ApplyPutRedHatCPEsExpectations(expectations []DBPutRedHatCPEsExpectation)

func (*MockDB) ApplyPutRedHatNVRsExpectation

func (_m *MockDB) ApplyPutRedHatNVRsExpectation(e DBPutRedHatNVRsExpectation)

func (*MockDB) ApplyPutRedHatNVRsExpectations

func (_m *MockDB) ApplyPutRedHatNVRsExpectations(expectations []DBPutRedHatNVRsExpectation)

func (*MockDB) ApplyPutRedHatRepositoriesExpectation

func (_m *MockDB) ApplyPutRedHatRepositoriesExpectation(e DBPutRedHatRepositoriesExpectation)

func (*MockDB) ApplyPutRedHatRepositoriesExpectations

func (_m *MockDB) ApplyPutRedHatRepositoriesExpectations(expectations []DBPutRedHatRepositoriesExpectation)

func (*MockDB) ApplyPutVulnerabilityDetailExpectation

func (_m *MockDB) ApplyPutVulnerabilityDetailExpectation(e DBPutVulnerabilityDetailExpectation)

func (*MockDB) ApplyPutVulnerabilityDetailExpectations

func (_m *MockDB) ApplyPutVulnerabilityDetailExpectations(expectations []DBPutVulnerabilityDetailExpectation)

func (*MockDB) ApplyPutVulnerabilityExpectation

func (_m *MockDB) ApplyPutVulnerabilityExpectation(e DBPutVulnerabilityExpectation)

func (*MockDB) ApplyPutVulnerabilityExpectations

func (_m *MockDB) ApplyPutVulnerabilityExpectations(expectations []DBPutVulnerabilityExpectation)

func (*MockDB) ApplyPutVulnerabilityIDExpectation

func (_m *MockDB) ApplyPutVulnerabilityIDExpectation(e DBPutVulnerabilityIDExpectation)

func (*MockDB) ApplyPutVulnerabilityIDExpectations

func (_m *MockDB) ApplyPutVulnerabilityIDExpectations(expectations []DBPutVulnerabilityIDExpectation)

func (*MockDB) ApplyRedHatNVRToCPEsExpectation

func (_m *MockDB) ApplyRedHatNVRToCPEsExpectation(e DBRedHatNVRToCPEsExpectation)

func (*MockDB) ApplyRedHatNVRToCPEsExpectations

func (_m *MockDB) ApplyRedHatNVRToCPEsExpectations(expectations []DBRedHatNVRToCPEsExpectation)

func (*MockDB) ApplyRedHatRepoToCPEsExpectation

func (_m *MockDB) ApplyRedHatRepoToCPEsExpectation(e DBRedHatRepoToCPEsExpectation)

func (*MockDB) ApplyRedHatRepoToCPEsExpectations

func (_m *MockDB) ApplyRedHatRepoToCPEsExpectations(expectations []DBRedHatRepoToCPEsExpectation)

func (*MockDB) ApplySaveAdvisoryDetailsExpectation

func (_m *MockDB) ApplySaveAdvisoryDetailsExpectation(e DBSaveAdvisoryDetailsExpectation)

func (*MockDB) ApplySaveAdvisoryDetailsExpectations

func (_m *MockDB) ApplySaveAdvisoryDetailsExpectations(expectations []DBSaveAdvisoryDetailsExpectation)

func (*MockDB) BatchUpdate

func (_m *MockDB) BatchUpdate(fn func(*bbolt.Tx) error) error

BatchUpdate provides a mock function with given fields: fn

func (*MockDB) DeleteAdvisoryDetailBucket

func (_m *MockDB) DeleteAdvisoryDetailBucket() error

DeleteAdvisoryDetailBucket provides a mock function with given fields:

func (*MockDB) DeleteVulnerabilityDetailBucket

func (_m *MockDB) DeleteVulnerabilityDetailBucket() error

DeleteVulnerabilityDetailBucket provides a mock function with given fields:

func (*MockDB) ForEachAdvisory

func (_m *MockDB) ForEachAdvisory(sources []string, pkgName string) (map[string]db.Value, error)

ForEachAdvisory provides a mock function with given fields: sources, pkgName

func (*MockDB) ForEachVulnerabilityID

func (_m *MockDB) ForEachVulnerabilityID(fn func(*bbolt.Tx, string) error) error

ForEachVulnerabilityID provides a mock function with given fields: fn

func (*MockDB) Get

func (_m *MockDB) Get(release string, pkgName string) ([]types.Advisory, error)

Get provides a mock function with given fields: release, pkgName

func (*MockDB) GetAdvisories

func (_m *MockDB) GetAdvisories(source string, pkgName string) ([]types.Advisory, error)

GetAdvisories provides a mock function with given fields: source, pkgName

func (*MockDB) GetVulnerability

func (_m *MockDB) GetVulnerability(vulnerabilityID string) (types.Vulnerability, error)

GetVulnerability provides a mock function with given fields: vulnerabilityID

func (*MockDB) GetVulnerabilityDetail

func (_m *MockDB) GetVulnerabilityDetail(cveID string) (map[types.SourceID]types.VulnerabilityDetail, error)

GetVulnerabilityDetail provides a mock function with given fields: cveID

func (*MockDB) Put

func (_m *MockDB) Put(_a0 *bbolt.Tx, _a1 PutInput) error

Put provides a mock function with given fields: _a0, _a1

func (*MockDB) PutAdvisoryDetail

func (_m *MockDB) PutAdvisoryDetail(tx *bbolt.Tx, vulnerabilityID string, pkgName string, nestedBktNames []string, advisory interface{}) error

PutAdvisoryDetail provides a mock function with given fields: tx, vulnerabilityID, pkgName, nestedBktNames, advisory

func (*MockDB) PutDataSource

func (_m *MockDB) PutDataSource(tx *bbolt.Tx, bktName string, source types.DataSource) error

PutDataSource provides a mock function with given fields: tx, bktName, source

func (*MockDB) PutRedHatCPEs

func (_m *MockDB) PutRedHatCPEs(tx *bbolt.Tx, cpeIndex int, cpe string) error

PutRedHatCPEs provides a mock function with given fields: tx, cpeIndex, cpe

func (*MockDB) PutRedHatNVRs

func (_m *MockDB) PutRedHatNVRs(tx *bbolt.Tx, nvr string, cpeIndices []int) error

PutRedHatNVRs provides a mock function with given fields: tx, nvr, cpeIndices

func (*MockDB) PutRedHatRepositories

func (_m *MockDB) PutRedHatRepositories(tx *bbolt.Tx, repository string, cpeIndices []int) error

PutRedHatRepositories provides a mock function with given fields: tx, repository, cpeIndices

func (*MockDB) PutVulnerability

func (_m *MockDB) PutVulnerability(tx *bbolt.Tx, vulnerabilityID string, vulnerability types.Vulnerability) error

PutVulnerability provides a mock function with given fields: tx, vulnerabilityID, vulnerability

func (*MockDB) PutVulnerabilityDetail

func (_m *MockDB) PutVulnerabilityDetail(tx *bbolt.Tx, vulnerabilityID string, source types.SourceID, vulnerability types.VulnerabilityDetail) error

PutVulnerabilityDetail provides a mock function with given fields: tx, vulnerabilityID, source, vulnerability

func (*MockDB) PutVulnerabilityID

func (_m *MockDB) PutVulnerabilityID(tx *bbolt.Tx, vulnerabilityID string) error

PutVulnerabilityID provides a mock function with given fields: tx, vulnerabilityID

func (*MockDB) RedHatNVRToCPEs

func (_m *MockDB) RedHatNVRToCPEs(nvr string) ([]int, error)

RedHatNVRToCPEs provides a mock function with given fields: nvr

func (*MockDB) RedHatRepoToCPEs

func (_m *MockDB) RedHatRepoToCPEs(repository string) ([]int, error)

RedHatRepoToCPEs provides a mock function with given fields: repository

func (*MockDB) SaveAdvisoryDetails

func (_m *MockDB) SaveAdvisoryDetails(tx *bbolt.Tx, cveID string) error

SaveAdvisoryDetails provides a mock function with given fields: tx, cveID

type Module

type Module struct {
	Stream  string `json:"stream,omitempty"`
	Name    string `json:"name,omitempty"`
	Version int64  `json:"version,omitempty"`
	Arch    string `json:"arch,omitempty"`
	Context string `json:"context,omitempty"`
}

type OID

type OID struct {
	OID string `json:"$oid,omitempty"`
}

type Package

type Package struct {
	Name            string      `json:"name"`
	Version         string      `json:"version"`
	Release         string      `json:"release"`
	Epoch           string      `json:"epoch"`
	Arch            string      `json:"arch"`
	Src             string      `json:"src"`
	Filename        string      `json:"filename"`
	Sum             string      `json:"sum"`
	SumType         interface{} `json:"sum_type"`
	RebootSuggested int         `json:"reboot_suggested"`
}

type Pkglist

type Pkglist struct {
	Name      string    `json:"name"`
	Shortname string    `json:"shortname"`
	Packages  []Package `json:"packages"`
	Module    Module    `json:"module"`
}

type PutInput

type PutInput struct {
	PlatformName string
	CveID        string
	Vuln         types.VulnerabilityDetail
	Advisories   map[string]types.Advisory
	Erratum      Erratum // for extensibility, not used in vul-db
}

type Reference

type Reference struct {
	Href  string `json:"href"`
	Type  string `json:"type"`
	ID    string `json:"id"`
	Title string `json:"title"`
}

type VulnSrc

type VulnSrc struct {
	DB // Those who want to customize Vul DB can override put/get methods.
}

func NewVulnSrc

func NewVulnSrc() *VulnSrc

func (*VulnSrc) Name

func (vs *VulnSrc) Name() types.SourceID

func (*VulnSrc) Update

func (vs *VulnSrc) Update(dir string) error

Jump to

Keyboard shortcuts

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