Skip to content

Commit

Permalink
fix readme
Browse files Browse the repository at this point in the history
  • Loading branch information
fujiwara committed Apr 5, 2024
1 parent ab7387c commit 5f17b41
Showing 1 changed file with 23 additions and 17 deletions.
40 changes: 23 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,26 +202,43 @@ cert_file = "/path/to/server.crt"
kid = "kid"
team_id = "team_id"

[fcm]
api_key = "API key for FCM"

[fcm_v1]
google_application_credentials = "/path/to/credentials.json"
```

param | status | description
### [provider] section

This section is for Gunfish server configuration.

Parameter | Requirement | Description
---------------- | ------ | --------------------------------------------------------------------------------------
port |optional| Listen port number.
worker_num |optional| Number of Gunfish owns http clients.
queue_size |optional| Limit number of posted JSON from the developer application.
max_request_size |optional| Limit size of Posted JSON array.
max_connections |optional| Max connections
error_hook |optional| Error hook command. This command runs when Gunfish catches an error response.

### [apns] section

This section is for APNs provider configuration.
If you don't need to APNs provider, you can skip this section.

Parameter | Requirement | Description
---------------- | ------ | --------------------------------------------------------------------------------------
key_file |required| The key file path.
cert_file |optional| The cert file path.
kid |optional| kid for APNs provider authentication token.
team_id |optional| team id for APNs provider authentication token.
error_hook |optional| Error hook command. This command runs when Gunfish catches an error response.
api_key |optional| FCM api key. If you want to delivery notifications to android, it is required.

### [fcm_v1] section

This section is for FCM v1 provider configuration.
If you don't need to FCM v1 provider, you can skip this section.

Parameter | Requirement | Description
---------------- | ------ | --------------------------------------------------------------------------------------
google_application_credentials |required| The path to the Google Cloud Platform service account key file.

## Error Hook

Expand All @@ -239,17 +256,6 @@ for example JSON structure: (>= v0.2.x)
}
```

```json5
// FCM
{
"provider": "fcm",
"status": 200,
"registration_id": "8kMSTcfqrca:APA91bEfS-uC1WV374Mg83Lkn43..",
// or "to": "8kMSTcfqrca:APA91bEfS-uC1WV374Mg83Lkn43..",
"error": "InvalidRegistration"
}
```

```json5
// FCM v1
{
Expand Down

0 comments on commit 5f17b41

Please sign in to comment.