Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BleveCache ¶
type BleveCache struct {
// contains filtered or unexported fields
}
func (*BleveCache) Add ¶
func (cache *BleveCache) Add(link *RecipeLink) error
func (*BleveCache) Cached ¶
func (cache *BleveCache) Cached(link *RecipeLink) bool
func (*BleveCache) Close ¶
func (cache *BleveCache) Close() error
func (*BleveCache) Search ¶
func (cache *BleveCache) Search(ctx context.Context, term string, options SearchOptions) ([]*RecipeLink, error)
type JsonFileCache ¶
type JsonFileCache struct { Entries map[string]*RecipeLink `json:"entries"` // contains filtered or unexported fields }
func (*JsonFileCache) Add ¶
func (cache *JsonFileCache) Add(entry *RecipeLink) error
func (*JsonFileCache) Cached ¶
func (cache *JsonFileCache) Cached(entry *RecipeLink) bool
func (*JsonFileCache) Close ¶
func (cache *JsonFileCache) Close() error
func (*JsonFileCache) Search ¶
func (cache *JsonFileCache) Search(ctx context.Context, term string, options SearchOptions) ([]*RecipeLink, error)
type LocalCache ¶
type LocalCache interface { Search(context.Context, string, SearchOptions) ([]*RecipeLink, error) Add(*RecipeLink) error Close() error Cached(*RecipeLink) bool }
func OpenBleveCache ¶
func OpenBleveCache(dbPath string) (LocalCache, error)
func OpenJsonFileCache ¶
func OpenJsonFileCache(name string) (LocalCache, error)
type RecipeLink ¶
type Repository ¶
type SearchMode ¶
type SearchMode byte
const ( Contains SearchMode = iota BeginsWith ExactMatch WildCards RegularExpression )
type SearchOptions ¶
Click to show internal directories.
Click to hide internal directories.