Aurora.Uix.Resource (Aurora UIX v0.1.0)
Manages comprehensive metadata configuration for schemas and their associated UI representations.
This module provides a flexible struct and utility functions for:
- Defining schema-specific UI configurations
- Managing dynamic field definitions
- Supporting complex UI generation scenarios
Key features:
- Supports custom field configurations
- Allows runtime modification of schema metadata
- Integrates with other Aurora.Uix parsing components
Summary
Functions
Updates an existing resource struct with the given attributes.
Creates a new Aurora.Uix.Resource struct with the given attributes.
Types
Functions
Updates an existing resource struct with the given attributes.
Parameters
resource_config(Aurora.Uix.Resource.t()) - Existing resource struct to update.attrs(map() |keyword()) - Attributes to update with :name, :schema, :context, and :fields keys.
Returns
Aurora.Uix.Resource.t() - Updated resource struct.
Examples
resource = Aurora.Uix.Resource.new(name: :user)
Aurora.Uix.Resource.change(resource, %{schema: MyApp.User})
# => %Aurora.Uix.Resource{name: :user, schema: MyApp.User, ...}
Creates a new Aurora.Uix.Resource struct with the given attributes.
Parameters
attrs(map() |keyword()) - Initial attributes with :name, :schema, :context, and :fields keys.
Returns
Aurora.Uix.Resource.t() - A new resource struct.
Examples
Aurora.Uix.Resource.new(name: :user, schema: MyApp.User)
# => %Aurora.Uix.Resource{name: :user, schema: MyApp.User, ...}