all repos — searchix @ 35226fd9989a28f813380e665a026caf427cb549

Search engine for NixOS, nix-darwin, home-manager and NUR users

feat: store import timestamp on entities

Alan Pearce
commit

35226fd9989a28f813380e665a026caf427cb549

parent

a3d4d48317310712ba8e98c0288d7eb84f9efafd

M internal/importer/options.gointernal/importer/options.go
@@ -4,6 +4,7 @@ import (
"context" "io" "reflect" + "time" "alin.ovh/x/log"
@@ -180,6 +181,7 @@ Example: i.convertDocsValue(i.optJSON.Example),
RelatedPackages: nix.Markdown(i.optJSON.RelatedPackages), Loc: i.optJSON.Loc, Type: i.optJSON.Type, + ImportedAt: time.Now(), } } }()
M internal/importer/package.gointernal/importer/package.go
@@ -7,6 +7,7 @@ "io"
"net/url" "reflect" "strings" + "time" "alin.ovh/x/log"
@@ -338,6 +339,7 @@ Licenses: licenses,
Maintainers: maintainers, Definition: definition, Programs: programs, + ImportedAt: time.Now(), } } }()
M internal/index/index_meta.gointernal/index/index_meta.go
@@ -11,7 +11,7 @@ "github.com/Southclaws/fault"
"github.com/Southclaws/fault/fmsg" ) -const CurrentSchemaVersion = 8 +const CurrentSchemaVersion = 9 type SourceMeta struct { IndexedAt time.Time
M internal/nix/option.gointernal/nix/option.go
@@ -2,6 +2,7 @@ package nix
import ( "io" + "time" "github.com/Southclaws/fault" "github.com/yuin/goldmark"
@@ -31,6 +32,7 @@ Example *Docs `json:",omitempty"`
Loc []string RelatedPackages Markdown `json:",omitempty"` Type string + ImportedAt time.Time `storm:"index"` } func (Option) BleveType() string {
M internal/nix/package.gointernal/nix/package.go
@@ -1,5 +1,7 @@
package nix +import "time" + type Package struct { Name string Attribute string `storm:"id"`
@@ -16,6 +18,7 @@ Maintainers []Maintainer
PackageSet string Platforms []string Version string + ImportedAt time.Time `storm:"index"` } type License struct {