Documentation
¶
Index ¶
- Variables
- type Config
- type Option
- func WithAdminUserId(userId string) Option
- func WithChannelSecret(secret string) Option
- func WithChannelToken(token string) Option
- func WithJoinGroupReplyFunc(f reply.JoinGroupReplyFunc) Option
- func WithNotificationService(s notify.LineNotificationService) Option
- func WithReplies(replies ...textreply.LineKeywordReply) Option
- type SDK
- type UserInfo
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultConfig = &Config{}
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
FollowStore follow.Store
GroupStore group.Store
NotificationService notify.LineNotificationService
JoinGroupReplyFunc reply.JoinGroupReplyFunc
ChannelSecret string
ChannelToken string
AdminUserId string
Replies []textreply.LineKeywordReply
}
type Option ¶
type Option func(*Config)
func WithAdminUserId ¶
func WithChannelSecret ¶
func WithChannelToken ¶
func WithJoinGroupReplyFunc ¶
func WithJoinGroupReplyFunc(f reply.JoinGroupReplyFunc) Option
func WithNotificationService ¶
func WithNotificationService(s notify.LineNotificationService) Option
func WithReplies ¶
func WithReplies(replies ...textreply.LineKeywordReply) Option
type SDK ¶
type SDK interface {
GetUserInfo(string) (*UserInfo, error)
ParseRequest(*http.Request) ([]*linebot.Event, error)
PushMessage(string, ...linebot.SendingMessage) (*linebot.BasicResponse, error)
ReplyMessage(replyToken string, messages ...linebot.SendingMessage) (*linebot.BasicResponse, error)
}
Click to show internal directories.
Click to hide internal directories.