Documentation
¶
Index ¶
- Constants
- func CreatePluginTables(ctx context.Context, db *sql.DB, dialect string, owner string, ...) error
- func DropPluginTables(ctx context.Context, db *sql.DB, dialect string, owner string, ...) error
- func InitializeSchema(ctx context.Context, db *sql.DB, driver string) error
- func LimitOffset(d Dialect, limit, offset int) (string, []any)
- func PluginTableName(owner, name string) string
- func Rebind(d Dialect, query string) string
- func UpsertOptionSQL(d Dialect) string
- type AttachmentMeta
- type Comment
- type Content
- type Dialect
- type Field
- type Meta
- type Option
- type Relationship
- type Revision
- type Stats
- type User
Constants ¶
View Source
const ( ContentTypePost = "post" ContentTypePage = "page" ContentTypeAttach = "attachment" ContentStatusPost = "publish" ContentStatusDraft = "draft" )
View Source
const CurrentSchemaVersion = 1
Variables ¶
This section is empty.
Functions ¶
func CreatePluginTables ¶
func DropPluginTables ¶
func PluginTableName ¶
func UpsertOptionSQL ¶
Types ¶
type AttachmentMeta ¶
type AttachmentMeta struct {
Name string `json:"name"`
Path string `json:"path"`
URL string `json:"url"`
Size int64 `json:"size"`
Type string `json:"type"`
MIME string `json:"mime"`
Description string `json:"description,omitempty"`
IsImage bool `json:"isImage"`
Width int `json:"width"`
Height int `json:"height"`
}
type Content ¶
type Content struct {
CID int64
Title string
Slug string
SlugID int64
Created int64
Modified int64
Text string
SortOrder int64
AuthorID int64
Template string
Type string
Status string
Password string
CommentsNum int64
AllowComment string
AllowPing string
AllowFeed string
Parent int64
DraftOf int64
}
func (Content) ModifiedAt ¶
type Relationship ¶
Click to show internal directories.
Click to hide internal directories.