builtin

package
v0.0.0-...-9989f86 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 2, 2016 License: GPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CmdFuncs = map[string]Creator{}

Functions

func Add

func Add(name string, creator Creator)

Types

type BuiltinCommand

type BuiltinCommand struct {
	Cmd     string
	CmdFunc CmdFunc
	// contains filtered or unexported fields
}

func New

func New(cmd string, cmdFunc CmdFunc, matchWords bool) (*BuiltinCommand, error)

func (*BuiltinCommand) Endpoint

func (c *BuiltinCommand) Endpoint() endpoint.Endpoint

func (*BuiltinCommand) Match

func (c *BuiltinCommand) Match(in string) (req interface{}, ok bool)

func (*BuiltinCommand) Response

func (c *BuiltinCommand) Response(res interface{}) (*message.Message, error)

type CmdFunc

type CmdFunc func(args []*command.Argument) (string, error)

func NewHelpCmd

func NewHelpCmd(cfg *config.Config) CmdFunc

type Creator

type Creator func(cfg *config.Config) CmdFunc

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL