Documentation
¶
Index ¶
- type CFeature
- func (f *CFeature[MakeTypedFeature]) Exists(path string) (present bool)
- func (f *CFeature[MakeTypedFeature]) Init(this interface{})
- func (f *CFeature[MakeTypedFeature]) MountPathROFS(path, point string, rofs fs.FileSystem)
- func (f *CFeature[MakeTypedFeature]) MountPathRWFS(path, point string, rwfs fs.RWFileSystem)
- func (f *CFeature[MakeTypedFeature]) ReadPageMatter(path string) (pm *matter.PageMatter, err error)
- func (f *CFeature[MakeTypedFeature]) Setup(enjin feature.Internals)
- func (f *CFeature[MakeTypedFeature]) WritePageMatter(pm *matter.PageMatter) (err error)
- type CMountPoint
- type EmbedPathSupport
- type Feature
- type LocalPathSupport
- type MakeFeature
- type ZipPathSupport
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CFeature ¶
type CFeature[MakeTypedFeature interface{}] struct { feature.CFeature MountPoints map[string][]*CMountPoint }
func (*CFeature[MakeTypedFeature]) Init ¶
func (f *CFeature[MakeTypedFeature]) Init(this interface{})
func (*CFeature[MakeTypedFeature]) MountPathROFS ¶
func (f *CFeature[MakeTypedFeature]) MountPathROFS(path, point string, rofs fs.FileSystem)
func (*CFeature[MakeTypedFeature]) MountPathRWFS ¶
func (f *CFeature[MakeTypedFeature]) MountPathRWFS(path, point string, rwfs fs.RWFileSystem)
func (*CFeature[MakeTypedFeature]) ReadPageMatter ¶
func (f *CFeature[MakeTypedFeature]) ReadPageMatter(path string) (pm *matter.PageMatter, err error)
func (*CFeature[MakeTypedFeature]) WritePageMatter ¶
func (f *CFeature[MakeTypedFeature]) WritePageMatter(pm *matter.PageMatter) (err error)
type CMountPoint ¶
type CMountPoint struct { // Path is the actual filesystem path Path string // Mount is the URL path prefix Mount string // ROFS is the read-only filesystem, always non-nil ROFS fs.FileSystem // RWFS is the write-only filesystem, nil when fs is read-only RWFS fs.RWFileSystem }
type EmbedPathSupport ¶
type EmbedPathSupport[MakeTypedFeature interface{}] interface { }
type Feature ¶
type Feature[MakeTypedFeature interface{}] interface { feature.Feature // MountPathROFS mounts the given fs.FileSystem path to the virtual URI point MountPathROFS(path, point string, rofs fs.FileSystem) // MountPathRWFS mounts the given fs.RWFileSystem path to the virtual URI point MountPathRWFS(path, point string, rwfs fs.RWFileSystem) // Exists returns true if the given URI path is present on any of this // feature instance's mounted filesystems (can be a file or directory) Exists(path string) (present bool) // ReadPageMatter parses the given path file data into a matter.PageMatter // structure, suitable for further processing as page.Page or any other // type. The first fs.FileSystem which has the given path is used. The order // checked is the order features are added during the main enjin build phase ReadPageMatter(path string) (pm *matter.PageMatter, err error) // WritePageMatter constructs new file data from the existing pm.Body with // pm.Matter (using pm.FrontMatterType) and writes it to the first // fs.RWFileSystem that matches the PageMatter's path WritePageMatter(pm *matter.PageMatter) (err error) }
type LocalPathSupport ¶
type LocalPathSupport[MakeTypedFeature interface{}] interface { }
type MakeFeature ¶
type MakeFeature[MakeTypedFeature interface{}] interface { LocalPathSupport[MakeTypedFeature] EmbedPathSupport[MakeTypedFeature] ZipPathSupport[MakeTypedFeature] }
type ZipPathSupport ¶
type ZipPathSupport[MakeTypedFeature interface{}] interface { }
Click to show internal directories.
Click to hide internal directories.