Documentation
¶
Index ¶
- func FormatAgentData(agents []agents.Agent) []map[string]any
- func FormatAgentSchema(agent *agents.Agent) map[string]any
- func FormatAgentsSchema(agents []agents.Agent) []map[string]any
- func FormatCollectionItem(item *models.Item, collection *models.Collection) map[string]any
- func FormatCollectionItems(items []models.Item, collection *models.Collection) []map[string]any
- func FormatCollectionSchema(collection *models.Collection) map[string]any
- func FormatCollectionsData(collections []models.Collection) []map[string]any
- func FormatCollectionsSchema(collections []models.Collection) []map[string]any
- func FormatNestedItems(itemID uint, data models.JSONMap, collection *models.Collection) map[string]any
- func GenerateSlug(username string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatAgentData ¶
FormatAgentData returns an array of agents as DATA (not schema).
func FormatAgentSchema ¶
FormatAgentSchema formats a single agent into a schema map for API endpoints.
func FormatAgentsSchema ¶
FormatAgentsSchema returns an array of agent schemas for admin endpoints.
func FormatCollectionItem ¶
FormatCollectionItem formats a single item for a Strapi-like /api/[collection] response.
func FormatCollectionItems ¶
FormatCollectionItems returns multiple items formatted for Strapi
func FormatCollectionSchema ¶
func FormatCollectionSchema(collection *models.Collection) map[string]any
func FormatCollectionsData ¶
func FormatCollectionsData(collections []models.Collection) []map[string]any
FormatCollectionData returns an array of collections as DATA (not schema), Strapi-style for /collections API.
func FormatCollectionsSchema ¶
func FormatCollectionsSchema(collections []models.Collection) []map[string]any
FormatCollectionsSchema: returns an array of collection schemas for admin endpoints.
func FormatNestedItems ¶
func FormatNestedItems(itemID uint, data models.JSONMap, collection *models.Collection) map[string]any
FormatNestedItemToStrapi wraps your nested JSONMap
func GenerateSlug ¶
GenerateSlug creates a URL-friendly slug from the provided username.
Types ¶
This section is empty.