-
Notifications
You must be signed in to change notification settings - Fork 15
feat: support creating resources from spec #239
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
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
5905360
feat: support creating resources from spec
infiniteregrets acaebc5
..
infiniteregrets 04fee8a
..
infiniteregrets 40f128a
..
infiniteregrets 8d0d04f
idea
infiniteregrets cf69094
..
infiniteregrets 2ba1304
.
infiniteregrets 6cd3371
.
infiniteregrets d850cb5
..
infiniteregrets 9ca95ae
ci
infiniteregrets 20fe53c
..
infiniteregrets d01030d
..
infiniteregrets 4c2f467
Merge branch 'main' into m/102
infiniteregrets File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,225 @@ | ||
| { | ||
| "$schema": "http://json-schema.org/draft-07/schema#", | ||
| "title": "ResourcesSpec", | ||
| "type": "object", | ||
| "properties": { | ||
| "basins": { | ||
| "type": "array", | ||
| "items": { | ||
| "$ref": "#/definitions/BasinSpec" | ||
| } | ||
| } | ||
| }, | ||
| "definitions": { | ||
| "BasinConfigSpec": { | ||
| "type": "object", | ||
| "properties": { | ||
| "create_stream_on_append": { | ||
| "description": "Create stream on append if it doesn't exist, using the default stream configuration.", | ||
| "default": null, | ||
| "type": [ | ||
| "boolean", | ||
| "null" | ||
| ] | ||
| }, | ||
| "create_stream_on_read": { | ||
| "description": "Create stream on read if it doesn't exist, using the default stream configuration.", | ||
| "default": null, | ||
| "type": [ | ||
| "boolean", | ||
| "null" | ||
| ] | ||
| }, | ||
| "default_stream_config": { | ||
| "anyOf": [ | ||
| { | ||
| "$ref": "#/definitions/StreamConfigSpec" | ||
| }, | ||
| { | ||
| "type": "null" | ||
| } | ||
| ] | ||
| } | ||
| }, | ||
| "additionalProperties": false | ||
| }, | ||
| "BasinSpec": { | ||
| "type": "object", | ||
| "required": [ | ||
| "name" | ||
| ], | ||
| "properties": { | ||
| "config": { | ||
| "anyOf": [ | ||
| { | ||
| "$ref": "#/definitions/BasinConfigSpec" | ||
| }, | ||
| { | ||
| "type": "null" | ||
| } | ||
| ] | ||
| }, | ||
| "name": { | ||
| "type": "string" | ||
| }, | ||
| "streams": { | ||
| "type": "array", | ||
| "items": { | ||
| "$ref": "#/definitions/StreamSpec" | ||
| } | ||
| } | ||
| }, | ||
| "additionalProperties": false | ||
| }, | ||
| "DeleteOnEmptySpec": { | ||
| "type": "object", | ||
| "properties": { | ||
| "min_age": { | ||
| "description": "Minimum age before an empty stream can be deleted. Set to 0 (default) to disable delete-on-empty (don't delete automatically).", | ||
| "anyOf": [ | ||
| { | ||
| "$ref": "#/definitions/HumanDuration" | ||
| }, | ||
| { | ||
| "type": "null" | ||
| } | ||
| ] | ||
| } | ||
| }, | ||
| "additionalProperties": false | ||
| }, | ||
| "HumanDuration": { | ||
| "description": "A duration string in humantime format, e.g. \"1day\", \"2h 30m\"", | ||
| "examples": [ | ||
| "1day", | ||
| "2h 30m" | ||
| ], | ||
| "type": "string" | ||
| }, | ||
| "RetentionPolicySpec": { | ||
| "description": "Retain records unless explicitly trimmed (\"infinite\"), or automatically trim records older than the given duration (e.g. \"7days\", \"1week\").", | ||
| "examples": [ | ||
| "infinite", | ||
| "7days", | ||
| "1week" | ||
| ], | ||
| "type": "string" | ||
| }, | ||
| "StorageClassSpec": { | ||
| "description": "Storage class for recent writes.", | ||
| "type": "string", | ||
| "enum": [ | ||
| "standard", | ||
| "express" | ||
| ] | ||
| }, | ||
| "StreamConfigSpec": { | ||
| "type": "object", | ||
| "properties": { | ||
| "delete_on_empty": { | ||
| "description": "Delete-on-empty configuration.", | ||
| "anyOf": [ | ||
| { | ||
| "$ref": "#/definitions/DeleteOnEmptySpec" | ||
| }, | ||
| { | ||
| "type": "null" | ||
| } | ||
| ] | ||
| }, | ||
| "retention_policy": { | ||
| "description": "Retention policy for the stream. If unspecified, the default is to retain records for 7 days.", | ||
| "anyOf": [ | ||
| { | ||
| "$ref": "#/definitions/RetentionPolicySpec" | ||
| }, | ||
| { | ||
| "type": "null" | ||
| } | ||
| ] | ||
| }, | ||
| "storage_class": { | ||
| "description": "Storage class for recent writes.", | ||
| "default": null, | ||
| "anyOf": [ | ||
| { | ||
| "$ref": "#/definitions/StorageClassSpec" | ||
| }, | ||
| { | ||
| "type": "null" | ||
| } | ||
| ] | ||
| }, | ||
| "timestamping": { | ||
| "description": "Timestamping behavior.", | ||
| "anyOf": [ | ||
| { | ||
| "$ref": "#/definitions/TimestampingSpec" | ||
| }, | ||
| { | ||
| "type": "null" | ||
| } | ||
| ] | ||
| } | ||
| }, | ||
| "additionalProperties": false | ||
| }, | ||
| "StreamSpec": { | ||
| "type": "object", | ||
| "required": [ | ||
| "name" | ||
| ], | ||
| "properties": { | ||
| "config": { | ||
| "anyOf": [ | ||
| { | ||
| "$ref": "#/definitions/StreamConfigSpec" | ||
| }, | ||
| { | ||
| "type": "null" | ||
| } | ||
| ] | ||
| }, | ||
| "name": { | ||
| "type": "string" | ||
| } | ||
| }, | ||
| "additionalProperties": false | ||
| }, | ||
| "TimestampingModeSpec": { | ||
| "description": "Timestamping mode for appends that influences how timestamps are handled.", | ||
| "type": "string", | ||
| "enum": [ | ||
| "client-prefer", | ||
| "client-require", | ||
| "arrival" | ||
| ] | ||
| }, | ||
| "TimestampingSpec": { | ||
| "type": "object", | ||
| "properties": { | ||
| "mode": { | ||
| "description": "Timestamping mode for appends that influences how timestamps are handled.", | ||
| "default": null, | ||
| "anyOf": [ | ||
| { | ||
| "$ref": "#/definitions/TimestampingModeSpec" | ||
| }, | ||
| { | ||
| "type": "null" | ||
| } | ||
| ] | ||
| }, | ||
| "uncapped": { | ||
| "description": "Allow client-specified timestamps to exceed the arrival time. If this is `false` or not set, client timestamps will be capped at the arrival time.", | ||
| "default": null, | ||
| "type": [ | ||
| "boolean", | ||
| "null" | ||
| ] | ||
| } | ||
| }, | ||
| "additionalProperties": false | ||
| } | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.