line

package
v0.0.0-...-1cd85f6 Latest Latest
Warning

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

Go to latest
Published: May 30, 2022 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LineService

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

func NewLineService

func NewLineService(_ context.Context) *LineService

func (*LineService) GetChannelInfo

func (s *LineService) GetChannelInfo(ctx context.Context, accessToken string) (*linebot.BotInfoResponse, domain.Error)

func (*LineService) IssueAccessToken

func (s *LineService) IssueAccessToken(ctx context.Context, ExternalChannelID string, ExternalChannelSecret string) (string, time.Time, domain.Error)

func (*LineService) ParseLineEvents

func (s *LineService) ParseLineEvents(_ context.Context, payload []byte) ([]domain.LineEvent, domain.Error)

func (*LineService) SendMessage

func (s *LineService) SendMessage(ctx context.Context, params SendMessageParams) (err error)

SendMessage would take care of PushMessage and ReplyMessage internally. It would also fall back to PushMessage if ReplyMessage fail.

func (*LineService) ValidateSignature

func (s *LineService) ValidateSignature(_ context.Context, externalChannelSecret, signature string, payload []byte) bool

type SendMessageParams

type SendMessageParams struct {
	AccessToken string
	Messages    []linebot.SendingMessage
	ReplyToken  string
	To          string // userId, groupId, roomId
	RetryKey    string
}

Jump to

Keyboard shortcuts

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