router

package
v3.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2017 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPlugin

func NewPlugin(client *slack.Client, repository slackbot.Repository) plugins.BotMessagePlugin

Types

type ActionType

type ActionType string
const (
	AddAction    ActionType = "add"
	DelAction    ActionType = "del"
	DeleteAction ActionType = "delete"
	ListAction   ActionType = "list"
	HelpAction   ActionType = "help"
)

type Command

type Command struct {
	Trigger    string // router
	Action     ActionType
	FilterArgs string
	RouterID   string
}

func (Command) Key

func (c Command) Key() string

func (Command) Message

func (c Command) Message() string

Message return a reply message

func (*Command) Scan

func (c *Command) Scan(command string) (bool, error)

Scan router add hoge.* .*fuga.* #random -> cronCommand

func (Command) String

func (c Command) String() string

Jump to

Keyboard shortcuts

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