Documentation ¶
Index ¶
- func GoToLua(L *lua.LState, v interface{}) lua.LValue
- func LNewChannel(g *G, ch slack.ChannelID) lua.LValue
- func LNewResponse(L *lua.LState, resp *http.Response) *lua.LUserData
- func LNewTeam(g *G) lua.LValue
- func LNewUser(g *G, user slack.UserID, preload bool) (lua.LValue, error)
- func OpenBit(L *lua.LState) int
- func OpenBot(team marvin.Team) func(L *lua.LState) int
- func OpenCorpus(L *lua.LState) int
- func OpenFuncs(L *lua.LState) int
- func OpenGoogle(g *G, L *lua.LState) int
- func OpenIntra(g *G, L *lua.LState) int
- func OpenJson(L *lua.LState) int
- func OpenRequests(L *lua.LState) int
- func OpenTime(L *lua.LState) int
- type CorpusData
- type G
- type LChannel
- type LChannelIndex
- type LUser
- type LUserIndex
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LNewChannel ¶
func LNewResponse ¶
func OpenCorpus ¶
func OpenCorpus(L *lua.LState) int
func OpenGoogle ¶
func OpenRequests ¶
func OpenRequests(L *lua.LState) int
func OpenTime ¶
func OpenTime(L *lua.LState) int
The time module provides access to time formatting functions from Lua.
Module: time.rfc3339 -> string: formatting constant time.now() -> Time: returns the current time time.fromunix(sec, nsec=0) -> Time: creates a new Time from a unix timestamp time.parse(value, format=time.rfc3339) -> Time, err: Parses a time with the given format
Type: Time
t.year -> number: year number t.month -> number t.day -> number t.hour -> number t.minute -> number t.second -> number t.ns -> number: nanoseconds into the second t.tz -> string: tzinfo-based timezone string (e.g. Europe/Paris) t.__is_a_time -> bool: type indicator t:format(str) -> string: formats a time according to https://godoc.org/time#pkg-constants t:unix() -> number, number: returns the unix time (seconds, nanoseconds)
Types ¶
type CorpusData ¶
type G ¶
type G struct { L *lua.LState Ctx context.Context PrintBuf bytes.Buffer // contains filtered or unexported fields }
func (*G) ActionSource ¶
func (g *G) ActionSource() marvin.ActionSource
func (*G) OpenLibraries ¶
func (g *G) OpenLibraries()
type LChannel ¶
type LChannel struct { ID slack.ChannelID IsPublic bool IsGroup bool IsIM bool IMOther lua.LValue Info *slack.Channel Creator lua.LValue Users *lua.LTable // contains filtered or unexported fields }
LChannel ...
ch.id: slack.ChannelID ch.type: "public", "group", "mpim", or "im" ch.name: string ch.creator: LUser ch.im_other: slack.UserID ch.users: []slack.UserID ch.topic: string ch.topic_user: LUser ch.topic_changed: unixMillis ch.purpose: string ch.purpose_user: LUser ch.purpose_changed: unixMillis
func (*LChannel) SetupMetatable ¶
type LChannelIndex ¶
type LChannelIndex struct {
// contains filtered or unexported fields
}
type LUser ¶
type LUser struct { ID slack.UserID Acc marvin.AccessLevel Info *slack.User // contains filtered or unexported fields }
LUser has the following API:
tostring(user) -> "<@USLACKBOT>" user.id -> "USLACKBOT" user.is_blacklisted user.is_admin user.is_controller user.username -> "slackbot" fname, lname, name user.tz -> "America/Los_Angeles" user.tz_offset -> -28800 (seconds) user.profile.real user.profile.first user.profile.last user.profile.phone
func (*LUser) SetupMetatable ¶
func (*LUser) SetupMetatable(L *lua.LState)
type LUserIndex ¶
type LUserIndex struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.