Documentation
¶
Overview ¶
Package models holds the values the repositories return.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrNotFound = errors.New("not found")
ErrNotFound reports that a path has no concept in the tenant's scope.
ErrUnavailable wraps every error that means the database is down.
Functions ¶
This section is empty.
Types ¶
type GrepError ¶
type GrepError struct{ Msg string }
GrepError reports a pattern Postgres could not compile or match within the timeout.
type Hit ¶
type Hit struct {
Path string
Type string
Title string
Description string
Score float64
Frontmatter *okf.Map
Snippet string
// Match is the byte offset in Snippet of the first matched term.
Match int `db:"-"`
}
Hit is one search result. It carries no body, only the passages that match: the agent searches, chooses, then reads.
type NotFoundError ¶
type NotFoundError struct{ Path string }
NotFoundError is ErrNotFound for one path.
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
func (*NotFoundError) Is ¶
func (e *NotFoundError) Is(target error) bool
type Revision ¶
type Revision struct {
Path string
Version int
Op string
UpdatedBy string
CreatedAt time.Time
TenantID uuid.UUID
// Day is CreatedAt's date in the session TimeZone, as psycopg dates it.
Day string
}
Revision is one entry in the revision log, without the snapshot that holds the body.
type Summary ¶
type Summary struct {
Path string
Type string
Title string
Description string
Version int
UpdatedAt time.Time
TenantID uuid.UUID
}
Summary is a concept table row: Hit without the score or frontmatter, plus TenantID for mixed-tenant pages.
type TenantCount ¶
TenantCount is one tenant and how many concepts it holds.