Documentation
¶
Overview ¶
Package cmsstore contains the implementation of the CMS store functionality.
Package cmsstore defines the interface for querying menu items.
Package cmsstore provides the core functionality for the CMS store.
Package cmsstore provides functionality to create and manage a CMS store, handling various components like blocks, menus, pages, templates, and translations.
Index ¶
- Constants
- func GenerateShortID() string
- func IsShortID(id string) bool
- func Middleware() *middleware
- func NewBlockFromExistingData(data map[string]string) *block
- func NewMenuFromExistingData(data map[string]string) *menuImplementation
- func NewMenuItemFromExistingData(data map[string]string) *menuItemImplementation
- func NewPageFromExistingData(data map[string]string) *pageImplementation
- func NewSiteFromExistingData(data map[string]string) *siteImplementation
- func NormalizeID(id string) string
- func ShortenID(id string) string
- func UnshortenID(id string) string
- type BlockInterface
- type BlockQueryInterface
- type MenuInterface
- type MenuItemInterface
- type MenuItemQueryInterface
- type MenuQueryInterface
- type MiddlewareInterface
- type NewStoreOptions
- type Option
- type Options
- type PageInterface
- type PageQueryInterface
- type ShortcodeInterface
- type SiteInterface
- type SiteQueryInterface
- type StoreInterface
- type TemplateInterface
- type TemplateQueryInterface
- type TranslationInterface
- type TranslationQueryInterface
- type VersioningInterface
- type VersioningQueryInterface
Constants ¶
const ( BLOCK_STATUS_DRAFT = "draft" BLOCK_STATUS_ACTIVE = "active" BLOCK_STATUS_INACTIVE = "inactive" )
Block Statuses
const ( ERROR_EMPTY_ARRAY = "array cannot be empty" ERROR_EMPTY_STRING = "string cannot be empty" ERROR_NEGATIVE_NUMBER = "number cannot be negative" )
Error Messages for Validation
const ( COLUMN_ALIAS = "alias" COLUMN_CANONICAL_URL = "canonical_url" COLUMN_CONTENT = "content" COLUMN_CREATED_AT = "created_at" COLUMN_DOMAIN_NAMES = "domain_names" COLUMN_EDITOR = "editor" COLUMN_ID = "id" COLUMN_HANDLE = "handle" COLUMN_MEMO = "memo" COLUMN_MENU_ID = "menu_id" COLUMN_META_DESCRIPTION = "meta_description" COLUMN_META_KEYWORDS = "meta_keywords" COLUMN_META_ROBOTS = "meta_robots" COLUMN_METAS = "metas" COLUMN_NAME = "name" COLUMN_MIDDLEWARES_BEFORE = "middlewares_before" COLUMN_MIDDLEWARES_AFTER = "middlewares_after" COLUMN_PAGE_ID = "page_id" COLUMN_PARENT_ID = "parent_id" COLUMN_SEQUENCE = "sequence" COLUMN_SITE_ID = "site_id" COLUMN_SOFT_DELETED_AT = "soft_deleted_at" COLUMN_STATUS = "status" COLUMN_TARGET = "target" COLUMN_TYPE = "type" COLUMN_TEMPLATE_ID = "template_id" COLUMN_TITLE = "title" COLUMN_UPDATED_AT = "updated_at" COLUMN_URL = "url" )
Column Names for Database Queries
const ( MENU_STATUS_DRAFT = "draft" MENU_STATUS_ACTIVE = "active" MENU_STATUS_INACTIVE = "inactive" )
Menu Statuses
const ( MENU_ITEM_STATUS_DRAFT = "draft" MENU_ITEM_STATUS_ACTIVE = "active" MENU_ITEM_STATUS_INACTIVE = "inactive" )
Menu Item Statuses
const ( MIDDLEWARE_TYPE_BEFORE = "before" MIDDLEWARE_TYPE_AFTER = "after" )
Middleware Types
const ( PAGE_STATUS_DRAFT = "draft" PAGE_STATUS_ACTIVE = "active" PAGE_STATUS_INACTIVE = "inactive" )
Page Statuses
const ( PAGE_EDITOR_BLOCKAREA = "blockarea" PAGE_EDITOR_BLOCKEDITOR = "blockeditor" PAGE_EDITOR_CODEMIRROR = "codemirror" PAGE_EDITOR_HTMLAREA = "htmlarea" PAGE_EDITOR_MARKDOWN = "markdown" PAGE_EDITOR_TEXTAREA = "textarea" )
Page Editor Types
const ( SITE_STATUS_DRAFT = "draft" SITE_STATUS_ACTIVE = "active" SITE_STATUS_INACTIVE = "inactive" )
Site Statuses
const ( TEMPLATE_STATUS_DRAFT = "draft" TEMPLATE_STATUS_ACTIVE = "active" TEMPLATE_STATUS_INACTIVE = "inactive" )
Template Statuses
const ( TRANSLATION_STATUS_DRAFT = "draft" TRANSLATION_STATUS_ACTIVE = "active" TRANSLATION_STATUS_INACTIVE = "inactive" )
Translation Statuses
const ( VERSIONING_TYPE_BLOCK = "block" VERSIONING_TYPE_PAGE = "page" VERSIONING_TYPE_MENU = "menu" VERSIONING_TYPE_MENU_ITEM = "menu_item" VERSIONING_TYPE_TEMPLATE = "template" VERSIONING_TYPE_TRANSLATION = "translation" VERSIONING_TYPE_SITE = "site" )
Versioning Types
Variables ¶
This section is empty.
Functions ¶
func GenerateShortID ¶ added in v1.7.0
func GenerateShortID() string
GenerateShortID generates a new shortened ID using TimestampMicro + Crockford Base32 (lowercase) Returns a 9-character lowercase ID (e.g., "86ccrtsgx")
func IsShortID ¶ added in v1.7.0
IsShortID checks if an ID appears to be a shortened ID (9 or 21 chars) vs a long HumanUid ID (32 chars)
func NewMenuFromExistingData ¶
NewMenuFromExistingData creates a new menu instance from existing data. It hydrates the menu with the provided data map.
func NewPageFromExistingData ¶
NewPageFromExistingData creates a new page from existing data.
func NewSiteFromExistingData ¶
NewSiteFromExistingData creates a new site from existing data.
func NormalizeID ¶ added in v1.7.0
NormalizeID normalizes an ID to lowercase for consistent lookups Handles both short (9-char, 21-char) and long (32-char) ID formats
func ShortenID ¶ added in v1.7.0
ShortenID shortens a long ID to its shortened form - 9-char IDs: Return as-is (already shortened TimestampMicro) - 32-char IDs: Shorten to 21-char using Crockford - Other lengths: Return as-is
func UnshortenID ¶ added in v1.7.0
UnshortenID attempts to unshorten a shortened ID back to its original form Returns the original ID if it cannot be unshortened
Types ¶
type BlockInterface ¶
type BlockInterface interface {
Data() map[string]string
DataChanged() map[string]string
MarkAsNotDirty()
ID() string
SetID(id string) BlockInterface
CreatedAt() string
SetCreatedAt(createdAt string) BlockInterface
CreatedAtCarbon() *carbon.Carbon
Content() string
SetContent(content string) BlockInterface
Editor() string
SetEditor(editor string) BlockInterface
Handle() string
SetHandle(handle string) BlockInterface
Memo() string
SetMemo(memo string) BlockInterface
Meta(key string) string
SetMeta(key, value string) error
Metas() (map[string]string, error)
SetMetas(metas map[string]string) error
UpsertMetas(metas map[string]string) error
Name() string
SetName(name string) BlockInterface
PageID() string
SetPageID(pageID string) BlockInterface
ParentID() string
SetParentID(parentID string) BlockInterface
Sequence() string
SequenceInt() int
SetSequenceInt(sequence int) BlockInterface
SetSequence(sequence string) BlockInterface
SiteID() string
SetSiteID(siteID string) BlockInterface
TemplateID() string
SetTemplateID(templateID string) BlockInterface
SoftDeletedAt() string
SetSoftDeletedAt(softDeletedAt string) BlockInterface
SoftDeletedAtCarbon() *carbon.Carbon
// Status returns the status of the block, i.e. BLOCK_STATUS_ACTIVE
Status() string
// SetStatus sets the status of the block, i.e. BLOCK_STATUS_ACTIVE
SetStatus(status string) BlockInterface
// Type returns the type of the block, i.e. "text"
Type() string
// SetType sets the type of the block, i.e. "text"
SetType(blockType string) BlockInterface
// UpdatedAt returns the last updated time of block
UpdatedAt() string
// SetUpdatedAt sets the last updated time of block
SetUpdatedAt(updatedAt string) BlockInterface
// UpdatedAtCarbon returns carbon.Carbon of the last updated time of block
UpdatedAtCarbon() *carbon.Carbon
IsActive() bool
IsInactive() bool
IsSoftDeleted() bool
}
func NewBlock ¶
func NewBlock() BlockInterface
type BlockQueryInterface ¶
type BlockQueryInterface interface {
Validate() error
IsCountOnly() bool
Columns() []string
SetColumns(columns []string) BlockQueryInterface
HasCreatedAtGte() bool
HasCreatedAtLte() bool
HasHandle() bool
HasID() bool
HasIDIn() bool
HasLimit() bool
HasNameLike() bool
HasOffset() bool
HasOrderBy() bool
HasPageID() bool
HasParentID() bool
HasSequence() bool
HasSiteID() bool
HasSoftDeleted() bool
HasSortOrder() bool
HasStatus() bool
HasStatusIn() bool
HasTemplateID() bool
CreatedAtGte() string
CreatedAtLte() string
Handle() string
ID() string
IDIn() []string
Limit() int
NameLike() string
Offset() int
OrderBy() string
PageID() string
ParentID() string
Sequence() int
SiteID() string
SoftDeleteIncluded() bool
SortOrder() string
Status() string
StatusIn() []string
TemplateID() string
SetCountOnly(countOnly bool) BlockQueryInterface
SetID(id string) BlockQueryInterface
SetIDIn(idIn []string) BlockQueryInterface
SetHandle(handle string) BlockQueryInterface
SetLimit(limit int) BlockQueryInterface
SetNameLike(nameLike string) BlockQueryInterface
SetOffset(offset int) BlockQueryInterface
SetOrderBy(orderBy string) BlockQueryInterface
SetPageID(pageID string) BlockQueryInterface
SetParentID(parentID string) BlockQueryInterface
SetSequence(sequence int) BlockQueryInterface
SetSiteID(websiteID string) BlockQueryInterface
SetSoftDeleteIncluded(withSoftDeleted bool) BlockQueryInterface
SetSortOrder(sortOrder string) BlockQueryInterface
SetStatus(status string) BlockQueryInterface
SetStatusIn(statusIn []string) BlockQueryInterface
SetTemplateID(templateID string) BlockQueryInterface
}
func BlockQuery ¶
func BlockQuery() BlockQueryInterface
type MenuInterface ¶
type MenuInterface interface {
Data() map[string]string
DataChanged() map[string]string
MarkAsNotDirty()
MarshalToVersioning() (string, error)
CreatedAt() string
SetCreatedAt(createdAt string) MenuInterface
CreatedAtCarbon() *carbon.Carbon
Handle() string
SetHandle(handle string) MenuInterface
ID() string
SetID(id string) MenuInterface
Memo() string
SetMemo(memo string) MenuInterface
Meta(key string) string
SetMeta(key, value string) error
Metas() (map[string]string, error)
SetMetas(metas map[string]string) error
UpsertMetas(metas map[string]string) error
Name() string
SetName(name string) MenuInterface
SiteID() string
SetSiteID(siteID string) MenuInterface
SoftDeletedAt() string
SetSoftDeletedAt(softDeletedAt string) MenuInterface
SoftDeletedAtCarbon() *carbon.Carbon
Status() string
SetStatus(status string) MenuInterface
UpdatedAt() string
SetUpdatedAt(updatedAt string) MenuInterface
UpdatedAtCarbon() *carbon.Carbon
IsActive() bool
IsInactive() bool
IsSoftDeleted() bool
}
func NewMenu ¶
func NewMenu() MenuInterface
NewMenu creates a new menu instance with default values. It initializes the menu with a unique ID, draft status, and current timestamps.
type MenuItemInterface ¶
type MenuItemInterface interface {
Data() map[string]string
DataChanged() map[string]string
MarkAsNotDirty()
MarshalToVersioning() (string, error)
CreatedAt() string
SetCreatedAt(createdAt string) MenuItemInterface
CreatedAtCarbon() *carbon.Carbon
Handle() string
SetHandle(handle string) MenuItemInterface
ID() string
SetID(id string) MenuItemInterface
Memo() string
SetMemo(memo string) MenuItemInterface
MenuID() string
SetMenuID(menuID string) MenuItemInterface
Meta(key string) string
SetMeta(key, value string) error
Metas() (map[string]string, error)
SetMetas(metas map[string]string) error
UpsertMetas(metas map[string]string) error
Name() string
SetName(name string) MenuItemInterface
PageID() string
SetPageID(pageID string) MenuItemInterface
ParentID() string
SetParentID(parentID string) MenuItemInterface
Sequence() string
SequenceInt() int
SetSequence(sequence string) MenuItemInterface
SetSequenceInt(sequence int) MenuItemInterface
SoftDeletedAt() string
SetSoftDeletedAt(softDeletedAt string) MenuItemInterface
SoftDeletedAtCarbon() *carbon.Carbon
Status() string
SetStatus(status string) MenuItemInterface
Target() string
SetTarget(target string) MenuItemInterface
UpdatedAt() string
SetUpdatedAt(updatedAt string) MenuItemInterface
UpdatedAtCarbon() *carbon.Carbon
URL() string
SetURL(url string) MenuItemInterface
IsActive() bool
IsInactive() bool
IsSoftDeleted() bool
}
func NewMenuItem ¶
func NewMenuItem() MenuItemInterface
NewMenuItem creates a new menu item with default values.
type MenuItemQueryInterface ¶
type MenuItemQueryInterface interface {
// Validate validates the query parameters.
Validate() error
// Columns returns the columns to be returned in the query.
Columns() []string
// SetColumns sets the columns to be returned in the query.
SetColumns(columns []string) MenuItemQueryInterface
// HasCountOnly returns true if the query is for counting only.
HasCountOnly() bool
// IsCountOnly returns true if the query is for counting only.
IsCountOnly() bool
// SetCountOnly sets the query to be for counting only.
SetCountOnly(countOnly bool) MenuItemQueryInterface
// HasCreatedAtGte returns true if the query has a CreatedAtGte filter.
HasCreatedAtGte() bool
// CreatedAtGte returns the CreatedAtGte filter.
CreatedAtGte() string
// SetCreatedAtGte sets the CreatedAtGte filter.
SetCreatedAtGte(createdAtGte string) MenuItemQueryInterface
// HasCreatedAtLte returns true if the query has a CreatedAtLte filter.
HasCreatedAtLte() bool
// CreatedAtLte returns the CreatedAtLte filter.
CreatedAtLte() string
// SetCreatedAtLte sets the CreatedAtLte filter.
SetCreatedAtLte(createdAtLte string) MenuItemQueryInterface
// HasID returns true if the query has an ID filter.
HasID() bool
// ID returns the ID filter.
ID() string
// SetID sets the ID filter.
SetID(id string) MenuItemQueryInterface
// HasIDIn returns true if the query has an IDIn filter.
HasIDIn() bool
// IDIn returns the IDIn filter.
IDIn() []string
// SetIDIn sets the IDIn filter.
SetIDIn(idIn []string) MenuItemQueryInterface
// HasMenuID returns true if the query has a MenuID filter.
HasMenuID() bool
// MenuID returns the MenuID filter.
MenuID() string
// SetMenuID sets the MenuID filter.
SetMenuID(menuID string) MenuItemQueryInterface
// HasNameLike returns true if the query has a NameLike filter.
HasNameLike() bool
// NameLike returns the NameLike filter.
NameLike() string
// SetNameLike sets the NameLike filter.
SetNameLike(nameLike string) MenuItemQueryInterface
// HasOffset returns true if the query has an Offset.
HasOffset() bool
// Offset returns the Offset.
Offset() int
// SetOffset sets the Offset.
SetOffset(offset int) MenuItemQueryInterface
// HasLimit returns true if the query has a Limit.
HasLimit() bool
// Limit returns the Limit.
Limit() int
// SetLimit sets the Limit.
SetLimit(limit int) MenuItemQueryInterface
// HasSortOrder returns true if the query has a SortOrder.
HasSortOrder() bool
// SortOrder returns the SortOrder.
SortOrder() string
// SetSortOrder sets the SortOrder.
SetSortOrder(sortOrder string) MenuItemQueryInterface
// HasOrderBy returns true if the query has an OrderBy.
HasOrderBy() bool
// OrderBy returns the OrderBy.
OrderBy() string
// SetOrderBy sets the OrderBy.
SetOrderBy(orderBy string) MenuItemQueryInterface
// HasSiteID returns true if the query has a SiteID filter.
HasSiteID() bool
// SiteID returns the SiteID filter.
SiteID() string
// SetSiteID sets the SiteID filter.
SetSiteID(siteID string) MenuItemQueryInterface
// HasSoftDeletedIncluded returns true if soft deleted items should be included.
HasSoftDeletedIncluded() bool
// SoftDeletedIncluded returns true if soft deleted items should be included.
SoftDeletedIncluded() bool
// SetSoftDeletedIncluded sets whether soft deleted items should be included.
SetSoftDeletedIncluded(includeSoftDeleted bool) MenuItemQueryInterface
// HasStatus returns true if the query has a Status filter.
HasStatus() bool
// Status returns the Status filter.
Status() string
// SetStatus sets the Status filter.
SetStatus(status string) MenuItemQueryInterface
// HasStatusIn returns true if the query has a StatusIn filter.
HasStatusIn() bool
// StatusIn returns the StatusIn filter.
StatusIn() []string
// SetStatusIn sets the StatusIn filter.
SetStatusIn(statusIn []string) MenuItemQueryInterface
}
MenuItemQueryInterface defines the interface for querying menu items.
func MenuItemQuery ¶
func MenuItemQuery() MenuItemQueryInterface
MenuItemQuery returns a new instance of MenuItemQueryInterface. It initializes the properties map to store query parameters.
type MenuQueryInterface ¶
type MenuQueryInterface interface {
// Validate checks if the query parameters are valid.
Validate() error
// Columns returns the list of columns to be selected in the query.
Columns() []string
// SetColumns sets the list of columns to be selected in the query.
SetColumns(columns []string) MenuQueryInterface
// HasCountOnly checks if the query is set to return only the count.
HasCountOnly() bool
// IsCountOnly returns true if the query is set to return only the count.
IsCountOnly() bool
// SetCountOnly sets the query to return only the count.
SetCountOnly(countOnly bool) MenuQueryInterface
// HasCreatedAtGte checks if the query has a 'created_at' greater than or equal to condition.
HasCreatedAtGte() bool
// CreatedAtGte returns the 'created_at' greater than or equal to condition.
CreatedAtGte() string
// SetCreatedAtGte sets the 'created_at' greater than or equal to condition.
SetCreatedAtGte(createdAtGte string) MenuQueryInterface
// HasCreatedAtLte checks if the query has a 'created_at' less than or equal to condition.
HasCreatedAtLte() bool
// CreatedAtLte returns the 'created_at' less than or equal to condition.
CreatedAtLte() string
// SetCreatedAtLte sets the 'created_at' less than or equal to condition.
SetCreatedAtLte(createdAtLte string) MenuQueryInterface
// HasHandle checks if the query has a 'handle' condition.
HasHandle() bool
// Handle returns the 'handle' condition.
Handle() string
// SetHandle sets the 'handle' condition.
SetHandle(handle string) MenuQueryInterface
// HasID checks if the query has an 'id' condition.
HasID() bool
// ID returns the 'id' condition.
ID() string
// SetID sets the 'id' condition.
SetID(id string) MenuQueryInterface
// HasIDIn checks if the query has an 'id' in condition.
HasIDIn() bool
// IDIn returns the 'id' in condition.
IDIn() []string
// SetIDIn sets the 'id' in condition.
SetIDIn(idIn []string) MenuQueryInterface
// HasNameLike checks if the query has a 'name' like condition.
HasNameLike() bool
// NameLike returns the 'name' like condition.
NameLike() string
// SetNameLike sets the 'name' like condition.
SetNameLike(nameLike string) MenuQueryInterface
// HasOffset checks if the query has an offset condition.
HasOffset() bool
// Offset returns the offset condition.
Offset() int
// SetOffset sets the offset condition.
SetOffset(offset int) MenuQueryInterface
// HasLimit checks if the query has a limit condition.
HasLimit() bool
// Limit returns the limit condition.
Limit() int
// SetLimit sets the limit condition.
SetLimit(limit int) MenuQueryInterface
// HasSortOrder checks if the query has a sort order condition.
HasSortOrder() bool
// SortOrder returns the sort order condition.
SortOrder() string
// SetSortOrder sets the sort order condition.
SetSortOrder(sortOrder string) MenuQueryInterface
// HasOrderBy checks if the query has an order by condition.
HasOrderBy() bool
// OrderBy returns the order by condition.
OrderBy() string
// SetOrderBy sets the order by condition.
SetOrderBy(orderBy string) MenuQueryInterface
// HasSiteID checks if the query has a 'site_id' condition.
HasSiteID() bool
// SiteID returns the 'site_id' condition.
SiteID() string
// SetSiteID sets the 'site_id' condition.
SetSiteID(siteID string) MenuQueryInterface
// HasSoftDeletedIncluded checks if the query includes soft deleted records.
HasSoftDeletedIncluded() bool
// SoftDeletedIncluded returns true if the query includes soft deleted records.
SoftDeletedIncluded() bool
// SetSoftDeletedIncluded sets whether the query should include soft deleted records.
SetSoftDeletedIncluded(includeSoftDeleted bool) MenuQueryInterface
// HasStatus checks if the query has a 'status' condition.
HasStatus() bool
// Status returns the 'status' condition.
Status() string
// SetStatus sets the 'status' condition.
SetStatus(status string) MenuQueryInterface
// HasStatusIn checks if the query has a 'status' in condition.
HasStatusIn() bool
// StatusIn returns the 'status' in condition.
StatusIn() []string
// SetStatusIn sets the 'status' in condition.
SetStatusIn(statusIn []string) MenuQueryInterface
}
MenuQueryInterface defines the methods required for querying menus.
func MenuQuery ¶
func MenuQuery() MenuQueryInterface
MenuQuery returns a new instance of MenuQueryInterface.
type MiddlewareInterface ¶
type MiddlewareInterface interface {
// Identifier is a unique identifier for internal use (e.g., "auth_before").
// Must be unique, and cannot be changed after creation.
Identifier() string
// Name is a human-friendly label for display purposes (e.g., "Authentication Middleware").
Name() string
// Description provides details about the middleware’s functionality.
Description() string
// Type specifies when the middleware is executed:
// - "before" → Runs before rendering page content.
// - "after" → Runs after rendering page content.
Type() string
// Handler returns the middleware function that processes HTTP requests.
Handler() func(next http.Handler) http.Handler
}
MiddlewareInterface defines the structure of a middleware.
type NewStoreOptions ¶
type NewStoreOptions struct {
// Context is the context used if the AutoMigrateEnabled option is true
// If not set, a background context is used
Context context.Context
// DB is the database connection
DB *sql.DB
// DbDriverName is the database driver name
// If not set, an attempt will be made to detect it
DbDriverName string
// AutomigrateEnabled enables automigrate
AutomigrateEnabled bool
// DebugEnabled enables debug
DebugEnabled bool
// BlockTableName is the name of the block database table to be created/used
BlockTableName string
// MenusEnabled enables menus
MenusEnabled bool
// MenuTableName is the name of the menu database table to be created/used
MenuTableName string
// MenuItemTableName is the name of the menu item database table to be created/used
MenuItemTableName string
// PageTableName is the name of the page database table to be created/used
PageTableName string
// SiteTableName is the name of the site database table to be created/used
SiteTableName string
TemplateTableName string
// TranslationsEnabled enables translations
TranslationsEnabled bool
// TranslationTableName is the name of the translation database table to be created/used
TranslationTableName string
// TranslationLanguageDefault is the default language, i.e en
TranslationLanguageDefault string
// TranslationLanguages is the list of supported languages
TranslationLanguages map[string]string
// VersioningEnabled enables versioning
VersioningEnabled bool
// VersioningTableName is the name of the versioning database table to be created/used
VersioningTableName string
// Shortcodes is a list of shortcodes to be registered
Shortcodes []ShortcodeInterface
// Middlewares is a list of middlewares to be registered
Middlewares []MiddlewareInterface
}
NewStoreOptions defines the options for creating a new block store
type Option ¶
type Option func(*Options)
Option is a function type that modifies an Options instance.
func WithContext ¶
WithContext sets the context for the CMS store operations.
func WithDryRun ¶
WithDryRun sets the dry run flag for the CMS store operations.
func WithTransaction ¶
WithTransaction sets the transaction for the CMS store operations.
type Options ¶
type Options struct {
// contains filtered or unexported fields
}
Options holds various configuration options for the CMS store operations.
type PageInterface ¶
type PageInterface interface {
Data() map[string]string
DataChanged() map[string]string
MarkAsNotDirty()
MarshalToVersioning() (string, error)
ID() string
SetID(id string) PageInterface
Alias() string
SetAlias(alias string) PageInterface
CreatedAt() string
SetCreatedAt(createdAt string) PageInterface
CreatedAtCarbon() *carbon.Carbon
CanonicalUrl() string
SetCanonicalUrl(canonicalUrl string) PageInterface
Content() string
SetContent(content string) PageInterface
Editor() string
SetEditor(editor string) PageInterface
Handle() string
SetHandle(handle string) PageInterface
Memo() string
SetMemo(memo string) PageInterface
MetaDescription() string
SetMetaDescription(metaDescription string) PageInterface
MetaKeywords() string
SetMetaKeywords(metaKeywords string) PageInterface
MetaRobots() string
SetMetaRobots(metaRobots string) PageInterface
Meta(key string) string
SetMeta(key, value string) error
Metas() (map[string]string, error)
SetMetas(metas map[string]string) error
UpsertMetas(metas map[string]string) error
MiddlewaresBefore() []string
SetMiddlewaresBefore(middlewaresBefore []string) PageInterface
MiddlewaresAfter() []string
SetMiddlewaresAfter(middlewaresAfter []string) PageInterface
Name() string
SetName(name string) PageInterface
SiteID() string
SetSiteID(siteID string) PageInterface
SoftDeletedAt() string
SetSoftDeletedAt(softDeletedAt string) PageInterface
SoftDeletedAtCarbon() *carbon.Carbon
Status() string
SetStatus(status string) PageInterface
Title() string
SetTitle(title string) PageInterface
TemplateID() string
SetTemplateID(templateID string) PageInterface
UpdatedAt() string
SetUpdatedAt(updatedAt string) PageInterface
UpdatedAtCarbon() *carbon.Carbon
IsActive() bool
IsInactive() bool
IsSoftDeleted() bool
}
type PageQueryInterface ¶
type PageQueryInterface interface {
// Validate checks if the query parameters are valid.
Validate() error
// Columns returns the list of columns to be queried.
Columns() []string
// SetColumns sets the list of columns to be queried.
SetColumns(columns []string) PageQueryInterface
// HasAlias checks if an alias is set.
HasAlias() bool
// Alias returns the alias if set.
Alias() string
// SetAlias sets the alias.
SetAlias(alias string) PageQueryInterface
// HasAliasLike checks if an alias pattern is set.
HasAliasLike() bool
// AliasLike returns the alias pattern if set.
AliasLike() string
// SetAliasLike sets the alias pattern.
SetAliasLike(nameLike string) PageQueryInterface
// HasCreatedAtGte checks if a 'created at' greater-than-or-equal-to filter is set.
HasCreatedAtGte() bool
// CreatedAtGte returns the 'created at' greater-than-or-equal-to filter if set.
CreatedAtGte() string
// SetCreatedAtGte sets the 'created at' greater-than-or-equal-to filter.
SetCreatedAtGte(createdAtGte string) PageQueryInterface
// HasCreatedAtLte checks if a 'created at' less-than-or-equal-to filter is set.
HasCreatedAtLte() bool
// CreatedAtLte returns the 'created at' less-than-or-equal-to filter if set.
CreatedAtLte() string
// SetCreatedAtLte sets the 'created at' less-than-or-equal-to filter.
SetCreatedAtLte(createdAtLte string) PageQueryInterface
// HasCountOnly checks if count-only mode is set.
HasCountOnly() bool
// IsCountOnly returns the count-only mode setting.
IsCountOnly() bool
// SetCountOnly sets the count-only mode.
SetCountOnly(countOnly bool) PageQueryInterface
// HasHandle checks if a handle is set.
HasHandle() bool
// Handle returns the handle if set.
Handle() string
// SetHandle sets the handle.
SetHandle(handle string) PageQueryInterface
// HasID checks if an ID is set.
HasID() bool
// ID returns the ID if set.
ID() string
// SetID sets the ID.
SetID(id string) PageQueryInterface
// HasIDIn checks if an ID list is set.
HasIDIn() bool
// IDIn returns the ID list if set.
IDIn() []string
// SetIDIn sets the ID list.
SetIDIn(idIn []string) PageQueryInterface
// HasLimit checks if a limit is set.
HasLimit() bool
// Limit returns the limit if set.
Limit() int
// SetLimit sets the limit.
SetLimit(limit int) PageQueryInterface
// HasNameLike checks if a name pattern is set.
HasNameLike() bool
// NameLike returns the name pattern if set.
NameLike() string
// SetNameLike sets the name pattern.
SetNameLike(nameLike string) PageQueryInterface
// HasOffset checks if an offset is set.
HasOffset() bool
// Offset returns the offset if set.
Offset() int
// SetOffset sets the offset.
SetOffset(offset int) PageQueryInterface
// HasOrderBy checks if an order-by clause is set.
HasOrderBy() bool
// OrderBy returns the order-by clause if set.
OrderBy() string
// SetOrderBy sets the order-by clause.
SetOrderBy(orderBy string) PageQueryInterface
// HasSiteID checks if a site ID is set.
HasSiteID() bool
// SiteID returns the site ID if set.
SiteID() string
// SetSiteID sets the site ID.
SetSiteID(siteID string) PageQueryInterface
// HasSortOrder checks if a sort order is set.
HasSortOrder() bool
// SortOrder returns the sort order if set.
SortOrder() string
// SetSortOrder sets the sort order.
SetSortOrder(sortOrder string) PageQueryInterface
// HasSoftDeletedIncluded checks if soft-deleted records are included.
HasSoftDeletedIncluded() bool
// SoftDeletedIncluded returns whether soft-deleted records are included.
SoftDeletedIncluded() bool
// SetSoftDeletedIncluded sets whether to include soft-deleted records.
SetSoftDeletedIncluded(softDeleteIncluded bool) PageQueryInterface
// HasStatus checks if a status is set.
HasStatus() bool
// Status returns the status if set.
Status() string
// SetStatus sets the status.
SetStatus(status string) PageQueryInterface
// HasStatusIn checks if a status list is set.
HasStatusIn() bool
// StatusIn returns the status list if set.
StatusIn() []string
// SetStatusIn sets the status list.
SetStatusIn(statusIn []string) PageQueryInterface
// HasTemplateID checks if a template ID is set.
HasTemplateID() bool
// TemplateID returns the template ID if set.
TemplateID() string
// SetTemplateID sets the template ID.
SetTemplateID(templateID string) PageQueryInterface
}
PageQueryInterface defines methods for querying pages in the CMS store.
func PageQuery ¶
func PageQuery() PageQueryInterface
PageQuery returns a new instance of PageQueryInterface with an initialized map to hold query parameters.
type ShortcodeInterface ¶
type ShortcodeInterface interface {
// Alias returns a unique identifier for the shortcode.
Alias() string
// Description provides a brief explanation of the shortcode's purpose and usage.
Description() string
// Render generates the final output of the shortcode based on the provided
// HTTP request, shortcode name, and a map of attributes.
// r: HTTP request containing the context in which the shortcode is rendered.
// s: The name of the shortcode.
// m: A map of attributes and their values that configure the shortcode behavior.
Render(r *http.Request, s string, m map[string]string) string
}
ShortcodeInterface defines the methods that a shortcode must implement. A shortcode is a reusable snippet of code or content that can be rendered within a web page or template.
type SiteInterface ¶
type SiteInterface interface {
Data() map[string]string
DataChanged() map[string]string
MarkAsNotDirty()
MarshalToVersioning() (string, error)
CreatedAt() string
SetCreatedAt(createdAt string) SiteInterface
CreatedAtCarbon() *carbon.Carbon
DomainNames() ([]string, error)
SetDomainNames(domainNames []string) (SiteInterface, error)
Handle() string
SetHandle(handle string) SiteInterface
ID() string
SetID(id string) SiteInterface
Memo() string
SetMemo(memo string) SiteInterface
Meta(key string) string
SetMeta(key, value string) error
Metas() (map[string]string, error)
SetMetas(metas map[string]string) error
UpsertMetas(metas map[string]string) error
Name() string
SetName(name string) SiteInterface
SoftDeletedAt() string
SetSoftDeletedAt(softDeletedAt string) SiteInterface
SoftDeletedAtCarbon() *carbon.Carbon
Status() string
SetStatus(status string) SiteInterface
UpdatedAt() string
SetUpdatedAt(updatedAt string) SiteInterface
UpdatedAtCarbon() *carbon.Carbon
IsActive() bool
IsInactive() bool
IsSoftDeleted() bool
}
type SiteQueryInterface ¶
type SiteQueryInterface interface {
// Validate checks if the query parameters are valid.
Validate() error
// Columns returns the list of columns to be selected in the query.
Columns() []string
// SetColumns sets the list of columns to be selected in the query.
SetColumns(columns []string) SiteQueryInterface
// HasCountOnly checks if the query is set to return only the count of records.
HasCountOnly() bool
// IsCountOnly returns true if the query is set to return only the count of records.
IsCountOnly() bool
// SetCountOnly sets the query to return only the count of records.
SetCountOnly(countOnly bool) SiteQueryInterface
// HasCreatedAtGte checks if the query has a 'created_at' greater than or equal to condition.
HasCreatedAtGte() bool
// CreatedAtGte returns the 'created_at' greater than or equal to condition.
CreatedAtGte() string
// SetCreatedAtGte sets the 'created_at' greater than or equal to condition.
SetCreatedAtGte(createdAtGte string) SiteQueryInterface
// HasCreatedAtLte checks if the query has a 'created_at' less than or equal to condition.
HasCreatedAtLte() bool
// CreatedAtLte returns the 'created_at' less than or equal to condition.
CreatedAtLte() string
// SetCreatedAtLte sets the 'created_at' less than or equal to condition.
SetCreatedAtLte(createdAtLte string) SiteQueryInterface
// HasDomainName checks if the query has a domain name condition.
HasDomainName() bool
// DomainName returns the domain name condition.
DomainName() string
// SetDomainName sets the domain name condition.
SetDomainName(domainName string) SiteQueryInterface
// HasHandle checks if the query has a handle condition.
HasHandle() bool
// Handle returns the handle condition.
Handle() string
// SetHandle sets the handle condition.
SetHandle(handle string) SiteQueryInterface
// HasID checks if the query has an ID condition.
HasID() bool
// ID returns the ID condition.
ID() string
// SetID sets the ID condition.
SetID(id string) SiteQueryInterface
// HasIDIn checks if the query has an ID in condition.
HasIDIn() bool
// IDIn returns the ID in condition.
IDIn() []string
// SetIDIn sets the ID in condition.
SetIDIn(idIn []string) SiteQueryInterface
// HasLimit checks if the query has a limit condition.
HasLimit() bool
// Limit returns the limit condition.
Limit() int
// SetLimit sets the limit condition.
SetLimit(limit int) SiteQueryInterface
// HasNameLike checks if the query has a name like condition.
HasNameLike() bool
// NameLike returns the name like condition.
NameLike() string
// SetNameLike sets the name like condition.
SetNameLike(nameLike string) SiteQueryInterface
// HasOffset checks if the query has an offset condition.
HasOffset() bool
// Offset returns the offset condition.
Offset() int
// SetOffset sets the offset condition.
SetOffset(offset int) SiteQueryInterface
// HasSortOrder checks if the query has a sort order condition.
HasSortOrder() bool
// SortOrder returns the sort order condition.
SortOrder() string
// SetSortOrder sets the sort order condition.
SetSortOrder(sortOrder string) SiteQueryInterface
// HasOrderBy checks if the query has an order by condition.
HasOrderBy() bool
// OrderBy returns the order by condition.
OrderBy() string
// SetOrderBy sets the order by condition.
SetOrderBy(orderBy string) SiteQueryInterface
// HasSoftDeletedIncluded checks if the query includes soft deleted records.
HasSoftDeletedIncluded() bool
// SoftDeletedIncluded returns true if the query includes soft deleted records.
SoftDeletedIncluded() bool
// SetSoftDeletedIncluded sets the query to include soft deleted records.
SetSoftDeletedIncluded(softDeletedIncluded bool) SiteQueryInterface
// HasStatus checks if the query has a status condition.
HasStatus() bool
// Status returns the status condition.
Status() string
// SetStatus sets the status condition.
SetStatus(status string) SiteQueryInterface
// HasStatusIn checks if the query has a status in condition.
HasStatusIn() bool
// StatusIn returns the status in condition.
StatusIn() []string
// SetStatusIn sets the status in condition.
SetStatusIn(statusIn []string) SiteQueryInterface
}
SiteQueryInterface defines the methods required for querying site data.
func SiteQuery ¶
func SiteQuery() SiteQueryInterface
SiteQuery returns a new instance of SiteQueryInterface with an initialized parameters map.
type StoreInterface ¶
type StoreInterface interface {
AutoMigrate(ctx context.Context, opts ...Option) error
EnableDebug(debug bool)
BlockCreate(ctx context.Context, block BlockInterface) error
BlockCount(ctx context.Context, options BlockQueryInterface) (int64, error)
BlockDelete(ctx context.Context, block BlockInterface) error
BlockDeleteByID(ctx context.Context, id string) error
BlockFindByHandle(ctx context.Context, blockHandle string) (BlockInterface, error)
BlockFindByID(ctx context.Context, blockID string) (BlockInterface, error)
BlockList(ctx context.Context, query BlockQueryInterface) ([]BlockInterface, error)
BlockSoftDelete(ctx context.Context, block BlockInterface) error
BlockSoftDeleteByID(ctx context.Context, id string) error
BlockUpdate(ctx context.Context, block BlockInterface) error
MenusEnabled() bool
MenuCreate(ctx context.Context, menu MenuInterface) error
MenuCount(ctx context.Context, options MenuQueryInterface) (int64, error)
MenuDelete(ctx context.Context, menu MenuInterface) error
MenuDeleteByID(ctx context.Context, id string) error
MenuFindByHandle(ctx context.Context, menuHandle string) (MenuInterface, error)
MenuFindByID(ctx context.Context, menuID string) (MenuInterface, error)
MenuList(ctx context.Context, query MenuQueryInterface) ([]MenuInterface, error)
MenuSoftDelete(ctx context.Context, menu MenuInterface) error
MenuSoftDeleteByID(ctx context.Context, id string) error
MenuUpdate(ctx context.Context, menu MenuInterface) error
MenuItemCreate(ctx context.Context, menuItem MenuItemInterface) error
MenuItemCount(ctx context.Context, options MenuItemQueryInterface) (int64, error)
MenuItemDelete(ctx context.Context, menuItem MenuItemInterface) error
MenuItemDeleteByID(ctx context.Context, id string) error
MenuItemFindByID(ctx context.Context, menuItemID string) (MenuItemInterface, error)
MenuItemList(ctx context.Context, query MenuItemQueryInterface) ([]MenuItemInterface, error)
MenuItemSoftDelete(ctx context.Context, menuItem MenuItemInterface) error
MenuItemSoftDeleteByID(ctx context.Context, id string) error
MenuItemUpdate(ctx context.Context, menuItem MenuItemInterface) error
PageCreate(ctx context.Context, page PageInterface) error
PageCount(ctx context.Context, options PageQueryInterface) (int64, error)
PageDelete(ctx context.Context, page PageInterface) error
PageDeleteByID(ctx context.Context, id string) error
PageFindByHandle(ctx context.Context, pageHandle string) (PageInterface, error)
PageFindByID(ctx context.Context, pageID string) (PageInterface, error)
PageList(ctx context.Context, query PageQueryInterface) ([]PageInterface, error)
PageSoftDelete(ctx context.Context, page PageInterface) error
PageSoftDeleteByID(ctx context.Context, id string) error
PageUpdate(ctx context.Context, page PageInterface) error
SiteCreate(ctx context.Context, site SiteInterface) error
SiteCount(ctx context.Context, options SiteQueryInterface) (int64, error)
SiteDelete(ctx context.Context, site SiteInterface) error
SiteDeleteByID(ctx context.Context, id string) error
SiteFindByDomainName(ctx context.Context, siteDomainName string) (SiteInterface, error)
SiteFindByHandle(ctx context.Context, siteHandle string) (SiteInterface, error)
SiteFindByID(ctx context.Context, siteID string) (SiteInterface, error)
SiteList(ctx context.Context, query SiteQueryInterface) ([]SiteInterface, error)
SiteSoftDelete(ctx context.Context, site SiteInterface) error
SiteSoftDeleteByID(ctx context.Context, id string) error
SiteUpdate(ctx context.Context, site SiteInterface) error
TemplateCreate(ctx context.Context, template TemplateInterface) error
TemplateCount(ctx context.Context, options TemplateQueryInterface) (int64, error)
TemplateDelete(ctx context.Context, template TemplateInterface) error
TemplateDeleteByID(ctx context.Context, id string) error
TemplateFindByHandle(ctx context.Context, templateHandle string) (TemplateInterface, error)
TemplateFindByID(ctx context.Context, templateID string) (TemplateInterface, error)
TemplateList(ctx context.Context, query TemplateQueryInterface) ([]TemplateInterface, error)
TemplateSoftDelete(ctx context.Context, template TemplateInterface) error
TemplateSoftDeleteByID(ctx context.Context, id string) error
TemplateUpdate(ctx context.Context, template TemplateInterface) error
TranslationsEnabled() bool
TranslationCreate(ctx context.Context, translation TranslationInterface) error
TranslationCount(ctx context.Context, options TranslationQueryInterface) (int64, error)
TranslationDelete(ctx context.Context, translation TranslationInterface) error
TranslationDeleteByID(ctx context.Context, id string) error
TranslationFindByHandle(ctx context.Context, translationHandle string) (TranslationInterface, error)
TranslationFindByHandleOrID(ctx context.Context, translationHandleOrID string, language string) (TranslationInterface, error)
TranslationFindByID(ctx context.Context, translationID string) (TranslationInterface, error)
TranslationList(ctx context.Context, query TranslationQueryInterface) ([]TranslationInterface, error)
TranslationSoftDelete(ctx context.Context, translation TranslationInterface) error
TranslationSoftDeleteByID(ctx context.Context, id string) error
TranslationUpdate(ctx context.Context, translation TranslationInterface) error
TranslationLanguageDefault() string
TranslationLanguages() map[string]string
// Versioning
VersioningEnabled() bool
VersioningCreate(ctx context.Context, versioning VersioningInterface) error
// VersioningCount(options VersioningQueryInterface) (int64, error)
VersioningDelete(ctx context.Context, versioning VersioningInterface) error
VersioningDeleteByID(ctx context.Context, id string) error
VersioningFindByID(ctx context.Context, versioningID string) (VersioningInterface, error)
VersioningList(ctx context.Context, query VersioningQueryInterface) ([]VersioningInterface, error)
VersioningSoftDelete(ctx context.Context, versioning VersioningInterface) error
VersioningSoftDeleteByID(ctx context.Context, id string) error
VersioningUpdate(ctx context.Context, versioning VersioningInterface) error
Shortcodes() []ShortcodeInterface
AddShortcode(shortcode ShortcodeInterface)
AddShortcodes(shortcodes []ShortcodeInterface)
SetShortcodes(shortcodes []ShortcodeInterface)
Middlewares() []MiddlewareInterface
AddMiddleware(middleware MiddlewareInterface)
AddMiddlewares(middlewares []MiddlewareInterface)
SetMiddlewares(middlewares []MiddlewareInterface)
}
func NewStore ¶
func NewStore(opts NewStoreOptions) (StoreInterface, error)
NewStore creates a new CMS store based on the provided options.
type TemplateInterface ¶
type TemplateInterface interface {
Data() map[string]string
DataChanged() map[string]string
MarkAsNotDirty()
ID() string
SetID(id string) TemplateInterface
CreatedAt() string
SetCreatedAt(createdAt string) TemplateInterface
CreatedAtCarbon() *carbon.Carbon
Content() string
SetContent(content string) TemplateInterface
Editor() string
SetEditor(editor string) TemplateInterface
Handle() string
SetHandle(handle string) TemplateInterface
Memo() string
SetMemo(memo string) TemplateInterface
Meta(key string) string
SetMeta(key, value string) error
Metas() (map[string]string, error)
SetMetas(metas map[string]string) error
UpsertMetas(metas map[string]string) error
Name() string
SetName(name string) TemplateInterface
SiteID() string
SetSiteID(siteID string) TemplateInterface
SoftDeletedAt() string
SetSoftDeletedAt(softDeletedAt string) TemplateInterface
SoftDeletedAtCarbon() *carbon.Carbon
Status() string
SetStatus(status string) TemplateInterface
UpdatedAt() string
SetUpdatedAt(updatedAt string) TemplateInterface
UpdatedAtCarbon() *carbon.Carbon
IsActive() bool
IsInactive() bool
IsSoftDeleted() bool
}
func NewTemplate ¶
func NewTemplate() TemplateInterface
func NewTemplateFromExistingData ¶
func NewTemplateFromExistingData(data map[string]string) TemplateInterface
type TemplateQueryInterface ¶
type TemplateQueryInterface interface {
Validate() error
Columns() []string
SetColumns(columns []string) TemplateQueryInterface
HasCountOnly() bool
IsCountOnly() bool
SetCountOnly(countOnly bool) TemplateQueryInterface
HasCreatedAtGte() bool
CreatedAtGte() string
SetCreatedAtGte(createdAtGte string) TemplateQueryInterface
HasCreatedAtLte() bool
CreatedAtLte() string
SetCreatedAtLte(createdAtLte string) TemplateQueryInterface
HasHandle() bool
Handle() string
SetHandle(handle string) TemplateQueryInterface
HasID() bool
ID() string
SetID(id string) TemplateQueryInterface
HasIDIn() bool
IDIn() []string
SetIDIn(idIn []string) TemplateQueryInterface
HasNameLike() bool
NameLike() string
SetNameLike(nameLike string) TemplateQueryInterface
HasOffset() bool
Offset() int
SetOffset(offset int) TemplateQueryInterface
HasLimit() bool
Limit() int
SetLimit(limit int) TemplateQueryInterface
HasSortOrder() bool
SortOrder() string
SetSortOrder(sortOrder string) TemplateQueryInterface
HasOrderBy() bool
OrderBy() string
SetOrderBy(orderBy string) TemplateQueryInterface
HasSiteID() bool
SiteID() string
SetSiteID(siteID string) TemplateQueryInterface
HasSoftDeletedIncluded() bool
SoftDeletedIncluded() bool
SetSoftDeletedIncluded(includeSoftDeleted bool) TemplateQueryInterface
HasStatus() bool
Status() string
SetStatus(status string) TemplateQueryInterface
HasStatusIn() bool
StatusIn() []string
SetStatusIn(statusIn []string) TemplateQueryInterface
}
func TemplateQuery ¶
func TemplateQuery() TemplateQueryInterface
type TranslationInterface ¶
type TranslationInterface interface {
Data() map[string]string
DataChanged() map[string]string
MarkAsNotDirty()
ID() string
SetID(id string) TranslationInterface
CreatedAt() string
SetCreatedAt(createdAt string) TranslationInterface
CreatedAtCarbon() *carbon.Carbon
Content() (languageCodeContent map[string]string, err error)
SetContent(languageCodeContent map[string]string) error
Handle() string
SetHandle(handle string) TranslationInterface
Memo() string
SetMemo(memo string) TranslationInterface
Meta(key string) string
SetMeta(key, value string) error
Metas() (map[string]string, error)
SetMetas(metas map[string]string) error
UpsertMetas(metas map[string]string) error
Name() string
SetName(name string) TranslationInterface
SiteID() string
SetSiteID(siteID string) TranslationInterface
SoftDeletedAt() string
SetSoftDeletedAt(softDeletedAt string) TranslationInterface
SoftDeletedAtCarbon() *carbon.Carbon
Status() string
SetStatus(status string) TranslationInterface
UpdatedAt() string
SetUpdatedAt(updatedAt string) TranslationInterface
UpdatedAtCarbon() *carbon.Carbon
IsActive() bool
IsInactive() bool
IsSoftDeleted() bool
}
func NewTranslation ¶
func NewTranslation() TranslationInterface
func NewTranslationFromExistingData ¶
func NewTranslationFromExistingData(data map[string]string) TranslationInterface
type TranslationQueryInterface ¶
type TranslationQueryInterface interface {
Validate() error
Columns() []string
SetColumns(columns []string) TranslationQueryInterface
HasCountOnly() bool
IsCountOnly() bool
SetCountOnly(countOnly bool) TranslationQueryInterface
HasCreatedAtGte() bool
CreatedAtGte() string
SetCreatedAtGte(createdAtGte string) TranslationQueryInterface
HasCreatedAtLte() bool
CreatedAtLte() string
SetCreatedAtLte(createdAtLte string) TranslationQueryInterface
HasHandle() bool
Handle() string
SetHandle(handle string) TranslationQueryInterface
HasHandleOrID() bool
HandleOrID() string
SetHandleOrID(handleOrID string) TranslationQueryInterface
HasID() bool
ID() string
SetID(id string) TranslationQueryInterface
HasIDIn() bool
IDIn() []string
SetIDIn(idIn []string) TranslationQueryInterface
HasNameLike() bool
NameLike() string
SetNameLike(nameLike string) TranslationQueryInterface
HasOffset() bool
Offset() int
SetOffset(offset int) TranslationQueryInterface
HasLimit() bool
Limit() int
SetLimit(limit int) TranslationQueryInterface
HasSortOrder() bool
SortOrder() string
SetSortOrder(sortOrder string) TranslationQueryInterface
HasOrderBy() bool
OrderBy() string
SetOrderBy(orderBy string) TranslationQueryInterface
HasSiteID() bool
SiteID() string
SetSiteID(siteID string) TranslationQueryInterface
HasSoftDeletedIncluded() bool
SoftDeletedIncluded() bool
SetSoftDeletedIncluded(includeSoftDeleted bool) TranslationQueryInterface
HasStatus() bool
Status() string
SetStatus(status string) TranslationQueryInterface
HasStatusIn() bool
StatusIn() []string
SetStatusIn(statusIn []string) TranslationQueryInterface
}
func TranslationQuery ¶
func TranslationQuery() TranslationQueryInterface
type VersioningInterface ¶
type VersioningInterface interface {
versionstore.VersionInterface
}
func NewVersioning ¶
func NewVersioning() VersioningInterface
type VersioningQueryInterface ¶
type VersioningQueryInterface interface {
versionstore.VersionQueryInterface
}
func NewVersioningQuery ¶
func NewVersioningQuery() VersioningQueryInterface
Source Files
¶
- block.go
- block_query.go
- block_query_interface.go
- block_table_create_sql.go
- consts.go
- id_helpers.go
- interfaces.go
- menu_implementation.go
- menu_item_implementation.go
- menu_item_query.go
- menu_item_query_interface.go
- menu_item_table_create_sql.go
- menu_query.go
- menu_query_interface.go
- menu_table_create_sql.go
- middleware.go
- options.go
- page_implementation.go
- page_query.go
- page_query_interface.go
- page_table_create_sql.go
- shortcode_interface.go
- site_implementation.go
- site_query.go
- site_query_interface.go
- site_table_create_sql.go
- store.go
- store_blocks.go
- store_menu_items.go
- store_menus.go
- store_new.go
- store_pages.go
- store_sites.go
- store_templates.go
- store_translations.go
- store_versioning.go
- template_implementation.go
- template_query.go
- template_query_interface.go
- template_table_create_sql.go
- translation_implementation.go
- translation_query.go
- translation_query_interface.go
- translation_table_create_sql.go