package
1.4.2
Repository: https://github.com/croessner/nauthilus.git
Documentation: pkg.go.dev

# Functions

InitHTTPClient initializes the global httpClient variable with a pre-configured instance from util.NewHTTPClient.
NewCustomHook creates a new CustomHook with the specified HTTP method and precompiled Lua script.
NewCustomLocation creates a new CustomLocation, which is a map of Location keys to CustomHook values.
NewLuaHook compiles a Lua script based on the provided file path and returns a new instance of PrecompiledLuaScript with the compiled script.
PreCompileLuaHooks precompiles Lua scripts for pre-defined hooks in the configuration.
PreCompileLuaScript pre-compiles the Lua callback script and replaces the current luaScript with the new one.
RunLuaHook executes a precompiled Lua script based on a hook parameter from the gin.Context.
RunLuaInit initializes and runs a Lua script based on the specified hook.

# Variables

LuaScripts is a map that stores precompiled Lua scripts, allowing safe concurrent access and manipulation.

# Structs

PrecompiledLuaScript represents a type that holds a precompiled Lua script and allows safe concurrent access to the script.

# Type aliases

CustomHook maps an HTTP method to its corresponding precompiled Lua script for handling specific requests.
CustomLocation is a map where each key is a Location and each value is a CustomHook.
HttpMethod represents the HTTP methods used in HTTP requests.
Location represents a string type specifically used to denote a location.