Documentation
¶
Index ¶
- Variables
- type CacheConfig
- type CommandsConfig
- type Config
- type ContentConfig
- type Features
- type GeneratorConfig
- type I18NConfig
- type LoggingConfig
- type MarkdownConfig
- type MarkdownParserConfig
- type NavigationConfig
- type RetentionConfig
- type ShortcodeCacheConfig
- type ShortcodeConfig
- type ShortcodeDefinitionConfig
- type ShortcodeSecurityConfig
- type StorageConfig
- type ThemeConfig
- type URLKitResolverConfig
- type WidgetConfig
- type WidgetDefinitionConfig
- type WorkflowConfig
- type WorkflowDefinitionConfig
- type WorkflowStateConfig
- type WorkflowTransitionConfig
Constants ¶
This section is empty.
Variables ¶
var ErrAdvancedCacheRequiresEnabledCache = errors.New("cms config: advanced cache feature requires cache to be enabled")
ErrAdvancedCacheRequiresEnabledCache ensures advanced cache builds only when cache is enabled.
var ErrCommandsCronRequiresScheduling = errors.New("cms config: command cron auto-registration requires scheduling to be enabled")
ErrCommandsCronRequiresScheduling ensures automatic cron wiring only runs when scheduling is enabled.
var ErrDefaultLocaleRequired = errors.New("cms config: default locale is required when translations are enforced")
var ErrGeneratorOutputDirRequired = errors.New("cms config: generator output directory is required when generator is enabled")
var ErrLoggingFormatInvalid = errors.New("cms config: logging format is invalid")
var ErrLoggingLevelInvalid = errors.New("cms config: logging level is invalid")
var ErrLoggingProviderRequired = errors.New("cms config: logging provider is required when logging feature is enabled")
var ErrLoggingProviderUnknown = errors.New("cms config: logging provider is invalid")
var ErrMarkdownContentDirRequired = errors.New("cms config: markdown content directory is required when markdown is enabled")
var ErrMarkdownFeatureRequired = errors.New("cms config: markdown feature must be enabled to configure markdown")
var ErrSchedulingFeatureRequiresVersioning = errors.New("cms config: scheduling feature requires versioning to be enabled")
ErrSchedulingFeatureRequiresVersioning ensures scheduling stays behind the versioning flag.
var ErrShortcodesFeatureRequired = errors.New("cms config: shortcodes feature must be enabled to configure shortcodes")
var ErrStorageProfileAliasCollides = errors.New("cms config: storage profile alias collides with existing profile")
var ErrStorageProfileAliasDuplicate = errors.New("cms config: storage profile alias must be unique")
var ErrStorageProfileAliasInvalid = errors.New("cms config: storage profile alias is invalid")
var ErrStorageProfileAliasNameRequired = errors.New("cms config: storage profile alias name is required")
var ErrStorageProfileAliasTargetRequired = errors.New("cms config: storage profile alias target is required")
var ErrStorageProfileAliasTargetUnknown = errors.New("cms config: storage profile alias target is unknown")
var ErrStorageProfileConfigDSNRequired = errors.New("cms config: storage profile config DSN is required")
var ErrStorageProfileConfigDriverRequired = errors.New("cms config: storage profile config driver is required")
var ErrStorageProfileConfigNameRequired = errors.New("cms config: storage profile config name is required")
var ErrStorageProfileDuplicateName = errors.New("cms config: storage profile name must be unique")
var ErrStorageProfileFallbackEmpty = errors.New("cms config: storage profile fallback cannot be empty")
var ErrStorageProfileFallbackSelf = errors.New("cms config: storage profile fallback cannot reference the same profile")
var ErrStorageProfileFallbackUnknown = errors.New("cms config: storage profile fallback references unknown profile")
var ErrStorageProfileMultipleDefaults = errors.New("cms config: storage profile default must be unique")
var ErrStorageProfileNameInvalid = errors.New("cms config: storage profile name is invalid")
var ErrStorageProfileNameRequired = errors.New("cms config: storage profile name is required")
var ErrStorageProfileProviderRequired = errors.New("cms config: storage profile provider is required")
var ErrThemesFeatureRequired = errors.New("cms config: themes feature must be enabled to configure themes")
ErrThemesFeatureRequired indicates inconsistent theme configuration.
var ErrVersionRetentionLimitInvalid = errors.New("cms config: version retention limit must be zero or positive")
var ErrWorkflowProviderConfiguredWhenDisabled = errors.New("cms config: workflow provider configured while workflow disabled")
var ErrWorkflowProviderUnknown = errors.New("cms config: workflow provider is invalid")
Functions ¶
This section is empty.
Types ¶
type CacheConfig ¶
CacheConfig captures cache behaviour toggles.
type CommandsConfig ¶
type CommandsConfig struct {
Enabled bool
AutoRegisterDispatcher bool
AutoRegisterCron bool
CleanupAuditCron string
}
CommandsConfig captures optional command-layer behaviour.
type Config ¶
type Config struct {
Enabled bool
DefaultLocale string
Content ContentConfig
I18N I18NConfig
Storage StorageConfig
Cache CacheConfig
Themes ThemeConfig
Widgets WidgetConfig
Retention RetentionConfig
Features Features
Shortcodes ShortcodeConfig
Commands CommandsConfig
Markdown MarkdownConfig
Generator GeneratorConfig
Logging LoggingConfig
Workflow WorkflowConfig
}
Config aggregates feature flags and adapter bindings for the CMS module. Fields intentionally use simple types so host applications can extend them later.
func DefaultConfig ¶
func DefaultConfig() Config
DefaultConfig returns opinionated defaults matching Phase 1 expectations.
type ContentConfig ¶
type ContentConfig struct {
PageHierarchy bool
}
ContentConfig captures configuration for the core content module.
type Features ¶
type Features struct {
Widgets bool
Themes bool
Versioning bool
Scheduling bool
MediaLibrary bool
AdvancedCache bool
Markdown bool
Logger bool
Shortcodes bool
}
Features toggles module functionality.
type GeneratorConfig ¶
type GeneratorConfig struct {
Enabled bool
OutputDir string
BaseURL string
CleanBuild bool
Incremental bool
CopyAssets bool
GenerateSitemap bool
GenerateRobots bool
GenerateFeeds bool
Workers int
Menus map[string]string
RenderTimeout time.Duration
AssetCopyTimeout time.Duration
}
GeneratorConfig captures behaviour for the static site generator.
type I18NConfig ¶
type I18NConfig struct {
Enabled bool
Locales []string
RequireTranslations bool
DefaultLocaleRequired bool
}
I18NConfig wires go-i18n options through the CMS wrapper.
type LoggingConfig ¶
type LoggingConfig struct {
Provider string
Level string
Format string
AddSource bool
Focus []string
}
LoggingConfig captures provider-specific options for runtime logging.
type MarkdownConfig ¶
type MarkdownConfig struct {
Enabled bool
ContentDir string
Pattern string
Recursive bool
LocalePatterns map[string]string
DefaultLocale string
Locales []string
Parser MarkdownParserConfig
ProcessShortcodes bool
}
MarkdownConfig captures filesystem and parser behaviour for Markdown ingestion.
type MarkdownParserConfig ¶
MarkdownParserConfig mirrors interfaces.ParseOptions for runtime configuration.
type NavigationConfig ¶
type NavigationConfig struct {
}
NavigationConfig captures routing configuration for menu URL resolution.
type RetentionConfig ¶
RetentionConfig captures per-module version retention limits.
type ShortcodeCacheConfig ¶ added in v0.2.0
type ShortcodeCacheConfig struct {
Enabled bool
Provider string
DefaultTTL time.Duration
PerShortcode map[string]time.Duration
}
ShortcodeCacheConfig configures caching hints for shortcode output.
type ShortcodeConfig ¶ added in v0.2.0
type ShortcodeConfig struct {
Enabled bool
EnableWordPressSyntax bool
BuiltIns []string
CustomDefinitions []ShortcodeDefinitionConfig
Security ShortcodeSecurityConfig
Cache ShortcodeCacheConfig
}
ShortcodeConfig captures runtime toggles for shortcode processing.
type ShortcodeDefinitionConfig ¶ added in v0.2.0
ShortcodeDefinitionConfig allows hosts to register additional shortcode templates via configuration.
type ShortcodeSecurityConfig ¶ added in v0.2.0
type ShortcodeSecurityConfig struct {
AllowedDomains []string
MaxNestingDepth int
MaxExecutionTime time.Duration
SanitizeOutput bool
CSPEnabled bool
RateLimitPerMinute int
}
ShortcodeSecurityConfig wires sanitisation and execution-guard controls.
type StorageConfig ¶
StorageConfig lists identifiers for storage-related dependencies.
func (StorageConfig) ValidateProfiles ¶ added in v0.2.0
func (cfg StorageConfig) ValidateProfiles() error
ValidateProfiles ensures storage profiles and their aliases are well-formed.
type ThemeConfig ¶
ThemeConfig captures configuration for the themes module.
type URLKitResolverConfig ¶
type URLKitResolverConfig struct {
DefaultGroup string
LocaleGroups map[string]string
DefaultRoute string
SlugParam string
LocaleParam string
LocaleIDParam string
RouteField string
ParamsField string
QueryField string
}
URLKitResolverConfig configures the go-urlkit based resolver.
type WidgetConfig ¶
type WidgetConfig struct {
Definitions []WidgetDefinitionConfig
}
WidgetConfig controls registry bootstrapping.
type WidgetDefinitionConfig ¶
type WidgetDefinitionConfig struct {
Name string
Description string
Schema map[string]any
Defaults map[string]any
Category string
Icon string
}
WidgetDefinitionConfig mirrors the minimal RegisterDefinitionInput requirements.
type WorkflowConfig ¶ added in v0.2.0
type WorkflowConfig struct {
Enabled bool
Provider string
Definitions []WorkflowDefinitionConfig
}
WorkflowConfig captures workflow engine configuration.
type WorkflowDefinitionConfig ¶ added in v0.2.0
type WorkflowDefinitionConfig struct {
Entity string
Description string
States []WorkflowStateConfig
Transitions []WorkflowTransitionConfig
}
WorkflowDefinitionConfig documents a workflow definition sourced from configuration.
type WorkflowStateConfig ¶ added in v0.2.0
WorkflowStateConfig describes a workflow state.