https://github.com/suin/google-cloud-typed-pubsub-function
Strongly typed Google Cloud Function interface of the Pub/Sub handler for TypeScript.
https://github.com/suin/google-cloud-typed-pubsub-function
google-cloud-functions google-cloud-pubsub
Last synced: 3 months ago
JSON representation
Strongly typed Google Cloud Function interface of the Pub/Sub handler for TypeScript.
- Host: GitHub
- URL: https://github.com/suin/google-cloud-typed-pubsub-function
- Owner: suin
- License: mit
- Created: 2020-07-24T01:40:57.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-06T12:18:36.000Z (over 3 years ago)
- Last Synced: 2024-12-22T06:53:57.847Z (over 1 year ago)
- Topics: google-cloud-functions, google-cloud-pubsub
- Homepage:
- Size: 3.12 MB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 23
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# @suin/google-cloud-typed-pubsub-function
Strongly typed Google Cloud Function interface of the Pub/Sub handler for TypeScript.
## Installation
```bash
yarn add @suin/google-cloud-typed-pubsub-function
# or
npm install @suin/google-cloud-typed-pubsub-function
```
## Usage
```typescript
import { PubSubFunction } from '@suin/google-cloud-typed-pubsub-function'
export const receiveEvent: PubSubFunction = (event, context) => {
event.data // string
event.attributes // null or object
context.eventType // string
context.eventId // string
context.timestamp // string
}
```
## API Reference
https://suin.github.io/google-cloud-typed-pubsub-function/