blob: 67ba96dffc05342e1394d409600e4191b4120565 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
package nix
import (
"encoding/gob"
"searchix/internal/config"
)
type Importable interface {
BleveType() string
GetName() string
GetSource() string
}
func GetKey(i Importable) string {
return i.BleveType() + "/" + i.GetSource() + "/" + i.GetName()
}
func MakeKey(source *config.Source, id string) string {
return source.Importer.Singular() + "/" + source.Key + "/" + id
}
func init() {
gob.Register(Option{})
gob.Register(Package{})
}
|