Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PushHandler ¶
PushHandler handles the pubsub push responses
Decodes the response sent by PubSub and updates datastore. It doesn't return anything as required by https://cloud.google.com/pubsub/docs/push, this is because by default the return is 200 OK for http POST requests. It does not return any 4xx codes on error because it could lead to a loop where PubSub tries to push same message again which is rejected.
Types ¶
type PSRequest ¶
type PSRequest struct {
Msg struct {
Data string `json:"data"`
MessageID string `json:"messageId"`
} `json:"message"`
Sub string `json:"subscription"`
}
PSRequest helps to unmarshall json data sent from pubsub
The format of the data sent by PubSub is described in https://cloud.google.com/pubsub/docs/push?hl=en#receiving_push_messages
Click to show internal directories.
Click to hide internal directories.