pushover

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PushoverApiURL = "https://api.pushover.net/1/messages.json"
	UID            = "pushover"
)

Variables

This section is empty.

Functions

func Default

func Default() (*client, error)

func Load

func Load(loader envconfig.LoaderFunc) (*client, error)

func New

func New(opt Options) *client

Types

type Options

type Options struct {
	Token string `envconfig:"TOKEN" required:"true"`
	// User may be either a user key or a group key.
	User    string `envconfig:"USER_KEY"`
	Message string `envconfig:"MESSAGE"`

	// Optional params
	Device    []string `envconfig:"DEVICE"`
	Title     string   `envconfig:"TITLE"`
	URL       string   `envconfig:"URL"`
	URLTitle  string   `envconfig:"URL_TITLE"`
	Priority  string   `envconfig:"PRIORITY"`
	Timestamp string   `envconfig:"TIMESTAMP"`
	Sound     string   `envconfig:"SOUND"`
}

Options allows full configuration of the message sent to the Pushover API

Jump to

Keyboard shortcuts

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