feat: introduce support for plugins

This commit is contained in:
Joao Goncalves
2025-11-07 02:45:58 -01:00
parent 798f024743
commit a46c06b467
7 changed files with 87 additions and 21 deletions

View File

@@ -11,8 +11,10 @@ const (
LogLevelDebug
)
type Plugin func(v *V)
// Config defines configuration options for the via application
type Configuration struct {
type Options struct {
// Level of the logs to write to stdout.
// Options: Error, Warn, Info, Debug.
LogLvl LogLevel
@@ -27,4 +29,8 @@ type Configuration struct {
// Elements to include in the bottom of the body of the base
// HTML document.Useful for including JS scripts or a footer.
DocumentBodyIncludes []h.H
// Plugins to extend the capabilities of the `Via` application.
// Check `https://github.com/go-via/plugins` for a list of available plugins.
Plugins []Plugin
}