Documentation
¶
Overview ¶
Package datastore contains definitions of Datastore entities for OSV.dev.
Index ¶
- type AffectedCommits
- type AffectedEvent
- type AffectedVersions
- type AliasAllowListEntry
- type AliasDenyListEntry
- type AliasGroup
- type ImportFinding
- type ImportFindingsStore
- func (s *ImportFindingsStore) Clear(ctx context.Context, id string) error
- func (s *ImportFindingsStore) DeleteMulti(ctx context.Context, bugIDs []string) error
- func (s *ImportFindingsStore) DeleteResult(ctx context.Context, path string) error
- func (s *ImportFindingsStore) GetMulti(ctx context.Context, bugIDs []string) ([]*models.ImportFinding, error)
- func (s *ImportFindingsStore) ListIDs(ctx context.Context) ([]string, error)
- func (s *ImportFindingsStore) ListResultSources(ctx context.Context) ([]string, error)
- func (s *ImportFindingsStore) PutMulti(ctx context.Context, findings []*models.ImportFinding) error
- func (s *ImportFindingsStore) UploadResult(ctx context.Context, source string, data []byte) error
- type ListedVulnerability
- type RelatedGroup
- type RelationsStore
- func (s *RelationsStore) GetAliases(ctx context.Context, id string) (*models.GetAliasResult, error)
- func (s *RelationsStore) GetRelated(ctx context.Context, id string) (*models.GetRelatedResult, error)
- func (s *RelationsStore) GetUpstream(ctx context.Context, id string) (*models.GetUpstreamResult, error)
- type Severity
- type SourceRepository
- type SourceRepositoryStore
- func (s *SourceRepositoryStore) All(ctx context.Context) iter.Seq2[*models.SourceRepository, error]
- func (s *SourceRepositoryStore) Get(ctx context.Context, name string) (*models.SourceRepository, error)
- func (s *SourceRepositoryStore) Update(ctx context.Context, name string, repo *models.SourceRepository) error
- type UpstreamGroup
- type VulnStoreConfig
- type Vulnerability
- type VulnerabilityStore
- func (s *VulnerabilityStore) Get(ctx context.Context, id string) (*osvschema.Vulnerability, error)
- func (s *VulnerabilityStore) GetSourceModified(ctx context.Context, id string) (time.Time, error)
- func (s *VulnerabilityStore) GetWithMetadata(ctx context.Context, id string) (*osvschema.Vulnerability, *models.VulnSourceRef, error)
- func (s *VulnerabilityStore) ListBySource(ctx context.Context, source string, skipWithdrawn bool) iter.Seq2[*models.VulnSourceRef, error]
- func (s *VulnerabilityStore) Write(ctx context.Context, req models.WriteRequest) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AffectedCommits ¶
type AffectedEvent ¶
type AffectedVersions ¶
type AffectedVersions struct {
VulnID string `datastore:"vuln_id"`
Ecosystem string `datastore:"ecosystem"`
Name string `datastore:"name"`
Versions []string `datastore:"versions,noindex"`
Events []AffectedEvent `datastore:"events"`
CoarseMin string `datastore:"coarse_min"`
CoarseMax string `datastore:"coarse_max"`
}
type AliasAllowListEntry ¶
type AliasAllowListEntry struct {
VulnID string `datastore:"bug_id"`
}
type AliasDenyListEntry ¶
type AliasDenyListEntry struct {
VulnID string `datastore:"bug_id"`
}
type AliasGroup ¶
type ImportFinding ¶
type ImportFindingsStore ¶
type ImportFindingsStore struct {
// contains filtered or unexported fields
}
func NewImportFindingsStore ¶
func (*ImportFindingsStore) Clear ¶
func (s *ImportFindingsStore) Clear(ctx context.Context, id string) error
func (*ImportFindingsStore) DeleteMulti ¶
func (s *ImportFindingsStore) DeleteMulti(ctx context.Context, bugIDs []string) error
func (*ImportFindingsStore) DeleteResult ¶
func (s *ImportFindingsStore) DeleteResult(ctx context.Context, path string) error
func (*ImportFindingsStore) GetMulti ¶
func (s *ImportFindingsStore) GetMulti(ctx context.Context, bugIDs []string) ([]*models.ImportFinding, error)
func (*ImportFindingsStore) ListIDs ¶
func (s *ImportFindingsStore) ListIDs(ctx context.Context) ([]string, error)
func (*ImportFindingsStore) ListResultSources ¶
func (s *ImportFindingsStore) ListResultSources(ctx context.Context) ([]string, error)
func (*ImportFindingsStore) PutMulti ¶
func (s *ImportFindingsStore) PutMulti(ctx context.Context, findings []*models.ImportFinding) error
func (*ImportFindingsStore) UploadResult ¶
type ListedVulnerability ¶
type ListedVulnerability struct {
Key *datastore.Key `datastore:"__key__"`
Published time.Time `datastore:"published"`
Ecosystems []string `datastore:"ecosystems"`
Packages []string `datastore:"packages,noindex"`
Summary string `datastore:"summary,noindex"`
IsFixed bool `datastore:"is_fixed,noindex"`
Severities []Severity `datastore:"severities"`
AutocompleteTags []string `datastore:"autocomplete_tags"`
SearchIndices []string `datastore:"search_indices"`
}
func NewListedVulnerabilityFromProto ¶
func NewListedVulnerabilityFromProto(vuln *osvschema.Vulnerability) *ListedVulnerability
type RelatedGroup ¶
type RelationsStore ¶
type RelationsStore struct {
// contains filtered or unexported fields
}
func NewRelationsStore ¶
func NewRelationsStore(client *datastore.Client) *RelationsStore
func (*RelationsStore) GetAliases ¶
func (s *RelationsStore) GetAliases(ctx context.Context, id string) (*models.GetAliasResult, error)
func (*RelationsStore) GetRelated ¶
func (s *RelationsStore) GetRelated(ctx context.Context, id string) (*models.GetRelatedResult, error)
func (*RelationsStore) GetUpstream ¶
func (s *RelationsStore) GetUpstream(ctx context.Context, id string) (*models.GetUpstreamResult, error)
type SourceRepository ¶
type SourceRepository struct {
Type models.SourceRepositoryType `datastore:"type"`
Name string `datastore:"name"`
RepoURL string `datastore:"repo_url"`
RepoUsername string `datastore:"repo_username"`
RepoBranch string `datastore:"repo_branch"`
RESTAPIURL string `datastore:"rest_api_url"`
Bucket string `datastore:"bucket"`
DirectoryPath string `datastore:"directory_path"`
LastSyncedHash string `datastore:"last_synced_hash"`
LastUpdateDate *time.Time `datastore:"last_update_date"`
IgnorePatterns []string `datastore:"ignore_patterns"`
Editable bool `datastore:"editable"`
Extension string `datastore:"extension"`
KeyPath string `datastore:"key_path"`
AcceptedEcosystems []string `datastore:"accepted_ecosystems"`
IgnoreGit bool `datastore:"ignore_git"`
DetectCherrypicks bool `datastore:"detect_cherrypicks"`
ConsiderAllBranches bool `datastore:"consider_all_branches"`
VersionsFromRepo bool `datastore:"versions_from_repo"`
IgnoreLastImportTime bool `datastore:"ignore_last_import_time"`
IgnoreDeletionThreshold bool `datastore:"ignore_deletion_threshold"`
Link string `datastore:"link"`
HumanLink string `datastore:"human_link"`
DBPrefix []string `datastore:"db_prefix"`
StrictValidation bool `datastore:"strict_validation"`
WorkPool string `datastore:"work_pool"`
}
type SourceRepositoryStore ¶
type SourceRepositoryStore struct {
// contains filtered or unexported fields
}
func NewSourceRepositoryStore ¶
func NewSourceRepositoryStore(client *datastore.Client) *SourceRepositoryStore
func (*SourceRepositoryStore) All ¶
func (s *SourceRepositoryStore) All(ctx context.Context) iter.Seq2[*models.SourceRepository, error]
func (*SourceRepositoryStore) Get ¶
func (s *SourceRepositoryStore) Get(ctx context.Context, name string) (*models.SourceRepository, error)
func (*SourceRepositoryStore) Update ¶
func (s *SourceRepositoryStore) Update(ctx context.Context, name string, repo *models.SourceRepository) error
type UpstreamGroup ¶
type VulnStoreConfig ¶
type Vulnerability ¶
type Vulnerability struct {
Key *datastore.Key `datastore:"__key__"`
SourceID string `datastore:"source_id"`
Modified time.Time `datastore:"modified"`
IsWithdrawn bool `datastore:"is_withdrawn"`
ModifiedRaw time.Time `datastore:"modified_raw"`
AliasRaw []string `datastore:"alias_raw"`
RelatedRaw []string `datastore:"related_raw"`
UpstreamRaw []string `datastore:"upstream_raw"`
}
type VulnerabilityStore ¶
type VulnerabilityStore struct {
// contains filtered or unexported fields
}
func NewVulnerabilityStore ¶
func NewVulnerabilityStore(cfg VulnStoreConfig) *VulnerabilityStore
func (*VulnerabilityStore) Get ¶
func (s *VulnerabilityStore) Get(ctx context.Context, id string) (*osvschema.Vulnerability, error)
func (*VulnerabilityStore) GetSourceModified ¶
func (*VulnerabilityStore) GetWithMetadata ¶
func (s *VulnerabilityStore) GetWithMetadata(ctx context.Context, id string) (*osvschema.Vulnerability, *models.VulnSourceRef, error)
func (*VulnerabilityStore) ListBySource ¶
func (s *VulnerabilityStore) ListBySource(ctx context.Context, source string, skipWithdrawn bool) iter.Seq2[*models.VulnSourceRef, error]
func (*VulnerabilityStore) Write ¶
func (s *VulnerabilityStore) Write(ctx context.Context, req models.WriteRequest) error
Source Files
¶
Click to show internal directories.
Click to hide internal directories.