šŸš€ Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more →
Socket
Sign inDemoInstall
Socket

github.com/ibm/push-notifications-go-sdk

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/ibm/push-notifications-go-sdk

v1.0.0
Source
Go
Version published
Created
Source

IBM Cloud Mobile Services - Go server-side SDK for Push Notifications

The IBM Cloud Push Notifications service provides a unified push service to send real-time notifications to mobile and web applications. The Go SDK is used to manage Push Notifications service.

Ensure that you go through IBM Cloud Push Notifications service documentation before you start.

Table of Contents

Prerequisites

Installation

Install using the command.

go get -u github.com/IBM/push-notifications-go-sdk

Import the SDK

To import the module

import "github.com/IBM/push-notifications-go-sdk/pushservicev1"

then run go mod tidy to download and install the new dependency and update your Go application's go.mod file.

Initialize SDK

Initialize the sdk to connect with your App Configuration service instance.

func init() {
  authenticator := &core.IamAuthenticator{
		ApiKey: "apikey",
	}

	options := &pushservicev1.PushServiceV1Options{
		ServiceName:   "imfpush",
		Authenticator: authenticator,
		URL:           "url",
	}

	app, err := pushservicev1.NewPushServiceV1(options)

	if err != nil {
		log.Fatal(err)
	}
}
  • apikey : apikey of the Push notifications service. Get it from the service credentials section of the dashboard.
  • url : url of the Push notifications Instance. URL instance can found from here

Using the SDK

Refer to the example directory

License

This project is released under the Apache 2.0 license. The license's full text can be found in LICENSE

FAQs

Package last updated on 19 Oct 2021

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