Versions in this module Expand all Collapse all v2 v2.3.0 Sep 19, 2021 Changes in this version + func Env(envName string, defaultValue string) (value string) + func H3hash(s string) string + func JSONBind(c *gin.Context, ret interface{}) bool + func PackagePath() string + func PostBind(c *gin.Context, ret interface{}) bool + func Wait() + type GroupsList struct + func (g *GroupsList) Add(name string, actions ...string) + func (g *GroupsList) Get(names ...string) (actions []string) + type LangQ struct + Lang string + Q float64 + type Menu struct + Link string + Order int + Parent *Menu + Title string + func (m *Menu) Add(title string, order ...int) *Menu + type Module struct + Collection *mgo.Collection + Settings *ModuleSettings + func (m *Module) Ajax(c *gin.Context) + func (m *Module) GetSettings() *ModuleSettings + func (m *Module) Page(c *gin.Context) + func (m *Module) Websockets(c *gin.Context) + type ModuleList struct + func (m *ModuleList) Get(name string) (module Simple, exists bool) + func (m *ModuleList) GetList() map[string]Simple + type ModuleSettings struct + AjaxRouteName string + AjaxRouterGroup *gin.RouterGroup + CollectionName string + DisableAuth bool + GroupTitle string + GroupTo Simple + Icon string + Menu *Menu + MenuOrder int + MenuTitle string + Name string + OriginTemplate bool + PageRouteName string + Rights Rights + RouterGroup *gin.RouterGroup + SocketsRouteName string + TemplateName string + Title string + WsRouterGroup *gin.RouterGroup + type NotifyStruct struct + Created uint + Deleted bool + Demo bool + ID uint64 + Text string + Title string + Updated uint + UserID uint64 + type Panel struct + AI ai.AI + DropMenu *Menu + Groups *GroupsList + MainMenu *Menu + Modules *ModuleList + RootMenu *Menu + Users *Users + func Create(s Settings) *Panel + func (panel *Panel) AddModule(settings *ModuleSettings, s Simple) Simple + func (panel *Panel) AddOpenPage(name string, title string, menu *Menu, originTemplate ...bool) Simple + func (panel *Panel) AddPage(name string, title string, menu *Menu, originTemplate ...bool) Simple + func (panel *Panel) Run() + type Rights struct + Actions []string + Groups []string + type Settings struct + AICollection string + AuthPrefix string + AuthSalt string + AuthSkipIP bool + CSS []string + DBName string + Debug bool + DefaultPage string + DelayStart bool + DisableAuth bool + DisableFirstStart bool + Engine *gin.Engine + Files string + FirstStart func() + HashCookieFn func(login, password, authSalt, ip, userAgent string) string + HashDBFn func(login, password, authSalt string) string + JS []string + MakeEngineFn func(*gin.Engine) + MakeRouterGroupFn func(*gin.RouterGroup) + NotifyCollection string + Path string + Port uint + RouterGroup *gin.RouterGroup + TFuncMap template.FuncMap + Title string + UsersCollection string + Vars map[string]interface{} + Views string + ViewsDoT string + type Simple interface + Ajax func(c *gin.Context) + GetSettings func() *ModuleSettings + Page func(c *gin.Context) + Websockets func(c *gin.Context) + type Users struct + func UsersFarm(DBName, UsersCollection, AuthSalt string, AICollection ...string) *Users + func (u *Users) Add(user UsersStruct) error + func (u *Users) AddFrom(data interface{}) (uint64, error) + func (u *Users) CacheLength() int + func (u *Users) Clear(id uint64, login string) + func (u *Users) Get(id uint64) (user *UsersStruct, exists bool) + func (u *Users) GetByLogin(login string) (user *UsersStruct, exists bool) + func (u *Users) GetByLoginTo(login string, user interface{}) (exists bool) + func (u *Users) GetDummyUser() *UsersStruct + func (u *Users) GetFromContextTo(c *gin.Context, user interface{}) (exists bool) + func (u *Users) GetTo(id uint64, user interface{}) (exists bool) + func (u *Users) Length() int + func (u *Users) LoadUser(id uint64) + func (u *Users) Save(user *UsersStruct) error + func (u *Users) SaveFrom(data interface{}) error + func (u *Users) Validate(user *UsersStruct) error + type UsersStruct struct + Created int64 + Deleted bool + Demo bool + Disabled bool + Email string + ID uint64 + IP uint32 + Lang string + LastIP uint32 + Loaded int64 + Login string + Name string + Notice string + Password string + Password2 string + Rights Rights + Root bool + Settings map[string]interface{} + StringIP string + Updated int64 Other modules containing this package github.com/night-codes/summer