event-schemas

module
v0.0.0-...-33be302 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 15, 2024 License: GPL-3.0

README

Event schemas

This repository contains event schema definitions for common events ingested within Inngest. This allows you to get full type information for common events, and allows you to generate schemas in multiple languages for each event.

Events are defined using cue, a novel declarative data language. It's concise, strongly typed, allows constraining values, defaults, and annotations for extra data.

Converting JSON Schema & OpenAPI definitions to Cue

We use cue as our canonical representation of event types. You can generate a Cue type definition from an existing JSON schema or API schema:

cue import jsonschema ./path/to/schema.json -o -

This will print the cue type definitions to stdout. You can then take these definitions and add them to ./defs/${service.cue} to document events.

Go package

The event types are importable using the following package:

go get github.com/inngest/event-schemas/events

You can reference all supported events via events.Events.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL