Documentation ¶
Index ¶
- Constants
- Variables
- func BackgroundEvent(L *lua.LState) int
- func Base64Decode(L *lua.LState) int
- func Base64Encode(L *lua.LState) int
- func BlackList(L *lua.LState) int
- func CheckFileExists(L *lua.LState) int
- func CheckQRCode(L *lua.LState) int
- func CompileLua(filePath string) (*glua.FunctionProto, error)
- func CreateDirectory(L *lua.LState) int
- func CreatePaypalClient(sandbox bool)
- func CreatePaypalPayment(L *lua.LState) int
- func CreateRequestClient(L *glua.LState) int
- func DebugValue(L *lua.LState) int
- func DecodeURL(L *lua.LState) int
- func DeleteCacheValue(L *lua.LState) int
- func DeleteGlobalLuaValue(L *lua.LState) int
- func DestroySession(L *lua.LState) int
- func DoCompiledFile(state *glua.LState, proto *glua.FunctionProto) error
- func EncodeMap(L *lua.LState) int
- func EncodeURL(L *lua.LState) int
- func EscapeString(L *lua.LState) int
- func Execute(L *lua.LState) int
- func ExecuteControllerPage(luaState *glua.LState, method string) error
- func ExecuteFile(luaState *glua.LState, path string) error
- func ExecutePaypalPayment(L *lua.LState) int
- func FormFileDetectContentType(L *lua.LState) int
- func FormFileIsValidExtension(L *lua.LState) int
- func FormFileIsValidPNG(L *lua.LState) int
- func GenerateAuthSecretKey(L *lua.LState) int
- func GenerateOutfit(L *lua.LState) int
- func GenerateQRCode(L *lua.LState) int
- func GetApplicationState(luaState *glua.LState)
- func GetCacheValue(L *lua.LState) int
- func GetConfigLuaValue(L *lua.LState) int
- func GetCookie(L *glua.LState) int
- func GetDirectories(L *lua.LState) int
- func GetEnvVariable(L *lua.LState) int
- func GetFileModTime(L *lua.LState) int
- func GetFiles(L *lua.LState) int
- func GetFlash(L *lua.LState) int
- func GetFormFile(L *glua.LState) int
- func GetFormFileByteArray(L *lua.LState) int
- func GetGlobal(L *lua.LState) int
- func GetGlobalLuaValue(L *lua.LState) int
- func GetGoImageAsString(L *lua.LState) int
- func GetGuildLeader(L *lua.LState) int
- func GetGuildMembers(L *lua.LState) int
- func GetGuildOwner(L *lua.LState) int
- func GetHeader(L *glua.LState) int
- func GetLanguageIndex(L *lua.LState) int
- func GetLoggedAccount(L *lua.LState) int
- func GetPaypalPayment(L *lua.LState) int
- func GetPlayerAccountID(L *lua.LState) int
- func GetPlayerBankBalance(L *lua.LState) int
- func GetPlayerCapacity(L *lua.LState) int
- func GetPlayerCustomField(L *lua.LState) int
- func GetPlayerExperience(L *lua.LState) int
- func GetPlayerGender(L *lua.LState) int
- func GetPlayerGuild(L *lua.LState) int
- func GetPlayerLevel(L *lua.LState) int
- func GetPlayerName(L *lua.LState) int
- func GetPlayerPremiumDays(L *lua.LState) int
- func GetPlayerPremiumEndsAt(L *lua.LState) int
- func GetPlayerPremiumTime(L *lua.LState) int
- func GetPlayerStorageValue(L *lua.LState) int
- func GetPlayerTown(L *lua.LState) int
- func GetPlayerVocation(L *lua.LState) int
- func GetRelativeURL(L *glua.LState) int
- func GetRemoteAddress(L *glua.LState) int
- func GetRequest(L *glua.LState) int
- func GetSessionData(L *lua.LState) int
- func GetSocket(L *glua.LState) int
- func GetStorageValue(L *lua.LState) int
- func GetTownByID(L *lua.LState) int
- func GetTownByName(L *lua.LState) int
- func GetVocationByID(L *lua.LState) int
- func GetVocationByName(L *lua.LState) int
- func GuildConstructor(L *lua.LState) int
- func HmacSha256(L *lua.LState) int
- func HouseList(L *lua.LState) int
- func IsAdmin(L *lua.LState) int
- func IsEnabled(L *lua.LState) int
- func IsLogged(L *lua.LState) int
- func IsPlayerOnline(L *lua.LState) int
- func LoadConfig(path string) error
- func LogError(L *lua.LState) int
- func LogFatal(L *lua.LState) int
- func LogInfo(L *lua.LState) int
- func MapToTable(m map[string]interface{}) *lua.LTable
- func MarshalJSON(L *lua.LState) int
- func MarshalXML(L *lua.LState) int
- func Md5Hash(L *lua.LState) int
- func MergeTableFields(src *lua.LTable, dest *lua.LTable)
- func MonsterByName(L *lua.LState) int
- func MonsterList(L *lua.LState) int
- func NewDuration(L *lua.LState) int
- func NewGoImage(L *lua.LState) int
- func NewState() *glua.LState
- func OverwriteConfigFile() error
- func ParseDate(L *lua.LState) int
- func ParseDurationString(L *lua.LState) int
- func ParseMultiPartForm(L *glua.LState) int
- func ParseUnixTimestamp(L *lua.LState) int
- func PlayerConstructor(L *lua.LState) int
- func PostFormRequest(L *glua.LState) int
- func Query(L *lua.LState) int
- func RandomString(L *lua.LState) int
- func Redirect(L *glua.LState) int
- func ReloadExtensions(L *lua.LState) int
- func RenderTemplate(L *glua.LState) int
- func RenderWidgetTemplate(L *lua.LState) int
- func SaveFormFile(L *lua.LState) int
- func SaveFormFileAsJPEG(L *lua.LState) int
- func SaveFormFileAsPNG(L *lua.LState) int
- func SaveGoImage(L *lua.LState) int
- func SendMail(L *lua.LState) int
- func ServeFile(L *glua.LState) int
- func SetBackgroundGoImage(L *lua.LState) int
- func SetBase64MetaTable(luaState *lua.LState)
- func SetCacheMetaTable(luaState *lua.LState)
- func SetCacheValue(L *lua.LState) int
- func SetCaptchaMetaTable(luaState *lua.LState)
- func SetConfigCustomValue(L *lua.LState) int
- func SetConfigGlobal(L *glua.LState)
- func SetConfigMetaTable(luaState *lua.LState)
- func SetCookie(L *glua.LState) int
- func SetCryptoMetaTable(luaState *lua.LState)
- func SetDatabaseMetaTable(luaState *lua.LState)
- func SetDebugMetaTable(luaState *lua.LState)
- func SetEnvMetaTable(luaState *lua.LState)
- func SetEnvVariable(L *lua.LState) int
- func SetEventsMetaTable(luaState *lua.LState)
- func SetExtensionMetaTable(luaState *lua.LState)
- func SetFileMetaTable(luaState *lua.LState)
- func SetFlash(L *lua.LState) int
- func SetGlobalLuaValue(L *lua.LState) int
- func SetGlobalMetaTable(luaState *lua.LState)
- func SetHTTPMetaTable(luaState *glua.LState)
- func SetHTTPUserData(luaState *glua.LState, w http.ResponseWriter, r *http.Request)
- func SetHeader(L *glua.LState) int
- func SetI18nMetaTable(luaState *lua.LState)
- func SetI18nUserData(luaState *lua.LState, lang []string)
- func SetImageMetaTable(luaState *lua.LState)
- func SetJSONMetaTable(luaState *lua.LState)
- func SetLogMetaTable(luaState *lua.LState)
- func SetMailMetaTable(luaState *lua.LState)
- func SetMapMetaTable(luaState *lua.LState)
- func SetOutfitMetaTable(luaState *lua.LState)
- func SetPayPalMetaTable(luaState *lua.LState)
- func SetPlayerBankBalance(L *lua.LState) int
- func SetPlayerCustomField(L *lua.LState) int
- func SetPlayerStorageValue(L *lua.LState) int
- func SetReflectMetaTable(luaState *lua.LState)
- func SetRegularHTTPMetaTable(luaState *glua.LState)
- func SetSessionData(L *lua.LState) int
- func SetSessionMetaTable(luaState *lua.LState)
- func SetSessionMetaTableUserData(luaState *lua.LState, sessionData map[string]interface{})
- func SetSocketMetaTable(luaState *glua.LState)
- func SetStorageMetaTable(luaState *lua.LState)
- func SetStorageValue(L *lua.LState) int
- func SetTimeMetaTable(luaState *lua.LState)
- func SetURLMetaTable(luaState *lua.LState)
- func SetValidatorMetaTable(luaState *lua.LState)
- func SetWidgetHTTPMetaTable(luaState *glua.LState)
- func SetXMLMetaTable(luaState *lua.LState)
- func Sha1Hash(L *lua.LState) int
- func Sha256Hash(L *lua.LState) int
- func SingleQuery(L *lua.LState) int
- func StringSliceToTable(m []string) *lua.LTable
- func StructToTable(s interface{}) *lua.LTable
- func TableToMap(table *lua.LTable) map[string]interface{}
- func TableToStruct(table *lua.LTable, dst interface{})
- func TableToURLValues(t *lua.LTable) url.Values
- func Ternary(L *lua.LState) int
- func ThreadSleep(L *lua.LState) int
- func TownList(L *lua.LState) int
- func TryCatch(L *lua.LState) int
- func URLValuesToTable(m url.Values) *lua.LTable
- func UnmarshalJSON(L *lua.LState) int
- func UnmarshalJSONFile(L *lua.LState) int
- func UnmarshalXML(L *lua.LState) int
- func UnmarshalXMLFile(L *lua.LState) int
- func UnzipFile(L *lua.LState) int
- func ValidGender(L *lua.LState) int
- func ValidGuildName(L *lua.LState) int
- func ValidGuildRank(L *lua.LState) int
- func ValidTown(L *lua.LState) int
- func ValidUsername(L *lua.LState) int
- func ValidVocation(L *lua.LState) int
- func Validate(L *lua.LState) int
- func ValueToGo(lv lua.LValue) interface{}
- func VerifyCaptcha(L *lua.LState) int
- func VocationList(L *lua.LState) int
- func WriteGoImageText(L *lua.LState) int
- func WriteResponse(L *glua.LState) int
- type Date
- type StorageValue
Constants ¶
const ( // I18nMetaTableName the name of the i18n metatable I18nMetaTableName = "i18n" // ExtensionMetaTableName the name of the extension metatable ExtensionMetaTableName = "extension" // OutfitMetaTableName the name of the outfit metatable OutfitMetaTableName = "outfit" // FormFileMetaTableName the name of the form file metatable FormFileMetaTableName = "formFile" // GlobalMetaTableName the name of the global metatable GlobalMetaTableName = "global" // LogMetaTableName the name of the log metatable LogMetaTableName = "log" // EnvMetaTableName the name of the env metatable EnvMetaTableName = "env" // FileMetaTableName the name of the file metatable FileMetaTableName = "file" // GoImageMetaTableName the name of the goimage metatable GoImageMetaTableName = "goimage" // ImageMetaTableName the name of the image metatable ImageMetaTableName = "image" // PayPalMetaTableName the name of the paypal metatable PayPalMetaTableName = "paypal" // EventMetaTableName the name of the current event metatable EventMetaTableName = "event" // EventsMetaTableName the name of the widget metatable EventsMetaTableName = "events" // WidgetMetaTableName the name of the widget metatable WidgetMetaTableName = "widgets" // PlayerMetaTableName the name of the player metatable PlayerMetaTableName = "player" // StorageMetaTableName the name of the storage metatable StorageMetaTableName = "storage" // JSONMetaTableName the name of the json metatable JSONMetaTableName = "json" // ReflectMetaTableName the name of the reflect metatable ReflectMetaTableName = "reflect" // TimeMetaTableName the name of the time metatable TimeMetaTableName = "time" // URLMetaTableName the name of the url metatable URLMetaTableName = "url" // DebugMetaTableName the name of the debug metatable DebugMetaTableName = "debug" // CacheMetaTableName the name of the cache metatable CacheMetaTableName = "cache" // MailMetaTableName the name of the mail metatable MailMetaTableName = "mail" // XMLMetaTableName the name of the xml metatable XMLMetaTableName = "xml" // MapMetaTableName the name of the map metatable MapMetaTableName = "otbm" // CaptchaMetaTableName the name of the captcha metatable CaptchaMetaTableName = "captcha" // CryptoMetaTableName the name of the crypto metatable CryptoMetaTableName = "crypto" // Base64MetaTableName the name of the log metatable Base64MetaTableName = "base64" // ValidatorMetaTableName the name of the validator metatable ValidatorMetaTableName = "validator" // SessionMetaTable the name of the session metatable SessionMetaTable = "session" // SessionInstanceName the field name of the session instance SessionInstanceName = "__s" // DatabaseMetaTableName the name of the database metatable DatabaseMetaTableName = "db" // DatabaseTransactionFieldName the name of the field that holds the current database transaction DatabaseTransactionFieldName = "__tx" // DatabaseTransactionStatusFieldName the name of the field that holds if a transaction started DatabaseTransactionStatusFieldName = "__ts" // ConfigMetaTableName the name of the config metatable ConfigMetaTableName = "config" // HTTPGetValuesName the field name of the list of GET values HTTPGetValuesName = "getValues" // HTTPMetaTableName the name of the http metatable HTTPMetaTableName = "http" // HTTPMetaTableMethodName the field name of the http method HTTPMetaTableMethodName = "method" // HTTPResponseWriterName the field name of the http response writer HTTPResponseWriterName = "__w" // HTTPRequestName the field name of the http request HTTPRequestName = "__r" // HTTPPostValuesName the field name of the list of POST values HTTPPostValuesName = "postValues" // HTTPCurrentSubtopic the field name of the current subtopic uri HTTPCurrentSubtopic = "subtopic" // HTTPMetaTableBodyName the field name of the http body HTTPMetaTableBodyName = "body" // SocketMetatableName the name of the socket metatable SocketMetatableName = "socket" )
Variables ¶
var ( // WidgetList list of widget states WidgetList = &stateList{ List: make(map[string][]*glua.LState), Type: "widget", } // CompiledPageList list of compiled subtopic states CompiledPageList = &compiledStateList{ List: make(map[string]*glua.FunctionProto), Type: "page", } )
var Config = lua.NewState()
Config holds the current lua configuration file state
var ( // Pool saves all lua state pointers to create a sync.Pool Pool = &luaStatePool{ saved: make([]*glua.LState, 0, 10), } )
Functions ¶
func BackgroundEvent ¶
func BackgroundEvent(L *lua.LState) int
BackgroundEvent executes a background event
func Base64Decode ¶
func Base64Decode(L *lua.LState) int
Base64Decode decodes the given string from base64
func Base64Encode ¶
func Base64Encode(L *lua.LState) int
Base64Encode encodes the given string to base64
func CheckFileExists ¶
func CheckFileExists(L *lua.LState) int
CheckFileExists checks if the given file exists
func CheckQRCode ¶
func CheckQRCode(L *lua.LState) int
CheckQRCode checks if the given QR token is valid for the given secret key
func CompileLua ¶
func CompileLua(filePath string) (*glua.FunctionProto, error)
CompileLua reads the passed lua file from disk and compiles it.
func CreateDirectory ¶
func CreateDirectory(L *lua.LState) int
CreateDirectory creates the given directory
func CreatePaypalClient ¶
func CreatePaypalClient(sandbox bool)
CreatePaypalClient creates the paypal application client
func CreatePaypalPayment ¶
func CreatePaypalPayment(L *lua.LState) int
CreatePaypalPayment creates a paypal payment returning the payment URL
func CreateRequestClient ¶
CreateRequestClient creates a HTTP client
func DeleteCacheValue ¶
func DeleteCacheValue(L *lua.LState) int
DeleteCacheValue removes a key from the cache storage
func DeleteGlobalLuaValue ¶
func DeleteGlobalLuaValue(L *lua.LState) int
DeleteGlobalLuaValue deletes the given global value
func DestroySession ¶
func DestroySession(L *lua.LState) int
DestroySession removes the session data from the database
func DoCompiledFile ¶
func DoCompiledFile(state *glua.LState, proto *glua.FunctionProto) error
DoCompiledFile takes a FunctionProto, as returned by CompileLua, and runs it in the LState. It is equivalent to calling DoFile on the LState with the original source file.
func EscapeString ¶
func EscapeString(L *lua.LState) int
EscapeString converts the given string into a safe to-use string Usually you dont need this for queries but just in case you do some magic
func Execute ¶
func Execute(L *lua.LState) int
Execute executes a query without returning the result
func ExecuteControllerPage ¶
ExecuteControllerPage executes the given subtopic using call by param
func ExecuteFile ¶
ExecuteFile calls lua dofile
func ExecutePaypalPayment ¶
func ExecutePaypalPayment(L *lua.LState) int
ExecutePaypalPayment executes the given paypal payment
func FormFileDetectContentType ¶
func FormFileDetectContentType(L *lua.LState) int
FormFileDetectContentType returns the form file content type
func FormFileIsValidExtension ¶
func FormFileIsValidExtension(L *lua.LState) int
FormFileIsValidExtension checks if the current form file is a valid extension
func FormFileIsValidPNG ¶
func FormFileIsValidPNG(L *lua.LState) int
FormFileIsValidPNG checks if the current form file is a valid png file
func GenerateAuthSecretKey ¶
func GenerateAuthSecretKey(L *lua.LState) int
GenerateAuthSecretKey generates a valid authentication secret key
func GenerateQRCode ¶
func GenerateQRCode(L *lua.LState) int
GenerateQRCode generates a QR code for the given string and returns a base64 encoded image
func GetApplicationState ¶
GetApplicationState returns a page configured lua state
func GetCacheValue ¶
func GetCacheValue(L *lua.LState) int
GetCacheValue retrieves a value from the application cache
func GetConfigLuaValue ¶
func GetConfigLuaValue(L *lua.LState) int
GetConfigLuaValue gets a value from the config struct using reflect
func GetDirectories ¶
func GetDirectories(L *lua.LState) int
GetDirectories gets any directories in the provided path
func GetEnvVariable ¶
func GetEnvVariable(L *lua.LState) int
GetEnvVariable gets the given environment variable
func GetFileModTime ¶
func GetFileModTime(L *lua.LState) int
GetFileModTime gets the file unix timestamp
func GetFiles ¶
func GetFiles(L *lua.LState) int
GetFiles gets a list of files for the given directory
func GetFormFile ¶
GetFormFile retrieves a file input from a form
func GetFormFileByteArray ¶
func GetFormFileByteArray(L *lua.LState) int
GetFormFileByteArray returns the form file byte array as a lua string
func GetGlobal ¶
func GetGlobal(L *lua.LState) int
GetGlobal retrieves a global lua value from other script
func GetGlobalLuaValue ¶
func GetGlobalLuaValue(L *lua.LState) int
GetGlobalLuaValue gets the given value from the global database table
func GetGoImageAsString ¶
func GetGoImageAsString(L *lua.LState) int
GetGoImageAsString returns the underlying go image as a byte array string
func GetGuildLeader ¶
func GetGuildLeader(L *lua.LState) int
GetGuildLeader retrieves the guild leader
func GetGuildMembers ¶
func GetGuildMembers(L *lua.LState) int
GetGuildMembers retrieves guild members
func GetLanguageIndex ¶
func GetLanguageIndex(L *lua.LState) int
GetLanguageIndex retrieves the given language index
func GetLoggedAccount ¶
func GetLoggedAccount(L *lua.LState) int
GetLoggedAccount gets the user account if any
func GetPaypalPayment ¶
func GetPaypalPayment(L *lua.LState) int
GetPaypalPayment gets a paypal approved payment
func GetPlayerAccountID ¶
func GetPlayerAccountID(L *lua.LState) int
GetPlayerAccountID gets a player account ID
func GetPlayerBankBalance ¶
func GetPlayerBankBalance(L *lua.LState) int
GetPlayerBankBalance gets a player bank balance
func GetPlayerCapacity ¶
func GetPlayerCapacity(L *lua.LState) int
GetPlayerCapacity gets the player capacity
func GetPlayerCustomField ¶
func GetPlayerCustomField(L *lua.LState) int
GetPlayerCustomField retrieves a field from the player table as string
func GetPlayerExperience ¶
func GetPlayerExperience(L *lua.LState) int
GetPlayerExperience gets the player experience
func GetPlayerGender ¶
func GetPlayerGender(L *lua.LState) int
GetPlayerGender gets the player gender
func GetPlayerPremiumDays ¶
func GetPlayerPremiumDays(L *lua.LState) int
GetPlayerPremiumDays gets the player number of premium days
func GetPlayerPremiumEndsAt ¶
func GetPlayerPremiumEndsAt(L *lua.LState) int
GetPlayerPremiumEndsAt gets the player premium ends at
func GetPlayerPremiumTime ¶
func GetPlayerPremiumTime(L *lua.LState) int
GetPlayerPremiumTime gets the player remaining premium time
func GetPlayerStorageValue ¶
func GetPlayerStorageValue(L *lua.LState) int
GetPlayerStorageValue gets a player storage value by the given key
func GetPlayerVocation ¶
func GetPlayerVocation(L *lua.LState) int
GetPlayerVocation gets the player vocation
func GetRelativeURL ¶
GetRelativeURL returns the relative request URL
func GetRemoteAddress ¶
GetRemoteAddress returns the request remote address
func GetSessionData ¶
func GetSessionData(L *lua.LState) int
GetSessionData retrieves an element from the session map
func GetStorageValue ¶
func GetStorageValue(L *lua.LState) int
GetStorageValue gets a storage value from the given player
func GetTownByName ¶
func GetTownByName(L *lua.LState) int
GetTownByName grabs a town by the given name
func GetVocationByID ¶
func GetVocationByID(L *lua.LState) int
GetVocationByID gets a vocation by the given id
func GetVocationByName ¶
func GetVocationByName(L *lua.LState) int
GetVocationByName gets a vocation by the given name
func GuildConstructor ¶
func GuildConstructor(L *lua.LState) int
GuildConstructor returns a new guild metatable for the given ID or name
func HmacSha256 ¶
func HmacSha256(L *lua.LState) int
HmacSha256 returns the hmac-sha256 for the given message + secret
func HouseList ¶
func HouseList(L *lua.LState) int
HouseList returns the server house list as a lua table
func IsEnabled ¶
func IsEnabled(L *lua.LState) int
IsEnabled checks if the captcha service is enabled
func IsPlayerOnline ¶
func IsPlayerOnline(L *lua.LState) int
IsPlayerOnline checks if the given player is online
func LoadConfig ¶
LoadConfig loads the lua configuration file using lua vm to get the global variables
func MapToTable ¶
func MapToTable(m map[string]interface{}) *lua.LTable
MapToTable converts a Go map to a lua table
func MergeTableFields ¶
func MergeTableFields(src *lua.LTable, dest *lua.LTable)
MergeTableFields merges two tables into one
func MonsterByName ¶
func MonsterByName(L *lua.LState) int
MonsterByName retrieves a monster by name
func MonsterList ¶
func MonsterList(L *lua.LState) int
MonsterList retrieves the monster list as a lua table
func NewDuration ¶
func NewDuration(L *lua.LState) int
NewDuration creates a time duration from the given number
func NewGoImage ¶
func NewGoImage(L *lua.LState) int
NewGoImage creates and returns a new goimage image
func OverwriteConfigFile ¶
func OverwriteConfigFile() error
OverwriteConfigFile gathers all external config file and pushes globals
func ParseDate ¶
func ParseDate(L *lua.LState) int
ParseDate parses the given date string with the given layout
func ParseDurationString ¶
func ParseDurationString(L *lua.LState) int
ParseDurationString parses the given duration string to return the time in seconds
func ParseMultiPartForm ¶
ParseMultiPartForm parses a multi-part form encoded
func ParseUnixTimestamp ¶
func ParseUnixTimestamp(L *lua.LState) int
ParseUnixTimestamp returns a date object for the given timestamp
func PlayerConstructor ¶
func PlayerConstructor(L *lua.LState) int
PlayerConstructor returns a new player metatable for the given ID or name
func PostFormRequest ¶
PostFormRequest performs a HTTP POST request
func RandomString ¶
func RandomString(L *lua.LState) int
RandomString generates a random string with the given length
func ReloadExtensions ¶
ReloadExtensions reloads all extensions
func RenderTemplate ¶
RenderTemplate renders the given template with the given data as a LUA table
func RenderWidgetTemplate ¶
func RenderWidgetTemplate(L *lua.LState) int
RenderWidgetTemplate renders the given widget template
func SaveFormFile ¶
func SaveFormFile(L *lua.LState) int
SaveFormFile saves the current form file to the given destination
func SaveFormFileAsJPEG ¶
func SaveFormFileAsJPEG(L *lua.LState) int
SaveFormFileAsJPEG saves the current form file as a jpeg with resizing optional
func SaveFormFileAsPNG ¶
func SaveFormFileAsPNG(L *lua.LState) int
SaveFormFileAsPNG saves the current form file as a png with resizing optional
func SetBackgroundGoImage ¶
func SetBackgroundGoImage(L *lua.LState) int
SetBackgroundGoImage sets the background of a goimage
func SetBase64MetaTable ¶
func SetBase64MetaTable(luaState *lua.LState)
SetBase64MetaTable sets the base64 metatable for the given state
func SetCacheMetaTable ¶
func SetCacheMetaTable(luaState *lua.LState)
SetCacheMetaTable sets the cache metatable of the given state
func SetCacheValue ¶
func SetCacheValue(L *lua.LState) int
SetCacheValue sets a cache value with the given key and the given duration string
func SetCaptchaMetaTable ¶
func SetCaptchaMetaTable(luaState *lua.LState)
SetCaptchaMetaTable sets the captcha metatable of the given state
func SetConfigCustomValue ¶
func SetConfigCustomValue(L *lua.LState) int
SetConfigCustomValue sets the a config custom value
func SetConfigGlobal ¶
SetConfigGlobal sets the config global value
func SetConfigMetaTable ¶
func SetConfigMetaTable(luaState *lua.LState)
SetConfigMetaTable sets the config metatable of the given state
func SetCryptoMetaTable ¶
func SetCryptoMetaTable(luaState *lua.LState)
SetCryptoMetaTable sets the crypto metatable of the given state
func SetDatabaseMetaTable ¶
func SetDatabaseMetaTable(luaState *lua.LState)
SetDatabaseMetaTable sets the database metatable of the given state
func SetDebugMetaTable ¶
func SetDebugMetaTable(luaState *lua.LState)
SetDebugMetaTable sets the debug metatable of the given state
func SetEnvMetaTable ¶
func SetEnvMetaTable(luaState *lua.LState)
SetEnvMetaTable sets the env metatable on the given lua state
func SetEnvVariable ¶
func SetEnvVariable(L *lua.LState) int
SetEnvVariable sets the given environment variable
func SetEventsMetaTable ¶
func SetEventsMetaTable(luaState *lua.LState)
SetEventsMetaTable sets the event metatable of the given state
func SetExtensionMetaTable ¶
SetExtensionMetaTable sets the extension metatable for the given state
func SetFileMetaTable ¶
func SetFileMetaTable(luaState *lua.LState)
SetFileMetaTable sets the file metatable of the given state
func SetGlobalLuaValue ¶
func SetGlobalLuaValue(L *lua.LState) int
SetGlobalLuaValue saves the given value into the global database table
func SetGlobalMetaTable ¶
func SetGlobalMetaTable(luaState *lua.LState)
SetGlobalMetaTable sets the file metatable of the given state
func SetHTTPMetaTable ¶
SetHTTPMetaTable sets the http metatable on the given lua state
func SetHTTPUserData ¶
SetHTTPUserData sets the http metatable user data
func SetI18nMetaTable ¶
func SetI18nMetaTable(luaState *lua.LState)
SetI18nMetaTable sets the i18n metatable of the given state
func SetI18nUserData ¶
func SetI18nUserData(luaState *lua.LState, lang []string)
SetI18nUserData sets the i18n language value
func SetImageMetaTable ¶
func SetImageMetaTable(luaState *lua.LState)
SetImageMetaTable sets the image metatable of the given state
func SetJSONMetaTable ¶
func SetJSONMetaTable(luaState *lua.LState)
SetJSONMetaTable sets the json metatable of the given state
func SetLogMetaTable ¶
SetLogMetaTable sets the log metatable for the given state
func SetMailMetaTable ¶
func SetMailMetaTable(luaState *lua.LState)
SetMailMetaTable sets the mail metatable of the given state
func SetMapMetaTable ¶
func SetMapMetaTable(luaState *lua.LState)
SetMapMetaTable sets a map metatable for the given state
func SetOutfitMetaTable ¶
SetOutfitMetaTable sets the outfit metatable of the given state
func SetPayPalMetaTable ¶
func SetPayPalMetaTable(luaState *lua.LState)
SetPayPalMetaTable sets the paypal metatable of the given state
func SetPlayerBankBalance ¶
func SetPlayerBankBalance(L *lua.LState) int
SetPlayerBankBalance sets a player bank balance
func SetPlayerCustomField ¶
func SetPlayerCustomField(L *lua.LState) int
SetPlayerCustomField sets a fie from the player table
func SetPlayerStorageValue ¶
func SetPlayerStorageValue(L *lua.LState) int
SetPlayerStorageValue sets a player storage value with the given key
func SetReflectMetaTable ¶
func SetReflectMetaTable(luaState *lua.LState)
SetReflectMetaTable sets the reflect metatable of the given state
func SetRegularHTTPMetaTable ¶
SetRegularHTTPMetaTable sets the event http metatable removing some http methods
func SetSessionData ¶
func SetSessionData(L *lua.LState) int
SetSessionData saves an item to the session map
func SetSessionMetaTable ¶
func SetSessionMetaTable(luaState *lua.LState)
SetSessionMetaTable sets the session metatable on the given lua state
func SetSessionMetaTableUserData ¶
func SetSessionMetaTableUserData(luaState *lua.LState, sessionData map[string]interface{})
SetSessionMetaTableUserData sets the session metatable user data
func SetSocketMetaTable ¶
SetSocketProtocolMetaTable sets the socket metatable on the given lua state
func SetStorageMetaTable ¶
func SetStorageMetaTable(luaState *lua.LState)
SetStorageMetaTable sets the storage metatable of the given state
func SetStorageValue ¶
func SetStorageValue(L *lua.LState) int
SetStorageValue sets a storage value for the given player
func SetTimeMetaTable ¶
func SetTimeMetaTable(luaState *lua.LState)
SetTimeMetaTable sets the time metatable of the given state
func SetURLMetaTable ¶
func SetURLMetaTable(luaState *lua.LState)
SetURLMetaTable sets the url metatable of the given state
func SetValidatorMetaTable ¶
func SetValidatorMetaTable(luaState *lua.LState)
SetValidatorMetaTable sets the validator metatable of the given state
func SetWidgetHTTPMetaTable ¶
SetWidgetHTTPMetaTable sets the widget http metatable on the given lua state
func SetXMLMetaTable ¶
func SetXMLMetaTable(luaState *lua.LState)
SetXMLMetaTable sets the xml metatable of the given lua state
func Sha256Hash ¶
func Sha256Hash(L *lua.LState) int
Sha256Hash returns the sha256 hash of the given string
func SingleQuery ¶
func SingleQuery(L *lua.LState) int
SingleQuery performs and ad-hoc query returning the first result as a table
func StringSliceToTable ¶
func StringSliceToTable(m []string) *lua.LTable
StringSliceToTable converts a []string to a lua table
func StructToTable ¶
func StructToTable(s interface{}) *lua.LTable
StructToTable converts a go struct pointer to a lua table
func TableToMap ¶
func TableToMap(table *lua.LTable) map[string]interface{}
TableToMap converts a LUA table to a Go map[string]interface{}
func TableToStruct ¶
func TableToStruct(table *lua.LTable, dst interface{})
TableToStruct populates the given struct pointer with the contents of a lua table
func TableToURLValues ¶
TableToURLValues converts a lua table to a map[string][]string
func ThreadSleep ¶
func ThreadSleep(L *lua.LState) int
ThreadSleep sleeps the current running lua state
func TownList ¶
func TownList(L *lua.LState) int
TownList returns the server town list as a lua table
func URLValuesToTable ¶
URLValuesToTable converts a map[string][]string to a lua table
func UnmarshalJSON ¶
func UnmarshalJSON(L *lua.LState) int
UnmarshalJSON unmarshals the given string to a lua table
func UnmarshalJSONFile ¶
func UnmarshalJSONFile(L *lua.LState) int
UnmarshalJSONFile unmarshals the given file to a lua table
func UnmarshalXML ¶
func UnmarshalXML(L *lua.LState) int
UnmarshalXML unmarshals the given string to a lua table
func UnmarshalXMLFile ¶
func UnmarshalXMLFile(L *lua.LState) int
UnmarshalXMLFile unmarshals the given fle
func UnzipFile ¶
func UnzipFile(L *lua.LState) int
Unzip will decompress a zip archive, moving all files and folders within the zip file to the given directory
func ValidGender ¶
func ValidGender(L *lua.LState) int
ValidGender checks if the given gender is valid
func ValidGuildName ¶
func ValidGuildName(L *lua.LState) int
ValidGuildName checks if the given guild name is valid
func ValidGuildRank ¶
func ValidGuildRank(L *lua.LState) int
ValidGuildRank checks if the given rank is valid
func ValidUsername ¶
func ValidUsername(L *lua.LState) int
ValidUsername checks if the given username contains only letters and spaces
func ValidVocation ¶
func ValidVocation(L *lua.LState) int
ValidVocation checks if the given vocation exists
func Validate ¶
func Validate(L *lua.LState) int
Validate executes the given govalidator func and returns its output
func ValueToGo ¶
func ValueToGo(lv lua.LValue) interface{}
ValueToGo converts a lua value to a go type
func VerifyCaptcha ¶
func VerifyCaptcha(L *lua.LState) int
VerifyCaptcha checks if the given captcha response is valid
func VocationList ¶
func VocationList(L *lua.LState) int
VocationList returns the server vocations xml file
func WriteGoImageText ¶
func WriteGoImageText(L *lua.LState) int
WriteGoImageText writes text to the given goimage
func WriteResponse ¶
WriteResponse writes string to the response writer
Types ¶
type StorageValue ¶
StorageValue struct for storage values
Source Files ¶
- base64.go
- cache.go
- captcha.go
- config.go
- const.go
- crypto.go
- database.go
- debug.go
- env.go
- event.go
- extension.go
- file.go
- formfile.go
- global.go
- guild.go
- http.go
- i18n.go
- image.go
- json.go
- log.go
- lua.go
- mail.go
- map.go
- outfit.go
- paypal.go
- player.go
- reflect.go
- session.go
- sleep.go
- socket.go
- state.go
- storage.go
- ternary.go
- time.go
- try.go
- url.go
- util.go
- validator.go
- widgets.go
- xml.go