Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pub/Sub Push Handler Body Struct #59

Open
sinmetal opened this issue May 21, 2022 · 0 comments
Open

Pub/Sub Push Handler Body Struct #59

sinmetal opened this issue May 21, 2022 · 0 comments
Labels

Comments

@sinmetal
Copy link
Member

sinmetal commented May 21, 2022

Pub/SubのPush HandlerのBodyを入れれるStructを定義する。
Dataをbase64decodeして、json.Unmarshalするような機能もあってもいいのかもしれないが、protoのパターンもあるから、ちょっと考える必要があるか?

Example Body

{
	"deliveryAttempt": 1,
	"message": {
		"attributes": {
			"fail": "true",
			"taskID": "e91ad590-3ce4-4799-a917-abb60f439a83",
			"workTimeSec": "1"
		},
		"data": "MjAyMi0wNS0yMSAwOToxOTowNy41NjgyODY1NzUgKzAwMDAgVVRDIG09KzAuMTQyMjEwNzE1",
		"messageId": "4703659050285659",
		"message_id": "4703659050285659",
		"publishTime": "2022-05-21T09:19:07.957Z",
		"publish_time": "2022-05-21T09:19:07.957Z"
	},
	"subscription": "projects/sinmetal-queue2/subscriptions/hello"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant