[Aerogear-users] UnifiedPush Go Sender Library

Sebastien Blanc scm.blanc at gmail.com
Mon Jul 25 08:45:17 EDT 2016


Hi folk,

A few days ago I started to play with Go and the result of that is a small
Sender Library for the UnifiedPush Server :
https://github.com/sebastienblanc/upsgosender

Usage is pretty simple :

criteria := &Criteria{Alias: []string{"seb", "bob"}}message :=
&Message{Alert: "hello from #golang sender"}unifiedMessage :=
&UnifiedMessage{Message: *message, Criteria: *criteria}settings :=
&Settings{
    URL:           "https://mypushserver.com/ag-push",
    ApplicationID: "58f87fb7-829c-4c6f-a0eb-326d3017a94c",
    MasterSecret:  "3366736b-d52c-4115-87d3-c08095e87955"}sender :=
NewSender(*settings)
sender.send(*unifiedMessage)



Since, I'm a newbie on Go, PRs are mote than welcome to polish the code or
remove any anti-Go-patterns I could have used ;)

I still need to implement Proxy and Truststore support and add more test
but I think it's a good start.

Sebi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/aerogear-users/attachments/20160725/67e9eb09/attachment.html 


More information about the Aerogear-users mailing list