Documentation
¶
Index ¶
- Variables
- type Context
- func (c Context) GetConfig() *config.AppConfig
- func (c Context) GetLogger() *logger.Logger
- func (c Context) GetRedis() *redis.Client
- func (c Context) Message() pb.MessageClient
- func (c Context) Middle() pb.MiddleClient
- func (c Context) NLP() pb.NLPClient
- func (c Context) Storage() pb.StorageClient
- func (c Context) Subscribe() pb.SubscribeClient
- func (c Context) Todo() pb.TodoClient
- func (c Context) User() pb.UserClient
- func (c Context) Workflow() pb.WorkflowClient
- type IContext
- type Option
- type RuleBot
- type RuleParser
Constants ¶
This section is empty.
Variables ¶
View Source
var ProviderSet = wire.NewSet(NewContext, New)
Functions ¶
This section is empty.
Types ¶
type Context ¶ added in v0.0.24
type Context struct {
Conf *config.AppConfig
RDB *redis.Client
Logger *logger.Logger
MessageClient pb.MessageClient
MiddleClient pb.MiddleClient
SubscribeClient pb.SubscribeClient
WorkflowClient pb.WorkflowClient
StorageClient pb.StorageClient
TodoClient pb.TodoClient
UserClient pb.UserClient
NLPClient pb.NLPClient
}
func (Context) Message ¶ added in v0.0.24
func (c Context) Message() pb.MessageClient
func (Context) Middle ¶ added in v0.0.24
func (c Context) Middle() pb.MiddleClient
func (Context) Storage ¶ added in v0.0.24
func (c Context) Storage() pb.StorageClient
func (Context) Subscribe ¶ added in v0.0.24
func (c Context) Subscribe() pb.SubscribeClient
func (Context) Todo ¶ added in v0.0.24
func (c Context) Todo() pb.TodoClient
func (Context) User ¶ added in v0.0.24
func (c Context) User() pb.UserClient
func (Context) Workflow ¶ added in v0.0.24
func (c Context) Workflow() pb.WorkflowClient
type IContext ¶ added in v0.0.24
type IContext interface {
GetConfig() *config.AppConfig
GetRedis() *redis.Client
GetLogger() *logger.Logger
Message() pb.MessageClient
Middle() pb.MiddleClient
Subscribe() pb.SubscribeClient
Workflow() pb.WorkflowClient
Storage() pb.StorageClient
Todo() pb.TodoClient
User() pb.UserClient
NLP() pb.NLPClient
}
func NewContext ¶ added in v0.0.24
func NewContext( conf *config.AppConfig, rdb *redis.Client, logger *logger.Logger, messageClient pb.MessageClient, middleClient pb.MiddleClient, subscribeClient pb.SubscribeClient, workflowClient pb.WorkflowClient, storageClient pb.StorageClient, todoClient pb.TodoClient, userClient pb.UserClient, nlpClient pb.NLPClient, ) IContext
type Option ¶
type Option func(*RuleBot)
func RegisterRuleset ¶
func RegisterRuleset(rule RuleParser) Option
type RuleBot ¶
type RuleBot struct {
Ctx IContext
// contains filtered or unexported fields
}
func CreateRuleBot ¶ added in v0.0.24
func (*RuleBot) MessageProviderOut ¶
func (*RuleBot) SetOptions ¶ added in v0.0.24
Click to show internal directories.
Click to hide internal directories.