gcm

package module
v0.0.0-...-ed32b93 Latest Latest
Warning

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

Go to latest
Published: May 29, 2015 License: Apache-2.0 Imports: 0 Imported by: 0

README

gcm

GCM client for golang

How to use

Gets library

$ go get github.com/mokelab-go/gcm

write!

package main

import (
  "fmt"
  gcm "github.com/mokelab-go/gcm/impl"
)

const (
  api_key = "INPUT YOUR API_KEY"
  reg_id = "INPUT YOUR REG_ID"
)

func main() {
  client := gcm.NewClient()
  data := map[string]interface{}{}
  _, err := client.Send(api_key, data, reg_id)
  if err != nil {
    fmt.Errorf("Failed to send GCM message : %s", err)
  }
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GCMClient

type GCMClient interface {
	// Sends GCM message to GCM server.
	Send(apiKey string, data map[string]interface{}, regIds ...string) (Response, error)
}

type Response

type Response struct {
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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