handlers

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitConfig

func InitConfig()

func RegisterRoutes

func RegisterRoutes(route Route)

Types

type Handlers

type Handlers struct {
	Port     int     `yaml:"port" env:"PORT" env-default:"8080"`
	Cert     string  `yaml:"cert" env:"CERT" env-default:""`
	Key      string  `yaml:"key"  env:"KEY" env-default:""`
	Handlers []Route `yaml:"handlers"`
}
var Cfg Handlers

func GetHandlers

func GetHandlers(lua bool) (Handlers, error)

type Route

type Route struct {
	Route       string `yaml:"route"`
	Content     string `yaml:"content"`
	ContentType string `yaml:"contentType"`
	LuaFunc     *lua.LFunction
}

Jump to

Keyboard shortcuts

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