service

package
v0.0.0-...-2c63f42 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionExecutor

type ActionExecutor struct {
	FBClient *fbmsg.Client
}

func NewActionExecutor

func NewActionExecutor(fbClient *fbmsg.Client) *ActionExecutor

func (*ActionExecutor) ExecuteAction

func (ex *ActionExecutor) ExecuteAction(ctx context.Context, node *types.Node, state *ActionState) (_err error)

func (*ActionExecutor) ExecuteActions

func (ex *ActionExecutor) ExecuteActions(nodes []*types.Node, state *ActionState)

type ActionState

type ActionState struct {
	PageID dot.IntID
	PSID   dot.IntID
	Extra  map[string]string
}

type MessengerService

type MessengerService struct {
	FlowQuery  flowdef.QueryService
	StateStore *store.FlowStateStore
	ActionExec *ActionExecutor
}

func NewMessengerService

func NewMessengerService(
	query flowdef.QueryService,
	stateStore *store.FlowStateStore,
	actionExec *ActionExecutor,
) *MessengerService

func (*MessengerService) ReceivedMessage

func (*MessengerService) ReceivedPostback

type OrderService

type OrderService struct {
	FlowQuery  flowdef.QueryService
	StateStore *store.FlowStateStore
	ActionExec *ActionExecutor
}

func NewOrderService

func NewOrderService(
	query flowdef.QueryService,
	stateStore *store.FlowStateStore,
	actionExec *ActionExecutor,
) *OrderService

Jump to

Keyboard shortcuts

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