[aerogear-dev] UnifiedPush Go Sender Library

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[aerogear-dev] UnifiedPush Go Sender Library

Sebastien Blanc
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



_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev
Loading...