helperbot/interfaces.go

27 lines
552 B
Go

package helperbot
import "github.com/nlopes/slack"
type Model interface {
SendMessage(src, dest string, message slack.Message)
GetSlackAdminDMId() (string, error)
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()
}