Documentation
¶
Index ¶
- Constants
- type APIKeyConfig
- type ActionType
- type Asset
- type AssetLink
- type Attribute
- type AuditLog
- type AuthLog
- type ChannelConfig
- type ChannelType
- type ChannelsConfig
- type Collection
- type Comment
- type DataType
- type DatabaseProvider
- type EngagementCount
- type EngagementStatus
- type Entity
- type GuestAccessConfig
- type ImageCompressionOptions
- type Junction
- type LoadedAttribute
- type LoadedEntity
- type LocalFileStoreOptions
- type Lookup
- type MCPConfig
- type Menu
- type MenuItem
- type Notification
- type Page
- type PageArchitecture
- type PageMetadata
- type PublicationStatus
- type Query
- type Role
- type RouteOptions
- type Schema
- type SchemaSettings
- type SchemaType
- type SelectedQuery
- type SystemSettings
- type TrustedKey
- type User
- type UserChannel
- type Variable
Constants ¶
View Source
const ( RoleSa = "sa" RoleAdmin = "admin" RoleUser = "user" RoleGuest = "guest" )
View Source
const AssetLinkTableName = "__assetLinks"
View Source
const AssetTableName = "__assets"
View Source
const AuditLogTableName = "__auditlog"
View Source
const AuthLogTableName = "__auth_logs"
View Source
const CommentTableName = "__comments"
View Source
const EngagementCountTableName = "__engagement_counts"
View Source
const EngagementStatusTableName = "__engagements"
View Source
const NotificationTableName = "__notifications"
View Source
const UserChannelTableName = "__user_channels"
View Source
const UserTableName = "__users"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIKeyConfig ¶
type ActionType ¶
type ActionType string
const ( ActionCreate ActionType = "Create" ActionUpdate ActionType = "Update" ActionDelete ActionType = "Delete" )
type Asset ¶
type Asset struct {
Id int64 `json:"id" mapstructure:"id"`
Path string `json:"path" mapstructure:"path"`
Url string `json:"url" mapstructure:"url"`
Name string `json:"name" mapstructure:"name"`
Title string `json:"title" mapstructure:"title"`
Size int64 `json:"size" mapstructure:"size"`
Type string `json:"type" mapstructure:"type"`
Metadata map[string]interface{} `json:"metadata" mapstructure:"metadata"`
CreatedAt time.Time `json:"createdAt" mapstructure:"createdAt"`
UpdatedAt time.Time `json:"updatedAt" mapstructure:"updatedAt"`
CreatedBy string `json:"createdBy" mapstructure:"createdBy"`
}
type AssetLink ¶
type AssetLink struct {
Id int64 `json:"id" mapstructure:"id"`
EntityName string `json:"entityName" mapstructure:"entityName"`
RecordId int64 `json:"recordId" mapstructure:"recordId"`
AssetId int64 `json:"assetId" mapstructure:"assetId"`
CreatedAt time.Time `json:"createdAt" mapstructure:"createdAt"`
UpdatedAt time.Time `json:"updatedAt" mapstructure:"updatedAt"`
}
type Attribute ¶
type Attribute struct {
Field string `json:"field"`
Header string `json:"header"`
DataType DataType `json:"dataType"`
DisplayType displaymodels.DisplayType `json:"displayType"`
InList bool `json:"inList"`
InDetail bool `json:"inDetail"`
IsDefault bool `json:"isDefault"`
Options string `json:"options"`
Validation string `json:"validation"`
PermLevel int `json:"permLevel"`
}
func (*Attribute) ToLoaded ¶
func (a *Attribute) ToLoaded(tableName string) LoadedAttribute
type AuditLog ¶
type AuditLog struct {
Id int64 `json:"id" mapstructure:"id"`
UserId string `json:"userId" mapstructure:"user_id"`
UserName string `json:"userName" mapstructure:"user_name"`
Action ActionType `json:"action" mapstructure:"action"`
EntityName string `json:"entityName" mapstructure:"entity_name"`
RecordId string `json:"recordId" mapstructure:"record_id"`
RecordLabel string `json:"recordLabel" mapstructure:"record_label"`
Payload map[string]interface{} `json:"payload" mapstructure:"payload"`
CreatedAt time.Time `json:"createdAt" mapstructure:"created_at"`
}
type AuthLog ¶
type AuthLog struct {
Id int64 `json:"id" mapstructure:"id"`
UserId *int64 `json:"userId,omitempty" mapstructure:"user_id"`
ChannelType ChannelType `json:"channelType" mapstructure:"channel_type"`
Action string `json:"action" mapstructure:"action"` // login, verify, etc.
IPAddress string `json:"ipAddress" mapstructure:"ip_address"`
UserAgent string `json:"userAgent" mapstructure:"user_agent"`
Success bool `json:"success" mapstructure:"success"`
Metadata string `json:"metadata" mapstructure:"metadata"` // JSON string, e.g. failure reason, nonce hash
CreatedAt time.Time `json:"createdAt" mapstructure:"created_at"`
}
type ChannelConfig ¶
type ChannelConfig struct {
Enabled bool `json:"enabled" mapstructure:"enabled"`
GatewayURL string `json:"gateway_url" mapstructure:"gateway_url"`
PublicKey string `json:"public_key" mapstructure:"public_key"`
IMAPServer string `json:"imap_server" mapstructure:"imap_server"`
VerificationRequired bool `json:"verification_required" mapstructure:"verification_required"`
}
type ChannelType ¶
type ChannelType string
const ( ChannelWhatsApp ChannelType = "whatsapp" ChannelEmail ChannelType = "email" ChannelSignal ChannelType = "signal" ChannelTelegram ChannelType = "telegram" ChannelX ChannelType = "x" ChannelBluesky ChannelType = "bluesky" )
type ChannelsConfig ¶
type ChannelsConfig struct {
WhatsApp ChannelConfig `json:"whatsapp" mapstructure:"whatsapp"`
Email ChannelConfig `json:"email" mapstructure:"email"`
Signal ChannelConfig `json:"signal" mapstructure:"signal"`
Telegram ChannelConfig `json:"telegram" mapstructure:"telegram"`
X ChannelConfig `json:"x" mapstructure:"x"`
Bluesky ChannelConfig `json:"bluesky" mapstructure:"bluesky"`
GuestAccess GuestAccessConfig `json:"guest_access" mapstructure:"guest_access"`
A2AEnabled bool `json:"a2aEnabled" mapstructure:"a2a_enabled"`
TrustedKeys []TrustedKey `json:"trustedKeys" mapstructure:"trusted_keys"`
}
type Collection ¶
type Collection struct {
SourceEntity *LoadedEntity
TargetEntity *LoadedEntity
LinkAttribute *LoadedAttribute
}
type Comment ¶
type Comment struct {
Id string `json:"id" mapstructure:"id"`
EntityName string `json:"entityName" mapstructure:"entityName"`
RecordId int64 `json:"recordId" mapstructure:"recordId"`
CreatedBy string `json:"createdBy" mapstructure:"createdBy"`
Content string `json:"content" mapstructure:"content"`
Parent *string `json:"parent" mapstructure:"parent"`
Mention *string `json:"mention" mapstructure:"mention"`
PublishedAt *time.Time `json:"publishedAt" mapstructure:"publishedAt"`
CreatedAt time.Time `json:"createdAt" mapstructure:"createdAt"`
UpdatedAt time.Time `json:"updatedAt" mapstructure:"updatedAt"`
}
type DatabaseProvider ¶
type DatabaseProvider string
const ( Postgres DatabaseProvider = "Postgres" MySQL DatabaseProvider = "MySQL" SQLite DatabaseProvider = "SQLite" SQLServer DatabaseProvider = "SQLServer" )
type EngagementCount ¶
type EngagementCount struct {
Id int64 `json:"id" mapstructure:"id"`
EntityName string `json:"entityName" mapstructure:"entityName"`
RecordId string `json:"recordId" mapstructure:"recordId"`
EngagementType string `json:"engagementType" mapstructure:"engagementType"`
Count int64 `json:"count" mapstructure:"count"`
CreatedAt time.Time `json:"createdAt" mapstructure:"createdAt"`
UpdatedAt time.Time `json:"updatedAt" mapstructure:"updatedAt"`
}
type EngagementStatus ¶
type EngagementStatus struct {
Id int64 `json:"id" mapstructure:"id"`
EntityName string `json:"entityName" mapstructure:"entityName"`
RecordId string `json:"recordId" mapstructure:"recordId"`
EngagementType string `json:"engagementType" mapstructure:"engagementType"`
UserId string `json:"userId" mapstructure:"userId"`
IsActive bool `json:"isActive" mapstructure:"isActive"`
Title string `json:"title" mapstructure:"title"`
Url string `json:"url" mapstructure:"url"`
Image string `json:"image" mapstructure:"image"`
Subtitle string `json:"subtitle" mapstructure:"subtitle"`
PublishedAt *time.Time `json:"publishedAt" mapstructure:"publishedAt"`
CreatedAt time.Time `json:"createdAt" mapstructure:"createdAt"`
UpdatedAt time.Time `json:"updatedAt" mapstructure:"updatedAt"`
}
type Entity ¶
type Entity struct {
Attributes []Attribute `json:"attributes"`
Name string `json:"name"`
DisplayName string `json:"displayName"`
TableName string `json:"tableName"`
LabelAttributeName string `json:"labelAttributeName"`
PrimaryKey string `json:"primaryKey"`
DefaultPageSize int `json:"defaultPageSize"`
DefaultPublicationStatus PublicationStatus `json:"defaultPublicationStatus"`
PageUrl string `json:"pageUrl"`
TagsQuery string `json:"tagsQuery"`
TagsQueryParam string `json:"tagsQueryParam"`
TitleTagField string `json:"titleTagField"`
SubtitleTagField string `json:"subtitleTagField"`
ContentTagField string `json:"contentTagField"`
ImageTagField string `json:"imageTagField"`
PublishTimeTagField string `json:"publishTimeTagField"`
}
func (*Entity) SelectQuery ¶
func (e *Entity) SelectQuery(builder squirrel.StatementBuilderType) squirrel.SelectBuilder
func (*Entity) ToLoadedEntity ¶
func (e *Entity) ToLoadedEntity() *LoadedEntity
type GuestAccessConfig ¶
type ImageCompressionOptions ¶
type Junction ¶
type Junction struct {
JunctionEntity *LoadedEntity
TargetEntity *LoadedEntity
SourceEntity *LoadedEntity
SourceAttribute *LoadedAttribute
TargetAttribute *LoadedAttribute
}
type LoadedAttribute ¶
type LoadedAttribute struct {
Attribute
TableName string
Junction *Junction
Lookup *Lookup
Collection *Collection
}
type LoadedEntity ¶
type LoadedEntity struct {
Entity
LoadedAttributes []LoadedAttribute
PrimaryKeyAttribute LoadedAttribute
LabelAttribute LoadedAttribute
DeletedAttribute LoadedAttribute
PublicationStatusAttribute LoadedAttribute
UpdatedAtAttribute LoadedAttribute
}
type LocalFileStoreOptions ¶
type Lookup ¶
type Lookup struct {
TargetEntity *LoadedEntity
}
type MCPConfig ¶
type MCPConfig struct {
Enabled bool `json:"enabled" mapstructure:"enabled"`
APIKeys []APIKeyConfig `json:"apiKeys" mapstructure:"api_keys"`
}
type Notification ¶
type Notification struct {
Id int64 `json:"id" mapstructure:"id"`
UserId string `json:"userId" mapstructure:"user_id"`
SenderId string `json:"senderId" mapstructure:"sender_id"`
ActionType string `json:"actionType" mapstructure:"action_type"`
MessageType string `json:"messageType" mapstructure:"message_type"`
Message string `json:"message" mapstructure:"message"`
Url string `json:"url" mapstructure:"url"`
IsRead bool `json:"isRead" mapstructure:"is_read"`
CreatedAt time.Time `json:"createdAt" mapstructure:"created_at"`
UpdatedAt time.Time `json:"updatedAt" mapstructure:"updated_at"`
}
type PageArchitecture ¶
type PageArchitecture struct {
Sections *json.RawMessage `json:"sections"`
SelectedQueries []SelectedQuery `json:"selectedQueries"`
ArchitectureHints *string `json:"architectureHints"`
ComponentInstructions *json.RawMessage `json:"componentInstructions"`
}
type PageMetadata ¶
type PageMetadata struct {
Architecture *PageArchitecture `json:"architecture"`
EnableVisitTrack *bool `json:"enableVisitTrack"`
Components *json.RawMessage `json:"components"`
UserInput *string `json:"userInput"`
TemplateId *string `json:"templateId"`
CustomHeader *string `json:"customHeader"`
}
type PublicationStatus ¶
type PublicationStatus string
const ( Draft PublicationStatus = "Draft" Published PublicationStatus = "Published" Unpublished PublicationStatus = "Unpublished" Scheduled PublicationStatus = "Scheduled" )
type Query ¶
type Query struct {
Name string `json:"name"`
EntityName string `json:"entityName"`
Source string `json:"source"`
Filters []datamodels.Filter `json:"filters"`
Sorts []datamodels.Sort `json:"sorts"`
Variables []Variable `json:"variables"`
Distinct bool `json:"distinct"`
IdeUrl string `json:"ideUrl"`
Pagination *datamodels.Pagination `json:"pagination"`
}
type RouteOptions ¶
type Schema ¶
type Schema struct {
Id int64 `json:"id" mapstructure:"id"`
SchemaId string `json:"schemaId" mapstructure:"schemaId"`
Name string `json:"name" mapstructure:"name"`
Type SchemaType `json:"type" mapstructure:"type"`
Settings *SchemaSettings `json:"settings" mapstructure:"settings"`
Description string `json:"description" mapstructure:"description"`
IsLatest bool `json:"isLatest" mapstructure:"isLatest"`
PublicationStatus PublicationStatus `json:"publicationStatus" mapstructure:"publicationStatus"`
CreatedAt time.Time `json:"createdAt" mapstructure:"createdAt"`
CreatedBy string `json:"createdBy" mapstructure:"createdBy"`
Deleted bool `json:"deleted" mapstructure:"deleted"`
}
func RecordToSchema ¶
type SchemaSettings ¶
type SchemaType ¶
type SchemaType string
const ( MenuSchema SchemaType = "Menu" EntitySchema SchemaType = "Entity" QuerySchema SchemaType = "Query" PageSchema SchemaType = "Page" )
type SelectedQuery ¶
type SystemSettings ¶
type SystemSettings struct {
MapCmsHomePage bool `json:"mapCmsHomePage"`
GraphQlPath string `json:"graphQlPath"`
EntitySchemaExpiration time.Duration `json:"entitySchemaExpiration"`
PageSchemaExpiration time.Duration `json:"pageSchemaExpiration"`
QuerySchemaExpiration time.Duration `json:"querySchemaExpiration"`
ImageCompression ImageCompressionOptions `json:"imageCompression"`
RouteOptions RouteOptions `json:"routeOptions"`
DatabaseProvider DatabaseProvider `json:"databaseProvider"`
ReplicaCount int `json:"replicaCount"`
KnownPaths []string `json:"knownPaths"`
LocalFileStoreOptions LocalFileStoreOptions `json:"localFileStoreOptions"`
FileSignature map[string][][]byte `json:"fileSignature"`
}
func DefaultSystemSettings ¶
func DefaultSystemSettings() *SystemSettings
type TrustedKey ¶
type User ¶
type User struct {
Id int64 `json:"id" mapstructure:"id"`
Email string `json:"email" mapstructure:"email"`
PasswordHash string `json:"-" mapstructure:"password_hash"`
Roles []string `json:"roles" mapstructure:"roles"`
RolesDetails []Role `json:"rolesDetails,omitempty"`
DefaultRoleId *int64 `json:"defaultRoleId,omitempty" mapstructure:"default_role_id"`
AvatarPath string `json:"avatarPath" mapstructure:"avatar_path"`
Channels []UserChannel `json:"channels,omitempty" mapstructure:"channels"`
CreatedAt time.Time `json:"createdAt" mapstructure:"created_at"`
UpdatedAt time.Time `json:"updatedAt" mapstructure:"updated_at"`
}
type UserChannel ¶
type UserChannel struct {
Id int64 `json:"id" mapstructure:"id"`
UserId int64 `json:"userId" mapstructure:"user_id"`
AgentID string `json:"agentId" mapstructure:"agent_id"` // A2A Agent ID
ChannelType ChannelType `json:"channelType" mapstructure:"channel_type"`
Identifier string `json:"identifier" mapstructure:"identifier"`
IsAuthenticated bool `json:"isAuthenticated" mapstructure:"is_authenticated"`
Metadata string `json:"metadata" mapstructure:"metadata"` // JSON string
CreatedAt time.Time `json:"createdAt" mapstructure:"created_at"`
UpdatedAt time.Time `json:"updatedAt" mapstructure:"updated_at"`
}
Click to show internal directories.
Click to hide internal directories.