Documentation
¶
Overview ¶
Package embed provides external embed integration for oCMS. Supports embedding third-party services like Dify AI chat.
Index ¶
- func EmbedListPage(pc *adminviews.PageContext, data EmbedListViewData) templ.Component
- func EmbedProviderPage(pc *adminviews.PageContext, data EmbedProviderViewData) templ.Component
- type EmbedListViewData
- type EmbedProviderViewData
- type Module
- func (m *Module) AdminURL() string
- func (m *Module) Init(ctx *module.Context) error
- func (m *Module) Migrations() []module.Migration
- func (m *Module) RegisterAdminRoutes(r chi.Router)
- func (m *Module) RegisterRoutes(r chi.Router)
- func (m *Module) ReloadSettings() error
- func (m *Module) Shutdown() error
- func (m *Module) SidebarLabel() string
- func (m *Module) TemplateFuncs() template.FuncMap
- func (m *Module) TranslationsFS() embed.FS
- type ProviderListItem
- type ProviderSettings
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EmbedListPage ¶ added in v0.9.0
func EmbedListPage(pc *adminviews.PageContext, data EmbedListViewData) templ.Component
func EmbedProviderPage ¶ added in v0.9.0
func EmbedProviderPage(pc *adminviews.PageContext, data EmbedProviderViewData) templ.Component
Types ¶
type EmbedListViewData ¶ added in v0.9.0
type EmbedListViewData struct {
Providers []ProviderListItem
}
EmbedListViewData holds data for the embed providers list page.
type EmbedProviderViewData ¶ added in v0.9.0
type EmbedProviderViewData struct {
ProviderID string
ProviderName string
ProviderDesc string
IsEnabled bool
Schema []providers.SettingField
}
EmbedProviderViewData holds data for the embed provider settings page.
type Module ¶
type Module struct {
module.BaseModule
// contains filtered or unexported fields
}
Module implements the module.Module interface for the embed module.
func (*Module) Migrations ¶
Migrations returns database migrations for the module.
func (*Module) RegisterAdminRoutes ¶
RegisterAdminRoutes registers admin routes for the module.
func (*Module) RegisterRoutes ¶
RegisterRoutes registers public routes for the module.
func (*Module) ReloadSettings ¶
ReloadSettings reloads settings from the database.
func (*Module) SidebarLabel ¶
SidebarLabel returns the display label for the admin sidebar.
func (*Module) TemplateFuncs ¶
TemplateFuncs returns template functions provided by the module.
func (*Module) TranslationsFS ¶
TranslationsFS returns the embedded filesystem containing module translations.