Commit Graph

200 Commits

Author SHA1 Message Date
Bo-Yi Wu aa35465262 chore: upgrade gin-status-api 2019-06-11 02:07:01 +08:00
Bo-Yi Wu 80e833508f chore(package): upgrade gofight 2019-06-11 01:49:33 +08:00
Bo-Yi Wu 55ff87f96f
chore: remove facebook graceful shutdown package. (#408)
* chore: remove facebook graceful shutdown package.

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2019-04-29 11:33:27 +08:00
Bo-Yi Wu 27ec42543b
feat: add tryEnqueue function. (#406)
* feat: add tryEnqueue function.

tryEnqueue tries to enqueue a job to the given job channel. Returns true if
the operation was successful, and false if enqueuing would not have been
possible without blocking. Job is not enqueued in the latter case.

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* remove inital worker

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2019-04-25 23:10:12 +08:00
Bo-Yi Wu 6cc8e9f290 chore: update copyright year 2019-03-19 00:04:50 +08:00
Helmi Rifai ae6c01bd67 Adds QueueUsage to prometheus metrics (same as /api/stat/app) (#401)
Exposes gorush_queue_usage metric to be used in prometheus so monitor internal queues

Useful to make sure we are coping well with traffic
2019-03-16 22:19:05 +08:00
Bo-Yi Wu 758d4d60bb
chore: update test token. (#400) 2019-03-16 18:00:06 +08:00
Bo-Yi Wu 3f223cf6c0
feat: switch to drone 1.0 (#399)
fix #397
2019-03-16 11:37:01 +08:00
Bo-Yi Wu 5321ed4575 feat: switch vendor to go mod. 2019-03-16 09:27:47 +08:00
Daniel Jankowski 7f97bbf178 fixed: sound without a critical alert in ios push notifications (#394)
Currently the notification, if a sound is specified, will be converted into a critical notification. This behaviour occurs because the sideshow/apns2 package initializes a new sound-dict on `payload.SoundName()` and inserts the name into it. If the sound-key is specified as a dictionary, the alert will be seen as a critical alert according to the documentation [developer.apple.com/documentation/usernotifications](https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/generating_a_remote_notification#2943363).

In order to prevent the notification to get a critical one by specifying a sound, the sound name from the rest-API needs to be set as string to the sound-property of the payload for apns. This can be achieved by setting either the sound-key from the request to the sound property of the payload if it is a string or by setting the soundname-key from the request to the sound property without the usage of `payload.SoundName()`. For more consistency to the documentation, this pull request implements the variant, that the sound-key from the request is set as string into the sound-property of the apns-payload.
2019-03-14 00:01:15 +08:00
Bo-Yi Wu a7a451e363
fix(ios): mapstructure for sound field. (#385) 2018-11-20 17:01:35 +08:00
Bo-Yi Wu 375eec1d90
feat(ios12): Add support for Summary arguments in notifications (#384)
* feat(ios12): Add support for Summary arguments in notifications

* feat: upgrade go module
2018-11-20 11:02:26 +08:00
Iskander (Alex) Sharipov d275ddbccb gorush: do less copying in queueNotification (#370)
The PushNotification object is quite big (772 bytes on AMD64),
so avoid doing too many copying without a need.

Collect pointers and do copying only when sending into a channel.

Found using https://go-critic.github.io/overview#rangeValCopy-ref

Linter output:
```
$GOPATH/src/github.com/appleboy/gorush/gorush/worker.go:38:2: rangeValCopy: each iteration copies 772 bytes (consider pointers or indexing)
$GOPATH/src/github.com/appleboy/gorush/gorush/worker.go:53:2: rangeValCopy: each iteration copies 772 bytes (consider pointers or indexing)
```
2018-09-17 14:55:23 +08:00
Bo-Yi Wu 0c89fd1d81
feat(ios): Support iOS 12 Critical Alerts (#367)
fix https://github.com/appleboy/gorush/issues/366
2018-08-28 11:02:13 +08:00
Eduard Pelesh bf97ca59ec Added mutable_content option for Firebase (#364)
It is now possible to send `mutable_content` option to Firebase which gets forwarded as `mutable-content` option for APNS.

A link to official documentation is: https://firebase.google.com/docs/cloud-messaging/http-server-ref#mutable_content
2018-08-15 11:47:15 +08:00
Bo-Yi Wu a8994a5110
fix(debug): show error message. (#356) 2018-05-22 10:19:13 +08:00
Bo-Yi Wu ffa8eb12b3
feat: Add badgerDB support. (#353)
See https://github.com/dgraph-io/badger
Slide: https://github.com/gopherchina/conference/blob/master/2018/1.5%20Badger_%20Fast%20Key-Value%20DB%20in%20Go.pdf
2018-04-16 17:26:15 +08:00
Bo-Yi Wu fea79dd14a fix: typo in header. 2018-03-22 20:41:00 +08:00
Bo-Yi Wu 398b77744c
feat(https): support load certificate from base64 input. (#337) 2018-02-18 17:43:34 +08:00
Bo-Yi Wu 2d2f62d19b
feat(iOS): load iOS key from base64 input. (#336)
* feat(iOS): load iOS key from base64 input.

* test: check key type exist.
2018-02-18 17:12:51 +08:00
Bo-Yi Wu d7ce3c077c
feat(aws): support lambda (#334) 2018-01-23 16:34:34 +08:00
Bo-Yi Wu 230cfb23fa
feat: Add ThreadID for apns (#326) 2018-01-05 17:08:43 +08:00
Bo-Yi Wu bd6a6f7eba
Add CollapseID for ios notification. (#308)
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-11-15 10:12:09 -06:00
Bo-Yi Wu e99692717c support custom url for health URI. (#302)
* support custom url for health URI.

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* fix readme

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-10-25 21:19:58 -05:00
Bo-Yi Wu 313d74c927 Support get different mode of apns client in request for iOS app (#301)
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-10-25 09:51:33 -05:00
Bo-Yi Wu c06e819e08 Support new Apple Token Based Authentication (JWT) (#300)
* Support new Apple Token Based Authentication (JWT)

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* fix testing

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-10-25 03:49:23 -05:00
Bo-Yi Wu 461a57ec9a support Device Group HTTP POST Request (#299)
* support Device Group HTTP POST Request

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* fix vendor

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* check error exist

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-10-24 21:37:53 -05:00
Bo-Yi Wu 115ee18560 Send messages to topics for android (#296)
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-10-24 04:00:08 -05:00
Bo-Yi Wu f3480d2dd8 Support global ENV setting. (#293)
* Support global ENV setting.

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* add viper package

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* fix typo

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* fix testing.

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* fix testing.

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-10-22 22:06:30 -05:00
Bo-Yi Wu 6ec814c4e0 replace http status
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-10-06 10:45:56 +08:00
JieJhih 01d545a408 Change Request.Header.Get to GetHeader function (#290)
* Change Request.Header.Get to GetHeader function

* update gin version

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* update gin version

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* update gin version

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-10-03 08:21:49 -05:00
Bo-Yi Wu f960f942f2 add version handler (#287)
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-09-26 11:25:41 +08:00
Bo-Yi Wu ffd55152e5 add healthz check (#286)
* add healthz check

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* add testing

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-09-26 11:10:51 +08:00
Bo-Yi Wu e070248a11 fix lint error for gorush folder. (#275)
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-08-23 21:46:00 -05:00
Bo-Yi Wu 2bcc17de51 check response header. (#266)
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-08-06 09:53:38 +08:00
Simone Basso a714d03e2c feature(server): allow to bind specific addresses (#263)
The main use case for ooniprobe is to bind 127.0.0.1 only.
2017-07-31 16:31:07 +08:00
Bo-Yi Wu 00ff0248a2 feat(config): enable or disable httpd server. (#262) 2017-07-27 11:19:36 +08:00
Bo-Yi Wu 04b97019c8 add init func for testing.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-07-26 09:14:18 +08:00
Bo-Yi Wu f7168cfc9a refactor(testing): add ios testing file. (#259)
* refactor(testing): add ios testing file.

* initial workers.

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-07-25 21:05:27 +08:00
Bo-Yi Wu 430de17755 refactor(andorid): initial client. (#258)
* refactor(andorid): initial client.
2017-07-25 16:41:30 +08:00
Bo-Yi Wu 2e3cc8e281 fix: check return value (#256)
* fix: check return value

* fix testing

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-07-24 21:41:21 +08:00
Bo-Yi Wu a64fae7de7 refactor: send notification. 2017-07-24 21:17:11 +08:00
Bo-Yi Wu 41a8a609be feat(config): add grpc config. (#255) 2017-07-24 18:58:30 +08:00
Bo-Yi Wu 9a52f8f2b5 feat(grpc): initial grpc server. (#253)
* feat(grpc): initial grpc server.

* refactor(vendor): add missing vendor.

* fix testing

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-07-24 15:06:23 +08:00
Bo-Yi Wu 460b74d8a6 refactor(notification): separate ios and android (#250) 2017-07-16 22:22:48 -05:00
Bo-Yi Wu ecd0aa8ed2
add github.com/sirupsen/logrus
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-06-25 02:23:24 +08:00
Bo-Yi Wu 7fb51220c1
refactor initial variable
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-06-25 01:55:07 +08:00
Bo-Yi Wu 16c3f5c46c refactor: update status init func (#241) 2017-06-24 09:47:35 -05:00
Bo-Yi Wu 8dcc680434 move storage interface to storage folder. (#240)
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-06-23 23:09:45 -05:00
Bo-Yi Wu 14dc899b02 feat: check unused package (#232)
* feat: check unused package

update edganiukov/fcm to appleboy/go-fcm

* update readme

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* update comment

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-06-01 02:52:01 -05:00