type golang.org/x/pkgsite/internal/postgres.DB
122 uses
golang.org/x/pkgsite/internal/postgres (current package)
clean.go#L29: func (db *DB) GetModuleVersionsToClean(ctx context.Context, daysOld, limit int) (modvers []ModuleVersion, err error) {
clean.go#L76: func (db *DB) CleanModuleVersions(ctx context.Context, mvs []ModuleVersion, reason string) (err error) {
clean.go#L93: func (db *DB) CleanModule(ctx context.Context, modulePath, reason string) (err error) {
delete.go#L18: func (db *DB) DeletePseudoversionsExcept(ctx context.Context, modulePath, resolvedVersion string) (err error) {
details.go#L23: func (db *DB) GetNestedModules(ctx context.Context, modulePath string) (_ []*internal.ModuleInfo, err error) {
details.go#L79: func (db *DB) GetImportedBy(ctx context.Context, pkgPath, modulePath string, limit int) (paths []string, err error) {
details.go#L103: func (db *DB) GetImportedByCount(ctx context.Context, pkgPath, modulePath string) (_ int, err error) {
details.go#L131: func (db *DB) GetModuleInfo(ctx context.Context, modulePath, resolvedVersion string) (_ *internal.ModuleInfo, err error) {
excluded.go#L21: func (db *DB) IsExcluded(ctx context.Context, path string) (_ bool, err error) {
excluded.go#L43: func (db *DB) InsertExcludedPrefix(ctx context.Context, prefix, user, reason string) (err error) {
excluded.go#L55: func (db *DB) GetExcludedPrefixes(ctx context.Context) ([]string, error) {
insert_module.go#L35: func (db *DB) InsertModule(ctx context.Context, m *internal.Module, lmv *internal.LatestModuleVersions) (isLatest bool, err error) {
insert_module.go#L75: func (db *DB) saveModule(ctx context.Context, m *internal.Module, lmv *internal.LatestModuleVersions) (isLatest bool, err error) {
insert_module.go#L329: func (pdb *DB) insertUnits(ctx context.Context, db *database.DB, m *internal.Module, moduleID int, pathToID map[string]int) (err error) {
insert_module.go#L619: func (db *DB) ReInsertLatestVersion(ctx context.Context, modulePath string) (err error) {
insert_module.go#L805: func (db *DB) compareLicenses(ctx context.Context, moduleID int, lics []*licenses.License) (err error) {
insert_module.go#L827: func (db *DB) comparePaths(ctx context.Context, m *internal.Module) (err error) {
insert_module.go#L846: func (db *DB) DeleteModule(ctx context.Context, modulePath, resolvedVersion string) (err error) {
licenses.go#L25: func (db *DB) getLicenses(ctx context.Context, fullPath, modulePath string, unitID int) (_ []*licenses.License, err error) {
licenses.go#L85: func (db *DB) getModuleLicenses(ctx context.Context, moduleID int) (_ []*licenses.License, err error) {
path.go#L23: func (db *DB) GetLatestMajorPathForV1Path(ctx context.Context, v1path string) (_ string, _ int, err error) {
postgres.go#L20: type DB struct {
postgres.go#L28: func New(db *database.DB) *DB {
postgres.go#L35: func NewBypassingLicenseCheck(db *database.DB) *DB {
postgres.go#L42: func newdb(db *database.DB, bypass bool) *DB {
postgres.go#L56: return &DB{
postgres.go#L65: func (db *DB) Close() error {
postgres.go#L71: func (db *DB) Underlying() *database.DB {
postgres.go#L87: func (db *DB) StalenessTimestamp(ctx context.Context) (time.Time, error) {
requeue.go#L22: func (db *DB) UpdateModuleVersionStatesForReprocessing(ctx context.Context, appVersion string) (err error) {
requeue.go#L39: func (db *DB) UpdateModuleVersionStatesForReprocessingReleaseVersionsOnly(ctx context.Context, appVersion string) (err error) {
requeue.go#L65: func (db *DB) UpdateModuleVersionStatesForReprocessingLatestOnly(ctx context.Context, appVersion string) (err error) {
requeue.go#L98: func (db *DB) UpdateModuleVersionStatesWithStatus(ctx context.Context, status int, appVersion string) (err error) {
requeue.go#L135: func (db *DB) GetNextModulesToFetch(ctx context.Context, limit int) (_ []*internal.ModuleVersionState, err error) {
search.go#L85: type searcher func(db *DB, ctx context.Context, q string, limit, offset, maxResultCount int) searchResponse
search.go#L89: "popular": (*DB).popularSearch,
search.go#L90: "deep": (*DB).deepSearch,
search.go#L94: "symbol": (*DB).symbolSearch,
search.go#L120: func (db *DB) Search(ctx context.Context, q string, limit, offset, maxResultCount int, searchSymbols bool) (_ []*internal.SearchResult, err error) {
search.go#L194: func (db *DB) hedgedSearch(ctx context.Context, q string, limit, offset, maxResultCount int, searchers map[string]searcher, guardTestResult func(string) func()) (_ *searchResponse, err error) {
search.go#L252: func (db *DB) deepSearch(ctx context.Context, q string, limit, offset, maxResultCount int) searchResponse {
search.go#L300: func (db *DB) popularSearch(ctx context.Context, searchQuery string, limit, offset, maxResultCount int) searchResponse {
search.go#L347: func (db *DB) symbolSearch(ctx context.Context, q string, limit, offset, maxResultCount int) searchResponse {
search.go#L430: func (db *DB) addPackageDataToSearchResults(ctx context.Context, results []*internal.SearchResult) (err error) {
search.go#L689: func (db *DB) GetPackagesForSearchDocumentUpsert(ctx context.Context, before time.Time, limit int) (argsList []UpsertSearchDocumentArgs, err error) {
search.go#L745: func (db *DB) UpdateSearchDocumentsImportedByCount(ctx context.Context) (nUpdated int64, err error) {
search.go#L770: func (db *DB) getSearchPackages(ctx context.Context) (set map[string]bool, err error) {
search.go#L788: func (db *DB) computeImportedByCounts(ctx context.Context, searchDocsPackages map[string]bool) (counts map[string]int, err error) {
search.go#L1018: func (db *DB) DeleteOlderVersionFromSearchDocuments(ctx context.Context, modulePath, resolvedVersion string) (err error) {
search.go#L1060: func (db *DB) UpsertSearchDocumentWithImportedByCount(ctx context.Context, args UpsertSearchDocumentArgs, importedByCount int) (err error) {
stdlib.go#L20: func (db *DB) GetStdlibPathsWithSuffix(ctx context.Context, suffix string) (paths []string, err error) {
symbol_history.go#L24: func (db *DB) GetSymbolHistory(ctx context.Context, packagePath, modulePath string,
test_helper.go#L75: func SetupTestDB(dbName string) (_ *DB, err error) {
test_helper.go#L107: func ResetTestDB(db *DB, t *testing.T) {
test_helper.go#L137: func RunDBTests(dbName string, m *testing.M, testDB **DB) {
test_helper.go#L163: func RunDBTestsInParallel(dbBaseName string, numDBs int, m *testing.M, acquirep *func(*testing.T) (*DB, func())) {
test_helper.go#L166: dbs := make(chan *DB, numDBs)
test_helper.go#L179: *acquirep = func(t *testing.T) (*DB, func()) {
test_helper.go#L204: func MustInsertModule(ctx context.Context, t *testing.T, db *DB, m *internal.Module) {
test_helper.go#L208: func MustInsertModuleGoMod(ctx context.Context, t *testing.T, db *DB, m *internal.Module, goMod string) {
test_helper.go#L212: func MustInsertModuleNotLatest(ctx context.Context, t *testing.T, db *DB, m *internal.Module) {
test_helper.go#L216: func mustInsertModule(ctx context.Context, t *testing.T, db *DB, m *internal.Module, goMod string, latest bool) {
test_helper.go#L231: func addLatest(ctx context.Context, t *testing.T, db *DB, modulePath, version, modFile string) *internal.LatestModuleVersions {
test_helper.go#L248: func InsertSampleDirectoryTree(ctx context.Context, t *testing.T, testDB *DB) {
test_helper.go#L325: func GetFromSearchDocuments(ctx context.Context, t *testing.T, db *DB, packagePath string) (modulePath, version string, found bool) {
unit.go#L38: func (db *DB) GetUnitMeta(ctx context.Context, fullPath, requestedModulePath, requestedVersion string) (_ *internal.UnitMeta, err error) {
unit.go#L54: func (db *DB) getUnitMetaWithKnownLatestVersion(ctx context.Context, fullPath, modulePath, version string, lmv *internal.LatestModuleVersions) (_ *internal.UnitMeta, err error) {
unit.go#L143: func (db *DB) getLatestUnitVersion(ctx context.Context, fullPath, requestedModulePath string) (
unit.go#L245: func (db *DB) GetUnit(ctx context.Context, um *internal.UnitMeta, fields internal.FieldSet, bc internal.BuildContext) (_ *internal.Unit, err error) {
unit.go#L291: func (db *DB) getUnitID(ctx context.Context, fullPath, modulePath, resolvedVersion string) (_ int, err error) {
unit.go#L316: func (db *DB) getImports(ctx context.Context, unitID int) (_ []string, err error) {
unit.go#L327: func (db *DB) getPackagesInUnit(ctx context.Context, fullPath string, moduleID int) (_ []*internal.PackageMeta, err error) {
unit.go#L425: func (db *DB) getUnitWithAllFields(ctx context.Context, um *internal.UnitMeta, bc internal.BuildContext) (_ *internal.Unit, err error) {
unit.go#L585: func (db *DB) getPathsInModule(ctx context.Context, modulePath, resolvedVersion string) (_ []*dbPath, err error) {
unit.go#L628: func (db *DB) GetModuleReadme(ctx context.Context, modulePath, resolvedVersion string) (_ *internal.Readme, err error) {
version.go#L29: func (db *DB) GetVersionsForPath(ctx context.Context, path string) (_ []*internal.ModuleInfo, err error) {
version.go#L50: func getPathVersions(ctx context.Context, db *DB, path string, versionTypes ...version.Type) (_ []*internal.ModuleInfo, err error) {
version.go#L114: func populateLatestInfo(ctx context.Context, db *DB, mi *internal.ModuleInfo) (err error) {
version.go#L128: func populateLatestInfos(ctx context.Context, db *DB, mis []*internal.ModuleInfo) (err error) {
version.go#L156: func (db *DB) GetLatestInfo(ctx context.Context, unitPath, modulePath string, latestUnitMeta *internal.UnitMeta) (latest internal.LatestInfo, err error) {
version.go#L201: func (db *DB) getLatestMajorVersion(ctx context.Context, fullPath, modulePath string) (modPath, pkgPath string, err error) {
version.go#L279: func (db *DB) unitExistsAtLatest(ctx context.Context, unitPath, modulePath string) (unitExists bool, err error) {
version.go#L329: func (db *DB) getMultiLatestModuleVersions(ctx context.Context, modulePaths []string) (lmvs []*internal.LatestModuleVersions, err error) {
version.go#L408: func (db *DB) GetLatestModuleVersions(ctx context.Context, modulePath string) (_ *internal.LatestModuleVersions, err error) {
version.go#L459: func (db *DB) UpdateLatestModuleVersions(ctx context.Context, vNew *internal.LatestModuleVersions) (_ *internal.LatestModuleVersions, err error) {
version.go#L510: func (db *DB) UpdateLatestModuleVersionsStatus(ctx context.Context, modulePath string, newStatus int) (err error) {
version_map.go#L20: func (db *DB) UpsertVersionMap(ctx context.Context, vm *internal.VersionMap) (err error) {
version_map.go#L70: func (db *DB) GetVersionMap(ctx context.Context, modulePath, requestedVersion string) (_ *internal.VersionMap, err error) {
version_map.go#L99: func (db *DB) GetVersionMaps(ctx context.Context, paths []string, requestedVersion string) (_ []*internal.VersionMap, err error) {
versionstate.go#L25: func (db *DB) InsertIndexVersions(ctx context.Context, versions []*internal.IndexVersion) (err error) {
versionstate.go#L59: func (db *DB) UpsertModuleVersionState(ctx context.Context, mvs *ModuleVersionStateForUpsert) (err error) {
versionstate.go#L165: func (db *DB) UpdateModuleVersionStatus(ctx context.Context, modulePath, version string, status int, error string) (err error) {
versionstate.go#L210: func (db *DB) LatestIndexTimestamp(ctx context.Context) (_ time.Time, err error) {
versionstate.go#L276: func (db *DB) queryModuleVersionStates(ctx context.Context, queryFormat string, args ...interface{}) ([]*internal.ModuleVersionState, error) {
versionstate.go#L297: func (db *DB) GetRecentFailedVersions(ctx context.Context, limit int) (_ []*internal.ModuleVersionState, err error) {
versionstate.go#L311: func (db *DB) GetRecentVersions(ctx context.Context, limit int) (_ []*internal.ModuleVersionState, err error) {
versionstate.go#L325: func (db *DB) GetModuleVersionState(ctx context.Context, modulePath, resolvedVersion string) (_ *internal.ModuleVersionState, err error) {
versionstate.go#L350: func (db *DB) GetPackageVersionStatesForModule(ctx context.Context, modulePath, resolvedVersion string) (_ []*internal.PackageVersionState, err error) {
versionstate.go#L384: func (db *DB) GetPackageVersionState(ctx context.Context, pkgPath, modulePath, resolvedVersion string) (_ *internal.PackageVersionState, err error) {
versionstate.go#L425: func (db *DB) GetVersionStats(ctx context.Context) (_ *VersionStats, err error) {
versionstate.go#L463: func (db *DB) HasGoMod(ctx context.Context, modulePath, version string) (has bool, err error) {
golang.org/x/pkgsite/internal/frontend
404.go#L48: db, ok := ds.(*postgres.DB)
404.go#L181: func previousFetchStatusAndResponse(ctx context.Context, db *postgres.DB,
fetch.go#L92: if _, ok := ds.(*postgres.DB); !ok {
fetch.go#L146: db := ds.(*postgres.DB)
fetch.go#L175: func (s *Server) checkPossibleModulePaths(ctx context.Context, db *postgres.DB,
fetch.go#L336: func pollForPath(ctx context.Context, db *postgres.DB, pollEvery time.Duration,
fetch.go#L370: func checkForPath(ctx context.Context, db *postgres.DB,
fetch.go#L548: func FetchAndUpdateState(ctx context.Context, modulePath, requestedVersion string, proxyClient *proxy.Client, sourceClient *source.Client, db *postgres.DB) (_ int, err error) {
imports.go#L98: db, ok := ds.(*postgres.DB)
redirect.go#L31: func stdlibPathForShortcut(ctx context.Context, db *postgres.DB, shortcut string) (path string, err error) {
search.go#L60: func fetchSearchPage(ctx context.Context, db *postgres.DB, query string, pageParams paginationParams) (*SearchPage, error) {
search.go#L230: db, ok := ds.(*postgres.DB)
urlinfo.go#L193: db, ok := ds.(*postgres.DB)
versions.go#L85: db, ok := ds.(*postgres.DB)
golang.org/x/pkgsite/internal/worker
fetch.go#L46: DB *postgres.DB
fetch.go#L323: func updateVersionMap(ctx context.Context, db *postgres.DB, ft *fetchTask) (err error) {
fetch.go#L364: func deleteModule(ctx context.Context, db *postgres.DB, ft *fetchTask) (err error) {
server.go#L49: db *postgres.DB
server.go#L59: DB *postgres.DB
golang.org/x/pkgsite/cmd/internal/cmdconfig
cmdconfig.go#L98: func OpenDB(ctx context.Context, cfg *config.Config, bypassLicenseCheck bool) (_ *postgres.DB, err error) {
golang.org/x/pkgsite/cmd/worker
main.go#L206: func populateExcluded(ctx context.Context, db *postgres.DB) {
 |
The pages are generated with Golds v0.3.2-preview. (GOOS=darwin GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |