line

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package line provides sarah.Alerter implementation for LINE Notify.

Index

Constants

This section is empty.

Variables

View Source
var Endpoint = "https://notify-api.line.me/api/notify"

Endpoint defines the API endpoint to be used for notification.

Functions

This section is empty.

Types

type Client

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

Client is an API client for LINE notification.

func New

func New(config *Config) *Client

New creates and returns new Client instant.

func (*Client) Alert

func (c *Client) Alert(ctx context.Context, botType sarah.BotType, err error) error

Alert sends alert message to notify critical state of caller.

type Config

type Config struct {
	Token          string        `json:"token" yaml:"token"`
	RequestTimeout time.Duration `json:"timeout" yaml:"timeout"`
}

Config contains some configuration variables for gitter Adapter.

func NewConfig

func NewConfig() *Config

NewConfig returns initialized Config struct with default settings. Token is empty at this point. Token can be set by feeding this instance to json.Unmarshal/yaml.Unmarshal, or direct assignment.

Jump to

Keyboard shortcuts

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