Categorygithub.com/uniqush/uniqush-push
modulepackage
0.0.0-20200409172854-0805cb333282
Repository: https://github.com/uniqush/uniqush-push.git
Documentation: pkg.go.dev

# README

Introduction

Uniqush (\ˈyü-nə-ku̇sh\ "uni" pronounced as in "unified", and "qush" pronounced as in "cushion") is a free and open source software system which provides a unified push service for server side notification to apps on mobile devices. The uniqush-push API abstracts the APIs of the various push services used to send push notifications to those devices. By running uniqush-push on the server side, you can send push notifications to any supported mobile platform.

Build Status

Supported Platforms

  • GCM from Google for the Android platform
  • FCM from Google for the Android platform
  • APNS from Apple for the iOS platform
  • ADM from Amazon for Kindle tablets

FAQ

  • Q: Is this a general push notification platform for all types of devices? How does this differ from services such as Urban Airship?

  • A: Urban Airship is a great service, and there are other similar services available, like OpenPush, Notificare, etc. All of them are wonderful services. However, Uniqush is different from them. Uniqush is not a service. Instead, Uniqush is a system, which runs on your own server. In fact, if you wish, you can use Uniqush to set up a service similar to Urban Airship.

  • Q: OK. Then is it a library? Like java-apns?

  • A: Well.. Not actually. I mean, it is a program, like Apache HTTP Server. You download it, you run it. It does require a Redis server, but, other than that, you don't need to worry about which language to use, package dependencies, etc.

  • Q: But wait, how can I use it anyway? I mean, if my program wants to send a push notification, I need to tell Uniqush about this action. How can I communicate with Uniqush? There must be some library so that I can use it in my program to talk with Uniqush, right?

  • A: We are trying to make it easier. uniqush-push provides RESTful APIs. In other words, you talk with uniqush-push through HTTP protocol. As long as there's an HTTP client library for your language, you can use it and talk with uniqush-push. For details about our RESTful APIs, see our API documentation.

  • Q: Then that's cool. But I noticed that you are using Go programming language. Do I need to install Go compiler and other stuff to run uniqush-push?

  • A: No. There are no installation dependencies. All you need to do is to download the binary file from the download page and install it. But you do need to set up a Redis server running somewhere, preferably with persistence, so that uniqush-push can store the user data in Redis. For more details, see the installation guide

  • Q: This is nice. I want to give it a try. But you are keep talking about uniqush-push, and I'm talking about Uniqush, are they the same thing?

  • A: Thank you for your support! Uniqush is intended to be the name of a system which provides a full stack solution for communication between mobile devices and the app's server. uniqush-push is one piece of the system. However, right now, uniqush-push is the only piece and others are under active development. If you want to know more details about the Uniqush system's plan, you can read the blog post. If you want to find out about the latest progress with Uniqush, please check out our blog. And, if you are really impatient, there's always our our GitHub account which could have brand-new stuff that hasn't been released yet.

Setting Up Redis

Redis persistence describes the details of how Redis saves data on shutdown, as well as how one might back up that data. Make sure that the Redis server you use has persistence enabled - your redis.conf should have contents similar to the section **PERSISTENCE** of redis.conf in the example config files linked in http://redis.io/topics/config

Contributing

You're encouraged to contribute to the uniqush-push project. There are two ways you can contribute.

Issues

If you encounter an issue while using uniqush-push, please report it at the project's issues tracker. Feature suggestions are also welcome.

Pull request

Code contributions to uniqush-push can be made using pull requests. To submit a pull request:

  1. Fork this project.
  2. Make and commit your changes.
  3. Submit your changes as a pull request.

Related Links

# Packages

Package db contains the database implementation for uniqush-push, for managing Push Service Providers, Delivery Points, services, etc.
Package push contains generic abstractions for working with push service providers, delivery points, etc.
Package srv contains implementations of push services with code to send pushes to, receive responses from, and manage delivery points for the various external push service providers (ADM, APNs, GCM, and FCM).
Package testutil contains reusable utilities for uniqush-push's unit tests (such as ExpectEquals).
Package util contains miscellaneous utilities that are used throughout uniqush-push.

# Functions

LoadDatabaseConfig returns a representation of the [Database] section from uniqush.conf.
LoadLoggers will return an array of loggers, for each type in the enum.
LoadRestAddr returns the address to listen to HTTP requests on, or returns an error.
NewPushBackEnd creates and sets up the only instance of the push implementation.
NewRestAPI constructs the data structures for the singleton REST API of uniqush-push.
OpenConfig opens the uniqush.conf file at filename, or returns an error.
Run will load the configuration and start the uniqush-push server and REST API based on that config.

# Constants

Constants for the paths of the REST API.
Constants for the paths of the REST API.
Logger* is an enum of the indices of the loggers for the various log categories.
Logger* is an enum of the indices of the loggers for the various log categories.
Logger* is an enum of the indices of the loggers for the various log categories.
Logger* is an enum of the indices of the loggers for the various log categories.
Logger* is an enum of the indices of the loggers for the various log categories.
Logger* is an enum of the indices of the loggers for the various log categories.
Logger* is an enum of the indices of the loggers for the various log categories.
Logger* is an enum of the indices of the loggers for the various log categories.
Logger* is an enum of the indices of the loggers for the various log categories.
Logger* is an enum of the indices of the loggers for the various log categories.
Logger* is an enum of the indices of the loggers for the various log categories.
Constants for the paths of the REST API.
Constants for the paths of the REST API.
Constants for the paths of the REST API.
Constants for the paths of the REST API.
Constants for the paths of the REST API.
Constants for the paths of the REST API.
Constants for the paths of the REST API.
Constants for the paths of the REST API.
status codes for REST APIs with simple responses.
status codes for REST APIs with simple responses.
status codes for REST APIs with simple responses.
Constants for the paths of the REST API.
These are constants with codes for a uniqush response type.
These are constants with codes for a uniqush response type.
These are constants with codes for a uniqush response type.
These are constants with codes for a uniqush response type.
These are constants with codes for a uniqush response type.
These are constants with codes for a uniqush response type.
These are constants with codes for a uniqush response type.
These are constants with codes for a uniqush response type.
These are constants with codes for a uniqush response type.
These are constants with codes for a uniqush response type.
These are constants with codes for a uniqush response type.
These are constants with codes for a uniqush response type.
These are constants with codes for a uniqush response type.
These are constants with codes for a uniqush response type.
These are constants with codes for a uniqush response type.
These are constants with codes for a uniqush response type.
These are constants with codes for a uniqush response type.
These are constants with codes for a uniqush response type.
These are constants with codes for a uniqush response type.
These are constants with codes for a uniqush response type.
Constants for the paths of the REST API.

# Structs

APIPushResponse represents the push response data that will be returned to the uniqush client.
APIPushResponseHandler records information about push notification attempts to generate a JSON response.
APIResponseDetails is used to represent responses of various APIs.
APISimpleResponse serializes an API response containing a single response details object.
APISimpleResponseHandler is a handler that expects exactly one response to be added.
NullAPIResponseHandler is an APIResponseHandler implementation that does nothing.
PreviewAPIResponseDetails represents the response of /preview.
PushBackEnd contains the data structures associated with sending pushes, managing subscriptions, and logging the results.
RestAPI implements uniqush's REST API (/push, /subscribe, /addpsp, etc).

# Interfaces

APIResponseHandler is interface for collecting API responses.