botplug

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 5, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatToText

func FormatToText(output *MessageOutput) (result []string, err error)

Types

type BaseConfig

type BaseConfig struct {
	ID      uint
	Logger  *logrus.Logger
	Plugins []BotPlugin
}

func New

func New(logger *logrus.Logger) BaseConfig

type BotPlugin

type BotPlugin interface {
	ReceiveMessageEntry(*MessageInput) *MessageOutput
	ReceiveMemberJoinEntry(*MessageInput) *MessageOutput
	PushMessageEntry() *MessageOutput
}

type BotSender

type BotSender interface {
	SendTextMessageToChannels(string) error
}

type MessageInput

type MessageInput struct {
	Timestamp time.Time
	Source    *Source
	Messages  []string
}

type MessageOutput

type MessageOutput struct {
	Queue []interface{}
}

type Source

type Source struct {
	Type    string
	UserID  string
	GroupID string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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