interactor

package
v1.4.22 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Set provides a wire set.

Functions

This section is empty.

Types

type EventHandler

type EventHandler struct {
	// contains filtered or unexported fields
}

func NewEventHandler

func NewEventHandler(
	shoppingInteractor *Shopping,
	reminderInteractor *Reminder,
	weatherInteractor *Weather,
	conversation service.Conversation,
	reminder service.Reminder,
	message repository.MessageProviderSet,
	bot service.Bot,
	conf *config.LINEBot,
) (*EventHandler, error)

func (*EventHandler) Handle

func (h *EventHandler) Handle(ctx context.Context, events []*model.Event) error

func (*EventHandler) HandleReminder added in v1.1.0

func (h *EventHandler) HandleReminder(ctx context.Context, itemIDJSON *model.ReminderItemIDJSON) error

func (*EventHandler) HandleSchedule added in v1.1.0

func (h *EventHandler) HandleSchedule(ctx context.Context) error

type Image added in v1.2.0

type Image struct {
	// contains filtered or unexported fields
}

func NewImage added in v1.2.0

func NewImage(imageStore repository.ImageStore) *Image

func (*Image) Handle added in v1.2.0

func (i *Image) Handle(ctx context.Context, key string) (io.ReadCloser, int, error)

type Reminder added in v1.1.0

type Reminder struct {
	// contains filtered or unexported fields
}

func NewReminder added in v1.1.0

func NewReminder(
	conversation service.Conversation,
	reminder service.Reminder,
	message repository.MessageProviderSet,
	bot service.Bot,
	conf *config.Time,
) *Reminder

func (*Reminder) Handle added in v1.1.0

func (r *Reminder) Handle(ctx context.Context, e *model.Event) error

func (*Reminder) HandleSchedule added in v1.1.0

func (r *Reminder) HandleSchedule(ctx context.Context) error

type Screenshot added in v1.1.4

type Screenshot struct {
	// contains filtered or unexported fields
}

func NewScreenshot added in v1.1.4

func NewScreenshot(browser repository.Browser, weather service.Weather) *Screenshot

func (*Screenshot) Handle added in v1.1.4

func (r *Screenshot) Handle(ctx context.Context, target *url.URL, targetSelector string) error

type Shopping

type Shopping struct {
	// contains filtered or unexported fields
}

func NewShopping

func NewShopping(
	conversation service.Conversation,
	shopping service.Shopping,
	nlParser repository.NLParser,
	message repository.MessageProviderSet,
	bot service.Bot,
) *Shopping

func (*Shopping) Handle

func (s *Shopping) Handle(ctx context.Context, e *model.Event) error

func (*Shopping) HandleReminder added in v1.1.0

func (s *Shopping) HandleReminder(ctx context.Context, item *model.ReminderItem) error

type Weather added in v1.2.0

type Weather struct {
	// contains filtered or unexported fields
}

func NewWeather added in v1.2.0

func NewWeather(
	weather service.Weather,
	message repository.MessageProviderSet,
	bot service.Bot,
) *Weather

func (*Weather) Handle added in v1.2.0

func (w *Weather) Handle(ctx context.Context, e *model.Event) error

Jump to

Keyboard shortcuts

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