Documentation
¶
Overview ¶
Package resourcepath centralizes shared resource target rules.
Index ¶
- func CandidatePathsWithAttachmentFolder(note *model.Note, attachmentFolderPath string, rawTarget string) []string
- func LooksLikeImage(rawTarget string) bool
- func LookupImageEmbedPath(note *model.Note, attachmentFolderPath string, rawTarget string, ...) model.PathLookupResult
- func LookupIndexedAssetPath(note *model.Note, idx *model.VaultIndex, rawTarget string) model.PathLookupResult
- func LookupIndexedImageEmbedAssetPath(note *model.Note, idx *model.VaultIndex, rawTarget string) model.PathLookupResult
- func LookupPath(note *model.Note, attachmentFolderPath string, rawTarget string, ...) model.PathLookupResult
- func ResolveIndexedAssetPath(note *model.Note, idx *model.VaultIndex, rawTarget string) string
- func ResolveIndexedImageEmbedAssetPath(note *model.Note, idx *model.VaultIndex, rawTarget string) string
- type LookupResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CandidatePathsWithAttachmentFolder ¶
func CandidatePathsWithAttachmentFolder(note *model.Note, attachmentFolderPath string, rawTarget string) []string
CandidatePathsWithAttachmentFolder expands a resource target through the shared note-relative and attachment-folder rules.
func LooksLikeImage ¶
LooksLikeImage reports whether a target resolves to a supported image type.
func LookupImageEmbedPath ¶
func LookupImageEmbedPath(note *model.Note, attachmentFolderPath string, rawTarget string, lookup func(string) model.PathLookupResult) model.PathLookupResult
LookupImageEmbedPath applies the shared image-embed lookup rules, including an explicit vault-relative slash-path fallback after note-relative lookup misses.
func LookupIndexedAssetPath ¶
func LookupIndexedAssetPath(note *model.Note, idx *model.VaultIndex, rawTarget string) model.PathLookupResult
LookupIndexedAssetPath applies the indexed vault asset lookup rules and can surface canonical ambiguity when fallback is refused.
func LookupIndexedImageEmbedAssetPath ¶
func LookupIndexedImageEmbedAssetPath(note *model.Note, idx *model.VaultIndex, rawTarget string) model.PathLookupResult
LookupIndexedImageEmbedAssetPath applies the indexed vault image-embed asset lookup rules and can surface canonical ambiguity when fallback is refused.
func LookupPath ¶
func LookupPath(note *model.Note, attachmentFolderPath string, rawTarget string, lookup func(string) model.PathLookupResult) model.PathLookupResult
LookupPath applies the shared note-relative and attachment-folder lookup rules against a caller-provided lookup that can surface canonical ambiguity.
func ResolveIndexedAssetPath ¶
ResolveIndexedAssetPath applies the indexed vault asset lookup rules.
func ResolveIndexedImageEmbedAssetPath ¶
func ResolveIndexedImageEmbedAssetPath(note *model.Note, idx *model.VaultIndex, rawTarget string) string
ResolveIndexedImageEmbedAssetPath applies the indexed vault image-embed asset lookup rules.
Types ¶
type LookupResult ¶
type LookupResult = model.PathLookupResult
LookupResult describes a shared resource lookup attempt.