kengineembed

package module
v0.0.0-...-c1dc662 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 28, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FS

type FS struct{}

FS implements a Kengine module and fs.FS for an embedded file system provided by an unexported package variable.

To use, simply put your files in a subfolder called "files", then build Kengine with your local copy of this plugin. Your site's files will be embedded directly into the binary.

If the embedded file system contains only one file in its root which is a folder named "files", this module will strip that folder prefix using fs.Sub(), so that the contents of the folder can be accessed by name as if they were in the actual root of the file system. In other words, before: files/foo.txt, after: foo.txt.

func (FS) KengineModule

func (FS) KengineModule() kengine.ModuleInfo

KengineModule returns the Kengine module information.

func (FS) Open

func (FS) Open(name string) (fs.File, error)

func (FS) UnmarshalKenginefile

func (FS) UnmarshalKenginefile(d *kenginefile.Dispenser) error

UnmarshalKenginefile exists so this module can be used in the Kenginefile, but there is nothing to unmarshal.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL