modulepackage
0.1.6
Repository: https://github.com/alexjx/gopher-lua-libs.git
Documentation: pkg.go.dev
# README
gopher-lua-libs
Package contains is a libs for gopher-lua.
License
Development version, available on github, released under BSD 3-clause.
Installation
go get github.com/alexjx/gopher-lua-libs
Index
- base64 encoding/base64 api
- cloudwatch aws cloudwatch log access
- cert_util monitoring ssl certs
- chef chef client api
- cmd cmd port
- crypto calculate md5, sha256 hash for string
- db access to databases
- filepath path.filepath port
- goos os port
- http http.client && http.server
- humanize humanize github.com/dustin/go-humanize port
- inspect pretty print github.com/kikito/inspect.lua
- ioutil io/ioutil port
- json json implementation
- log log port
- plugin run lua code in lua code
- pprof pprof http-server for golang from lua
- prometheus prometheus exporter
- regexp regexp port
- runtime runtime port
- pb https://github.com/cheggaaa/pb port (v3)
- shellescape shellescape https://github.com/alessio/shellescape port
- stats stats https://github.com/montanaflynn/stats port
- storage package for store persist data and share values between lua states
- strings strings port (utf supported)
- tac tac line-by-line scanner (from end of file to up)
- tcp raw tcp client lib
- telegram telegram bot
- template template engines
- time time port
- xmlpath gopkg.in/xmlpath.v2 port
- yaml gopkg.in/yaml.v2 port
- zabbix zabbix bot
Usage
For the quick overview you can use standalone interpreter with listed libs. Examples and documentation for modules can be found in their directories.
go get github.com/alexjx/gopher-lua-libs/cmd/glua-libs
$ glua-libs example.lua
This example shows basic usage of this libs in your code
package main
import (
"log"
"flag"
"os"
lua "github.com/yuin/gopher-lua"
libs "github.com/alexjx/gopher-lua-libs"
)
var (
exec = flag.String("execute", "", "execute lua script")
)
func main() {
flag.Parse()
state := lua.NewState()
libs.Preload(state)
if *exec != `` {
if err := state.DoFile(*exec); err != nil {
log.Printf("[ERROR] Error executing file: ", err)
}
} else {
log.Println("Target file was not given!")
os.Exit(0)
}
}
# Packages
No description provided by the author
Package base64 implements base64 encode/decode functionality for lua.
Package cert_utils provides utility for checking ssl-certs in lua.
Package chef implements chef client api functionality for lua.
Package cmd implements golang cmd functionality for lua.
Package crypto implements golang package crypto functionality for lua.
Package db implements golang package db functionality for lua.
Package filepath implements golang filepath functionality for lua.
Package goos implements golang package os functionality for lua.
No description provided by the author
Port dustin/go-humanize for gopher-lua.
inspect.lua for gopher-lua.
No description provided by the author
Package ioutil implements golang package ioutil functionality for lua.
Package json implements json decode/encode functionality for lua.
Package plugin implements golang packege log functionality for lua.
Package pb implements github.com/cheggaaa/pb/v3 functionality for lua.
Package plugin implements run lua-code from lua-code.
Package pprof implements golang package pprof functionality.
No description provided by the author
Package regexp implements golang package regexp functionality for lua.
Package runtime implements golang runtime functionality for lua.
No description provided by the author
Package strings implements golang package montanaflynn/stats functionality for lua.
Package storage implements persist storage with ttl for to save and share data between differents lua.LState.
Package strings implements golang package strings functionality for lua.
Package tac implements file scanner (from end to up) functionality for lua.
Package tcp implements tcp client lib for lua.
Package telegram implements telegram api bot for lua.
Package template implements template functionality for lua.
No description provided by the author
Package time implements golang package time functionality for lua.
Package xmlpath provides xmlpath for lua.
Package yaml implements yaml decode functionality for lua.
Package zabbix implements zabbix api bot for lua.
# Functions
Preload preload all gopher lua packages.