Documentation
¶
Index ¶
- Variables
- func CanonicalMenuCode(code string) string
- func CanonicalMenuItemPath(menuCode, raw string) (string, error)
- func GetMigrationsFS() embed.FS
- func NormalizeTranslationFields(label, labelKey, groupTitle, groupTitleKey string) (string, string, string, string)
- func SanitizeMenuItemSegment(seg string) string
- func SeedMenu(ctx context.Context, opts SeedMenuOptions) error
- func SeedPositionPtrForType(itemType string, pos int) *int
- func ShouldAutoCreateParentsSeed(items []SeedMenuItem) bool
- type ActivityConfig
- type AdminPageGetOptions
- type AdminPageIncludeDefaults
- type AdminPageIncludeOptions
- type AdminPageListOptions
- type AdminPageReadService
- type AdminPageRecord
- type BlockAdminService
- type BlockService
- type CacheConfig
- type Config
- type ContentConfig
- type ContentMenuMembershipInfo
- type ContentService
- type ContentTranslationCreator
- type ContentTypeService
- type DerivedMenuItemPath
- type EnvironmentConfig
- type EnvironmentsConfig
- type Features
- type GeneratorConfig
- type GeneratorService
- type I18NConfig
- type LocaleInfo
- type LocaleNotFoundError
- type LocaleService
- type LoggingConfig
- type MarkdownConfig
- type MarkdownParserConfig
- type MediaService
- type MenuInfo
- type MenuItemInfo
- type MenuItemPath
- type MenuItemTranslationInput
- type MenuLocationBindingInfo
- type MenuResolveOptions
- type MenuService
- type MenuViewProfileInfo
- type MenusConfig
- type Module
- func (m *Module) AdminPageRead() AdminPageReadService
- func (m *Module) Blocks() BlockService
- func (m *Module) BlocksAdmin() BlockAdminService
- func (m *Module) Container() *di.Container
- func (m *Module) Content() ContentService
- func (m *Module) ContentTranslations() ContentTranslationCreator
- func (m *Module) ContentTypes() ContentTypeService
- func (m *Module) Generator() GeneratorService
- func (m *Module) Locales() LocaleService
- func (m *Module) Markdown() interfaces.MarkdownService
- func (m *Module) Media() MediaService
- func (m *Module) Menus() MenuService
- func (m *Module) Pages() PageService
- func (m *Module) Scheduler() interfaces.Scheduler
- func (m *Module) Shortcodes() interfaces.ShortcodeService
- func (m *Module) StorageAdmin() StorageAdminService
- func (m *Module) Themes() ThemeService
- func (m *Module) TranslationAdmin() TranslationAdminService
- func (m *Module) TranslationsEnabled() bool
- func (m *Module) TranslationsRequired() bool
- func (m *Module) Widgets() WidgetService
- func (m *Module) WorkflowEngine() interfaces.WorkflowEngine
- type NavigationConfig
- type NavigationNode
- type Option
- type PageService
- type ReconcileMenuResult
- type ResolvedMenuInfo
- type ResolvedMenuPreviewInfo
- type RetentionConfig
- type SeedMenuItem
- type SeedMenuOptions
- type ShortcodeCacheConfig
- type ShortcodeConfig
- type ShortcodeDefinitionConfig
- type ShortcodeSecurityConfig
- type StorageAdminService
- type StorageConfig
- type ThemeConfig
- type ThemeService
- type TranslationAdminService
- type URLKitResolverConfig
- type UpdateMenuItemByPathInput
- type UpsertMenuItemByPathInput
- type WidgetConfig
- type WidgetDefinitionConfig
- type WidgetService
- type WorkflowConfig
- type WorkflowDefinitionConfig
- type WorkflowStateConfig
- type WorkflowTransitionConfig
Constants ¶
This section is empty.
Variables ¶
var ( ErrThemesFeatureRequired = runtimeconfig.ErrThemesFeatureRequired ErrSchedulingFeatureRequiresVersioning = runtimeconfig.ErrSchedulingFeatureRequiresVersioning ErrAdvancedCacheRequiresEnabledCache = runtimeconfig.ErrAdvancedCacheRequiresEnabledCache ErrDefaultLocaleRequired = runtimeconfig.ErrDefaultLocaleRequired ErrLoggingProviderRequired = runtimeconfig.ErrLoggingProviderRequired ErrLoggingProviderUnknown = runtimeconfig.ErrLoggingProviderUnknown ErrLoggingLevelInvalid = runtimeconfig.ErrLoggingLevelInvalid ErrLoggingFormatInvalid = runtimeconfig.ErrLoggingFormatInvalid ErrActivityFeatureRequired = runtimeconfig.ErrActivityFeatureRequired ErrWorkflowProviderUnknown = runtimeconfig.ErrWorkflowProviderUnknown ErrWorkflowProviderConfiguredWhenDisabled = runtimeconfig.ErrWorkflowProviderConfiguredWhenDisabled ErrEnvironmentsFeatureRequired = runtimeconfig.ErrEnvironmentsFeatureRequired ErrEnvironmentKeyRequired = runtimeconfig.ErrEnvironmentKeyRequired ErrEnvironmentKeyInvalid = runtimeconfig.ErrEnvironmentKeyInvalid ErrEnvironmentKeyDuplicate = runtimeconfig.ErrEnvironmentKeyDuplicate ErrEnvironmentDefaultRequired = runtimeconfig.ErrEnvironmentDefaultRequired ErrEnvironmentDefaultMultiple = runtimeconfig.ErrEnvironmentDefaultMultiple ErrEnvironmentDefaultUnknown = runtimeconfig.ErrEnvironmentDefaultUnknown ErrEnvironmentPermissionStrategyInvalid = runtimeconfig.ErrEnvironmentPermissionStrategyInvalid )
var ( // ErrLocaleCodeRequired indicates locale lookups require a non-empty locale code. ErrLocaleCodeRequired = errors.New("cms: locale code is required") // ErrUnknownLocale indicates locale lookup failed because the locale code is unknown. ErrUnknownLocale = content.ErrUnknownLocale )
var ( ErrMenuCodeRequired = errors.New("cms: menu code is required") ErrMenuItemPathRequired = errors.New("cms: menu item path is required") ErrMenuItemPathInvalid = errors.New("cms: menu item path is invalid") ErrMenuItemPathMismatch = errors.New("cms: menu item path does not match menu code") )
var ( ErrMenuNotFound = menus.ErrMenuNotFound ErrMenuInUse = menus.ErrMenuInUse )
Public menu errors.
var ErrSeedMenuServiceRequired = errors.New("cms: menu service is required")
Functions ¶
func CanonicalMenuCode ¶ added in v0.15.0
CanonicalMenuCode normalizes user input into a go-cms menu code.
Canonicalization rules are documented in MENU_CANONICALIZATION.md.
func CanonicalMenuItemPath ¶ added in v0.15.0
CanonicalMenuItemPath canonicalizes raw inputs (dot-path, slash-path, relative path) into a canonical dot-path for the provided menu code.
Output is guaranteed to belong to menuCode and pass ParseMenuItemPathForMenu invariants, or an error is returned.
func GetMigrationsFS ¶ added in v0.2.0
GetMigrationsFS returns the embedded migration files for this package
func NormalizeTranslationFields ¶ added in v0.15.0
func NormalizeTranslationFields(label, labelKey, groupTitle, groupTitleKey string) (string, string, string, string)
NormalizeTranslationFields implements common "fallback to key" behavior for label fields.
func SanitizeMenuItemSegment ¶ added in v0.15.0
SanitizeMenuItemSegment converts an arbitrary string into a safe segment used in dot-paths.
It returns an empty string when the input cannot be sanitized into a non-empty segment. Canonicalization rules are documented in MENU_CANONICALIZATION.md.
func SeedPositionPtrForType ¶ added in v0.15.0
SeedPositionPtrForType normalizes seed "optional position" semantics (nil vs 0).
Canonicalization rules are documented in MENU_CANONICALIZATION.md.
func ShouldAutoCreateParentsSeed ¶ added in v0.15.0
func ShouldAutoCreateParentsSeed(items []SeedMenuItem) bool
ShouldAutoCreateParentsSeed returns true when the provided seed spec suggests that intermediate parents are missing and should be auto-scaffolded.
Types ¶
type ActivityConfig ¶ added in v0.5.0
type ActivityConfig = runtimeconfig.ActivityConfig
type AdminPageGetOptions ¶ added in v0.26.0
type AdminPageGetOptions = interfaces.AdminPageGetOptions
AdminPageGetOptions exports the admin page get options.
type AdminPageIncludeDefaults ¶ added in v0.26.0
type AdminPageIncludeDefaults = interfaces.AdminPageIncludeDefaults
AdminPageIncludeDefaults exports admin include defaults.
type AdminPageIncludeOptions ¶ added in v0.26.0
type AdminPageIncludeOptions = interfaces.AdminPageIncludeOptions
AdminPageIncludeOptions exports admin include options.
type AdminPageListOptions ¶ added in v0.26.0
type AdminPageListOptions = interfaces.AdminPageListOptions
AdminPageListOptions exports the admin page list options.
type AdminPageReadService ¶ added in v0.26.0
type AdminPageReadService = interfaces.AdminPageReadService
AdminPageReadService exports the admin page read service contract.
type AdminPageRecord ¶ added in v0.26.0
type AdminPageRecord = interfaces.AdminPageRecord
AdminPageRecord exports the admin page read record DTO.
type BlockAdminService ¶ added in v0.21.0
type BlockAdminService = *adminblocks.Service
BlockAdminService exports the embedded blocks admin helper contract.
type BlockService ¶
BlockService exports the blocks service contract.
type CacheConfig ¶
type CacheConfig = runtimeconfig.CacheConfig
type ContentConfig ¶
type ContentConfig = runtimeconfig.ContentConfig
type ContentMenuMembershipInfo ¶ added in v0.38.0
type ContentMenuMembershipInfo struct {
ContentID uuid.UUID `json:"content_id"`
ContentTypeID uuid.UUID `json:"content_type_id"`
ContentTypeSlug string `json:"content_type_slug,omitempty"`
ContentSlug string `json:"content_slug,omitempty"`
Location string `json:"location"`
Visible bool `json:"visible"`
Origin string `json:"origin,omitempty"`
VisibilityState string `json:"visibility_state,omitempty"`
MergeMode string `json:"merge_mode,omitempty"`
DuplicatePolicy string `json:"duplicate_policy,omitempty"`
URL string `json:"url,omitempty"`
Label string `json:"label,omitempty"`
SortOrder *int `json:"sort_order,omitempty"`
}
type ContentService ¶
ContentService exports the content service contract for consumers of the cms package.
type ContentTranslationCreator ¶ added in v0.36.0
type ContentTranslationCreator = content.TranslationCreator
ContentTranslationCreator exports the additive translation-create capability.
type ContentTypeService ¶ added in v0.33.0
type ContentTypeService = content.ContentTypeService
ContentTypeService exports the content-type service contract.
type DerivedMenuItemPath ¶ added in v0.15.0
func DeriveMenuItemPaths ¶ added in v0.15.0
func DeriveMenuItemPaths(menuCode string, id string, parent string, fallbackLabel string) (DerivedMenuItemPath, error)
DeriveMenuItemPaths canonicalizes and derives Path/ParentPath consistently from common user inputs.
Canonicalization and derivation rules are documented in MENU_CANONICALIZATION.md.
type EnvironmentConfig ¶ added in v0.23.1
type EnvironmentConfig = runtimeconfig.EnvironmentConfig
type EnvironmentsConfig ¶ added in v0.23.1
type EnvironmentsConfig = runtimeconfig.EnvironmentsConfig
type Features ¶
type Features = runtimeconfig.Features
type GeneratorConfig ¶
type GeneratorConfig = runtimeconfig.GeneratorConfig
type GeneratorService ¶
GeneratorService exports the static site generator contract.
type I18NConfig ¶
type I18NConfig = runtimeconfig.I18NConfig
type LocaleInfo ¶ added in v0.34.0
type LocaleInfo struct {
ID uuid.UUID
Code string
Display string
NativeName *string
IsActive bool
IsDefault bool
Metadata map[string]any
}
LocaleInfo is the stable public locale view exposed by cms.
type LocaleNotFoundError ¶ added in v0.34.0
type LocaleNotFoundError struct {
Code string
}
LocaleNotFoundError describes unknown locale-code lookups and unwraps to ErrUnknownLocale.
func (*LocaleNotFoundError) Error ¶ added in v0.34.0
func (e *LocaleNotFoundError) Error() string
func (*LocaleNotFoundError) Unwrap ¶ added in v0.34.0
func (e *LocaleNotFoundError) Unwrap() error
type LocaleService ¶ added in v0.34.0
type LocaleService interface {
ResolveByCode(ctx context.Context, code string) (LocaleInfo, error)
}
LocaleService resolves locale records through the public cms contract.
type LoggingConfig ¶
type LoggingConfig = runtimeconfig.LoggingConfig
type MarkdownConfig ¶
type MarkdownConfig = runtimeconfig.MarkdownConfig
type MarkdownParserConfig ¶
type MarkdownParserConfig = runtimeconfig.MarkdownParserConfig
type MediaService ¶
MediaService exports the media helper contract.
type MenuInfo ¶ added in v0.9.0
type MenuInfo struct {
Code string `json:"code"`
Location string `json:"location,omitempty"`
Description *string `json:"description,omitempty"`
Status string `json:"status"`
Locale *string `json:"locale,omitempty"`
TranslationGroupID *uuid.UUID `json:"translation_group_id,omitempty"`
PublishedAt *time.Time `json:"published_at,omitempty"`
}
MenuInfo is a stable public view of a menu record.
type MenuItemInfo ¶ added in v0.12.0
type MenuItemInfo struct {
Path string `json:"path"`
Type string `json:"type,omitempty"`
Position int `json:"position,omitempty"`
Target map[string]any `json:"target,omitempty"`
Icon string `json:"icon,omitempty"`
Badge map[string]any `json:"badge,omitempty"`
Permissions []string `json:"permissions,omitempty"`
Classes []string `json:"classes,omitempty"`
Styles map[string]string `json:"styles,omitempty"`
Collapsible bool `json:"collapsible,omitempty"`
Collapsed bool `json:"collapsed,omitempty"`
Metadata map[string]any `json:"metadata,omitempty"`
}
MenuItemInfo is a stable public view of a menu item record. Identity is always expressed via Path (external_code), never via UUID.
type MenuItemPath ¶ added in v0.12.0
MenuItemPath captures parsed information about a dot-path menu item identifier.
Canonicalization contract
- Menu codes and path segments are treated as lowercase.
- Callers may supply dot-paths, slash-paths, or relative paths; go-cms will canonicalize inputs into a stable dot-path (`<menuCode>.<seg>...`) and validate against `isPathSegment`.
- Canonicalization rules are documented in `MENU_CANONICALIZATION.md`.
Example: - Path: "admin.content.pages" - MenuCode: "admin" - ParentPath:"admin.content" - Key: "pages"
func ParseMenuItemPath ¶ added in v0.12.0
func ParseMenuItemPath(path string) (MenuItemPath, error)
ParseMenuItemPath parses a dot-separated menu item path and derives menu code and parent path.
Invariants: - Path must include the menu code prefix and at least one item segment (min 2 segments). - No leading/trailing dots and no empty segments.
func ParseMenuItemPathForMenu ¶ added in v0.12.0
func ParseMenuItemPathForMenu(menuCode string, path string) (MenuItemPath, error)
ParseMenuItemPathForMenu validates that the provided path belongs to the given menu code.
type MenuItemTranslationInput ¶ added in v0.12.0
type MenuItemTranslationInput struct {
Locale string `json:"locale"`
Label string `json:"label,omitempty"`
LabelKey string `json:"label_key,omitempty"`
GroupTitle string `json:"group_title,omitempty"`
GroupTitleKey string `json:"group_title_key,omitempty"`
URLOverride *string `json:"url_override,omitempty"`
}
type MenuLocationBindingInfo ¶ added in v0.38.0
type MenuResolveOptions ¶ added in v0.38.0
type MenuResolveOptions struct {
IncludeDrafts bool `json:"include_drafts,omitempty"`
PreviewToken string `json:"preview_token,omitempty"`
Status string `json:"status,omitempty"`
ViewProfile string `json:"view_profile,omitempty"`
BindingPolicy string `json:"binding_policy,omitempty"`
IncludeContributions *bool `json:"include_contributions,omitempty"`
ContributionMergeMode string `json:"contribution_merge_mode,omitempty"`
ContributionDuplicatePolicy string `json:"contribution_duplicate_policy,omitempty"`
}
type MenuService ¶
type MenuService interface {
GetOrCreateMenu(ctx context.Context, code string, description *string, actor uuid.UUID) (*MenuInfo, error)
GetOrCreateMenuWithLocation(ctx context.Context, code string, location string, description *string, actor uuid.UUID) (*MenuInfo, error)
UpsertMenu(ctx context.Context, code string, description *string, actor uuid.UUID) (*MenuInfo, error)
UpsertMenuWithLocation(ctx context.Context, code string, location string, description *string, actor uuid.UUID) (*MenuInfo, error)
GetMenuByCode(ctx context.Context, code string) (*MenuInfo, error)
GetMenuByLocation(ctx context.Context, location string) (*MenuInfo, error)
ResolveMenuByCode(ctx context.Context, code string, locale string, opts MenuResolveOptions) (*ResolvedMenuInfo, error)
ResolveMenuByLocation(ctx context.Context, location string, locale string, opts MenuResolveOptions) (*ResolvedMenuInfo, error)
ListMenuItemsByCode(ctx context.Context, menuCode string) ([]*MenuItemInfo, error)
ReconcileMenuByCode(ctx context.Context, menuCode string, actor uuid.UUID) (*ReconcileMenuResult, error)
ResetMenuByCode(ctx context.Context, code string, actor uuid.UUID, force bool) error
UpsertMenuItemByPath(ctx context.Context, input UpsertMenuItemByPathInput) (*MenuItemInfo, error)
UpdateMenuItemByPath(ctx context.Context, menuCode string, path string, input UpdateMenuItemByPathInput) (*MenuItemInfo, error)
DeleteMenuItemByPath(ctx context.Context, menuCode string, path string, actor uuid.UUID, cascadeChildren bool) error
UpsertMenuItemTranslationByPath(ctx context.Context, menuCode string, path string, input MenuItemTranslationInput) error
MoveMenuItemToTop(ctx context.Context, menuCode string, path string, actor uuid.UUID) error
MoveMenuItemToBottom(ctx context.Context, menuCode string, path string, actor uuid.UUID) error
MoveMenuItemBefore(ctx context.Context, menuCode string, path string, beforePath string, actor uuid.UUID) error
MoveMenuItemAfter(ctx context.Context, menuCode string, path string, afterPath string, actor uuid.UUID) error
SetMenuSiblingOrder(ctx context.Context, menuCode string, parentPath string, siblingPaths []string, actor uuid.UUID) error
}
MenuService is the public menus API for the cms package.
Identity rules: - Menus are addressed by code (e.g. "admin"). - Menu items are addressed by dot-paths (e.g. "admin.content.pages") and never by UUID.
UUIDs remain a persistence detail and must not be required for callers to use this API.
type MenuViewProfileInfo ¶ added in v0.38.0
type MenuViewProfileInfo struct {
Code string `json:"code"`
Name string `json:"name"`
Mode string `json:"mode"`
MaxTopLevel *int `json:"max_top_level,omitempty"`
MaxDepth *int `json:"max_depth,omitempty"`
IncludeItemIDs []string `json:"include_item_ids,omitempty"`
ExcludeItemIDs []string `json:"exclude_item_ids,omitempty"`
Status string `json:"status"`
}
type MenusConfig ¶ added in v0.13.0
type MenusConfig = runtimeconfig.MenusConfig
type Module ¶
type Module struct {
// contains filtered or unexported fields
}
Module represents the top level CMS runtime façade.
func (*Module) AdminPageRead ¶ added in v0.26.0
func (m *Module) AdminPageRead() AdminPageReadService
AdminPageRead returns the configured admin page read service.
func (*Module) Blocks ¶
func (m *Module) Blocks() BlockService
Blocks returns the configured block service.
func (*Module) BlocksAdmin ¶ added in v0.21.0
func (m *Module) BlocksAdmin() BlockAdminService
BlocksAdmin returns the embedded blocks admin helper service.
func (*Module) Content ¶
func (m *Module) Content() ContentService
Content returns the configured content service.
func (*Module) ContentTranslations ¶ added in v0.36.0
func (m *Module) ContentTranslations() ContentTranslationCreator
ContentTranslations returns the optional translation-create capability for content services.
func (*Module) ContentTypes ¶ added in v0.33.0
func (m *Module) ContentTypes() ContentTypeService
ContentTypes returns the configured content type service.
func (*Module) Generator ¶
func (m *Module) Generator() GeneratorService
Generator returns the configured generator service.
func (*Module) Locales ¶ added in v0.34.0
func (m *Module) Locales() LocaleService
Locales returns the configured locale resolver service.
func (*Module) Markdown ¶
func (m *Module) Markdown() interfaces.MarkdownService
Markdown returns the markdown service when configured.
func (*Module) Media ¶
func (m *Module) Media() MediaService
Media returns the media helper used by the module.
func (*Module) Menus ¶
func (m *Module) Menus() MenuService
Menus returns the configured menu service.
func (*Module) Pages ¶
func (m *Module) Pages() PageService
Pages returns the configured page service.
func (*Module) Scheduler ¶
func (m *Module) Scheduler() interfaces.Scheduler
Scheduler returns the scheduler used for publish automation.
func (*Module) Shortcodes ¶ added in v0.2.0
func (m *Module) Shortcodes() interfaces.ShortcodeService
Shortcodes returns the configured shortcode service.
func (*Module) StorageAdmin ¶ added in v0.2.0
func (m *Module) StorageAdmin() StorageAdminService
StorageAdmin returns the storage admin helper service.
func (*Module) Themes ¶
func (m *Module) Themes() ThemeService
Themes returns the configured theme service.
func (*Module) TranslationAdmin ¶ added in v0.16.0
func (m *Module) TranslationAdmin() TranslationAdminService
TranslationAdmin returns the translations admin helper service.
func (*Module) TranslationsEnabled ¶ added in v0.2.0
TranslationsEnabled reports whether translations are globally enabled.
func (*Module) TranslationsRequired ¶ added in v0.2.0
TranslationsRequired reports whether translations are required when enabled.
func (*Module) Widgets ¶
func (m *Module) Widgets() WidgetService
Widgets returns the configured widget service.
func (*Module) WorkflowEngine ¶ added in v0.2.0
func (m *Module) WorkflowEngine() interfaces.WorkflowEngine
WorkflowEngine returns the configured workflow engine.
type NavigationConfig ¶
type NavigationConfig = runtimeconfig.NavigationConfig
type NavigationNode ¶ added in v0.12.0
type NavigationNode struct {
}
NavigationNode is a localized, presentation-ready navigation node. This type intentionally omits UUIDs; menu identity is expressed via menu codes and item paths.
type Option ¶ added in v0.39.0
Option customises module wiring at construction time.
func WithGeneratorAssetResolver ¶ added in v0.39.0
func WithGeneratorAssetResolver(resolver generator.AssetResolver) Option
WithGeneratorAssetResolver overrides the generator asset resolver.
func WithGeneratorStorage ¶ added in v0.39.0
func WithGeneratorStorage(sp interfaces.StorageProvider) Option
WithGeneratorStorage overrides the storage provider used by the static generator.
func WithTemplate ¶ added in v0.39.0
func WithTemplate(tr interfaces.TemplateRenderer) Option
WithTemplate overrides the default template renderer.
type ReconcileMenuResult ¶ added in v0.12.0
type ResolvedMenuInfo ¶ added in v0.38.0
type ResolvedMenuInfo struct {
Location string `json:"location"`
RequestedLocale string `json:"requested_locale,omitempty"`
ResolvedLocale string `json:"resolved_locale,omitempty"`
Menu *MenuInfo `json:"menu,omitempty"`
Binding *MenuLocationBindingInfo `json:"binding,omitempty"`
Bindings []MenuLocationBindingInfo `json:"bindings,omitempty"`
ViewProfile *MenuViewProfileInfo `json:"view_profile,omitempty"`
Items []NavigationNode `json:"items,omitempty"`
ContentMembership []ContentMenuMembershipInfo `json:"content_membership,omitempty"`
Preview ResolvedMenuPreviewInfo `json:"preview"`
TranslationGroupID *uuid.UUID `json:"translation_group_id,omitempty"`
}
type ResolvedMenuPreviewInfo ¶ added in v0.38.0
type ResolvedMenuPreviewInfo struct {
IncludeDrafts bool `json:"include_drafts"`
PreviewTokenPresent bool `json:"preview_token_present"`
MenuStatus string `json:"menu_status,omitempty"`
BindingStatus string `json:"binding_status,omitempty"`
ViewProfileStatus string `json:"view_profile_status,omitempty"`
}
type RetentionConfig ¶
type RetentionConfig = runtimeconfig.RetentionConfig
type SeedMenuItem ¶ added in v0.12.0
type SeedMenuItem struct {
Path string
Position *int
Type string
Target map[string]any
Icon string
Badge map[string]any
Permissions []string
Classes []string
Styles map[string]string
Collapsible bool
Collapsed bool
Metadata map[string]any
Translations []MenuItemTranslationInput
AllowMissingTranslations bool
}
type SeedMenuOptions ¶ added in v0.12.0
type SeedMenuOptions struct {
Menus MenuService
MenuCode string
Description *string
Locale string
Actor uuid.UUID
Items []SeedMenuItem
AutoCreateParents bool
// Ensure makes SeedMenu converge persisted menu items onto the provided spec.
// It performs reconciliation and enforces deterministic sibling ordering from the spec.
Ensure bool
// PruneUnspecified deletes menu items (by path) that exist in persistence but are not present in the spec.
// Deletions are performed by path and cascade through any descendant items.
PruneUnspecified bool
}
type ShortcodeCacheConfig ¶ added in v0.2.0
type ShortcodeCacheConfig = runtimeconfig.ShortcodeCacheConfig
type ShortcodeConfig ¶ added in v0.2.0
type ShortcodeConfig = runtimeconfig.ShortcodeConfig
type ShortcodeDefinitionConfig ¶ added in v0.2.0
type ShortcodeDefinitionConfig = runtimeconfig.ShortcodeDefinitionConfig
type ShortcodeSecurityConfig ¶ added in v0.2.0
type ShortcodeSecurityConfig = runtimeconfig.ShortcodeSecurityConfig
type StorageAdminService ¶ added in v0.2.0
type StorageAdminService = *adminstorage.Service
StorageAdminService exports the storage admin helper contract.
type StorageConfig ¶
type StorageConfig = runtimeconfig.StorageConfig
type ThemeConfig ¶
type ThemeConfig = runtimeconfig.ThemeConfig
type ThemeService ¶
ThemeService exports the themes service contract.
type TranslationAdminService ¶ added in v0.16.0
type TranslationAdminService = *admintranslations.Service
TranslationAdminService exports the translation settings admin helper contract.
type URLKitResolverConfig ¶
type URLKitResolverConfig = runtimeconfig.URLKitResolverConfig
type UpdateMenuItemByPathInput ¶ added in v0.12.0
type UpdateMenuItemByPathInput struct {
ParentPath *string
Type *string
Target map[string]any
Icon *string
Badge map[string]any
Permissions []string
Classes []string
Styles map[string]string
Collapsible *bool
Collapsed *bool
Metadata map[string]any
// Position is a 0-based insertion index among siblings.
// Values past the end are clamped to append. Nil leaves the current position unchanged.
Position *int
Actor uuid.UUID
}
type UpsertMenuItemByPathInput ¶ added in v0.12.0
type UpsertMenuItemByPathInput struct {
Path string
ParentPath string
// Position is a 0-based insertion index among siblings.
// Values past the end are clamped to append. Nil defaults to append for new items.
Position *int
Type string
Target map[string]any
Icon string
Badge map[string]any
Permissions []string
Classes []string
Styles map[string]string
Collapsible bool
Collapsed bool
Metadata map[string]any
Translations []MenuItemTranslationInput
AllowMissingTranslations bool
Actor uuid.UUID
}
type WidgetConfig ¶
type WidgetConfig = runtimeconfig.WidgetConfig
type WidgetDefinitionConfig ¶
type WidgetDefinitionConfig = runtimeconfig.WidgetDefinitionConfig
type WidgetService ¶
WidgetService exports the widgets service contract.
type WorkflowConfig ¶ added in v0.2.0
type WorkflowConfig = runtimeconfig.WorkflowConfig
type WorkflowDefinitionConfig ¶ added in v0.2.0
type WorkflowDefinitionConfig = runtimeconfig.WorkflowDefinitionConfig
type WorkflowStateConfig ¶ added in v0.2.0
type WorkflowStateConfig = runtimeconfig.WorkflowStateConfig
type WorkflowTransitionConfig ¶ added in v0.2.0
type WorkflowTransitionConfig = runtimeconfig.WorkflowTransitionConfig
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
example
command
|
|
|
markdown/import
command
|
|
|
markdown/preview
command
|
|
|
markdown/sync
command
|
|
|
examples
|
|
|
static
command
|
|
|
internal
|
|
|
http
Package http provides optional HTTP adapters for CMS admin APIs.
|
Package http provides optional HTTP adapters for CMS admin APIs. |
|
markdown
Package markdown provides the concrete implementation of the Markdown ingestion workflows outlined in docs/FEAT_MARKDOWN.md.
|
Package markdown provides the concrete implementation of the Markdown ingestion workflows outlined in docs/FEAT_MARKDOWN.md. |
|
pkg
|
|
|
generator
Package generator exposes the static site generation API for go-cms hosts.
|
Package generator exposes the static site generation API for go-cms hosts. |