repository

package
v0.0.28-alpha Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2026 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ActiveAsOf

func ActiveAsOf(retiredAt time.Time, asof *time.Time) bool

ActiveAsOf reports whether a retired record counts as active. Without an as-of date a retired record is excluded; with one it stays active until the end of the day before its retirement.

func KeepPublishedOnOrBefore

func KeepPublishedOnOrBefore(published string, asof time.Time) bool

KeepPublishedOnOrBefore reports whether an advisory with the given published timestamp survives a knowledge as-of cutoff: true when it was published on or before the end of the asof day (the whole asof day stays in range). Empty or unparseable timestamps are kept, matching the semantics of the knowledge service's osv_asof mirror — a missing date must not silently erase an advisory.

Types

type PackageRepository

type PackageRepository struct {
	GetVersionStrings      func(depName string, knowledge *bun.DB) ([]string, error)
	GetVersionStringsBelow func(depName string, depVersion string, limit int, knowledge *bun.DB) ([]string, error)
	GetVersionStringsAbove func(depName string, depVersion string, limit int, knowledge *bun.DB) ([]string, error)
	GetFirstVersionString  func(depName string, knowledge *bun.DB) (string, error)
	GetLastVersionString   func(depName string, knowledge *bun.DB) (string, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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