Documentation ¶
Index ¶
- Constants
- func DecodeRaw(L *lua.LState, data []byte) (lua.LValue, error)
- func Init()
- func JsonDecode(L *lua.LState) int
- func LValueDumps(value lua.LValue) ([]byte, error)
- func Map(state *lua.LState, name string, st interface{}) error
- func ToGoValue(lv lua.LValue, opt Option) interface{}
- func ToUpperCamelCase(s string) string
- type CDb
- func (c *CDb) Float(key string) float64
- func (c *CDb) Int(key string) int
- func (c *CDb) SetFloat(key string, value float64)
- func (c *CDb) SetInt(key string, value int)
- func (c *CDb) SetStr(key, value string)
- func (c *CDb) SetTable(key string, m map[string]interface{})
- func (c *CDb) Str(key string) string
- func (c *CDb) Table(key string) lua.LValue
- type ContractDb
- type Mapper
- type Option
Constants ¶
View Source
const Prefix = "contract:"
Variables ¶
This section is empty.
Functions ¶
func JsonDecode ¶
func JsonDecode(L *lua.LState) int
func LValueDumps ¶
func ToGoValue ¶
func ToGoValue(lv lua.LValue, opt Option) interface{}
ToGoValue converts the given LValue to a Go object.
func ToUpperCamelCase ¶
ToUpperCamelCase is an Option.NameFunc that converts strings from snake case to upper camel case.
Types ¶
type ContractDb ¶
type ContractDb struct {
// contains filtered or unexported fields
}
func NewDb ¶
func NewDb(contractAddress []byte) *ContractDb
func (*ContractDb) Db ¶
func (c *ContractDb) Db(name string) *CDb
type Option ¶
type Option struct { // Function to convert a lua table key to Go's one. This defaults to "ToUpperCamelCase". NameFunc func(string) string // Returns error if unused keys exist. ErrorUnused bool // A struct tag name for lua table keys . This defaults to "gluamapper" TagName string }
Option is a configuration that is used to create a new mapper.
Click to show internal directories.
Click to hide internal directories.