Documentation
¶
Index ¶
Constants ¶
View Source
const ( DocTypeDecision = "decision" DocTypeFeature = "feature" DocTypeBugfix = "bugfix" DocTypeRefactor = "refactor" DocTypeRelease = "release" DocTypeNote = "note" )
Document type constants.
Variables ¶
View Source
var ( ErrNotFound = errors.New("not found") ErrCorrupted = errors.New("corrupted") ErrAlreadyExists = errors.New("already exists") ErrNotInitialized = errors.New("lore not initialized") ErrNotGitRepo = errors.New("not a git repository") ErrNotInteractive = errors.New("not interactive") )
Functions ¶
func Slugify ¶
Slugify converts a string to a URL-friendly slug (display purposes). For filename generation, use storage.slugify which also handles accents and length limits.
func ValidDocType ¶
ValidDocType reports whether t is a recognized document type. This is the single source of truth for accepted types.
Types ¶
type AIProvider ¶
type CallOptions ¶
type CommitInfo ¶
type CorpusReader ¶
type DocMeta ¶
type DocMeta struct {
Type string `yaml:"type"`
Date string `yaml:"date"`
Commit string `yaml:"commit,omitempty"`
Status string `yaml:"status"`
Tags []string `yaml:"tags,omitempty"`
Related []string `yaml:"related,omitempty"`
GeneratedBy string `yaml:"generated_by,omitempty"`
AngelaMode string `yaml:"angela_mode,omitempty"`
Filename string `yaml:"-"` // populated at runtime by ListDocs, not serialized
}
type GitAdapter ¶
type GitAdapter interface {
Diff(ref string) (string, error)
Log(ref string) (*CommitInfo, error)
CommitExists(ref string) (bool, error)
IsMergeCommit(ref string) (bool, error)
IsInsideWorkTree() bool
HeadRef() (string, error)
IsRebaseInProgress() (bool, error)
CommitMessageContains(ref, marker string) (bool, error)
GitDir() (string, error)
InstallHook(hookType string) (InstallResult, error)
UninstallHook(hookType string) error
HookExists(hookType string) (bool, error)
}
type InstallResult ¶
type InstallResult struct {
Installed bool // true if the hook was installed
HooksPathWarn string // non-empty if core.hooksPath is configured
}
InstallResult describes the outcome of a hook install operation.
type Option ¶
type Option func(*CallOptions)
Click to show internal directories.
Click to hide internal directories.