go fcm http proxy
Thanks
go get github.com/lwl1989/TTTask/msg
go build -o ttpush index.go
sudo ./ttpush -h show
sudo ./ttpush install
sudo ./ttpush remove
sudo ./ttpush start
or sudo ./ttpush -c configFilePath
sudo ./ttpush stop
{
"server_port":"8080",
"max_ttl":2419200,
"api_key":"AAAA_1dLSps:APA91......ZHrCUioe-vx6wFvDXfnoh9h",
"notify_callback":"http://localhost:8000/fcm/notify",
"log_file":"/tmp/",
"proxy":"",
"notification":{
"title":"",
"body":"",
"icon":"http://",
"uri":"http://"
}
}
post: http://localhost:8080
port It's config file setting
{
"message": {
"title": "fsafsa",
},
"token": "user_token", //topic or condition or token
}
{
"message": {
"title": "fsafsa",
"dasdsad":"dsada"
},
"topic": "/topics/ceshi", //topic or condition or token
"type": "notice", //type notice or message
"title": "notice title", //only notice use and It can be empty
"body":"notice content", //only notice use and It can be empty
"icon":"config or this",
"click_action":"config or this"
}
{
"message": {
"title": "fsafsa",
},
"token": "user_token", //topic or condition or token,
"send_time":"1524136833" // if send_time > now , It add to crontab
}
if you set config notify_callback
It's want be POST JSON to notify_callback_url
see callback