Documentation ¶
Index ¶
- func Build(backend db.Backend, app kit.App, integerIds bool)
- func BuildMigrations(b db.MigrationBackend, app kit.App) []db.Migration
- type BaseTag
- type Comment
- type CommentIntId
- type CommentResource
- type CommentStrId
- type Location
- type LocationIntId
- type LocationStrId
- type Menu
- type MenuIntId
- type MenuItem
- type MenuItemIntId
- type MenuItemResource
- type MenuItemStrId
- type MenuResource
- type MenuStrId
- type Page
- type PageComponent
- type PageComponentIntId
- type PageComponentStrId
- type PageIntId
- type PageResource
- func (PageResource) AllowFind(res kit.Resource, obj kit.Model, user kit.User) bool
- func (PageResource) ApiAlterQuery(res kit.Resource, query db.Query, r kit.Request) apperror.Error
- func (PageResource) BeforeDelete(res kit.Resource, obj kit.Model, user kit.User) apperror.Error
- func (PageResource) BeforeUpdate(res kit.Resource, obj, oldobj kit.Model, user kit.User) apperror.Error
- func (PageResource) Methods(res kit.Resource) []kit.Method
- type PageStrId
- type TagIntId
- type TagStrId
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildMigrations ¶
Types ¶
type BaseTag ¶
type BaseTag struct { Tag string `db:"required;max:100;index;unique-with:Group"` Group string `db:"required;max:100;index"` }
func (*BaseTag) Collection ¶
type Comment ¶
type Comment struct { db.TimeStampedModel Type string `db:"required;max:200;"` Title string `db:"max:255"` Comment string `db:"required"` }
func (*Comment) Collection ¶
type CommentIntId ¶
type CommentIntId struct { db.IntIdModel Comment }
type CommentResource ¶
type CommentResource struct { }
type CommentStrId ¶
type CommentStrId struct { db.StrIdModel Comment }
type Location ¶
type Location struct { Name string `db:"max:200"` Description string `db:"max:1000"` Comments string `db:"max:1000"` Country string `db:"min:2;max:2;"` PostalCode string `db:"max:100;"` State string `db:"max:100;"` Locality string `db:"max:255;"` Street string `db:"max:500"` StreetNumber string `db:"max:100"` Top string `db:"max:100"` FormattedAddress string `db:"max:300":` Point *db.Point }
func (*Location) Collection ¶
type LocationIntId ¶
type LocationIntId struct { db.IntIdModel Location }
type LocationStrId ¶
type LocationStrId struct { db.StrIdModel Location }
type Menu ¶
type Menu struct { // Internal identifier for the menu Name string `db:"required;unique;index;max:200;` // Language this menu is in. Language string `db:"required;min:2;max:2"` // Readable title for the menu. Title string `db:"required;max:250"` // Optional menu description. Description string `db:"max:500"` }
func (*Menu) Collection ¶
type MenuIntId ¶
type MenuIntId struct { db.IntIdModel Menu TranslatedMenu *MenuIntId TranslatedMenuId uint64 Items []*MenuItemIntId `db:"belongs-to:Id:MenuId"` }
type MenuItem ¶
type MenuItem struct { // Internal name for the menu item. Name string `db:"required;max:200;unique-with:MenuId"` // Optinal description for admins. Description string // Enabled specifies if the item should be shown. Enabled bool // Whether this item does not actually link to anything but acts as a placeholder. IsPlaceholder bool // The title that should be rendered. Title string `db:"required;max:250"` // Url this item links to. Url string `db:"max:2000"` // Route for this item. // Use this instead of url if you use a routing system. Route string `db:"max:100"` // Route arguments, separated by ;. RouteArgs string `db:"max:1000"` // Used for sorting. Weight int `db:"required"` }
func (*MenuItem) Collection ¶
type MenuItemIntId ¶
type MenuItemIntId struct { db.IntIdModel MenuItem Menu *MenuIntId MenuId uint64 `db:"required"` Parent *MenuItemIntId ParentId uint64 Children []*MenuItemIntId `db:"belongs-to:Id:ParentId"` }
type MenuItemResource ¶
type MenuItemResource struct {
resources.AdminResource
}
type MenuItemStrId ¶
type MenuItemStrId struct { db.StrIdModel MenuItem Menu *MenuStrId MenuId string `db:"max:200;required"` Parent *MenuItemStrId ParentId string `db:"max:200"` Children []*MenuItemStrId `db:"belongs-to:Id:ParentId"` }
type MenuResource ¶
type MenuResource struct {
resources.AdminResource
}
type MenuStrId ¶
type MenuStrId struct { db.StrIdModel Menu TranslatedMenu *MenuStrId TranslatedMenuId string `db:"max:200"` Items []*MenuItemStrId `db:"belongs-to:Id:MenuId"` }
type Page ¶
type Page struct { // CreatedAt and UpdatedAt. db.TimeStampedModel Published bool PublishedAt time.Time // Internal title. Name string `db:"required;max:200"` // Type of the page, like "blog post" Type string `db:"required;max:200"` Language string `db:"required;min:2;max:2"` // Public title. Title string `db:"required;max:200"` // Slug. Slug string `db:"required;max:250"` // Summary for lists. ListSummary string // Summary for top of the page, seo, etc. Summary string // Layout to use to display the page. Layout string `db:"max:255"` // The actual content. Content string `db:"required;"` }
func (Page) Collection ¶
type PageComponent ¶
type PageComponent struct { // Component type. Type string `db:"max:255;required"` // Explicative name for the content. Name string `db:"required"` // Data for the component. Data string `db:""` // Weight for sorting. Weight int // Whether to show the component. Enabled bool }
func (PageComponent) Collection ¶
func (PageComponent) Collection() string
type PageComponentIntId ¶
type PageComponentIntId struct { db.IntIdModel PageComponent PageId uint64 `db:"required"` Files []*files.FileIntId `db:"m2m:pages_component_files"` }
type PageComponentStrId ¶
type PageComponentStrId struct { db.StrIdModel PageComponent PageId string `db:"required"` Files []*files.FileStrId `db:"m2m:pages_component_files"` }
type PageIntId ¶
type PageIntId struct { db.IntIdModel users.IntUserModel Page MenuItem *MenuItemIntId MenuItemId uint64 TranslatedPage *PageIntId TranslatedPageId string `db:"max:200"` Files []*files.FileIntId `db:"m2m:pages_files"` // Tags. Tags []*TagIntId `db:"m2m:pages_tags"` // Components. Components []*PageComponentIntId `db:"belongs-to:Id:PageId"` }
type PageResource ¶
type PageResource struct {
resources.UserResource
}
func (PageResource) ApiAlterQuery ¶
func (PageResource) BeforeDelete ¶
func (PageResource) BeforeUpdate ¶
type PageStrId ¶
type PageStrId struct { db.StrIdModel users.StrUserModel Page MenuItem *MenuItemStrId MenuItemId string `db:"max:200"` TranslatedPage *PageStrId TranslatedPageId string `db:"max:200"` Files []*files.FileStrId `db:"m2m:pages_files"` // Tags. Tags []*TagStrId `db:"m2m:pages_tags"` // Components. Components []*PageComponentStrId `db:"belongs-to:Id:PageId"` }
type TagIntId ¶
type TagIntId struct { db.IntIdModel BaseTag }
type TagStrId ¶
type TagStrId struct { db.StrIdModel BaseTag }
Click to show internal directories.
Click to hide internal directories.