feat: add real-time chart example

This commit is contained in:
Joao Goncalves
2025-11-05 17:29:29 -01:00
parent 57b22de0e4
commit c167f0c74f
8 changed files with 302 additions and 65 deletions

30
configuration.go Normal file
View File

@@ -0,0 +1,30 @@
package via
import "github.com/go-via/via/h"
type LogLevel int
const (
LogLevelError LogLevel = iota
LogLevelWarn
LogLevelInfo
LogLevelDebug
)
// Config defines configuration options for the via application
type Configuration struct {
// Level of the logs to write to stdout.
// Options: Error, Warn, Info, Debug.
LogLvl LogLevel
// The title of the HTML document.
DocumentTitle string
// Elements to include in the head of the base HTML document.
// Useful for including css stylesheets and JS scripts.
DocumentHeadIncludes []h.H
// 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
}