domain

package
v0.0.0-...-6f746f0 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2020 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LineBotClient

type LineBotClient interface {
	ParseRequest(*http.Request) ([]*linebot.Event, error)
	ReplyMessage(string, ...linebot.SendingMessage) LineBotPushMessageCall
}

LineBotClient mimics line-bot-sdk-go Client

type LineBotPushMessageCall

type LineBotPushMessageCall interface {
	Do() (*linebot.BasicResponse, error)
}

LineBotPushMessageCall mimics line-bot-sdk-go ReplyMessageCall

type LineCommand

type LineCommand interface {
	Process() ([]linebot.SendingMessage, error)
}

LineCommand is interface for line command

type LineCommandBuilder

type LineCommandBuilder func([]string) LineCommand

LineCommandBuilder is builder function to generate command processor

type LineCommandMapper

type LineCommandMapper interface {
	GetCommandBuilder(string) LineCommandBuilder
}

LineCommandMapper is mapper that returns LineCommandBuilder

type LineContext

type LineContext struct {
	*linebot.Event
}

LineContext is base context that has Event type properties

type LineService

type LineService interface {
	HandleIncomingMessage(*LineTextMessageContext) error
}

LineService is our line service interface that defines function that needs to be implemented

type LineTextMessageContext

type LineTextMessageContext struct {
	*LineContext
	Message *linebot.TextMessage
}

LineTextMessageContext embedded Context and add TextMessage type properties

Jump to

Keyboard shortcuts

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