Documentation ¶
Index ¶
- func Delete(id string, w *wrapper.Wrapper) error
- func GetById(i string, v interface{}, w *wrapper.Wrapper) error
- func GetElement(b bson.M, v interface{}, w *wrapper.Wrapper) error
- func GetValidElement(i string, c string, v interface{}, w *wrapper.Wrapper) error
- func Save(id bson.ObjectId, v interface{}, w *wrapper.Wrapper) error
- func SlugDeleteAllChild(id string, w *wrapper.Wrapper) error
- func WrapperDeleteAllChild(id string, w *wrapper.Wrapper) error
- type ContentElement
- type ContentValues
- type Element
- type MenuElement
- type MenuItem
- type SlugElement
- type WrapperElement
- type WrapperElements
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetElement ¶
Query one element
func GetValidElement ¶
Get one element by id and controller path, most common query because you should validate your controller against the id
Types ¶
type ContentElement ¶
type ContentElement struct { ContentValues `bson:"controller_values" json:"content"` Element `bson:",inline"` }
func LoadContentElement ¶
func LoadContentElement(i string, w *wrapper.Wrapper) (ContentElement, error)
func NewContentElement ¶
func NewContentElement() ContentElement
type ContentValues ¶
type Element ¶
type Element struct { MongoId bson.ObjectId `bson:"_id,omitempty" json:"mongolarid"` Controller string `bson:"controller" json:"mongolartype"` Template string `bson:"template,omitempty" json:"mongolartemplate"` DynamicId string `bson:"dynamic_id,omitempty" json:"mongolardyn,omitempty"` Title string `bson:"title" json:"title"` Classes string `bson:"classes" json:"mongolarclasses,omitempty"` }
The designated structure for all elements
func LoadElement ¶
Constructor for existing paths
type MenuElement ¶
type MenuElement struct { MenuItems []MenuItem `bson:"controller_values" json:"menu_items"` Element `bson:",inline" json:"-"` }
func LoadMenuElement ¶
func LoadMenuElement(i string, w *wrapper.Wrapper) (MenuElement, error)
func NewMenuElement ¶
func NewMenuElement() MenuElement
type SlugElement ¶
type SlugElement struct { Slugs map[string]string `bson:"controller_values"` Element `bson:"_,inline"` }
func LoadSlugElement ¶
func LoadSlugElement(i string, w *wrapper.Wrapper) (SlugElement, error)
func NewSlugElement ¶
func NewSlugElement() SlugElement
type WrapperElement ¶
type WrapperElement struct { WrapperElements `bson:"controller_values" json:"content"` Element `bson:",inline"` }
func LoadWrapperElement ¶
func LoadWrapperElement(i string, w *wrapper.Wrapper) (WrapperElement, error)
func NewWrapperElement ¶
func NewWrapperElement() WrapperElement
type WrapperElements ¶
type WrapperElements struct {
Elements []string `bson:"elements" json:"elements"`
}
func NewWrapperElements ¶
func NewWrapperElements() WrapperElements
Click to show internal directories.
Click to hide internal directories.