line

package
v0.17.6 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Line

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

Line struct holds info about client and destination ID for communicating with line API

func New

func New(channelSecret, channelAccessToken string) (*Line, error)

New creates a new instance of Line notifier service For more info about line api credential: -> https://github.com/line/line-bot-sdk-go

func (*Line) AddReceivers

func (l *Line) AddReceivers(receiverIDs ...string)

AddReceivers receives user, group or room IDs then add them to internal receivers list

func (*Line) Send

func (l *Line) Send(ctx context.Context, subject, message string) error

Send receives message subject and body then sends it to all receivers set previously Subject will be on the first line followed by message on the next line

Jump to

Keyboard shortcuts

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