helperbot/interfaces.go

26 lines
536 B
Go

package helperbot
import slack "git.bullercodeworks.com/brian/go-slack"
type Model interface {
SendMessage(src, dest string, message slack.Message)
GetBytes(path []string) ([]byte, error)
SetBytes(path []string, val []byte) error
GetString(path []string) (string, error)
SetString(path []string, val string) error
}
type Message interface {
GetSource() string
GetDestination() string
GetMessage() slack.Message
}
type PluginState interface {
Name() string
Initialize(Model) error
ProcessMessage(Message)
Run()
Exit()
}