Documentation
¶
Index ¶
- type AddEntry
- type DepthSummary
- type DuplicateMatch
- type Entry
- type Query
- type Repository
- func (r *Repository) Add(req AddEntry) (Entry, error)
- func (r *Repository) AddMany(requests []AddEntry) ([]Entry, error)
- func (r *Repository) Delete(id int) (bool, error)
- func (r *Repository) DepthCounts() ([]DepthSummary, error)
- func (r *Repository) DuplicateCheck(content string, threshold float64) ([]DuplicateMatch, error)
- func (r *Repository) Get(id int) (Entry, bool, error)
- func (r *Repository) Init() error
- func (r *Repository) List(q Query) ([]Entry, error)
- func (r *Repository) ListMetadata(q Query) ([]Entry, error)
- func (r *Repository) RebuildIndex() error
- func (r *Repository) Search(q Query) ([]Entry, error)
- func (r *Repository) SearchDetailed(q Query) ([]SearchResult, error)
- func (r *Repository) SetPhaseHook(hook func(string, time.Duration))
- func (r *Repository) Update(id int, req AddEntry) (Entry, bool, error)
- type SearchResult
- type Snapshot
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DepthSummary ¶
type DuplicateMatch ¶
type Entry ¶
type Entry struct {
ID int `json:"id"`
Depth int `json:"depth"`
Title string `json:"title"`
Body string `json:"body"`
Tags []string `json:"tags,omitempty"`
Source string `json:"source,omitempty"`
SourceRef string `json:"source_ref,omitempty"`
Origin string `json:"origin,omitempty"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
func NewRepository ¶
func NewRepository(path, indexPath string, provider vector.Provider) *Repository
func (*Repository) DepthCounts ¶
func (r *Repository) DepthCounts() ([]DepthSummary, error)
func (*Repository) DuplicateCheck ¶
func (r *Repository) DuplicateCheck(content string, threshold float64) ([]DuplicateMatch, error)
func (*Repository) Init ¶
func (r *Repository) Init() error
func (*Repository) ListMetadata ¶ added in v1.3.8
func (r *Repository) ListMetadata(q Query) ([]Entry, error)
func (*Repository) RebuildIndex ¶
func (r *Repository) RebuildIndex() error
func (*Repository) SearchDetailed ¶
func (r *Repository) SearchDetailed(q Query) ([]SearchResult, error)
func (*Repository) SetPhaseHook ¶ added in v1.3.8
func (r *Repository) SetPhaseHook(hook func(string, time.Duration))
type SearchResult ¶
Click to show internal directories.
Click to hide internal directories.