New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

github.com/dialogs/dialog-push-service

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/dialogs/dialog-push-service

  • v1.0.7
  • Source
  • Go
  • Socket score

Version published
Created
Source

Dialog push service

Dialog Push Service (DPS) is a tiny service for pushing remote notifications.

DPS consists of two sub-projects:

  • gRPC server that does actual delivery
  • Scala module for Dialog Server which provides Scala bindings to gRPC server

Getting Started

You need to install go, protobuf and gogo-protobuf extensions:

brew install go
brew install protobuf
go get github.com/gogo/protobuf/proto
go get github.com/gogo/protobuf/protoc-gen-gogoslick
go get github.com/gogo/protobuf/gogoproto

You also need to make sure the protoc-gen-gogoslick is in the $PATH.

Config

Legacy FCM HTTP

google:
  - project-id: <string>
    key: <string>
    retries: <number>
    timeout: <string>
    nop-mode: <boolean>
    workers: <number>
    allow-alerts: <boolean>
    sandbox: <boolean>

properties:

  • project-id - identificator of the provider
  • key
  • retries - count retries by server error
  • timeout - time duration. Example: 1s, 2m
  • nop-mode - if the option is set to true, the message will not be sent
  • workers - count workers for sending. By default the value is equal count of processors.
  • allow-alerts - enabled alerting messages for converter protobuf push message to a notification message
  • sandbox - if the option is set to true, the message will not be actually sent. Instead FCM performs all the necessary validations, and emulates the send operation

FCM HTTP v1 (GCM)

fcm:
  - project-id: <string>
    service-account: <string>
    retries: <number>
    timeout: <string>
    nop-mode: <boolean>
    workers: <number>
    allow-alerts: <boolean>
    sandbox: <boolean>

properties:

  • project-id - identificator of the provider
  • service-account
  • retries - count retries by server error
  • timeout - time duration. Example: 1s, 2m
  • nop-mode - if the option is set to true, the message will not be sent
  • workers - count workers for sending. By default the value is equal count of processors.
  • allow-alerts - enabled alerting messages for converter protobuf push message to a notification message
  • sandbox - if the option is set to true, the message will not be actually sent. Instead FCM performs all the necessary validations, and emulates the send operation

APNS

apple:
  - project-id: <string>
    pem: <string>
    retries: <number>
    timeout: <string>
    nop-mode: <boolean>
    workers: <number>
    allow-alerts: <boolean>
    sandbox: <boolean>

properties:

  • project-id - identifier of the provider
  • pem - path to tls certificate in pem format
  • retries - count retries by server error
  • timeout - time duration. Example: 1s, 2m
  • nop-mode - if the option is set to true, the message will not be sent
  • workers - count workers for sending. By default the value is equal count of processors.
  • allow-alerts - enabled alerting messages for converter protobuf push message to a notification message
  • topic - the topic of the remote notification, which is typically the bundle ID for your ap
  • sound - sound of the alerting message

Test environment

  1. download iOS certificate in PEM format
  2. create environment variable APPLE_PUSH_CERTIFICATE with path to PEM
  3. download service-account.json
  4. create environment variable GOOGLE_APPLICATION_CREDENTIALS with path to service-account.json
  5. copy server key
  6. save server key in a file. File format:
{
  "key":"<server key>"
}
  1. create environment variable GOOGLE_LEGACY_APPLICATION_CREDENTIALS with path to server key file
  2. create devices tokens file. File format:
{
  "android": "<token>",
  "ios": "<token>"
}
  1. create environment variable PUSH_DEVICES with path to devices tokens file

Metrics

Metrics split by provider type and project identifier:

  • processed_tasks -quantity of successfully sent push-notifications.
  • failed_tasks - quantity of push-notifications with errors.
  • io - time of sending push-notifications
  • pushes_recv - quantity of push-notifications received from IP of a sender.

Client application

Android

Build and run:

License

This software is available under the Apache 2.0 License

FAQs

Package last updated on 11 Dec 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc