datastore

package
v0.0.0-...-0439c0d Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package datastore contains definitions of Datastore entities for OSV.dev.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AliasAllowListEntry

type AliasAllowListEntry struct {
	VulnID string `datastore:"bug_id"`
}

type AliasDenyListEntry

type AliasDenyListEntry struct {
	VulnID string `datastore:"bug_id"`
}

type AliasGroup

type AliasGroup struct {
	VulnIDs  []string  `datastore:"bug_ids"`
	Modified time.Time `datastore:"last_modified"`
}

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"`
}

type RelatedGroup

type RelatedGroup struct {
	Key        *datastore.Key `datastore:"__key__"`
	RelatedIDs []string       `datastore:"related_ids"`
	Modified   time.Time      `datastore:"modified"`
}

type Severity

type Severity struct {
	Type  string `datastore:"type"`
	Score string `datastore:"score"`
}

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"`
	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"`
}

type SourceRepositoryStore

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

func NewSourceRepositoryStore

func NewSourceRepositoryStore(client *datastore.Client) *SourceRepositoryStore

func (*SourceRepositoryStore) All

func (*SourceRepositoryStore) Get

func (*SourceRepositoryStore) Update

type UpstreamGroup

type UpstreamGroup struct {
	Key               *datastore.Key `datastore:"__key__"`
	VulnID            string         `datastore:"db_id"`
	UpstreamIDs       []string       `datastore:"upstream_ids"`
	Modified          time.Time      `datastore:"last_modified"`
	UpstreamHierarchy []byte         `datastore:"upstream_hierarchy,noindex"`
}

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(client *datastore.Client) *VulnerabilityStore

func (*VulnerabilityStore) ListBySource

func (s *VulnerabilityStore) ListBySource(ctx context.Context, source string, skipWithdrawn bool) iter.Seq2[*models.VulnSourceRef, error]

Directories

Path Synopsis
internal
validate command
Package main reads datastore records that were created by the validate.py python script.
Package main reads datastore records that were created by the validate.py python script.

Jump to

Keyboard shortcuts

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