line

package
v0.0.0-...-a56952b Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

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 WithAdminUserId(userId string) Option

func WithChannelSecret

func WithChannelSecret(secret string) Option

func WithChannelToken

func WithChannelToken(token string) Option

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)
}

func NewSDK

func NewSDK(channelSecret, accessToken string) (SDK, error)

type UserInfo

type UserInfo struct {
	UserId     string `json:"userId"`
	Name       string `json:"name"`
	PictureUrl string `json:"pictureUrl"`
	Language   string `json:"language"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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