rulebot

package
v0.0.15 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*RuleBot)

func RegisterRuleset

func RegisterRuleset(rule RuleParser) Option

type RuleBot

type RuleBot struct {
	RDB       *redis.Client
	SubClient pb.SubscribeClient
	MidClient pb.MiddleClient
	MsgClient pb.MessageClient
	WfClient  pb.WorkflowClient
	// contains filtered or unexported fields
}

func New

func New(name string, RDB *redis.Client,
	SubClient pb.SubscribeClient, MidClient pb.MiddleClient, MsgClient pb.MessageClient, WfClient pb.WorkflowClient,
	opts ...Option) *RuleBot

func (*RuleBot) MessageProviderOut

func (s *RuleBot) MessageProviderOut() []string

func (*RuleBot) Name

func (s *RuleBot) Name() string

func (*RuleBot) Process

func (s *RuleBot) Process(in string) *RuleBot

type RuleParser

type RuleParser interface {
	Name() string
	Boot(*RuleBot)
	ParseMessage(*RuleBot, string) []string
	HelpMessage(*RuleBot, string) string
}

Jump to

Keyboard shortcuts

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