simplepush

package module
v0.0.0-...-8980e96 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2017 License: GPL-3.0 Imports: 12 Imported by: 6

README

Simplepush

Library for Simplepush

Example

go get github.com/simplepush/simplepush-go
package main

import "github.com/simplepush/simplepush-go"

func main() {
  // Send notification
  simplepush.Send(simplepush.Message{"HuxgBB", "title", "message", "event", false, "", ""})
  // Send encrypted notification
  simplepush.Send(simplepush.Message{"HuxgBB", "title", "message", "event", true, "password", "salt"})
}

Documentation

Overview

Package simplepush provides a library to send (end-to-end encrypted) push messages to Smartphones via https://simplepush.io

Index

Constants

This section is empty.

Variables

View Source
var APIUrl = "https://api.simplepush.io/"

APIUrl is the public API entry point for https://simplepush.io. It is public to allow overriding in case of simplepush.io compatible services.

Functions

func Send

func Send(m Message) error

Send takes a message of type Message and sends it via the simplepush.io API. Please refer to the documentation of the Message struct for further information.

Types

type Message

type Message struct {
	SimplePushKey string // Your simeplepush.io key
	Title         string // Title of your message
	Message       string // Message body
	Event         string // The event the message should be associated with
	Encrypt       bool   // If set, the message will be sent end-to-end encrypted with the provided Password/Salt. If false, the message is sent unencrypted.
	Password      string // Your password
	Salt          string // If set, this salt is used, otherwise the default one gets used.
}

Message contains all the information necessary to send a, potentially encrypted, message.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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