Documentation
¶
Index ¶
- Constants
- func DisplayPath(req PathDisplayRequest) (string, error)
- func PlaceAttachment(req AttachmentPlacementRequest) (string, error)
- func Save(root string, manifest Manifest) error
- func Validate(manifest Manifest) error
- type AddMode
- type AddOptions
- type Asset
- type AssetLink
- type AttachmentPlacementPolicy
- type AttachmentPlacementRequest
- type EmbeddedAssetPreview
- type LinkExtractionRequest
- type Manifest
- type PathDisplayRequest
- type PathDisplayStyle
- type RenderPreviewRequest
- type RenderPreviewResult
- type Verification
- type VerifyResult
Constants ¶
View Source
const ManifestSchemaVersion = "pinax.assets.v1"
Variables ¶
This section is empty.
Functions ¶
func DisplayPath ¶
func DisplayPath(req PathDisplayRequest) (string, error)
func PlaceAttachment ¶
func PlaceAttachment(req AttachmentPlacementRequest) (string, error)
Types ¶
type AddOptions ¶
type Asset ¶
func AddWithOptions ¶
func AddWithOptions(root, source string, opts AddOptions) (Asset, error)
type AssetLink ¶
func ExtractLinks ¶
func ExtractLinks(req LinkExtractionRequest) []AssetLink
ExtractLinks parses local non-Markdown attachment references without rewriting the note body.
type AttachmentPlacementPolicy ¶
type AttachmentPlacementPolicy string
const ( AttachmentPlacementPerNote AttachmentPlacementPolicy = "per-note" AttachmentPlacementVaultFolder AttachmentPlacementPolicy = "vault-folder" AttachmentPlacementNoteFolder AttachmentPlacementPolicy = "note-folder" )
type AttachmentPlacementRequest ¶
type AttachmentPlacementRequest struct {
Root string
NoteID string
NotePath string
Filename string
Policy AttachmentPlacementPolicy
}
type EmbeddedAssetPreview ¶
type LinkExtractionRequest ¶
LinkExtractionRequest describes a single Markdown note body to scan for asset references.
type Manifest ¶
type Manifest = domain.AssetManifest
type PathDisplayRequest ¶
type PathDisplayStyle ¶
type PathDisplayStyle string
const ( PathStyleVaultRelative PathDisplayStyle = "vault-relative" PathStyleNoteRelative PathDisplayStyle = "note-relative" PathStyleAbsolute PathDisplayStyle = "absolute" PathStyleMarkdown PathDisplayStyle = "markdown" PathStyleWiki PathDisplayStyle = "wiki" )
type RenderPreviewRequest ¶
type RenderPreviewResult ¶
type RenderPreviewResult struct {
Body string
EmbeddedAssets []EmbeddedAssetPreview
}
func RenderEmbeddedPreview ¶
func RenderEmbeddedPreview(req RenderPreviewRequest) (RenderPreviewResult, error)
type Verification ¶
type Verification = domain.AssetVerification
type VerifyResult ¶
type VerifyResult = domain.AssetVerifyResult
func Verify ¶
func Verify(root string) (VerifyResult, error)
Click to show internal directories.
Click to hide internal directories.