Documentation
¶
Overview ¶
Package ports defines the infrastructure required by the application.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IDGenerator ¶
IDGenerator generates note identifiers.
type IndexAttribute ¶
IndexAttribute is a searchable name-value pair associated with a note.
type IndexRecord ¶
type IndexRecord struct {
ID uuid.UUID
Kind domain.NoteKind
CreatedAt time.Time
UpdatedAt time.Time
Attributes []IndexAttribute
Tags []string
}
IndexRecord contains metadata recovered from one note document.
type NoteDeleter ¶
NoteDeleter removes a note document by its identifier.
type NoteIndex ¶
type NoteIndex interface {
Upsert(context.Context, domain.Note) error
UpsertRecord(context.Context, IndexRecord) error
Delete(context.Context, uuid.UUID) error
JournalExists(context.Context, domain.Date) (bool, error)
JournalID(context.Context, domain.Date) (uuid.UUID, bool, error)
ReplaceAll(context.Context, []IndexRecord) error
}
NoteIndex indexes note metadata.
type NoteLister ¶
type NoteLister interface {
List(context.Context) ([]IndexRecord, error)
}
NoteLister reads indexed note metadata without depending on a presentation.
type NoteParser ¶
type NoteParser interface {
Parse([]byte) (IndexRecord, error)
}
NoteParser recovers indexable metadata from one document.
type NoteReader ¶
NoteReader reads a note document by its identifier.
type NoteRenderer ¶
NoteRenderer renders a note as a document.
type NoteWalker ¶
NoteWalker visits AsciiDoc note files and supplies their content.