Expand description
§JunoBuild-Satellite
junobuild-satellite
is a Rust crate that extends the functionality of Juno satellites. This library is intended for developers looking to enhance the capabilities of Juno.
§Getting Started
To include junobuild-satellite
in your Rust project, add it as a dependency in your Cargo.toml
:
[dependencies]
junobuild-satellite = "*"
Replace "*"
with the specific version you want to use, or omit the version to always use the latest version.
§Usage
The primary feature of junobuild-satellite
is the include_satellite!
macro. It allows you to include all the stock satellite features required for a Juno satellite to work efficiently.
Example usage:
use junobuild_satellite::include_satellite;
include_satellite!();
By using the include_satellite!
macro, you can effortlessly integrate all the necessary features into your satellite project.
§Features
- on_set_doc: Enables the
on_set_doc
feature. - on_set_many_docs: Enables the
on_set_many_docs
feature. - on_delete_doc: Enables the
on_delete_doc
feature. - on_delete_many_docs: Enables the
on_delete_many_docs
feature. - on_upload_asset: Enables the
on_upload_asset
feature. - on_delete_asset: Enables the
on_delete_asset
feature. - on_delete_many_assets: Enables the
on_delete_many_assets
feature. - assert_set_doc: Enables the
assert_set_doc
feature. - assert_delete_doc: Enables the
assert_delete_doc
feature. - assert_upload_asset: Enables the
assert_upload_asset
feature. - assert_delete_asset: Enables the
assert_delete_asset
feature.
These features are enabled by default and do not have additional dependencies.
§Links & Resources
Here are some useful links:
- Looking to get started? Check out the documentation.
- Have a look at the LICENSE for information about licensing and limitation.
- Have questions, comments or feedback? Join our Discord or OpenChat.
Macros§
- Include the stock Juno satellite features into your Juno application.
Structs§
- Parameters for deleting a document.
- Represents a document in a collection’s store.
- A generic context struct used in Juno satellite hooks.
- Parameters for setting a document.
Enums§
Functions§
- Count assets in a collection.
- Count the number of assets in a collection’s store.
- Count the number of documents in a collection’s store.
- Count documents in a collection.
- Logs a debug-level message.
- Logs a debug-level message with additional serialized data.
- Delete an asset from a collection’s store.
- Delete Delete a document from a collection’s store.
- Delete multiple documents from a collection’s store.
- Delete multiple assets from a collection’s store based on filter criteria.
- Delete multiple documents from a collection’s store based on filter criteria.
- Logs an error message.
- Logs an error message with additional serialized data.
- Get an asset from a collection’s store.
- Getter, list and delete
- Get Get a document from a collection’s store.
- Logs an informational message.
- Logs an informational message with additional serialized data.
- List assets in a collection.
- List List documents in a collection.
- Logs a message at the
Info
level. - Logs a message at the
Info
level with additional serialized data. - Handles the setting of an asset within the store. This function performs various checks and operations to ensure the asset can be set and updated correctly.
- Insert Set a document in a collection’s store.
- Logs a warning message.
- Logs a warning message with additional serialized data.
Type Aliases§
- A type alias for the context used in the
assert_delete_asset
satellite hook. - A type alias for the context used in the
assert_delete_doc
satellite hook. - A type alias for the context used in the
assert_set_doc
satellite hook. - A type alias for the context used in the
assert_upload_asset
satellite hook. - Represents binary data as a vector of bytes.
- Represents a unique identifier or key.
- A type alias for the context used in the
on_delete_asset
satellite hook. - A type alias for the context used in the
on_delete_doc
satellite hook. - A type alias for the context used in the
on_delete_many_assets
satellite hook. - A type alias for the context used in the
on_delete_many_docs
satellite hook. - A type alias for the context used in the
on_set_doc
satellite hook. - A type alias for the context used in the
on_set_many_docs
satellite hook. - A type alias for the context used in the
on_upload_asset
satellite hook.